blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 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
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4f098ef27158409b81ac9721cb4213cc95be16a4 | 73bcc34c2caf59d816342ec6caa06f3e5945c841 | /cloud-storage/onedrive/api/src/java/org/sakaiproject/onedrive/model/OneDriveFile.java | 6e6d7821d06e44604d5ad37a3e48c33d30cb18b0 | [
"ECL-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-1.0-or-later",
"LicenseRef-scancode-generic-cla"
] | permissive | dagasonhackason/sakai | c5a548ff57d83eeb9602ec41dc08af95b5a64b09 | 9362e735a083d20fbd38b839232bc51ef7254b34 | refs/heads/master | 2020-11-26T16:56:43.275523 | 2019-12-19T19:36:53 | 2019-12-19T19:36:53 | 229,138,278 | 1 | 0 | ECL-2.0 | 2019-12-19T21:03:05 | 2019-12-19T21:03:05 | null | UTF-8 | Java | false | false | 300 | java | package org.sakaiproject.onedrive.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter @Setter
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class OneDriveFile {
public String mimeType;
}
| [
"[email protected]"
] | |
b27d237fab326e7619d7efb4f005c3bacb2a2c11 | 35e6c56c26889ca794c535038091f7d04626c2de | /src/main/java/com/bookHouse/api/CollectionService.java | b672f2bebed97d049793dbef99b86a1f1b6c1a6b | [] | no_license | ranyq/just_test | db1a03393824d7904805114714a957277b00d612 | a6790d0d7a7bfc5f714ef65df7c238c2ba8dca7b | refs/heads/master | 2020-05-03T18:51:34.678047 | 2019-05-13T10:12:28 | 2019-05-13T10:12:28 | 178,772,518 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 420 | java | package com.bookHouse.api;
import com.bookHouse.domain.Collection;
import com.bookHouse.domain.User;
import java.util.List;
import java.util.Map;
public interface CollectionService {
void addCollection(Collection collection);
List<Collection> selectByCondition(Collection collection);
List<Collection> selectByConditionWithPage(Map<String,Object> param);
int deleteCollection(int userId,int bookId);
} | [
"[email protected]"
] | |
25d902aa27f48dfcaa3f171ce371f402bd87f7f6 | 19e4b4fa8ee6670bef460472325bdc9c2e0c8117 | /src/main/java/com/ait/tooling/nativetools/client/collection/NFastIntegerDictionary.java | 941c0a589420439a85741a879a71c64d49db8863 | [
"Apache-2.0"
] | permissive | romartin/ahome-tooling-nativetools | b39a45d1ec476eb9f59e273f7a6741038c862c0a | e38ffdc990bfdc2b2d05d6c795312f2e12259665 | refs/heads/master | 2020-12-26T02:20:55.704562 | 2016-02-06T23:43:48 | 2016-02-06T23:43:48 | 54,660,676 | 0 | 0 | null | 2016-03-24T17:23:06 | 2016-03-24T17:23:06 | null | UTF-8 | Java | false | false | 1,305 | java | /*
Copyright (c) 2014,2015,2016 Ahome' Innovation Technologies. 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.ait.tooling.nativetools.client.collection;
public final class NFastIntegerDictionary extends NFastPrimitiveDictionaryBase<NFastIntegerDictionaryJSO>
{
public NFastIntegerDictionary(final NFastIntegerDictionaryJSO jso)
{
super((null == jso) ? NFastIntegerDictionaryJSO.make() : jso);
}
public NFastIntegerDictionary()
{
super(NFastIntegerDictionaryJSO.make());
}
public final NFastIntegerDictionary put(final String name, final int value)
{
getJSO().put(name, value);
return this;
}
public final int get(final String name)
{
return getJSO().get(name);
}
}
| [
"[email protected]"
] | |
430e5408d21445d952231bcb91d55e46ab61a755 | 16b8a46c6d6d380719c61d5e1a3f2729460ac5c0 | /src/main/java/com/jlu/github/service/IGitHubCommitService.java | 3dbd36510e4dd1546afb1b86835f1523d5b5cc43 | [] | no_license | lihang011614/CIHome | 97afa12b1c7255b923f7307b6ca8eb92ab3bade1 | 14cd1b8553dc6a2cbcae7035b5da38f489285c24 | refs/heads/master | 2020-08-02T08:33:53.834420 | 2019-09-27T10:03:35 | 2019-09-27T10:03:35 | 211,290,209 | 0 | 0 | null | 2019-09-27T10:01:17 | 2019-09-27T10:01:17 | null | UTF-8 | Java | false | false | 437 | java | package com.jlu.github.service;
import com.jlu.github.model.GitHubCommit;
/**
* Created by niuwanpeng on 17/4/25.
*/
public interface IGitHubCommitService {
/**
* save
* @param gitHubCommit
*/
void save(GitHubCommit gitHubCommit);
/**
* 根据pipelinId获得代码提交信息
* @param pipelineBuildId
* @return
*/
GitHubCommit getGithubCommitByPipelineId(int pipelineBuildId);
}
| [
"[email protected]"
] | |
19a2d90a86eb19fc09e57c87f053410eb4fd7113 | 29102350c740342c9e6acbc69539f0b25510411c | /fullbasketballweb/src/main/java/com/finalBasketballWeb/fullbasketballweb/service/PlayerService.java | fbf8705f8d146f51b38330ab468c74cb0dd58843 | [] | no_license | cocan4/basketball | 969e7bd726a5c40ee7f7192494f0fcd701d4ca9a | 469fff869aee48c24f4d083e96ad991f30a0804a | refs/heads/master | 2022-12-20T17:05:39.636412 | 2020-09-26T09:14:21 | 2020-09-26T09:14:21 | 298,775,863 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 822 | java | package com.finalBasketballWeb.fullbasketballweb.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.finalBasketballWeb.fullbasketballweb.beans.Player;
import com.finalBasketballWeb.fullbasketballweb.repo.PlayerRepo;
@Service
public class PlayerService {
@Autowired
private PlayerRepo playerRepo;
public void addPlayers(Player player) {
playerRepo.save(player);
}
public void updatePlayers(Player player) {
playerRepo.saveAndFlush(player);
}
public void deletePlayers(Player player) {
playerRepo.delete(player);
}
public List<Player> getAllPlayers(){
return playerRepo.findAll();
}
public Player getTeam(int id) {
return playerRepo.getOne(id);
}
}
| [
"[email protected]"
] | |
15dfdc3309c400eb0f018e98010eb5128051442a | 2fd6b2e8888cf78ab3940793c00771c791abcab9 | /drug_manage_api/src/test/java/com/jk/DrugManageApiApplicationTests.java | 1cbbbfe0a0eb104dc04b2661e8a81eb5e0fb9228 | [] | no_license | xiayuliao11/drug | f0c490102042d12dfca8c6122b8b8b09798e1e28 | 64ecad863917ea173878a104f9763c2655df73ac | refs/heads/master | 2020-04-27T15:51:20.071410 | 2019-03-23T07:15:24 | 2019-03-23T07:15:24 | 174,263,586 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 339 | java | package com.jk;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class DrugManageApiApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"[email protected]"
] | |
06b0d1c3dd8ffb1201202700296b06a0867593eb | d438d50deb981be61c50cd788cfe24d7ea23ec00 | /sfs-server/src/main/java/swordfishsync/controllers/TorrentController.java | a7d9d3e0b2738914d78b51c7734803296363099d | [] | no_license | jsloane/SwordfishSync | 60b8129a94048e1b3599cc892bde894f67149f2b | 0b49bd926cc816dfc7a6c4af640bf2532f2f6fbf | refs/heads/master | 2023-04-28T07:14:18.886056 | 2023-04-15T01:47:04 | 2023-04-15T01:47:04 | 10,736,853 | 0 | 0 | null | 2023-04-15T01:47:06 | 2013-06-17T12:29:55 | Java | UTF-8 | Java | false | false | 3,134 | java | package swordfishsync.controllers;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
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.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import swordfishsync.domain.TorrentState;
import swordfishsync.exceptions.TorrentClientException;
import swordfishsync.model.TorrentDetails;
import swordfishsync.service.TorrentClientService;
import swordfishsync.service.TorrentStateService;
import swordfishsync.service.dto.TorrentDto;
@RestController
@RequestMapping("/api")
public class TorrentController {
private final Logger log = LoggerFactory.getLogger(TorrentController.class);
@Resource
TorrentStateService torrentStateService;
@Resource
TorrentClientService torrentClientService;
@RequestMapping(value = "/torrents/torrentStatesByStatus", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<Page<TorrentDto>> getTorrentsByStatuses(@RequestParam List<String> statuses, Pageable pageable) {
List<TorrentState.Status> torrentStateStatuses = new ArrayList<TorrentState.Status>();
for (String status : statuses) {
switch (status) {
case "downloading":
torrentStateStatuses.add(TorrentState.Status.IN_PROGRESS);
break;
case "notified":
torrentStateStatuses.add(TorrentState.Status.NOTIFIED_NOT_ADDED);
break;
case "completed":
torrentStateStatuses.add(TorrentState.Status.COMPLETED);
torrentStateStatuses.add(TorrentState.Status.NOTIFY_COMPLETED);
break;
default:
break;
}
}
Page<TorrentDto> page = torrentStateService.getTorrentStatesByStatuses(torrentStateStatuses, pageable);
return new ResponseEntity<Page<TorrentDto>>(page, HttpStatus.OK);
}
@RequestMapping(value = "/torrents/clientTorrents", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<List<TorrentDetails>> getClientTorrents() {
List<TorrentDetails> torrents = null;
try {
torrents = torrentClientService.getAllTorrents();
} catch (TorrentClientException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
}
return new ResponseEntity<List<TorrentDetails>>(torrents, HttpStatus.OK);
}
@RequestMapping(value = "/torrents/purgeInProgress", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void purgeTorrents() {
torrentStateService.purgeTorrentStates(Arrays.asList(TorrentState.Status.IN_PROGRESS));
}
}
| [
"[email protected]"
] | |
cca287b7b0ad1e6c09ba2f3fdedda31b4e3b1c6e | be4fd9e90b9a81df014ac18a86f44e6417777a93 | /src/main/java/org/broadinstitute/hellbender/engine/ReferenceMemorySource.java | e3295580d160226943ddcb4aa6756180c9b4f0dc | [] | no_license | AriesLL/PipeGATK | eb55fb2959e4c03762cd47719f175a732db76679 | e5ecbf1695b95c0397757ab4e8935d3e1b738000 | refs/heads/master | 2020-12-24T21:01:09.049479 | 2016-06-04T09:56:47 | 2016-06-04T09:56:47 | 59,696,900 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,425 | java | package org.broadinstitute.hellbender.engine;
import htsjdk.samtools.SAMSequenceDictionary;
import htsjdk.samtools.reference.ReferenceSequence;
import org.broadinstitute.hellbender.exceptions.GATKException;
import org.broadinstitute.hellbender.utils.SimpleInterval;
import org.broadinstitute.hellbender.utils.Utils;
import org.broadinstitute.hellbender.utils.fasta.CachingIndexedFastaSequenceFile;
import org.broadinstitute.hellbender.utils.iterators.ByteArrayIterator;
import org.broadinstitute.hellbender.utils.reference.ReferenceBases;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
/**
* Manages traversals and queries over in-memory reference data.
*
* Supports targeted queries over the reference by interval, but does not
* yet support complete iteration over the entire reference.
*/
public final class ReferenceMemorySource implements ReferenceDataSource {
private final ReferenceBases bases;
private final SAMSequenceDictionary sequenceDictionary;
/**
* Initialize this data source using ReferenceBases and corresponding sequence dictionary.
*/
public ReferenceMemorySource(final ReferenceBases bases, final SAMSequenceDictionary referenceSequenceDictionary) {
this.bases = Utils.nonNull(bases);
this.sequenceDictionary = referenceSequenceDictionary;
}
/**
* Start an iteration over the entire reference. Not yet supported!
*
* See the BaseUtils class for guidance on how to work with bases in this format.
*
* @return iterator over all bases in this reference
*/
@Override
public Iterator<Byte> iterator() {
throw new UnsupportedOperationException("Iteration over entire reference not yet implemented");
}
/**
* Query a specific interval on this reference, and get back an iterator over the bases spanning that interval.
*
* See the BaseUtils class for guidance on how to work with bases in this format.
*
* @param interval query interval
* @return iterator over the bases spanning the query interval
*/
@Override
public Iterator<Byte> query( final SimpleInterval interval ) {
int startIndex = (interval.getStart() - bases.getInterval().getStart());
int stopIndex = startIndex + interval.size();
return new ByteArrayIterator(bases.getBases(), startIndex, stopIndex);
}
/**
* Query a specific interval on this reference, and get back all bases spanning that interval at once.
* Call getBases() on the returned ReferenceSequence to get the actual reference bases. See the BaseUtils
* class for guidance on how to work with bases in this format.
*
* @param interval query interval
* @return a ReferenceSequence containing all bases spanning the query interval, prefetched
*/
@Override
public ReferenceSequence queryAndPrefetch( final SimpleInterval interval ) {
return queryAndPrefetch(interval.getContig(), interval.getStart(), interval.getEnd());
}
/**
* Query a specific interval on this reference, and get back all bases spanning that interval at once.
* Call getBases() on the returned ReferenceSequence to get the actual reference bases. See the BaseUtils
* class for guidance on how to work with bases in this format.
*
* @param contig query interval contig
* @param start query interval start
* @param stop query interval stop (included)
* @return a ReferenceSequence containing all bases spanning the query interval, prefetched
*/
@Override
public ReferenceSequence queryAndPrefetch( final String contig, final long start , final long stop) {
final int contigIndex = sequenceDictionary.getSequenceIndex(contig);
int startIndex = (int)(start - bases.getInterval().getStart());
int length = (int)(stop - start + 1);
byte[] basesBytes = bases.getBases();
if (startIndex==0 && length==basesBytes.length) {
// special case: no need to make a copy
return new ReferenceSequence(contig, contigIndex, basesBytes);
}
if (startIndex<0) {
throw new IllegalArgumentException("Asking for start "+start+" on contig "+contig+" but the ReferenceData only has data starting at "+bases.getInterval().getStart());
}
if (startIndex>=basesBytes.length) {
throw new IllegalArgumentException("Asking for start "+start+" on contig "+contig+" but the ReferenceData only has data until "+bases.getInterval().getEnd());
}
if (startIndex+length>basesBytes.length) {
throw new IllegalArgumentException("Asking for stop "+stop+" on contig "+contig+" but the ReferenceData only has data until "+bases.getInterval().getEnd());
}
if (length<0) {
throw new IllegalArgumentException("Asking for stop<start ("+stop+"<"+start+")");
}
return new ReferenceSequence(contig, contigIndex, Arrays.copyOfRange(basesBytes, startIndex, startIndex+length));
}
/**
* Get the sequence dictionary for this reference
*
* @return SAMSequenceDictionary for this reference
*/
@Override
public SAMSequenceDictionary getSequenceDictionary() {
return sequenceDictionary;
}
/**
* no-op (nothing's open)
*/
@Override
public void close() {}
}
| [
"[email protected]"
] | |
95cf0493c5cf6e685d98268f08f3d3c9ca8669a7 | 875b00b5082a326b96005d8dcc7b9a1dd5d44679 | /src/com/qht/builder/AirShip.java | b28b32e093d2de1c4daaaa23c37e970794fa002f | [] | no_license | 54linxiu/gof23 | 8c6472506fd9b79b2adf1c4741a93f4e4f3360ba | 5dcf729fba08dc6715877f81bffea3df3a185275 | refs/heads/master | 2022-11-05T12:31:00.838207 | 2020-06-19T07:02:58 | 2020-06-19T07:02:58 | 273,421,820 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,333 | java | package com.qht.builder;
/**
* 宇宙飞船 创建者模式
* @author q
*
*/
public class AirShip {
private OrbitalModule orbitalModule;//轨道仓
private Engine engine;//发动机
private EscapeTower escapeTower;//逃逸仓
public OrbitalModule getOrbitalModule() {
return orbitalModule;
}
public void setOrbitalModule(OrbitalModule orbitalModule) {
this.orbitalModule = orbitalModule;
}
public Engine getEngine() {
return engine;
}
public void setEngine(Engine engine) {
this.engine = engine;
}
public EscapeTower getEscapeTower() {
return escapeTower;
}
public void setEscapeTower(EscapeTower escapeTower) {
this.escapeTower = escapeTower;
}
}
class OrbitalModule{
private String name;
public OrbitalModule(String name) {
super();
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
class Engine{
private String name;
public Engine(String name) {
super();
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
class EscapeTower{
private String name;
public EscapeTower(String name) {
super();
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} | [
"[email protected]"
] | |
c2e5ce0c8d50794d8d32f2a9e7f60e25c9da4a13 | 5598faaaaa6b3d1d8502cbdaca903f9037d99600 | /code_changes/Apache_projects/YARN-24/b7442bf92eb6e1ae64a0f9644ffc2eee4597aad5/~CommonNodeLabelsManager.java | 2796fb610e6e3e41e157ba7358f52e9d9de749db | [] | no_license | SPEAR-SE/LogInBugReportsEmpirical_Data | 94d1178346b4624ebe90cf515702fac86f8e2672 | ab9603c66899b48b0b86bdf63ae7f7a604212b29 | refs/heads/master | 2022-12-18T02:07:18.084659 | 2020-09-09T16:49:34 | 2020-09-09T16:49:34 | 286,338,252 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 24,994 | java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.nodelabels;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.service.AbstractService;
import org.apache.hadoop.yarn.api.records.NodeId;
import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.yarn.event.AsyncDispatcher;
import org.apache.hadoop.yarn.event.Dispatcher;
import org.apache.hadoop.yarn.event.EventHandler;
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import org.apache.hadoop.yarn.nodelabels.event.StoreNewClusterNodeLabels;
import org.apache.hadoop.yarn.nodelabels.event.NodeLabelsStoreEvent;
import org.apache.hadoop.yarn.nodelabels.event.NodeLabelsStoreEventType;
import org.apache.hadoop.yarn.nodelabels.event.RemoveClusterNodeLabels;
import org.apache.hadoop.yarn.nodelabels.event.UpdateNodeToLabelsMappingsEvent;
import org.apache.hadoop.yarn.util.resource.Resources;
import com.google.common.collect.ImmutableSet;
public class CommonNodeLabelsManager extends AbstractService {
protected static final Log LOG = LogFactory.getLog(CommonNodeLabelsManager.class);
private static final int MAX_LABEL_LENGTH = 255;
public static final Set<String> EMPTY_STRING_SET = Collections
.unmodifiableSet(new HashSet<String>(0));
public static final String ANY = "*";
public static final Set<String> ACCESS_ANY_LABEL_SET = ImmutableSet.of(ANY);
private static final Pattern LABEL_PATTERN = Pattern
.compile("^[0-9a-zA-Z][0-9a-zA-Z-_]*");
public static final int WILDCARD_PORT = 0;
/**
* If a user doesn't specify label of a queue or node, it belongs
* DEFAULT_LABEL
*/
public static final String NO_LABEL = "";
protected Dispatcher dispatcher;
protected ConcurrentMap<String, Label> labelCollections =
new ConcurrentHashMap<String, Label>();
protected ConcurrentMap<String, Host> nodeCollections =
new ConcurrentHashMap<String, Host>();
protected final ReadLock readLock;
protected final WriteLock writeLock;
protected NodeLabelsStore store;
protected static class Label {
private Resource resource;
protected Label() {
this.resource = Resource.newInstance(0, 0);
}
public Resource getResource() {
return this.resource;
}
}
/**
* A <code>Host</code> can have multiple <code>Node</code>s
*/
protected static class Host {
public Set<String> labels;
public Map<NodeId, Node> nms;
protected Host() {
labels =
Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
nms = new ConcurrentHashMap<NodeId, Node>();
}
public Host copy() {
Host c = new Host();
c.labels = new HashSet<String>(labels);
for (Entry<NodeId, Node> entry : nms.entrySet()) {
c.nms.put(entry.getKey(), entry.getValue().copy());
}
return c;
}
}
protected static class Node {
public Set<String> labels;
public Resource resource;
public boolean running;
protected Node() {
labels = null;
resource = Resource.newInstance(0, 0);
running = false;
}
public Node copy() {
Node c = new Node();
if (labels != null) {
c.labels =
Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
c.labels.addAll(labels);
} else {
c.labels = null;
}
c.resource = Resources.clone(resource);
c.running = running;
return c;
}
}
private final class ForwardingEventHandler implements
EventHandler<NodeLabelsStoreEvent> {
@Override
public void handle(NodeLabelsStoreEvent event) {
handleStoreEvent(event);
}
}
// Dispatcher related code
protected void handleStoreEvent(NodeLabelsStoreEvent event) {
try {
switch (event.getType()) {
case ADD_LABELS:
StoreNewClusterNodeLabels storeNewClusterNodeLabelsEvent =
(StoreNewClusterNodeLabels) event;
store.storeNewClusterNodeLabels(storeNewClusterNodeLabelsEvent
.getLabels());
break;
case REMOVE_LABELS:
RemoveClusterNodeLabels removeClusterNodeLabelsEvent =
(RemoveClusterNodeLabels) event;
store.removeClusterNodeLabels(removeClusterNodeLabelsEvent.getLabels());
break;
case STORE_NODE_TO_LABELS:
UpdateNodeToLabelsMappingsEvent updateNodeToLabelsMappingsEvent =
(UpdateNodeToLabelsMappingsEvent) event;
store.updateNodeToLabelsMappings(updateNodeToLabelsMappingsEvent
.getNodeToLabels());
break;
}
} catch (IOException e) {
LOG.error("Failed to store label modification to storage");
throw new YarnRuntimeException(e);
}
}
public CommonNodeLabelsManager() {
super(CommonNodeLabelsManager.class.getName());
ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
readLock = lock.readLock();
writeLock = lock.writeLock();
}
// for UT purpose
protected void initDispatcher(Configuration conf) {
// create async handler
dispatcher = new AsyncDispatcher();
AsyncDispatcher asyncDispatcher = (AsyncDispatcher) dispatcher;
asyncDispatcher.init(conf);
asyncDispatcher.setDrainEventsOnStop();
}
@Override
protected void serviceInit(Configuration conf) throws Exception {
initNodeLabelStore(conf);
labelCollections.put(NO_LABEL, new Label());
}
protected void initNodeLabelStore(Configuration conf) throws Exception {
this.store = new FileSystemNodeLabelsStore(this);
this.store.init(conf);
this.store.recover();
}
// for UT purpose
protected void startDispatcher() {
// start dispatcher
AsyncDispatcher asyncDispatcher = (AsyncDispatcher) dispatcher;
asyncDispatcher.start();
}
@Override
protected void serviceStart() throws Exception {
// init dispatcher only when service start, because recover will happen in
// service init, we don't want to trigger any event handling at that time.
initDispatcher(getConfig());
if (null != dispatcher) {
dispatcher.register(NodeLabelsStoreEventType.class,
new ForwardingEventHandler());
}
startDispatcher();
}
// for UT purpose
protected void stopDispatcher() {
AsyncDispatcher asyncDispatcher = (AsyncDispatcher) dispatcher;
asyncDispatcher.stop();
}
@Override
protected void serviceStop() throws Exception {
// finalize store
stopDispatcher();
// only close store when we enabled store persistent
if (null != store) {
store.close();
}
}
/**
* Add multiple node labels to repository
*
* @param labels
* new node labels added
*/
@SuppressWarnings("unchecked")
public void addToCluserNodeLabels(Set<String> labels) throws IOException {
if (null == labels || labels.isEmpty()) {
return;
}
Set<String> newLabels = new HashSet<String>();
labels = normalizeLabels(labels);
// do a check before actual adding them, will throw exception if any of them
// doesn't meet label name requirement
for (String label : labels) {
checkAndThrowLabelName(label);
}
for (String label : labels) {
// shouldn't overwrite it to avoid changing the Label.resource
if (this.labelCollections.get(label) == null) {
this.labelCollections.put(label, new Label());
newLabels.add(label);
}
}
if (null != dispatcher && !newLabels.isEmpty()) {
dispatcher.getEventHandler().handle(
new StoreNewClusterNodeLabels(newLabels));
}
LOG.info("Add labels: [" + StringUtils.join(labels.iterator(), ",") + "]");
}
protected void checkAddLabelsToNode(
Map<NodeId, Set<String>> addedLabelsToNode) throws IOException {
if (null == addedLabelsToNode || addedLabelsToNode.isEmpty()) {
return;
}
// check all labels being added existed
Set<String> knownLabels = labelCollections.keySet();
for (Entry<NodeId, Set<String>> entry : addedLabelsToNode.entrySet()) {
if (!knownLabels.containsAll(entry.getValue())) {
String msg =
"Not all labels being added contained by known "
+ "label collections, please check" + ", added labels=["
+ StringUtils.join(entry.getValue(), ",") + "]";
LOG.error(msg);
throw new IOException(msg);
}
}
}
@SuppressWarnings("unchecked")
protected void internalAddLabelsToNode(
Map<NodeId, Set<String>> addedLabelsToNode) throws IOException {
// do add labels to nodes
Map<NodeId, Set<String>> newNMToLabels =
new HashMap<NodeId, Set<String>>();
for (Entry<NodeId, Set<String>> entry : addedLabelsToNode.entrySet()) {
NodeId nodeId = entry.getKey();
Set<String> labels = entry.getValue();
createHostIfNonExisted(nodeId.getHost());
if (nodeId.getPort() == WILDCARD_PORT) {
Host host = nodeCollections.get(nodeId.getHost());
host.labels.addAll(labels);
newNMToLabels.put(nodeId, host.labels);
} else {
createNodeIfNonExisted(nodeId);
Node nm = getNMInNodeSet(nodeId);
if (nm.labels == null) {
nm.labels = new HashSet<String>();
}
nm.labels.addAll(labels);
newNMToLabels.put(nodeId, nm.labels);
}
}
if (null != dispatcher) {
dispatcher.getEventHandler().handle(
new UpdateNodeToLabelsMappingsEvent(newNMToLabels));
}
// shows node->labels we added
LOG.info("addLabelsToNode:");
for (Entry<NodeId, Set<String>> entry : newNMToLabels.entrySet()) {
LOG.info(" NM=" + entry.getKey() + ", labels=["
+ StringUtils.join(entry.getValue().iterator(), ",") + "]");
}
}
/**
* add more labels to nodes
*
* @param addedLabelsToNode node -> labels map
*/
public void addLabelsToNode(Map<NodeId, Set<String>> addedLabelsToNode)
throws IOException {
addedLabelsToNode = normalizeNodeIdToLabels(addedLabelsToNode);
checkAddLabelsToNode(addedLabelsToNode);
internalAddLabelsToNode(addedLabelsToNode);
}
protected void checkRemoveFromClusterNodeLabels(
Collection<String> labelsToRemove) throws IOException {
if (null == labelsToRemove || labelsToRemove.isEmpty()) {
return;
}
// Check if label to remove doesn't existed or null/empty, will throw
// exception if any of labels to remove doesn't meet requirement
for (String label : labelsToRemove) {
label = normalizeLabel(label);
if (label == null || label.isEmpty()) {
throw new IOException("Label to be removed is null or empty");
}
if (!labelCollections.containsKey(label)) {
throw new IOException("Node label=" + label
+ " to be removed doesn't existed in cluster "
+ "node labels collection.");
}
}
}
@SuppressWarnings("unchecked")
protected void internalRemoveFromClusterNodeLabels(Collection<String> labelsToRemove) {
// remove labels from nodes
for (String nodeName : nodeCollections.keySet()) {
Host host = nodeCollections.get(nodeName);
if (null != host) {
host.labels.removeAll(labelsToRemove);
for (Node nm : host.nms.values()) {
if (nm.labels != null) {
nm.labels.removeAll(labelsToRemove);
}
}
}
}
// remove labels from node labels collection
for (String label : labelsToRemove) {
labelCollections.remove(label);
}
// create event to remove labels
if (null != dispatcher) {
dispatcher.getEventHandler().handle(
new RemoveClusterNodeLabels(labelsToRemove));
}
LOG.info("Remove labels: ["
+ StringUtils.join(labelsToRemove.iterator(), ",") + "]");
}
/**
* Remove multiple node labels from repository
*
* @param labelsToRemove
* node labels to remove
* @throws IOException
*/
public void removeFromClusterNodeLabels(Collection<String> labelsToRemove)
throws IOException {
labelsToRemove = normalizeLabels(labelsToRemove);
checkRemoveFromClusterNodeLabels(labelsToRemove);
internalRemoveFromClusterNodeLabels(labelsToRemove);
}
protected void checkRemoveLabelsFromNode(
Map<NodeId, Set<String>> removeLabelsFromNode) throws IOException {
// check all labels being added existed
Set<String> knownLabels = labelCollections.keySet();
for (Entry<NodeId, Set<String>> entry : removeLabelsFromNode.entrySet()) {
NodeId nodeId = entry.getKey();
Set<String> labels = entry.getValue();
if (!knownLabels.containsAll(labels)) {
String msg =
"Not all labels being removed contained by known "
+ "label collections, please check" + ", removed labels=["
+ StringUtils.join(labels, ",") + "]";
LOG.error(msg);
throw new IOException(msg);
}
Set<String> originalLabels = null;
boolean nodeExisted = false;
if (WILDCARD_PORT != nodeId.getPort()) {
Node nm = getNMInNodeSet(nodeId);
if (nm != null) {
originalLabels = nm.labels;
nodeExisted = true;
}
} else {
Host host = nodeCollections.get(nodeId.getHost());
if (null != host) {
originalLabels = host.labels;
nodeExisted = true;
}
}
if (!nodeExisted) {
String msg =
"Try to remove labels from NM=" + nodeId
+ ", but the NM doesn't existed";
LOG.error(msg);
throw new IOException(msg);
}
// the labels will never be null
if (labels.isEmpty()) {
continue;
}
// originalLabels may be null,
// because when a Node is created, Node.labels can be null.
if (originalLabels == null || !originalLabels.containsAll(labels)) {
String msg =
"Try to remove labels = [" + StringUtils.join(labels, ",")
+ "], but not all labels contained by NM=" + nodeId;
LOG.error(msg);
throw new IOException(msg);
}
}
}
@SuppressWarnings("unchecked")
protected void internalRemoveLabelsFromNode(
Map<NodeId, Set<String>> removeLabelsFromNode) {
// do remove labels from nodes
Map<NodeId, Set<String>> newNMToLabels =
new HashMap<NodeId, Set<String>>();
for (Entry<NodeId, Set<String>> entry : removeLabelsFromNode.entrySet()) {
NodeId nodeId = entry.getKey();
Set<String> labels = entry.getValue();
if (nodeId.getPort() == WILDCARD_PORT) {
Host host = nodeCollections.get(nodeId.getHost());
host.labels.removeAll(labels);
newNMToLabels.put(nodeId, host.labels);
} else {
Node nm = getNMInNodeSet(nodeId);
if (nm.labels != null) {
nm.labels.removeAll(labels);
newNMToLabels.put(nodeId, nm.labels);
}
}
}
if (null != dispatcher) {
dispatcher.getEventHandler().handle(
new UpdateNodeToLabelsMappingsEvent(newNMToLabels));
}
// shows node->labels we added
LOG.info("removeLabelsFromNode:");
for (Entry<NodeId, Set<String>> entry : newNMToLabels.entrySet()) {
LOG.info(" NM=" + entry.getKey() + ", labels=["
+ StringUtils.join(entry.getValue().iterator(), ",") + "]");
}
}
/**
* remove labels from nodes, labels being removed most be contained by these
* nodes
*
* @param removeLabelsFromNode node -> labels map
*/
public void
removeLabelsFromNode(Map<NodeId, Set<String>> removeLabelsFromNode)
throws IOException {
removeLabelsFromNode = normalizeNodeIdToLabels(removeLabelsFromNode);
checkRemoveLabelsFromNode(removeLabelsFromNode);
internalRemoveLabelsFromNode(removeLabelsFromNode);
}
protected void checkReplaceLabelsOnNode(
Map<NodeId, Set<String>> replaceLabelsToNode) throws IOException {
if (null == replaceLabelsToNode || replaceLabelsToNode.isEmpty()) {
return;
}
// check all labels being added existed
Set<String> knownLabels = labelCollections.keySet();
for (Entry<NodeId, Set<String>> entry : replaceLabelsToNode.entrySet()) {
if (!knownLabels.containsAll(entry.getValue())) {
String msg =
"Not all labels being replaced contained by known "
+ "label collections, please check" + ", new labels=["
+ StringUtils.join(entry.getValue(), ",") + "]";
LOG.error(msg);
throw new IOException(msg);
}
}
}
@SuppressWarnings("unchecked")
protected void internalReplaceLabelsOnNode(
Map<NodeId, Set<String>> replaceLabelsToNode) throws IOException {
// do replace labels to nodes
Map<NodeId, Set<String>> newNMToLabels = new HashMap<NodeId, Set<String>>();
for (Entry<NodeId, Set<String>> entry : replaceLabelsToNode.entrySet()) {
NodeId nodeId = entry.getKey();
Set<String> labels = entry.getValue();
createHostIfNonExisted(nodeId.getHost());
if (nodeId.getPort() == WILDCARD_PORT) {
Host host = nodeCollections.get(nodeId.getHost());
host.labels.clear();
host.labels.addAll(labels);
newNMToLabels.put(nodeId, host.labels);
} else {
createNodeIfNonExisted(nodeId);
Node nm = getNMInNodeSet(nodeId);
if (nm.labels == null) {
nm.labels = new HashSet<String>();
}
nm.labels.clear();
nm.labels.addAll(labels);
newNMToLabels.put(nodeId, nm.labels);
}
}
if (null != dispatcher) {
dispatcher.getEventHandler().handle(
new UpdateNodeToLabelsMappingsEvent(newNMToLabels));
}
// shows node->labels we added
LOG.info("setLabelsToNode:");
for (Entry<NodeId, Set<String>> entry : newNMToLabels.entrySet()) {
LOG.info(" NM=" + entry.getKey() + ", labels=["
+ StringUtils.join(entry.getValue().iterator(), ",") + "]");
}
}
/**
* replace labels to nodes
*
* @param replaceLabelsToNode node -> labels map
*/
public void replaceLabelsOnNode(Map<NodeId, Set<String>> replaceLabelsToNode)
throws IOException {
replaceLabelsToNode = normalizeNodeIdToLabels(replaceLabelsToNode);
checkReplaceLabelsOnNode(replaceLabelsToNode);
internalReplaceLabelsOnNode(replaceLabelsToNode);
}
/**
* Get mapping of nodes to labels
*
* @return nodes to labels map
*/
public Map<NodeId, Set<String>> getNodeLabels() {
try {
readLock.lock();
Map<NodeId, Set<String>> nodeToLabels =
new HashMap<NodeId, Set<String>>();
for (Entry<String, Host> entry : nodeCollections.entrySet()) {
String hostName = entry.getKey();
Host host = entry.getValue();
for (NodeId nodeId : host.nms.keySet()) {
Set<String> nodeLabels = getLabelsByNode(nodeId);
if (nodeLabels == null || nodeLabels.isEmpty()) {
continue;
}
nodeToLabels.put(nodeId, nodeLabels);
}
if (!host.labels.isEmpty()) {
nodeToLabels
.put(NodeId.newInstance(hostName, WILDCARD_PORT), host.labels);
}
}
return Collections.unmodifiableMap(nodeToLabels);
} finally {
readLock.unlock();
}
}
/**
* Get existing valid labels in repository
*
* @return existing valid labels in repository
*/
public Set<String> getClusterNodeLabels() {
try {
readLock.lock();
Set<String> labels = new HashSet<String>(labelCollections.keySet());
labels.remove(NO_LABEL);
return Collections.unmodifiableSet(labels);
} finally {
readLock.unlock();
}
}
private void checkAndThrowLabelName(String label) throws IOException {
if (label == null || label.isEmpty() || label.length() > MAX_LABEL_LENGTH) {
throw new IOException("label added is empty or exceeds "
+ MAX_LABEL_LENGTH + " character(s)");
}
label = label.trim();
boolean match = LABEL_PATTERN.matcher(label).matches();
if (!match) {
throw new IOException("label name should only contains "
+ "{0-9, a-z, A-Z, -, _} and should not started with {-,_}"
+ ", now it is=" + label);
}
}
protected String normalizeLabel(String label) {
if (label != null) {
return label.trim();
}
return NO_LABEL;
}
private Set<String> normalizeLabels(Collection<String> labels) {
Set<String> newLabels = new HashSet<String>();
for (String label : labels) {
newLabels.add(normalizeLabel(label));
}
return newLabels;
}
protected Node getNMInNodeSet(NodeId nodeId) {
return getNMInNodeSet(nodeId, nodeCollections);
}
protected Node getNMInNodeSet(NodeId nodeId, Map<String, Host> map) {
return getNMInNodeSet(nodeId, map, false);
}
protected Node getNMInNodeSet(NodeId nodeId, Map<String, Host> map,
boolean checkRunning) {
Host host = map.get(nodeId.getHost());
if (null == host) {
return null;
}
Node nm = host.nms.get(nodeId);
if (null == nm) {
return null;
}
if (checkRunning) {
return nm.running ? nm : null;
}
return nm;
}
protected Set<String> getLabelsByNode(NodeId nodeId) {
return getLabelsByNode(nodeId, nodeCollections);
}
protected Set<String> getLabelsByNode(NodeId nodeId, Map<String, Host> map) {
Host host = map.get(nodeId.getHost());
if (null == host) {
return EMPTY_STRING_SET;
}
Node nm = host.nms.get(nodeId);
if (null != nm && null != nm.labels) {
return nm.labels;
} else {
return host.labels;
}
}
protected void createNodeIfNonExisted(NodeId nodeId) throws IOException {
Host host = nodeCollections.get(nodeId.getHost());
if (null == host) {
throw new IOException("Should create host before creating node.");
}
Node nm = host.nms.get(nodeId);
if (null == nm) {
host.nms.put(nodeId, new Node());
}
}
protected void createHostIfNonExisted(String hostName) {
Host host = nodeCollections.get(hostName);
if (null == host) {
host = new Host();
nodeCollections.put(hostName, host);
}
}
protected Map<NodeId, Set<String>> normalizeNodeIdToLabels(
Map<NodeId, Set<String>> nodeIdToLabels) {
Map<NodeId, Set<String>> newMap = new HashMap<NodeId, Set<String>>();
for (Entry<NodeId, Set<String>> entry : nodeIdToLabels.entrySet()) {
NodeId id = entry.getKey();
Set<String> labels = entry.getValue();
newMap.put(id, normalizeLabels(labels));
}
return newMap;
}
}
| [
"[email protected]"
] | |
9221c60842a1fce2e9bfcf6fe3efa0a12ea8feba | 8a5c4fed881352b3e559f6a5d54beaab83d57920 | /src/Origins/Monster.java | ccbdbcf797183bc267e80cbbe73adae543e39ed6 | [] | no_license | Blackdread/Origins | 587681972a87f50b2386c6963882c12e4b85e4eb | 5de79807eae38e5e083a20b306b0bde8ab3f844d | refs/heads/master | 2016-09-05T13:18:28.330733 | 2015-12-06T04:44:51 | 2015-12-06T04:44:51 | 14,828,840 | 0 | 0 | null | null | null | null | MacCentralEurope | Java | false | false | 14,333 | java | package Origins;
import org.lwjgl.Sys;
/**
* Classe des unités
* @author Yoann CAPLAIN
* @version 1.0
*/
public class Monster {
private double deltaX;
private double deltaY;
private double x;
private double y;
private int destX;
private int destY;
private int vie;
private int mana;
private int kills;
private int dmg;
private int metamorphose;
private boolean moveAttack; // Bouge en gérant IA
private boolean tenirPos;
private long lastAttack; // Temps de la derniere attaque (voir si avec un compte de loop ou temps générale)
public static int nbreUnite = 0;
public static int nbreNain = 0;
public static int nbreFantassin = 0;
public static int nbreMinautaure = 0;
public static int nbreArcher = 0;
public static int nbreCentaure = 0;
public static int nbreMage = 0;
// ID unique pour chaque monstre
public static int IDincrement=0;
private int id;
// ID unique de l'unité attaquer et verifier si c tjr a portee sinon voir si y a une autre cible ą côté
@SuppressWarnings("unused")
private int idCible;
//*****************************************************************************************
// CONSTRUCTEURS
//*****************************************************************************************
/** Default constructor */
public Monster(int x, int y/*, int camp*/){
this.x = x;
this.y = y;
this.vie = 100;
this.mana = 100;
this.kills = 0;
this.metamorphose = 0;
this.dmg = 15;
//this.camp = camp;
this.moveAttack = false;
this.tenirPos = false;
this.lastAttack = getTime();
//checkKill(kills);
changeVitesse();
Monster.nbreUnite++;
Monster.nbreNain++;
Monster.IDincrement++;
this.id = IDincrement;
checkStaticInt();
}
public Monster(int x, int y/*, int camp*/, int metamor){
this.x = x;
this.y = y;
this.vie = 100;
this.mana = 100;
this.kills = 0;
this.metamorphose = metamor;
incrementNbType();
changeMetamor(metamor);
this.mana = 100; // Mis pour remettre a bloc car soustrait pile avant
//this.camp = camp;
this.moveAttack = false;
this.tenirPos = false;
this.lastAttack = getTime();
//checkKill(kills);
changeVitesse();
Monster.nbreUnite++;
Monster.IDincrement++;
this.id = IDincrement;
checkStaticInt();
}
public Monster(int x, int y/*, int camp*/, int metamor, int xx, int yy){
this.x = x;
this.y = y;
changeDestination(xx,yy);
//this.destX = xx;
//this.destY = yy;
this.vie = 100;
this.mana = 100;
this.kills = 0;
this.metamorphose = metamor;
incrementNbType();
changeMetamor(metamor);
this.mana = 100;
//this.camp = camp;
this.moveAttack = false;
this.tenirPos = false;
this.lastAttack = getTime();
//checkKill(kills);
Monster.nbreUnite++;
Monster.IDincrement++;
this.id = IDincrement;
checkStaticInt();
}
public Monster(int x, int y/*, int camp*/, int metamor, int xx, int yy, boolean MoveAttack){
this.x = x;
this.y = y;
changeDestination(xx,yy);
//this.destX = xx;
//this.destY = yy;
this.vie = 100;
this.mana = 100;
this.kills = 0;
this.metamorphose = metamor;
incrementNbType();
changeMetamor(metamor);
this.mana = 100;
//this.camp = camp;
this.moveAttack = MoveAttack; // ICI LA DIFFERENCE
this.tenirPos = false;
this.lastAttack = getTime();
//checkKill(kills);
Monster.nbreUnite++;
Monster.IDincrement++;
this.id = IDincrement;
checkStaticInt();
}
// Constructeur d'unité de l'ennemie
/** Enemy constructor, id is given by player 1 */
public Monster(int x, int y, int id2, int metamor, int xx, int yy, boolean MoveAttack){
this.x = x;
this.y = y;
changeDestination(xx,yy);
//this.destX = xx;
//this.destY = yy;
this.vie = 100;
this.mana = 100;
this.kills = 0;
this.metamorphose = metamor;
incrementNbType();
changeMetamor(metamor);
this.mana = 100;
//this.camp = camp;
this.moveAttack = MoveAttack; // ICI LA DIFFERENCE
this.tenirPos = false;
this.lastAttack = getTime();
//checkKill(kills);
Monster.nbreUnite++;
Monster.IDincrement++;
this.id = id2;
checkStaticInt();
}
//*****************************************************************************************
// MUTATEURS
//*****************************************************************************************
public void setX(double x) {
this.x = x;
}
public void setY(double y) {
this.y = y;
}
public void setDeltaX(double x) {
this.deltaX = x;
}
public void setDeltaY(double y) {
this.deltaY = y;
}
public void setVie(int vie) {
this.vie = vie;
}
/** Decrement life of the unit, there is not + damage (+ -> - & - -> -)*/
public void setDmgSurUnit(int d){
if(d <= 0)
this.vie+= d;
else
this.vie-= d;
}
public void setMana(int mana) {
this.mana += mana;
}
public void setKills() {
this.kills++;
checkKill(getKills());
}
public void setDmg(int dmg) {
this.dmg = dmg;
}
public void setMetamor(int metamor) {
this.metamorphose = metamor;
}
public void setLastAttack(long lastAtt) {
this.lastAttack = lastAtt;
}
public void setTenirPos(boolean pos){
this.tenirPos = pos;
}
public void setMoveAttack(boolean move){
this.moveAttack = move;
}
public void setId(int id){
this.id = id;
}
//*****************************************************************************************
// ACCESSEURS
//*****************************************************************************************
public double getDeltaX(){
return deltaX;
}
public double getDeltaY(){
return deltaY;
}
public double getX() {
return x;
}
public double getY() {
return y;
}
public int getDestX(){
return destX;
}
public int getDestY(){
return destY;
}
public int getVie() {
return vie;
}
public int getMana() {
return mana;
}
public int getKills() {
return kills;
}
public int getDmg() {
return dmg;
}
/*public int getCamp() {
return camp;
}*/
public int getMetamor() {
return metamorphose;
}
public boolean getMoveAttack(){
return moveAttack;
}
public long getLastAttack(){
return lastAttack;
}
public boolean getTenirPos(){
return tenirPos;
}
public int getId(){
return id;
}
//*****************************************************************************************
// METHODES
//*****************************************************************************************
/** Move monster depending his deltaX and deltaY */
public void moveMonster(){
if(Math.abs(this.x - this.destX) <= 2)//{
deltaX=0;
/*System.out.println("deltaX MIS A 0");
}//*/
if(Math.abs(this.y - this.destY) <= 2)//{
deltaY=0;
/*System.out.println("deltaY MIS A 0");
}//*/
if(this.deltaX != 0 || this.deltaY != 0) // J'AI CHANGE EN || MAIS AVANT SA MARCHAIT AVEC &&, JUSTE POUR TEST, CAR IL SE PEUT QU'ILS SOIENT SUR LE MEME X MAIS PAS MEME Y
//if(this.x != this.destX || this.y != this.destY){
if(this.x > this.destX && this.deltaX > 0)
this.x -= this.deltaX;
else if(this.x > this.destX && this.deltaX < 0)
this.x += this.deltaX;
else if(x < this.destX && this.deltaX > 0)
this.x += this.deltaX;
if(this.y > this.destY && this.deltaY < 0)
this.y += deltaY;
else if(this.y < this.destY && this.deltaY > 0)
this.y += deltaY;
//}
//System.out.println("deltaX "+this.deltaX+" et "+this.deltaY+" et "+this.destX+" et "+this.destY);
}
/** Augment mana, max is 100 except for 5 -> 150 */
public void augmenteMana(){
switch(getMetamor()){
case 0:
setMana(9);
if(getMana() > 100)
this.mana = 100;
break;
case 1:
setMana(5);
if(getMana() > 100)
this.mana = 100;
break;
case 2:
setMana(6);
if(getMana() > 100)
this.mana = 100;
break;
case 3:
setMana(3);
if(getMana() > 100)
this.mana = 100;
break;
case 4:
setMana(3);
if(getMana() > 100)
this.mana = 100;
break;
case 5:
setMana(4);
if(getMana() > 150)
this.mana = 150;
break;
default:
setMana(2);
break;
}
}
/**
* Change metamorphose
*
* @return true if possible
*/
public boolean changeMetamor(int metamor){
/*
* Metamor = 0 -> Unités de base deplacement moyenne nain
* Metamor = 1 -> Unités de corps ą corps deplacement rapide fantasin
* Metamor = 2 -> Unités de corp ą corps avancée deplacement rapide minotaure
* Metamor = 3 -> Unités de distance faible deplacement lent archer
* Metamor = 4 -> Unités de de distance avancée deplacement moyenne centaure
* Metamor = 5 -> Unités de distance de zone deplacement lent mage
*/
checkStaticInt();
switch(metamor){
case 0:
if(this.mana >= 60){
setVie(100);
setDmg(15);
setMana(-60);
decrementNbType();
setMetamor(metamor);
Monster.nbreNain++;
killRestore();
}else
return false;
break;
case 1:
if(this.mana >= 50){
setVie(90);
setDmg(22);
setMana(-50);
decrementNbType();
setMetamor(metamor);
Monster.nbreFantassin++;
killRestore();
break;
}else
return false;
case 2:
if(this.mana >= 50){
setVie(160);
setDmg(33);
setMana(-50);
decrementNbType();
setMetamor(metamor);
Monster.nbreMinautaure++;
killRestore();
break;
}else
return false;
case 3:
if(this.mana >= 50){
setVie(130);
setDmg(25);
setMana(-80);
decrementNbType();
setMetamor(metamor);
Monster.nbreArcher++;
killRestore();
break;
}else
return false;
case 4:
if(this.mana >= 80){
setVie(200);
setDmg(40);
setMana(-80);
decrementNbType();
setMetamor(metamor);
Monster.nbreCentaure++;
killRestore();
break;
}else
return false;
case 5:
if(this.mana >= 90){
setVie(100);
setDmg(50);
setMana(-90);
decrementNbType();
setMetamor(metamor);
Monster.nbreMage++;
killRestore();
break;
}else
return false;
default:
if(this.mana >= 60){
setMetamor(0);
setVie(100);
setDmg(15);
setMana(-60);
Monster.nbreNain++;
killRestore();
}else
return false;
}
//checkKill(getKills());
return true;
}
public void decrementNbType(){
switch(this.metamorphose){
case 0:
Monster.nbreNain--;
break;
case 1:
Monster.nbreFantassin--;
break;
case 2:
Monster.nbreMinautaure--;
break;
case 3:
Monster.nbreArcher--;
break;
case 4:
Monster.nbreCentaure--;
break;
case 5:
Monster.nbreMage--;
break;
}
}
public void incrementNbType(){
switch(this.metamorphose){
case 0:
Monster.nbreNain++;
break;
case 1:
Monster.nbreFantassin++;
break;
case 2:
Monster.nbreMinautaure++;
break;
case 3:
Monster.nbreArcher++;
break;
case 4:
Monster.nbreCentaure++;
break;
case 5:
Monster.nbreMage++;
break;
}
}
/** Change speed depending on metamorphose */
public void changeVitesse(){
switch(this.metamorphose){
case 0:
this.deltaX *= 2.0f;
this.deltaY *= 2.0f;
break;
case 1:
this.deltaX *= 1.5f;
this.deltaY *= 1.5f;
break;
case 2:
this.deltaX *= 3.0f;
this.deltaY *= 3.0f;
break;
case 3:
this.deltaX *= 2.5f;
this.deltaY *= 2.5f;
break;
case 4:
this.deltaX *= 3.5f;
this.deltaY *= 3.5f;
break;
case 5:
this.deltaX *= 0.9f;
this.deltaY *= 0.9f;
break;
default:
//this.deltaX *= 1.0f;
//this.deltaY *= 1.0f;
break;
}
}
/** Change deltaX and deltaY */
public void changeDestination(int xx, int yy){
this.deltaX = ((double)(xx - (int)(this.x))/Math.sqrt(Math.pow((xx - this.x), 2) + Math.pow((yy - this.y), 2)));
this.deltaY = ((double)(yy - (int)(this.y))/Math.sqrt(Math.pow((xx - this.x), 2) + Math.pow((yy - this.y), 2)));
this.destX = xx;
this.destY = yy;
changeVitesse();
this.tenirPos = false;
}
/** Augment dmg on number of kill */
public void checkKill(int kill){
if(kill == 4) // Level 1
setDmg(getDmg() + 1);
if(kill == 6)
setDmg(getDmg() + 4);
if(kill == 11) // Level 3
setDmg(getDmg() + 4);
if(kill == 16)
setDmg(getDmg() + 7);
if(kill == 30) // Level 5
setDmg(getDmg() + 10);
}
/** Restore dmg after a metamorphose */
public void killRestore(){
if(this.kills >= 30)
setDmg(getDmg() + 26);
else if(this.kills >= 16)
setDmg(getDmg() + 16);
else if(this.kills >= 11)
setDmg(getDmg() + 9);
else if(this.kills >= 6)
setDmg(getDmg() + 5);
else if(this.kills >= 4)
setDmg(getDmg() + 1);
else
setDmg(getDmg());
}
/**
* Get the accurate system time
* @return The system time in milliseconds
*/
public long getTime() {
return (Sys.getTime() * 1000) / Sys.getTimerResolution();
}
/**
* Get information about this Monster
*
* @return Info this.monster
*/
public String toString(){
return ("deltaX: "+this.deltaX+" deltaY: "+this.deltaY+" Kill: "+ this.getKills()+" Vie: "+this.getVie()+" x: "+this.getX()+" y: "+this.getY());
}
/** Kill this Monster, change variable */
public void killMonster(){
if(this.vie <= 0){
// Cas de tuer unité ennemie
this.x = -100;
this.y = -100;
this.deltaX =0;
this.deltaY=0;
this.destX=0;
this.destY=0;
}
}
/** Kill this Monster, change variable, and decrement unit count */
public void killMonster(int meta){
if(this.vie <= 0){ // Verification
nbreUnite--;
this.x = -100;
this.y = -100;
this.deltaX =0;
this.deltaY=0;
this.destX=0;
this.destY=0;
switch(meta){
case 0:
nbreNain--;
break;
case 1:
nbreFantassin--;
break;
case 2:
nbreMinautaure--;
break;
case 3:
nbreArcher--;
break;
case 4:
nbreCentaure--;
break;
case 5:
nbreMage--;
break;
}
}
}
/** Vérifier static int pour que ce ne soit pas en-dessous de 0 */
private void checkStaticInt(){
if(Monster.nbreUnite<0)
Monster.nbreUnite = 0;
if(Monster.nbreNain<0)
Monster.nbreNain = 0;
if(Monster.nbreFantassin<0)
Monster.nbreFantassin = 0;
if(Monster.nbreMinautaure<0)
Monster.nbreMinautaure = 0;
if(Monster.nbreArcher<0)
Monster.nbreArcher = 0;
if(Monster.nbreCentaure<0)
Monster.nbreCentaure = 0;
if(Monster.nbreMage<0)
Monster.nbreMage = 0;
}
}
| [
"[email protected]"
] | |
0490809a2c98d1db10f4c331f4b9e2f84dfd3ded | 7cfbe68b93116508a976ff77fbc0f948d015c66b | /app/src/main/java/org/techtown/dingdong/mypage/SalesResponse.java | d32dba015e6911fce7cacd438d2a9256fa18ee0d | [] | no_license | gy741/dingdong-front | d6e65fd85cc1eda47b40a8c7ac5b7ab6f06d6724 | 1a006d18c96a679725b12f5207cb19cd2f4dfa3e | refs/heads/master | 2023-07-17T08:37:33.899596 | 2021-09-09T14:56:26 | 2021-09-09T14:56:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 948 | java | package org.techtown.dingdong.mypage;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import org.techtown.dingdong.home.Share;
import java.util.ArrayList;
public class SalesResponse {
@SerializedName("code")
@Expose
private String result;
@SerializedName("data")
@Expose
private Data data;
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public Data getData() {
return data;
}
public void setData(Data data) {
this.data = data;
}
public class Data{
@SerializedName("content")
@Expose
private ArrayList<Sales> sales = new ArrayList<>();
public ArrayList<Sales> getSales() {
return sales;
}
public void setSales(ArrayList<Sales> sales) {
this.sales = sales;
}
}
}
| [
"[email protected]"
] | |
e7aaabafefd6eeeff577bcaf06e137488aa8fe79 | b8fb2e1ddc0332b6e5bde109f844b8c5d56bd293 | /src/main/java/com/ronwelch/myapp/service/UserService.java | 05326869196ce432887a1d8e4682e84e77b238b2 | [] | no_license | RonWelch/jhipster-sample-application | ebc69f0b8090e31f8f02bc1ed28304eb42251f16 | 191d2250f0361e7d43950e153dc3da04ff727fac | refs/heads/main | 2023-04-02T07:22:19.937834 | 2021-03-30T16:39:43 | 2021-03-30T16:39:43 | 353,071,404 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,206 | java | package com.ronwelch.myapp.service;
import com.ronwelch.myapp.config.Constants;
import com.ronwelch.myapp.domain.Authority;
import com.ronwelch.myapp.domain.User;
import com.ronwelch.myapp.repository.AuthorityRepository;
import com.ronwelch.myapp.repository.UserRepository;
import com.ronwelch.myapp.security.AuthoritiesConstants;
import com.ronwelch.myapp.security.SecurityUtils;
import com.ronwelch.myapp.service.dto.AdminUserDTO;
import com.ronwelch.myapp.service.dto.UserDTO;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cache.CacheManager;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tech.jhipster.security.RandomUtil;
/**
* Service class for managing users.
*/
@Service
@Transactional
public class UserService {
private final Logger log = LoggerFactory.getLogger(UserService.class);
private final UserRepository userRepository;
private final PasswordEncoder passwordEncoder;
private final AuthorityRepository authorityRepository;
private final CacheManager cacheManager;
public UserService(
UserRepository userRepository,
PasswordEncoder passwordEncoder,
AuthorityRepository authorityRepository,
CacheManager cacheManager
) {
this.userRepository = userRepository;
this.passwordEncoder = passwordEncoder;
this.authorityRepository = authorityRepository;
this.cacheManager = cacheManager;
}
public Optional<User> activateRegistration(String key) {
log.debug("Activating user for activation key {}", key);
return userRepository
.findOneByActivationKey(key)
.map(
user -> {
// activate given user for the registration key.
user.setActivated(true);
user.setActivationKey(null);
this.clearUserCaches(user);
log.debug("Activated user: {}", user);
return user;
}
);
}
public Optional<User> completePasswordReset(String newPassword, String key) {
log.debug("Reset user password for reset key {}", key);
return userRepository
.findOneByResetKey(key)
.filter(user -> user.getResetDate().isAfter(Instant.now().minusSeconds(86400)))
.map(
user -> {
user.setPassword(passwordEncoder.encode(newPassword));
user.setResetKey(null);
user.setResetDate(null);
this.clearUserCaches(user);
return user;
}
);
}
public Optional<User> requestPasswordReset(String mail) {
return userRepository
.findOneByEmailIgnoreCase(mail)
.filter(User::isActivated)
.map(
user -> {
user.setResetKey(RandomUtil.generateResetKey());
user.setResetDate(Instant.now());
this.clearUserCaches(user);
return user;
}
);
}
public User registerUser(AdminUserDTO userDTO, String password) {
userRepository
.findOneByLogin(userDTO.getLogin().toLowerCase())
.ifPresent(
existingUser -> {
boolean removed = removeNonActivatedUser(existingUser);
if (!removed) {
throw new UsernameAlreadyUsedException();
}
}
);
userRepository
.findOneByEmailIgnoreCase(userDTO.getEmail())
.ifPresent(
existingUser -> {
boolean removed = removeNonActivatedUser(existingUser);
if (!removed) {
throw new EmailAlreadyUsedException();
}
}
);
User newUser = new User();
String encryptedPassword = passwordEncoder.encode(password);
newUser.setLogin(userDTO.getLogin().toLowerCase());
// new user gets initially a generated password
newUser.setPassword(encryptedPassword);
newUser.setFirstName(userDTO.getFirstName());
newUser.setLastName(userDTO.getLastName());
if (userDTO.getEmail() != null) {
newUser.setEmail(userDTO.getEmail().toLowerCase());
}
newUser.setImageUrl(userDTO.getImageUrl());
newUser.setLangKey(userDTO.getLangKey());
// new user is not active
newUser.setActivated(false);
// new user gets registration key
newUser.setActivationKey(RandomUtil.generateActivationKey());
Set<Authority> authorities = new HashSet<>();
authorityRepository.findById(AuthoritiesConstants.USER).ifPresent(authorities::add);
newUser.setAuthorities(authorities);
userRepository.save(newUser);
this.clearUserCaches(newUser);
log.debug("Created Information for User: {}", newUser);
return newUser;
}
private boolean removeNonActivatedUser(User existingUser) {
if (existingUser.isActivated()) {
return false;
}
userRepository.delete(existingUser);
userRepository.flush();
this.clearUserCaches(existingUser);
return true;
}
public User createUser(AdminUserDTO userDTO) {
User user = new User();
user.setLogin(userDTO.getLogin().toLowerCase());
user.setFirstName(userDTO.getFirstName());
user.setLastName(userDTO.getLastName());
if (userDTO.getEmail() != null) {
user.setEmail(userDTO.getEmail().toLowerCase());
}
user.setImageUrl(userDTO.getImageUrl());
if (userDTO.getLangKey() == null) {
user.setLangKey(Constants.DEFAULT_LANGUAGE); // default language
} else {
user.setLangKey(userDTO.getLangKey());
}
String encryptedPassword = passwordEncoder.encode(RandomUtil.generatePassword());
user.setPassword(encryptedPassword);
user.setResetKey(RandomUtil.generateResetKey());
user.setResetDate(Instant.now());
user.setActivated(true);
if (userDTO.getAuthorities() != null) {
Set<Authority> authorities = userDTO
.getAuthorities()
.stream()
.map(authorityRepository::findById)
.filter(Optional::isPresent)
.map(Optional::get)
.collect(Collectors.toSet());
user.setAuthorities(authorities);
}
userRepository.save(user);
this.clearUserCaches(user);
log.debug("Created Information for User: {}", user);
return user;
}
/**
* Update all information for a specific user, and return the modified user.
*
* @param userDTO user to update.
* @return updated user.
*/
public Optional<AdminUserDTO> updateUser(AdminUserDTO userDTO) {
return Optional
.of(userRepository.findById(userDTO.getId()))
.filter(Optional::isPresent)
.map(Optional::get)
.map(
user -> {
this.clearUserCaches(user);
user.setLogin(userDTO.getLogin().toLowerCase());
user.setFirstName(userDTO.getFirstName());
user.setLastName(userDTO.getLastName());
if (userDTO.getEmail() != null) {
user.setEmail(userDTO.getEmail().toLowerCase());
}
user.setImageUrl(userDTO.getImageUrl());
user.setActivated(userDTO.isActivated());
user.setLangKey(userDTO.getLangKey());
Set<Authority> managedAuthorities = user.getAuthorities();
managedAuthorities.clear();
userDTO
.getAuthorities()
.stream()
.map(authorityRepository::findById)
.filter(Optional::isPresent)
.map(Optional::get)
.forEach(managedAuthorities::add);
this.clearUserCaches(user);
log.debug("Changed Information for User: {}", user);
return user;
}
)
.map(AdminUserDTO::new);
}
public void deleteUser(String login) {
userRepository
.findOneByLogin(login)
.ifPresent(
user -> {
userRepository.delete(user);
this.clearUserCaches(user);
log.debug("Deleted User: {}", user);
}
);
}
/**
* Update basic information (first name, last name, email, language) for the current user.
*
* @param firstName first name of user.
* @param lastName last name of user.
* @param email email id of user.
* @param langKey language key.
* @param imageUrl image URL of user.
*/
public void updateUser(String firstName, String lastName, String email, String langKey, String imageUrl) {
SecurityUtils
.getCurrentUserLogin()
.flatMap(userRepository::findOneByLogin)
.ifPresent(
user -> {
user.setFirstName(firstName);
user.setLastName(lastName);
if (email != null) {
user.setEmail(email.toLowerCase());
}
user.setLangKey(langKey);
user.setImageUrl(imageUrl);
this.clearUserCaches(user);
log.debug("Changed Information for User: {}", user);
}
);
}
@Transactional
public void changePassword(String currentClearTextPassword, String newPassword) {
SecurityUtils
.getCurrentUserLogin()
.flatMap(userRepository::findOneByLogin)
.ifPresent(
user -> {
String currentEncryptedPassword = user.getPassword();
if (!passwordEncoder.matches(currentClearTextPassword, currentEncryptedPassword)) {
throw new InvalidPasswordException();
}
String encryptedPassword = passwordEncoder.encode(newPassword);
user.setPassword(encryptedPassword);
this.clearUserCaches(user);
log.debug("Changed password for User: {}", user);
}
);
}
@Transactional(readOnly = true)
public Page<AdminUserDTO> getAllManagedUsers(Pageable pageable) {
return userRepository.findAll(pageable).map(AdminUserDTO::new);
}
@Transactional(readOnly = true)
public Page<UserDTO> getAllPublicUsers(Pageable pageable) {
return userRepository.findAllByIdNotNullAndActivatedIsTrue(pageable).map(UserDTO::new);
}
@Transactional(readOnly = true)
public Optional<User> getUserWithAuthoritiesByLogin(String login) {
return userRepository.findOneWithAuthoritiesByLogin(login);
}
@Transactional(readOnly = true)
public Optional<User> getUserWithAuthorities() {
return SecurityUtils.getCurrentUserLogin().flatMap(userRepository::findOneWithAuthoritiesByLogin);
}
/**
* Not activated users should be automatically deleted after 3 days.
* <p>
* This is scheduled to get fired everyday, at 01:00 (am).
*/
@Scheduled(cron = "0 0 1 * * ?")
public void removeNotActivatedUsers() {
userRepository
.findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(Instant.now().minus(3, ChronoUnit.DAYS))
.forEach(
user -> {
log.debug("Deleting not activated user {}", user.getLogin());
userRepository.delete(user);
this.clearUserCaches(user);
}
);
}
/**
* Gets a list of all the authorities.
* @return a list of all the authorities.
*/
@Transactional(readOnly = true)
public List<String> getAuthorities() {
return authorityRepository.findAll().stream().map(Authority::getName).collect(Collectors.toList());
}
private void clearUserCaches(User user) {
Objects.requireNonNull(cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE)).evict(user.getLogin());
if (user.getEmail() != null) {
Objects.requireNonNull(cacheManager.getCache(UserRepository.USERS_BY_EMAIL_CACHE)).evict(user.getEmail());
}
}
}
| [
"[email protected]"
] | |
0ce45dc62d2ffb55cf7a42a957f89904ceb4e389 | 216af102f38f7eff8ac931bebcf52ec1f3196c9d | /src/swea/d2/Solution_1974_스도쿠검증.java | 2a727524215af27a8a0fcfe80761e177f9966305 | [] | no_license | LeeA0/Algorithm | d9ff150cbef817d95b5b853b29e8ade6df712d87 | 416897e40098b4b9a60f85ac09528ae1f1d43ca6 | refs/heads/master | 2023-08-31T23:54:52.809679 | 2021-10-10T15:33:26 | 2021-10-10T15:33:26 | 298,046,835 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,867 | java | package swea.d2;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
//SW_스도쿠검증_1974_D2
//D2_스도쿠 검증 -> 도합 45
public class Solution_1974_스도쿠검증 {
static int T;
static int[][] sdoku;
static int[][] dir4 = { { -1, 0 }, { 1, 0 }, { 0, -1 }, { 0, 1 } };
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
T = Integer.parseInt(br.readLine().trim());
for (int t = 1; t <= T; t++) {
sdoku = new int[9][9];
for (int i = 0; i < 9; i++) {
StringTokenizer st = new StringTokenizer(br.readLine().trim());
for (int j = 0; j < 9; j++) {
sdoku[i][j] = Integer.parseInt(st.nextToken());
}
}
int can = 1;
// 가로세로탐색
a: for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
for (int[] d : dir4) {
int nx = i + d[0];
int ny = j + d[1];
while (check(nx, ny)) {
if (sdoku[i][j] == sdoku[nx][ny]) {
can = 0;
break a;
}
nx += d[0];
ny += d[1];
}
}
}
}
// 3*3탐색
if (can == 1) {
a: for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
can = threeFind(i * 3, i * 3 + 3, j * 3, j * 3 + 3);
if (can == 0) {
break a;
}
}
}
}
System.out.println("#" + t + " " + can);
}
}
private static int threeFind(int a, int b, int c, int d) {
for (int i = a; i < b; i++) {
for (int j = c; j < d; j++) {
for (int k = i + 1; k < b; k++) {
for (int l = j + 1; l < d; l++) {
if (sdoku[i][j] == sdoku[k][l]) {
return 0;
}
}
}
}
}
return 1;
}
private static boolean check(int nx, int ny) {
if (nx >= 0 && nx < 9 && ny >= 0 && ny < 9) {
return true;
}
return false;
}
}
| [
"[email protected]"
] | |
5aa4668ee3cfa8db281835195cd2310de0086c41 | 8bfc254f7559664fe9eaeaf8d2ed449aca0958c1 | /src/test/java/com/tictactoesbot/tests/SampleTest.java | e4a39a48105cb2c6138523b2e4630d3a7f123107 | [
"MIT"
] | permissive | AaronCoplan/tic-tac-toe-bot | c1cc63c37845eaf6b74ae23005764cf53a781f87 | 3ef0f283b647f5edf7a4a77ada0fae8ad880b195 | refs/heads/master | 2021-01-22T04:49:42.245188 | 2017-06-21T20:04:17 | 2017-06-21T20:04:17 | 81,590,085 | 1 | 0 | null | 2017-02-22T07:29:30 | 2017-02-10T17:40:18 | Java | UTF-8 | Java | false | false | 1,395 | java | /*
MIT License
Copyright (c) 2017 Aaron Coplan
Copyright (c) 2017 Andrew Adalian
Copyright (c) 2017 Devin Kopp
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.tictactoesbot.tests;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* Created by afcoplan on 2/10/17.
*/
public class SampleTest {
@Test
public void sampleTest(){
assertEquals(true, true);
}
}
| [
"[email protected]"
] | |
0b2b442e991cdd01c59ab6c6dce0192e26ba1d0c | 3330fea71fa37e7c390dc4a78f6a0c47f932caa5 | /src/main/java/it/polimi/ingsw/model/Action.java | ab071a168b1ae794acb78c034ecce730cc0c7bff | [] | no_license | giacomocassano/Adrenalina | 7c3f15d2c1996b3b01512be16b2b827f3f674c7b | 6bf58c191ff13beb22bb9b74b35c1dd8652203cd | refs/heads/master | 2023-06-23T04:35:54.107177 | 2021-07-15T10:39:31 | 2021-07-15T10:39:31 | 386,252,187 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,841 | java | package it.polimi.ingsw.model;
import it.polimi.ingsw.exceptions.EffectException;
import it.polimi.ingsw.exceptions.MoveException;
import it.polimi.ingsw.exceptions.ShootException;
import it.polimi.ingsw.model.cards.AmmunitionCard;
import it.polimi.ingsw.model.cards.EmpowerCard;
import it.polimi.ingsw.model.cards.Stack;
import it.polimi.ingsw.model.cards.WeaponCard;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static it.polimi.ingsw.model.MoveType.*;
/**
* Action Class is used to describe an action made by player.
* An Action is a group of moves.
* Player normally can do two action each turn
*/
public class Action {
private static final int ZERO = 0;
private final Player activePlayer;
private List<Move> moves;
private int moveCounter;
private final boolean finalFrenzy;
private List<MoveType> validMoves;
private boolean isActive;
private final Map map;
private Stack<EmpowerCard> empowersStack;
private Stack<AmmunitionCard> ammosStack;
/**
* Constructor
* @param map is playing map
* @param activePlayer is the active player that is doing the action
* @param finalFrenzy is true if is a frenzy action
* @param empowersStack is the stack of empowers
* @param ammosStack is the stack of the ammos.
*/
public Action(Map map, Player activePlayer, boolean finalFrenzy, Stack<EmpowerCard> empowersStack, Stack<AmmunitionCard> ammosStack) {
this.activePlayer = activePlayer;
this.finalFrenzy = finalFrenzy;
moves = new ArrayList<>();
validMoves = new ArrayList<>();
moveCounter = ZERO;
isActive = true;
this.map = map;
this.empowersStack = empowersStack;
this.ammosStack = ammosStack;
setValidMoves();
}
/**
* @return moves done.
*/
public List<Move> getMoves() {
return moves;
}
/**
*Sets valid moves if the action is normal.
* Valid moves are moves that player can do normally each turn
*
*/
private void setValidNormalMoves() {
Move previous = null;
switch (moveCounter) {
case ZERO:
validMoves.addAll(Arrays.asList(RUN, GRAB, SHOOT, RELOAD, END_ACTION));
break;
case 1:
previous = moves.get(ZERO);
if (previous.hasType(RUN)) {
validMoves.addAll(Arrays.asList(RUN, GRAB, RELOAD, END_ACTION));
if (activePlayer.getNumDamages() > 5)
validMoves.add(SHOOT);
}else if (previous.hasType(GRAB) || previous.hasType(SHOOT)) {
validMoves = new ArrayList<>();
validMoves.add(RELOAD);
validMoves.add(END_ACTION);
}else{
validMoves = new ArrayList<>();
validMoves.add(END_ACTION);
}
break;
case 2:
previous = moves.get(1);
if(previous.hasType(RUN)) {
validMoves.addAll(Arrays.asList(RUN, RELOAD, END_ACTION));
if(activePlayer.getNumDamages() > 2)
validMoves.add(GRAB);
}else if(previous.hasType(GRAB) || previous.hasType(SHOOT)){
validMoves = new ArrayList<>();
validMoves.add(RELOAD);
validMoves.add(END_ACTION);
}else{
validMoves = new ArrayList<>();
validMoves.add(END_ACTION);
}
break;
case 3:
previous = moves.get(2);
if(previous.hasType(RUN) || previous.hasType(GRAB)) {
validMoves = new ArrayList<>();
validMoves.add(RELOAD);
validMoves.add(END_ACTION);
}else{
validMoves = new ArrayList<>();
validMoves.add(END_ACTION);
}
break;
default:
validMoves = new ArrayList<>();
break;
}
}
/**
* This sets moves that player can do if he is before the first player during
* final frenzy mode.
*/
private void setValidFinalFrenzyBeforeFirstPlayerMoves() {
Move previous = null;
switch (moveCounter) {
case ZERO:
validMoves.addAll(Arrays.asList(RUN, GRAB, SHOOT, RELOAD));
validMoves.add(END_ACTION);
break;
case 1:
previous = moves.get(ZERO);
if (previous.hasType(RUN)) {
validMoves.addAll(Arrays.asList(RUN, GRAB, SHOOT, RELOAD));
validMoves.add(END_ACTION);
} else if (previous.hasType(RELOAD)) {
validMoves = new ArrayList<>();
validMoves.add(SHOOT);
validMoves.add(END_ACTION);
}else{
validMoves = new ArrayList<>();
validMoves.add(END_ACTION);
}
break;
case 2:
previous = moves.get(1);
if(previous.hasType(RUN)) {
validMoves.addAll(Arrays.asList(RUN, GRAB, END_ACTION));
}else if(previous.hasType(RELOAD)){
validMoves = new ArrayList<>();
validMoves.add(SHOOT);
validMoves.add(END_ACTION);
}else{
validMoves = new ArrayList<>();
validMoves.add(END_ACTION);
}
break;
case 3:
previous = moves.get(2);
if(previous.hasType(RUN)) {
validMoves = new ArrayList<>();
validMoves.add(RUN);
validMoves.add(END_ACTION);
}else{
validMoves = new ArrayList<>();
validMoves.add(END_ACTION);
}
break;
default:
validMoves = new ArrayList<>();
break;
}
}
/**
* This sets final frenzy possible move if player is after first player
*/
private void setValidFinalFrenzyAfterFirstPlayerMoves() {
Move previous = null;
switch (moveCounter) {
case ZERO:
validMoves.addAll(Arrays.asList(RUN, GRAB, SHOOT, RELOAD, END_ACTION));
break;
case 1:
previous = moves.get(ZERO);
if (previous.hasType(RUN)) {
validMoves.addAll(Arrays.asList(RUN, GRAB, SHOOT, RELOAD, END_ACTION));
} else if (previous.hasType(RELOAD)) {
validMoves = new ArrayList<>();
validMoves.add(SHOOT);
validMoves.add(END_ACTION);
}else{
validMoves = new ArrayList<>();
validMoves.add(END_ACTION);
}
break;
case 2:
previous = moves.get(1);
if(previous.hasType(RUN)) {
validMoves.addAll(Arrays.asList(RUN, GRAB, SHOOT, RELOAD, END_ACTION));
}else if(previous.hasType(RELOAD)){
validMoves = new ArrayList<>();
validMoves.add(SHOOT);
validMoves.add(END_ACTION);
}else{
validMoves = new ArrayList<>();
validMoves.add(END_ACTION);
}
break;
case 3:
previous = moves.get(2);
if(previous.hasType(RUN)) {
validMoves = new ArrayList<>();
validMoves.add(GRAB);
validMoves.add(END_ACTION);
}else if(previous.hasType(RELOAD)){
validMoves = new ArrayList<>();
validMoves.add(SHOOT);
validMoves.add(END_ACTION);
}else{
validMoves = new ArrayList<>();
validMoves.add(END_ACTION);
}
break;
default:
validMoves = new ArrayList<>();
break;
}
}
/**
*
* @param move is a move
* @return true if move is valid, so move is in validMoves
*/
public boolean isValidMove(Move move) {
if( move != null && move.getPlayer() == activePlayer && isActive && validMoves.contains(move.getType()) && move.isValidMove())
return true;
return false;
}
/**
* This performs the move,
* @param move is move that has to be performed
* @throws MoveException if move is not valid
* @throws ShootException if move is a shoot move and player can't shoot
* @throws EffectException if an effect is used during move and isn't usable.
*/
public void performMove(Move move) throws MoveException, ShootException, EffectException {
if (move.hasType(END_ACTION)){
endAction();
}else {
if (!isValidMove(move)) throw new MoveException("La mossa non è valida.");
move.performMove(empowersStack, ammosStack);
moves.add(move);
moveCounter++;
setValidMoves();
}
if(validMoves.isEmpty() || (validMoves.contains(END_ACTION) && validMoves.size() == 1))
endAction();
}
/**
* Sets ValidMoves.
* is based on the action status. If final frenzy is true and player is before
* first player, so valid moves are from setFinalFrenzyBeforeFirstPlayerMoves()...
*/
private void setValidMoves() {
validMoves = new ArrayList<>();
if(finalFrenzy) {
if(activePlayer.isBeforeFirstPlayer())
setValidFinalFrenzyBeforeFirstPlayerMoves();
else
setValidFinalFrenzyAfterFirstPlayerMoves();
}else{
setValidNormalMoves();
}
//If the player doesn't have loaded weapons, he can't shoot
List<WeaponCard> loadedWeapons = activePlayer.getLoadedWeapons();
if(validMoves.contains(SHOOT) && loadedWeapons.isEmpty())
validMoves.remove(SHOOT);
//If there aren't other players on map player can't shoot
if(validMoves.contains(SHOOT) && map.getPlayersOnMap().size() == 1)
validMoves.remove(SHOOT);
//If player stays in a position where he can't grab
Square position = map.getPlayerPosition(activePlayer);
if(position != null) {
if (validMoves.contains(GRAB) && ((position.isRespawnPoint() && map.getPlayerPosition(activePlayer).getWeaponsSize() == ZERO)
|| (!position.isRespawnPoint() && map.getPlayerPosition(activePlayer).getAmmos() == null)))
validMoves.remove(GRAB);
//If all weapons are loaded,player cant't reload
if (validMoves.contains(RELOAD) && loadedWeapons.containsAll(activePlayer.getWeapons()))
validMoves.remove(RELOAD);
}
}
/**
*
* @return valid Moves
*/
public List<MoveType> getValidMoves() {
return validMoves;
}
/**
*
* @return true if action is active
*/
public boolean isActive() {
return isActive;
}
/**
* ends the action
*/
public void endAction() {
this.isActive = false;
validMoves = new ArrayList<>();
}
/**
*
* @return move counter
*/
public int getMoveCounter() {
return moveCounter;
}
} | [
"[email protected]"
] | |
6a6390e2a4e584496fb4a59b1f42a5f88fcc43a6 | 1b70d92ec2243247b1bedee1733a44bd17efb6ed | /src/main/java/com/example/demo/SSUserDetailsService.java | 430ecfe6bf001a37954158c5336dbea7025728b7 | [] | no_license | JBCOCT19/week-7-challenge-prasantib | 57ab0ab488157839776ba3de9887e5dcf84e43e2 | 35fec07cf477c3753f71e4374fa9b683df788361 | refs/heads/master | 2020-09-29T06:23:04.513062 | 2019-12-09T21:49:05 | 2019-12-09T21:49:05 | 226,974,452 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,676 | java | package com.example.demo;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.util.HashSet;
import java.util.Set;
@Transactional
@Service
public class SSUserDetailsService implements UserDetailsService {
private UserRepository userRepository;
public SSUserDetailsService(UserRepository userRepository){
this.userRepository=userRepository;
}
@Override
public UserDetails loadUserByUsername(String username)
throws UsernameNotFoundException {
try{
User user = userRepository.findByUsername(username);
if (user == null){
return null;
}
return new org.springframework.security.core.userdetails.User(
user.getUsername(), user.getPassword(), getAuthorities(user)
);
} catch (Exception e) {
throw new UsernameNotFoundException("User not found");
}
}
private Set<GrantedAuthority> getAuthorities(User user) {
Set<GrantedAuthority> authorities = new HashSet<>();
for(Role role : user.getRoles()) {
GrantedAuthority grantedAuthority = new SimpleGrantedAuthority(role.getRole());
authorities.add(grantedAuthority);
}
return authorities;
}
}
| [
"[email protected]"
] | |
9eb4e93b096ef19a7942f22b9ab357643eb299d9 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a161/A161532Test.java | 8371ba2a460d8ef21b4030c4e0bc63953323b35a | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package irvine.oeis.a161;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A161532Test extends AbstractSequenceTest {
}
| [
"[email protected]"
] | |
b268c93d06dd5b095269514a7140639ec5003ab1 | 16a5cc4ee39852ea8469ba95ea08f269ce03d0a7 | /src/osm/src/main/java/org/locationtech/geogig/osm/internal/history/Change.java | 23afbaf9de74055fe30b1f9bd6209df663566a48 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | jmarin/GeoGig | 8ad823351549b17a84dc385db2cfae694a824358 | 1a70408ee4495832eb2f9b827fef12512666d6ba | refs/heads/master | 2021-01-17T22:18:20.647772 | 2014-08-12T16:53:24 | 2014-08-12T16:53:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,762 | java | /* Copyright (c) 2013 OpenPlans. All rights reserved.
* This code is licensed under the BSD New License, available at the root
* application directory.
*/
package org.locationtech.geogig.osm.internal.history;
import com.google.common.base.Optional;
/**
*
*/
public class Change {
public enum Type {
create, modify, delete
}
private Node node;
private Way way;
private Relation relation;
private final Type type;
public Change(Type type, Primitive primitive) {
this.type = type;
if (primitive instanceof Node) {
node = (Node) primitive;
} else if (primitive instanceof Way) {
way = (Way) primitive;
} else if (primitive instanceof Relation) {
relation = (Relation) primitive;
} else {
throw new IllegalArgumentException("Unknown primitive: " + primitive);
}
}
public Type getType() {
return type;
}
public Optional<Node> getNode() {
return Optional.fromNullable(node);
}
public Optional<Way> getWay() {
return Optional.fromNullable(way);
}
public Optional<Relation> getRelation() {
return Optional.fromNullable(relation);
}
void setNode(Node node) {
this.node = node;
}
void setWay(Way way) {
this.way = way;
}
void setRelation(Relation relation) {
this.relation = relation;
}
@Override
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append("[type:").append(getType())
.append(", ")
.append(getNode().isPresent() ? node : (getWay().isPresent() ? way : relation))
.append(']').toString();
}
}
| [
"[email protected]"
] | |
8e6c7f234ab6fb8f38bbc490b5325b6e98452d4a | f743b1ddb97499a3e81a4b9898b98e028694ac74 | /src/main/java/com/wyl/test/service/impl/UserServiceImpl.java | 983b800e265ea86d20258c5d15643b79f0dd2c09 | [] | no_license | wang1yu2ku3/springMVC1 | 6901d9c699e03dc04e22b26bd789390e1a92402b | 1cbed3287fe293a5b515f17c46c5deae89b11472 | refs/heads/master | 2020-03-27T08:36:02.678141 | 2018-08-27T09:11:34 | 2018-08-27T09:11:34 | 146,269,962 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,296 | java | package com.wyl.test.service.impl;
import com.wyl.test.dao.IUserDao;
import com.wyl.test.entity.User;
import com.wyl.test.service.IUserService;
import com.wyl.test.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.apache.log4j.Logger;
import javax.transaction.Transactional;
/**
* @Auther: wangyulin
* @Date: 2018/8/19 12:01
* @Description:
*/
@Service
public class UserServiceImpl extends HibernateBaseService<User, Long> implements IUserService {
private static final Logger logger = Logger.getLogger(UserServiceImpl.class);
@Autowired
@Qualifier("userDaoImpl")
private IUserDao iUserDao;
@Override
public User getById(Long id) {
return iUserDao.getById(id);
}
@Override
public User add(User user) {
Long id = iUserDao.add(user);
return iUserDao.getById(id);
}
@Override
public User update(User user) {
this.iUserDao.updateUser(user);
return user;
}
@Override
public void delete(Long id) {
this.iUserDao.delete(id);
}
@Override
public Page<User> page(Page page) {
return this.iUserDao.page(page);
}
}
| [
"[email protected]"
] | |
7dd25eb651e440dd3254913eafd4691a727f721a | b2fb985a58b10625c029c6cfe94e1f15f03b018f | /code/src/net/sourceforge/kolmafia/textui/parsetree/LibraryFunction.java | 323dc0da9af0e4295dcca34fce865f46286e5af9 | [] | no_license | sery/kolmafia-code | 7ab4e22d5822fa004e6c8eed20a44849ec1ca4c1 | 2aa6bc078f484f6003eb50976b6ea6bee0e427b4 | refs/heads/master | 2021-01-21T20:06:38.879569 | 2017-05-23T15:17:40 | 2017-05-23T15:17:40 | 92,185,865 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,042 | java | /**
* Copyright (c) 2005-2017, KoLmafia development team
* http://kolmafia.sourceforge.net/
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* [1] Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* [2] Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* [3] Neither the name "KoLmafia" nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package net.sourceforge.kolmafia.textui.parsetree;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import net.sourceforge.kolmafia.KoLmafia;
import net.sourceforge.kolmafia.StaticEntity;
import net.sourceforge.kolmafia.textui.Interpreter;
import net.sourceforge.kolmafia.textui.RuntimeLibrary;
import net.sourceforge.kolmafia.textui.ScriptException;
public class LibraryFunction
extends Function
{
private Method method;
public LibraryFunction( final String name, final Type type, final Type[] params )
{
super( name.toLowerCase(), type );
Class[] args = new Class[ params.length + 1 ];
args[ 0 ] = Interpreter.class;
// Make a list of VariableReferences, even though the library
// function will not use them, so that tracing works
for ( int i = 1; i <= params.length; ++i )
{
Variable variable = new Variable( params[ i - 1 ] );
this.variableReferences.add( new VariableReference( variable ) );
args[ i ] = Value.class;
}
try
{
this.method = RuntimeLibrary.findMethod( name, args );
}
catch ( Exception e )
{
// This should not happen; it denotes a coding
// error that must be fixed before release.
StaticEntity.printStackTrace( e, "No method found for built-in function: " + name );
}
}
@Override
public Value execute( final Interpreter interpreter, Object[] values )
{
if ( !KoLmafia.permitsContinue() )
{
interpreter.setState( Interpreter.STATE_EXIT );
return null;
}
if ( StaticEntity.isDisabled( this.getName() ) )
{
this.printDisabledMessage( interpreter );
return this.getType().initialValue();
}
if ( this.method == null )
{
throw interpreter.runtimeException( "Internal error: no method for " + this.getName() );
}
try
{
// Invoke the method
return (Value) this.method.invoke( this, (Object []) values );
}
catch ( InvocationTargetException e )
{
// This is an error in the called method. Pass
// it on up so that we'll print a stack trace.
Throwable cause = e.getCause();
if ( cause instanceof ScriptException )
{
// Pass up exceptions intentionally generated by library
throw (ScriptException) cause;
}
throw new RuntimeException( cause );
}
catch ( IllegalAccessException e )
{
// This is not expected, but is an internal error in ASH
throw new ScriptException( e );
}
}
}
| [
"[email protected]"
] | |
1f47d769de4eb5a94121bd1bc6b70042e206d47f | 4fde91122b6a6213adf12fa0af092259590c9861 | /BS_Sample/src/hotels/HotelControl.java | e37754726695545abe4da6908e0e03c37ba5ba2c | [] | no_license | LeeYH94/web_team4 | 8d7845907cb6f3e4d58fdfe091c56b7b44208343 | ccd223978832cb2d4fe7ac12f2f436eaf6f069cc | refs/heads/master | 2022-06-11T07:38:53.341481 | 2020-05-06T16:21:20 | 2020-05-06T16:21:20 | 254,014,893 | 0 | 1 | null | null | null | null | UHC | Java | false | false | 3,523 | java | package hotels;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
import core.DBConnection;
public class HotelControl {
Connection conn;
PreparedStatement pstm;
ResultSet rs;
// 호텔 리스트 출력
// TODO 호텔에는 시간이 없는데 과연 여기에도 시간을 써야할까요?
public void getHotelList(String country, String userDate) {
String query = "";
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
// time1 == user가 선택한 시간
// time2 == 현재시간
Date time = new Date();
String time1 = format1.format(time);
int compare = userDate.compareTo(time1);
if (compare < 0) {
// 선택한 날이 현재 날보다 이전일때
System.out.println(time1 + " 이전의 날을 입력했습니다.");
} else {
// 선택한 날이 현재 날과 같거나 이후일 때
query = "SELECT * FROM HOTEL WHERE HOTEL_LOCATION = \'" + country + "\'";
showHotelList(query);
}
}
// 호텔 리스트 출력
public void showHotelList(String query) {
try {
conn = DBConnection.getConnection();
pstm = conn.prepareStatement(query);
rs = pstm.executeQuery();
System.out.println("-----------------------------------------------------------------------");
// column명 쓰기
System.out.println("HOTEL_NUM" + "\t" + "HOTEL_NAME" + "\t" + "HOTEL_LOCATION");
while (rs.next()) {
System.out.println(rs.getString(1) + "\t" + rs.getString(2) + "\t" + rs.getString(3));
rs.getString(4);
}
System.out.println("-----------------------------------------------------------------------");
pstm.close();
} catch (SQLException sqle) {
System.out.println(sqle);
System.out.println("showHotelList() 쿼리문 오류");
} catch (Exception e) {
System.out.println(e);
System.out.println("알 수 없는 오류(showHotelList())");
} finally {
try {
if (rs != null) {
rs.close();
}
if (pstm != null) {
pstm.close();
}
if (conn != null) {
conn.close();
}
} catch (SQLException e) {
throw new RuntimeException(e.getMessage());
}
}
}
public void showHotelPriceList(String hotel_num){
String query = "SELECT * FROM HOTEl_CLASS WHERE HOTEL_NUM = ?";
try {
conn = DBConnection.getConnection();
pstm = conn.prepareStatement(query);
pstm.setString(1, hotel_num);
rs = pstm.executeQuery();
rs.next();
System.out.println("ROOM_1\tROOM_2\tROOM_4\n"
+ rs.getInt(2) + "\t" + rs.getInt(3) + "\t" + rs.getInt(4));
} catch(SQLException sqle) {
System.out.println("hotel_price_list() 쿼리문 오류");
} catch (Exception e) {
System.out.println("알 수 없는 오류(hotel_price_list())");
} finally {
try {
if(rs != null) {
rs.close();
}
if(pstm != null) {
pstm.close();
}
if(conn != null) {
conn.close();
}
} catch (SQLException e) {
throw new RuntimeException(e.getMessage());
}
}
}
}
| [
"[email protected]"
] | |
d158201bc8f28d11f8feab1e97f0efc40345b091 | 02ef717aea4b99b271379fbae495cefb2fdf5135 | /src/main/Betch/pachinko/p_word/old/店舗情報解析.java | 7a016b802b877204f30c6cc790aef00b20863d33 | [] | no_license | sakazume/Pachinko_APP | 5d9500d908bda57b09482600118b1592bd36c2af | 0036f457eb928b31cfb9f26f758c35902147e60f | refs/heads/master | 2021-01-24T06:17:58.199774 | 2017-07-02T22:58:11 | 2017-07-02T22:58:11 | 93,310,616 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,790 | java | package pachinko.p_word.old;
import com.avaje.ebean.Ebean;
import lombok.Data;
import org.joda.time.DateTime;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import pachinko.db.Dstore;
import pachinko.db.Mmodels;
import pachinko.db.Mstore;
import pachinko.library.JsoupHelper;
import pachinko.p_word.パチンコ情報解析;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Created by gyutr20 on 2015/10/02.
*/
public class 店舗情報解析 {
// public static void main(String... args) {
//
// DateTime a = new DateTime().withTime(0,0,0,0).plusHours(-24);
//
//// List<Mstore> allList = Ebean.createQuery(Mstore.class).where().lt("updatedAt",a.toDate()).findList();
//// List<Mstore> allList = Mstore.likeByAddress("埼玉");
// List<Mstore> allList = Ebean.createQuery(Mstore.class).where().findList();
//
// allList.parallelStream().forEach(s -> {
//
// String url = s.getLink();
//
// パチンコ設置台解析(s);
// お店情報解析(s);
//
// JsoupHelper.dhtmlCacheMap.remove(s.getLink() + "_" + パチンコ情報解析.ユーザーエージェント);
// JsoupHelper.dhtmlCacheMap.remove(s.getLink() + "_" + JsoupHelper.ユーザーエージェント_PC);
//
// JsoupHelper.dhtmlCacheMap.remove(s.getSpLink() + "_" + パチンコ情報解析.ユーザーエージェント);
// JsoupHelper.dhtmlCacheMap.remove(s.getSpLink() + "_" + JsoupHelper.ユーザーエージェント_PC);
//
//// スロット設置台解析(s);
//
// });
// JsoupHelper.end();
// }
@Data
static class Dto{
Document doc;
パチンコ情報解析 パチンコ;
}
public static void main(String... args) {
List<Mstore> allList = Ebean.createQuery(Mstore.class).where().findList();
allList.parallelStream().map(s->{
Dto dto = new Dto();
パチンコ情報解析 パチンコ = new パチンコ情報解析(s);
if(s.getSpLink()==null) {
パチンコ.spLink();
}
dto.setパチンコ(パチンコ);
return dto;
}).map(dto->{
System.out.println(dto.getパチンコ().getMstore().getName() + "URL取得");
Document doc = JsoupHelper.run(dto.getパチンコ().getMstore().getSpLink(),パチンコ情報解析.ユーザーエージェント);
dto.setDoc(doc);
return dto;
}).forEach(dto->{
// List<設置機種情報> 設置機種情報List = dto.getパチンコ().モバイル解析処理(dto.getDoc());
List<設置機種情報> 設置機種情報List = null;
if (設置機種情報List == null) {
return;
}
savePachi(設置機種情報List,dto.getパチンコ().getMstore());
});
JsoupHelper.end();
}
public static Mstore お店情報解析(Mstore mstore) {
DateTime dtime = new DateTime(mstore.getUpdatedAt());
dtime = dtime.plusHours(24);
DateTime now = new DateTime();
if(dtime.isAfter(now)) {
return mstore;
}
Document doc = JsoupHelper.run(mstore.getLink());
if(doc==null) {
return null;
}
for(Element el:doc.select("center p b")) {
if(0<=el.text().indexOf("最終更新日")) {
System.out.println(el.text());
}
}
if(doc.select("table[bordercolorlight=\"#6699FF\"] table").size()==0) {
System.out.println(mstore.getLink()+ "お店情報が存在しない");
return mstore;
}
Element table = doc.select("table[bordercolorlight=\"#6699FF\"] table").get(0);
Elements trs = table.select("tr");
for(Element tr : trs) {
if(tr.select("td").size()<2) {
continue;
}
String title = tr.select("td").get(0).text();
String data = tr.select("td").get(1).text();
title = title.replace(" ","").replace(" ","");
switch(title) {
case "住所":
mstore.setAddress(data);
break;
case "営業時間":
mstore.setHours(data);
break;
case "電話":
mstore.setTel(data);
break;
}
}
mstore.setUpdatedAt(new Timestamp(new Date().getTime()));
Ebean.save(mstore);
return mstore;
}
public static void パチンコ設置台解析(Mstore mstore) {
パチンコ情報解析 パチンコ = new パチンコ情報解析(mstore);
if(mstore.getSpLink()==null) {
パチンコ.spLink();
}
// List<設置機種情報> 設置機種情報List = パチンコ.モバイル解析処理();
List<設置機種情報> 設置機種情報List = null;
if (設置機種情報List == null) {
return;
}
savePachi(設置機種情報List,mstore);
}
public static void savePachi(List<設置機種情報> 設置機種情報List,Mstore mstore) {
List<Dstore> saveDstores = new ArrayList<>();
設置機種情報List.parallelStream().forEach(s -> {
//機種情報が存在しない場合登録する。
if (!Mmodels.リンク存在チェック(s.getLink())) {
Mmodels 登録データ = new Mmodels();
登録データ.setName(s.getName());
登録データ.setLink(s.getLink());
Ebean.save(登録データ);
}
Dstore dstore = new Dstore();
dstore.setModels(Mmodels.findByLink(s.getLink()));
dstore.setStoreId(mstore.getId());
dstore.setNumber(s.get台数());
dstore.setUnitPriceText(s.get貸し玉料金());
dstore.setUnitPrice(s.貸し玉料金解析());
saveDstores.add(dstore);
});
//delete&insert
try {
Dstore.deleteBystoreId(mstore.getId());
Ebean.save(saveDstores);
} catch (NullPointerException e) {
System.out.println("NULL");
for (Dstore s : saveDstores) {
try {
Ebean.save(s);
} catch (NullPointerException ex) {
System.out.println("登録できない情報あり" + mstore.getLink());
}
}
}
}
public static void スロット設置台解析(Mstore mstore) {
Document doc = JsoupHelper.run(mstore.getLink());
}
@Data
static class 設置機種情報 {
Integer 台数;
String 貸し玉料金;
String name;
String link;
public Float 貸し玉料金解析() {
Float ret = 0F;
String text = this.貸し玉料金;
text = text.replace(" ","").replace(" ","").replace("【","").replace("】","").replace("パチ","").replace("玉","").replace("円","");
text = text.replace("/","/");
if(0<text.indexOf("/")) {
Float x = Float.parseFloat(text.split("/")[0]);
Float y = Float.parseFloat(text.split("/")[1]);
Float xy = x/y;
ret = xy.floatValue();
} else {
try {
ret = Float.parseFloat(text);
} catch (NumberFormatException ne) {
}
}
return ret;
}
}
}
| [
"[email protected]"
] | |
7878094b71f4dbb64962021b883990dddb11f9ce | 88360b303ae68ea39db4db9d445b234076166ee7 | /13kafka/kafka-demo/src/main/java/com/catcher/kafkademo/KafkaDemoApplication.java | cf305955ab0ceb8fb59125014b5af50b1d912b82 | [] | no_license | catcherwyf/homework | b1f0261ed80b31e3ed00cd9e28831972beace522 | 1e7a6b1d98d18dcad7cdd2745e6923cd67b62131 | refs/heads/master | 2023-07-06T05:46:10.032776 | 2021-08-15T16:30:38 | 2021-08-15T16:30:38 | 365,556,131 | 1 | 0 | null | 2021-08-15T16:30:39 | 2021-05-08T16:03:15 | Java | UTF-8 | Java | false | false | 1,051 | java | package com.catcher.kafkademo;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.common.protocol.types.Field;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class KafkaDemoApplication {
@Autowired
private static Producer producer;
@Autowired
private static Consumer consumer;
public static void main(String[] args) {
//SpringApplication.run(KafkaDemoApplication.class, args);
String servers = "localhost:9001,localhost:9002,localhost:9003";
String topic = "kafka-topic";
String message = "kafka-demo-message";
KafkaProducer<String, String> kafkaProducer = producer.createProducer(servers);
producer.send(kafkaProducer, topic, message);
KafkaConsumer<String, String> kafkaConsumer = consumer.createConsumer(servers, topic);
consumer.readMessage(kafkaConsumer, 100);
}
}
| [
"[email protected]"
] | |
1148a6b4790047e68e4e3327dcf5d3a552a75ccd | 1f752454f82bbfce9c65e3c0f11def69ecdab3bd | /plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/method/ExtensionMethodsHelper.java | 888cd37a71dfb91815196cb38ac3860e06ba768b | [
"Apache-2.0"
] | permissive | Yamishit/intellij-community | 85cabd9700ef6a5f802ec2d52c31c6f5bb43d911 | b852aaedb1e8c48211bc11d4fb973bddcade1a76 | refs/heads/master | 2023-01-10T13:35:45.259734 | 2020-11-15T23:01:00 | 2020-11-15T23:14:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,058 | java | package de.plushnikov.intellij.plugin.processor.method;
import com.intellij.lang.java.JavaLanguage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.psi.*;
import com.intellij.psi.infos.MethodCandidateInfo;
import com.intellij.psi.util.*;
import com.intellij.util.SmartList;
import com.intellij.util.containers.ContainerUtil;
import de.plushnikov.intellij.plugin.LombokClassNames;
import de.plushnikov.intellij.plugin.psi.LombokLightMethodBuilder;
import de.plushnikov.intellij.plugin.psi.LombokLightParameter;
import de.plushnikov.intellij.plugin.util.PsiAnnotationUtil;
import de.plushnikov.intellij.plugin.util.PsiClassUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.function.BiFunction;
import java.util.stream.Collectors;
public class ExtensionMethodsHelper {
private static final Logger LOG = Logger.getInstance(ExtensionMethodsHelper.class);
public static List<PsiMethod> getExtensionMethods(final @NotNull PsiClass targetClass,
final String nameHint,
final @NotNull PsiElement place) {
if (nameHint == null || !(place instanceof PsiMethodCallExpression)) {
return Collections.emptyList();
}
PsiReferenceExpression methodExpression = ((PsiMethodCallExpression)place).getMethodExpression();
PsiExpression qualifierExpression = methodExpression.getQualifierExpression();
if (qualifierExpression == null ||
!nameHint.equals(methodExpression.getReferenceName()) ||
qualifierExpression instanceof PsiReferenceExpression && ((PsiReferenceExpression)qualifierExpression).resolve() instanceof PsiClass) {
return Collections.emptyList();
}
List<PsiMethod> result = new SmartList<>();
@Nullable PsiClass context = PsiTreeUtil.getContextOfType(place, PsiClass.class);
while (context != null) {
final @Nullable PsiAnnotation annotation = context.getAnnotation(LombokClassNames.EXTENSION_METHOD);
if (annotation != null) {
final Set<PsiClass> providers = PsiAnnotationUtil.getAnnotationValues(annotation, PsiAnnotation.DEFAULT_REFERENCED_METHOD_NAME, PsiType.class).stream()
.filter(PsiClassType.class::isInstance)
.map(PsiClassType.class::cast)
.map(PsiClassType::resolve)
.filter(Objects::nonNull)
.collect(Collectors.toSet());
if (!providers.isEmpty()) {
List<PsiMethod> extensionMethods = collectExtensionMethods(providers, ((PsiMethodCallExpression)place), targetClass);
extensionMethods
.stream()
.map(method -> MethodSignatureBackedByPsiMethod.create(method, PsiSubstitutor.EMPTY))
.distinct()
.filter(methodSignature -> !targetClass.getVisibleSignatures().contains(methodSignature))
.forEach(methodSignature -> result.add(methodSignature.getMethod()));
}
}
context = PsiTreeUtil.getContextOfType(context, PsiClass.class);
}
return result;
}
private static List<PsiMethod> collectExtensionMethods(final Set<PsiClass> providers,
final PsiMethodCallExpression callExpression,
final PsiClass targetClass) {
List<PsiMethod> psiMethods = new ArrayList<>();
providers.forEach(providerClass -> providerData(providerClass).forEach(function -> ContainerUtil.addIfNotNull(psiMethods, function.apply(targetClass, callExpression))));
return psiMethods;
}
public static List<BiFunction<PsiClass, PsiMethodCallExpression, PsiMethod>> providerData(final PsiClass providerClass) {
return CachedValuesManager.getCachedValue(providerClass, () -> CachedValueProvider.Result
.create(createProviderCandidates(providerClass), PsiModificationTracker.MODIFICATION_COUNT));
}
private static List<BiFunction<PsiClass, PsiMethodCallExpression, PsiMethod>> createProviderCandidates(final PsiClass providerClass) {
final List<BiFunction<PsiClass, PsiMethodCallExpression, PsiMethod>> result = new ArrayList<>();
for (PsiMethod providerStaticMethod : PsiClassUtil.collectClassStaticMethodsIntern(providerClass)) {
if (providerStaticMethod.hasModifierProperty(PsiModifier.PUBLIC)) {
PsiParameter @NotNull [] parameters = providerStaticMethod.getParameterList().getParameters();
if (parameters.length > 0 && !(parameters[0].getType() instanceof PsiPrimitiveType)) {
result.add((targetClass, call) -> createLightMethodBySignature(providerStaticMethod, targetClass, call));
}
}
}
return result;
}
private static LombokLightMethodBuilder createLightMethodBySignature(PsiMethod staticMethod,
PsiClass targetClass,
PsiMethodCallExpression callExpression) {
if (!staticMethod.getName().equals(callExpression.getMethodExpression().getReferenceName())) return null;
PsiClass providerClass = Objects.requireNonNull(staticMethod.getContainingClass());
PsiMethodCallExpression staticMethodCall;
try {
staticMethodCall = (PsiMethodCallExpression)JavaPsiFacade.getElementFactory(staticMethod.getProject())
.createExpressionFromText(providerClass.getQualifiedName() + "." + staticMethod.getName() + "()", callExpression);
PsiExpressionList argList = staticMethodCall.getArgumentList();
argList.add(Objects.requireNonNull(callExpression.getMethodExpression().getQualifierExpression()));
for (PsiExpression expression : callExpression.getArgumentList().getExpressions()) {
argList.add(expression);
}
}
catch (ProcessCanceledException e) {
throw e;
}
catch (Throwable e) {
LOG.error(e);
return null;
}
JavaResolveResult result = staticMethodCall.resolveMethodGenerics();
if (!(result instanceof MethodCandidateInfo)) return null;
PsiMethod method = ((MethodCandidateInfo)result).getElement();
if (!method.equals(staticMethod) || !((MethodCandidateInfo)result).isApplicable()) return null;
PsiSubstitutor substitutor = result.getSubstitutor();
final LombokLightMethodBuilder lightMethod = new LombokLightMethodBuilder(staticMethod.getManager(), staticMethod.getName()) {
@Override
public boolean isEquivalentTo(final PsiElement another) { return staticMethod.isEquivalentTo(another); }
};
lightMethod
.addModifiers(PsiModifier.PUBLIC);
PsiParameter @NotNull [] parameters = staticMethod.getParameterList().getParameters();
if (targetClass.isInterface()) {
lightMethod.addModifier(PsiModifier.DEFAULT);
}
lightMethod.setMethodReturnType(substitutor.substitute(staticMethod.getReturnType()));
for (int i = 1, length = parameters.length; i < length; i++) {
PsiParameter parameter = parameters[i];
lightMethod.addParameter(new LombokLightParameter(parameter.getName(), substitutor.substitute(parameter.getType()), lightMethod, JavaLanguage.INSTANCE));
}
PsiClassType[] thrownTypes = staticMethod.getThrowsList().getReferencedTypes();
for (PsiClassType thrownType : thrownTypes) {
lightMethod.addException((PsiClassType)substitutor.substitute(thrownType));
}
PsiTypeParameter[] staticMethodTypeParameters = staticMethod.getTypeParameters();
HashSet<PsiTypeParameter> initialTypeParameters = ContainerUtil.newHashSet(staticMethodTypeParameters);
Arrays.stream(staticMethodTypeParameters)
.filter(typeParameter -> PsiTypesUtil.mentionsTypeParameters(substitutor.substitute(typeParameter), initialTypeParameters))
.forEach(lightMethod::addTypeParameter);
lightMethod.setNavigationElement(staticMethod);
lightMethod.setContainingClass(targetClass);
return lightMethod;
}
}
| [
"[email protected]"
] | |
0773c36a81e396da801c4f1ab23b1b888df09e37 | 68b22b9be222a5eae8264330685a988dbca12485 | /Java Swing/tableSwing/src/MarketTable/MYOSM.java | 44bc4ad19672cb7a35c7b73d866a3e7e2473ebfb | [] | no_license | smileHorse/Java | 4bc64b413a73ac416cfdea5df9b4debff5668901 | 8ecad1ad7352eaf2c788aec9965db0ef9daeffe3 | refs/heads/master | 2022-12-14T02:35:39.528245 | 2020-09-27T06:35:26 | 2020-09-27T06:35:26 | 119,227,889 | 0 | 0 | null | 2022-12-10T21:03:40 | 2018-01-28T04:35:40 | Java | UTF-8 | Java | false | false | 2,443 | java | package MarketTable;
import javax.swing.*;
import java.awt.*;
import java.util.Map;
import java.util.Random;
public class MYOSM extends JFrame implements Runnable {
Stock[] market = {
new Stock("JTree", 14.57),
new Stock("JTable", 17.44),
new Stock("JList", 16.44),
new Stock("JButton", 7.21),
new Stock("JComponent", 27.40)
};
boolean monitor;
Random random = new Random();
Thread runner;
public MYOSM() {
// Not meant to be shown as a real frame
super("Thread only version...");
runner = new Thread(this);
runner.start();
}
// This version creates a real frame so that you can see how the typical stocks
// are updated. It's not meant to be used with other programs, but rather as a
// debugging tool to make sure the market runs smoothly.
public MYOSM(boolean monitorOn) {
super("Stock Market Monitor");
setSize(400, 100);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
monitor = monitorOn;
getContentPane().add(new JLabel("Trading is active. " + "Close this window to close the market"),
BorderLayout.CENTER);
runner = new Thread(this);
runner.start();
}
// Here's the heart of our stock market. In an infinite loop, just pick a
// random stock and update its price. To make the program interesting, we'll
// update a price every second.
@Override
public void run() {
while (true) {
int whichStock = Math.abs(random.nextInt()) % market.length;
double delta = random.nextDouble() - 0.4;
market[whichStock].update(delta);
if (monitor) {
market[whichStock].print();
}
try {
Thread.sleep(1000);
} catch(InterruptedException ie) {
}
}
}
public Stock getQuote(int index) {
return market[index];
}
// This method returns the list of all the symbols in the market table.
public String[] getSymbols() {
String[] symbols = new String[market.length];
for (int i = 0; i < market.length; i++) {
symbols[i] = market[i].symbol;
}
return symbols;
}
public static void main(String args[]) {
MYOSM myMarket = new MYOSM(args.length > 0);
myMarket.setVisible(true);
}
}
| [
"[email protected]"
] | |
8201da90be18cc9102c10d9de31bb81d4537706c | a99e5a5423588fd2cde08bb31a6b869798c0794f | /src/main/java/com/quiz/lesson01/Lesson01Quiz03.java | 346fe40dc26358bf1ede5130c6a264df1d66facd | [] | no_license | ellahyesu/spring_quiz | a40c8726eed5a1024a1137e48baf5beb65559a52 | e9e384becbfb859131dc7db6c60ef87c3c3b122c | refs/heads/master | 2023-08-29T08:43:58.699672 | 2021-10-05T13:04:33 | 2021-10-05T13:04:33 | 385,993,186 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 407 | java | package com.quiz.lesson01;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller // jsp를 내려줄 때는 @ResponseBody가 사용되지 않는다.
public class Lesson01Quiz03 {
// 요청 URL : http://localhost/lesson01/quiz03/1
@RequestMapping("/lesson01/quiz03/1")
public String quiz03_1() {
return "lesson01/quiz03_1";
}
}
| [
"[email protected]"
] | |
b29ba54360aa49a3026721aac7e576e4290f3ffc | 0b4efdc5f341646c9f7cddeeafe2b2252e4ddd03 | /sping_security/src/main/java/com/example/demo/auth/ApplicationUser.java | ac0eb8a965a9093e5a8f9bef86e1dc06fddd4bf8 | [] | no_license | Nam-1810/Spring-Security | 78e4ac52ee4f468327d326456843cb9a78fc953d | 9765900b2594dc58da3ba8a116743db510ffe924 | refs/heads/master | 2023-04-28T16:16:57.058663 | 2021-05-25T02:05:26 | 2021-05-25T02:05:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,998 | java | package com.example.demo.auth;
import java.util.Collection;
import java.util.Set;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
public class ApplicationUser implements UserDetails {
private final String password;
private final String username;
private final Set<? extends GrantedAuthority> grantedAuthorities;
private final Boolean isAccountNonExpired;
private final Boolean isAccountNonLocked;
private final Boolean isCredentialsNonExpired;
private final Boolean isEnabled;
public ApplicationUser( String username, String password, Set<? extends GrantedAuthority> grantedAuthorities,
Boolean isAccountNonExpired, Boolean isAccountNonLocked, Boolean isCredentialsNonExpired,
Boolean isEnabled) {
this.username = username;
this.password = password;
this.grantedAuthorities = grantedAuthorities;
this.isAccountNonExpired = isAccountNonExpired;
this.isAccountNonLocked = isAccountNonLocked;
this.isCredentialsNonExpired = isCredentialsNonExpired;
this.isEnabled = isEnabled;
}
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
// TODO Auto-generated method stub
return grantedAuthorities;
}
@Override
public String getPassword() {
// TODO Auto-generated method stub
return password;
}
@Override
public String getUsername() {
// TODO Auto-generated method stub
return username;
}
@Override
public boolean isAccountNonExpired() {
// TODO Auto-generated method stub
return isAccountNonExpired;
}
@Override
public boolean isAccountNonLocked() {
// TODO Auto-generated method stub
return isAccountNonLocked;
}
@Override
public boolean isCredentialsNonExpired() {
// TODO Auto-generated method stub
return isCredentialsNonExpired;
}
@Override
public boolean isEnabled() {
// TODO Auto-generated method stub
return isEnabled;
}
}
| [
"[email protected]"
] | |
3c95b5b47392ece3cc75fd6f6692b7412785b899 | e63363389e72c0822a171e450a41c094c0c1a49c | /Mate20_9_0_0/src/main/java/com/android/server/pm/-$$Lambda$InstantAppRegistry$o-Qxi7Gaam-yhhMK-IMWv499oME.java | 36a1a913887da019a6bd7046e13e0f5b74da5f95 | [] | no_license | solartcc/HwFrameWorkSource | fc23ca63bcf17865e99b607cc85d89e16ec1b177 | 5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad | refs/heads/master | 2022-12-04T21:14:37.581438 | 2020-08-25T04:30:43 | 2020-08-25T04:30:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 615 | java | package com.android.server.pm;
import android.content.pm.PackageParser.Package;
import java.util.function.Predicate;
/* compiled from: lambda */
public final /* synthetic */ class -$$Lambda$InstantAppRegistry$o-Qxi7Gaam-yhhMK-IMWv499oME implements Predicate {
private final /* synthetic */ Package f$0;
public /* synthetic */ -$$Lambda$InstantAppRegistry$o-Qxi7Gaam-yhhMK-IMWv499oME(Package packageR) {
this.f$0 = packageR;
}
public final boolean test(Object obj) {
return ((UninstalledInstantAppState) obj).mInstantAppInfo.getPackageName().equals(this.f$0.packageName);
}
}
| [
"[email protected]"
] | |
1d5cfee64c0a7e106418e5b35f52218a9e30fc5a | 95a8afb46d20c18ffb436086db9482e709c3578b | /app/src/main/java/kz/algakzru/youtubevideovocabulary/ui/FlippingView.java | 2eefcc2977f9d4b74b51bb44c74a92817beb08c5 | [] | no_license | arman-sydikov/vvAndroidOld | ee1e8bb9c881bb4bc2d9a0e63bf06b1aedd3c782 | 26c426fe0dfd887ae6e1138c07e4d2bab1b0d987 | refs/heads/master | 2021-06-10T11:25:57.991522 | 2017-01-24T09:56:39 | 2017-01-24T09:56:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,552 | java | /*
* Copyright 2012 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kz.algakzru.youtubevideovocabulary.ui;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
/**
* A view which flips from one ImageView to another view using a 3D flip animation.
*/
public class FlippingView extends FrameLayout {
private final ImageView flipOutView;
private final ImageView flipInView;
private final AnimatorSet animations;
private final Listener listener;
/**
* Defines an interface to enable listening to flip events.
*/
public interface Listener {
/**
* Called when the FlippingView has completed a flip.
*
* @param view The FlippingView which has completed the flip.
*/
void onFlipped(FlippingView view);
}
/**
* Create a flipping view which performs a 3D flip animation from one view to another.
*
* @param context The context associated with this View.
* @param listener A listener which is informed of when the view has completed flipping.
* @param width The view's width.
* @param height The view's height.
*/
public FlippingView(Context context, Listener listener, int width, int height) {
super(context);
this.listener = listener;
this.flipOutView = new ImageView(context);
this.flipInView = new ImageView(context);
addView(flipOutView, width, height);
addView(flipInView, width, height);
flipInView.setRotationY(-90);
ObjectAnimator flipOutAnimator = ObjectAnimator.ofFloat(flipOutView, "rotationY", 0, 90);
flipOutAnimator.setInterpolator(new AccelerateInterpolator());
Animator flipInAnimator = ObjectAnimator.ofFloat(flipInView, "rotationY", -90, 0);
flipInAnimator.setInterpolator(new DecelerateInterpolator());
animations = new AnimatorSet();
animations.playSequentially(flipOutAnimator, flipInAnimator);
animations.addListener(new AnimationListener());
}
public void setFlipInDrawable(Drawable drawable) {
flipInView.setImageDrawable(drawable);
}
public void setFlipOutDrawable(Drawable drawable) {
flipOutView.setImageDrawable(drawable);
}
public void setFlipDuration(int flipDuration) {
animations.setDuration(flipDuration);
}
public void flip() {
animations.start();
}
/**
* Listens to the end of the flip animation to signal to listeners that the flip is complete
*/
public final class AnimationListener extends AnimatorListenerAdapter {
@Override
public void onAnimationEnd(Animator animation) {
flipOutView.setRotationY(0);
flipInView.setRotationY(-90);
listener.onFlipped(FlippingView.this);
}
}
}
| [
"[email protected]"
] | |
d8d57de40956504a1af2f946eb02336da00540fe | 584d73b907980df4a174c45f6c4018d8e984b037 | /src/main/java/com/uam/aps/utils/Menu.java | 2d1ea16d07f676a57da9b0662ce5c4e2b0ebd9cc | [] | no_license | LucasAlvez/distributed-database | 2e36dc8aa1384b05576e2ab63e9dba29a2e0818e | a2fcc25c9d4642423539d4f47a54e4bb991cd703 | refs/heads/master | 2020-04-01T22:21:41.838223 | 2018-11-15T21:03:10 | 2018-11-15T21:03:10 | 153,704,163 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,471 | java | package com.uam.aps.utils;
import java.util.Scanner;
import com.uam.aps.request.ClientRequest;
import com.uam.aps.request.EmployeeRequest;
import com.uam.aps.request.ProductRequest;
public class Menu {
public static ClientRequest clientMenu() {
Scanner in = new Scanner(System.in);
ClientRequest clientRequest = new ClientRequest();
System.out.println("*************** CLIENTE ******************");
System.out.println("(1) Cadastrar Cliente\n" + "(2) Atualizar Cliente\n" + "(3) Buscar Cliente\n"
+ "(4) Deletar Cliente\n");
System.out.println("Digite a operação desejada:");
clientRequest.setOperation(in.nextInt());
if (clientRequest.getOperation() == 1 || clientRequest.getOperation() == 2) {
if (clientRequest.getOperation() == 2) {
System.out.println("Digite o cpf do cliente que deseja atualizar");
clientRequest.setCpfAux(in.next());
}
System.out.println("Digite o nome:");
clientRequest.setName(in.next());
System.out.println("Digite o cpf:");
clientRequest.setCpf(in.next());
System.out.println("Digite a idade:");
clientRequest.setAge(in.nextInt());
} else if (clientRequest.getOperation() == 3) {
System.out.println("Digite o cpf do cliente que deseja buscar");
clientRequest.setCpf(in.next());
} else if (clientRequest.getOperation() == 4){
System.out.println("Digite o cpf do cliente que deseja excluir");
clientRequest.setCpf(in.next());
} else {
System.out.println("Operação invalida");
}
return clientRequest;
}
public static EmployeeRequest employeeMenu() {
Scanner in = new Scanner(System.in);
EmployeeRequest employeeRequest = new EmployeeRequest();
System.out.println("*************** FUNCIONÁRIO ******************");
System.out.println("(1) Cadastrar Funcinário\n" + "(2) Atualizar Funcionário\n" + "(3) Buscar Funcionário\n"
+ "(4) Deletar Funcionário\n");
System.out.println("Digite a operação desejada:");
employeeRequest.setOperation(in.nextInt());
if (employeeRequest.getOperation() == 1 || employeeRequest.getOperation() == 2) {
if (employeeRequest.getOperation() == 2) {
System.out.println("Digite o cpf do funcionário que deseja atualizar");
employeeRequest.setCpfAux(in.next());
}
System.out.println("Digite o nome:");
employeeRequest.setName(in.next());
System.out.println("Digite o cpf:");
employeeRequest.setCpf(in.next());
System.out.println("Digite o cargo:");
employeeRequest.setResponsibility(in.next());
System.out.println("Digite o salario:");
employeeRequest.setSalary(in.nextDouble());
} else if (employeeRequest.getOperation() == 3) {
System.out.println("Digite o cpf do funcionário que deseja buscar");
employeeRequest.setCpf(in.next());
} else if (employeeRequest.getOperation() == 4){
System.out.println("Digite o cpf do funcionário que deseja excluir");
employeeRequest.setCpf(in.next());
} else {
System.out.println("Operação invalida");
}
return employeeRequest;
}
public static ProductRequest productMenu() {
Scanner in = new Scanner(System.in);
ProductRequest productRequest = new ProductRequest();
System.out.println("*************** PRODUTO ******************");
System.out.println("(1) Cadastrar Produto\n" + "(2) Atualizar Produto\n" + "(3) Buscar Produto\n"
+ "(4) Deletar Produto\n");
System.out.println("Digite a operação desejada:");
productRequest.setOperation(in.nextInt());
if (productRequest.getOperation() == 1 || productRequest.getOperation() == 2) {
if (productRequest.getOperation() == 2) {
System.out.println("Digite o código do produto que deseja atualizar");
productRequest.setCodeAux(in.next());
}
System.out.println("Digite o nome:");
productRequest.setName(in.next());
System.out.println("Digite o código do produto:");
productRequest.setCode(in.next());
System.out.println("Digite o preço:");
productRequest.setPrice(in.nextDouble());
System.out.println("Digite a quantidade:");
productRequest.setQuantity(in.nextInt());
} else if (productRequest.getOperation() == 3) {
System.out.println("Digite o código do produto que deseja buscar");
productRequest.setCode(in.next());
} else if (productRequest.getOperation() == 4){
System.out.println("Digite o código do produto que deseja excluir");
productRequest.setCode(in.next());
} else {
System.out.println("Operação invalida");
}
return productRequest;
}
}
| [
"[email protected]"
] | |
1120dbb26926e055724d108a5d38361acb264bc9 | 2869fc39e2e63d994d5dd8876476e473cb8d3986 | /Super_clutter/src/test/com/client/TestUserService.java | ccc4c45cdcc4ee7955ee0fe3080e1d79aa4edbd5 | [] | no_license | kavt/feiniu_pet | bec739de7c4e2ee896de50962dbd5fb6f1e28fe9 | 82963e2e87611442d9b338d96e0343f67262f437 | refs/heads/master | 2020-12-25T17:45:16.166052 | 2016-06-13T10:02:42 | 2016-06-13T10:02:42 | 61,026,061 | 0 | 0 | null | 2016-06-13T10:02:01 | 2016-06-13T10:02:01 | null | UTF-8 | Java | false | false | 3,385 | java | package com.client;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import com.lvmama.clutter.model.MobileOrder;
import com.lvmama.clutter.model.MobileUser;
import com.lvmama.clutter.service.client.v3_1.ClientUserServiceV31;
public class TestUserService extends TestBase{
ClientUserServiceV31 os = (ClientUserServiceV31) context.getBean("api_com_user_3_1_0");
/**
* 获取用户信息
*/
//@Test
public void testGetUser() {
Map<String,String> param = new HashMap<String,String>();
param.put("userNo", "ff808081328b6bbe01328b7dfd4000c8");
param.put("lvsessionid", "f4233fca-029e-4f17-8075-ac8e7e2c2b0b");
MobileUser c = os.getUser(param);
if(null != c) {
System.out.println("=获取用户信息 success the user name =====" +c.getImageUrl());
}else {
System.out.println("=获取用户信息 faild there is no user was found!=====");
}
}
/**
* 获取用户信息
*/
@Test
public void testaddContact() {
Map<String,String> param = new HashMap<String,String>();
param.put("userNo", "5ad32f1a1d2250d7011d22a254e601c7");
param.put("certType", "HUZHAO");
param.put("certNo", "1231231231");
//receiverName
param.put("receiverName", "a");
param.put("mobileNumber", "1111111111");
param.put("gender", "F");
param.put("birthday", "1987-09-08");
os.addContact(param);
}
/**
* 获取用户优惠劵信息
*/
//@Test
public void testGetCoupon() {
Map<String,String> param = new HashMap<String,String>();
param.put("userId", "298");
param.put("state", "USED");
param.put("lvsessionid", "f4233fca-029e-4f17-8075-ac8e7e2c2b0b");
// List<MobileUserCoupon> c = os.getCoupon(param);
// if(null != c) {
// System.out.println("=获取用户优惠劵信息 success the userCouponList size =====" +c.size());
// }else {
// System.out.println("=获取用户优惠劵信息 faild there is no userCouponList was found!=====");
// }
}
/**
* 获取用户某个订单
*/
//@Test
public void testGetOrder() {
Map<String,Object> param = new HashMap<String,Object>();
param.put("userNo", "40288add3fe1d53a013ff0d54850546f");
param.put("orderId", "2696178");
MobileOrder mo = os.getOrder(param);
System.out.println(mo);
}
/**
* 获取用户订单列表
*/
public void testGetOrderList() {
Map<String,String> param = new HashMap<String,String>();
param.put("userId", "5ad32f1a1d2250d7011d22a254e601c7");
param.put("lvsessionid", "f4233fca-029e-4f17-8075-ac8e7e2c2b0b");
}
// @Test
// public void testgetBonusBalanceInCome(){
// os.getBonusBalanceInCome();
// }
//@Test
public void testqueryCmtWaitForOrder(){
//{lvversion=3.1.0, osVersion=4.0.4, userAgent=ANDROID_LVMM 3.1.0 (SHV-E160L; Android OS 4.0.4; WIFI), udid=35955404018268, secondChannel=LVMM, isIphone=false, lvsessionid=7f9576e5-fc87-474a-aee5-3c794e6dc7ff, isAndroid=true, appVersion=310, userNo=5ad32f1a1d2250d7011d22a254e601c7, userId=12, method=api.com.user.queryCmtWaitForOrder, firstChannel=ANDROID, formate=json}
Map<String,Object> param = new HashMap<String,Object>();
param.put("userId", "12");
param.put("userNo", "5ad32f1a1d2250d7011d22a254e601c7");
param.put("lvsessionid", "f4233fca-029e-4f17-8075-ac8e7e2c2b0b");
os.queryCmtWaitForOrder(param);
}
}
| [
"[email protected]"
] | |
3ccd2e7d7b29ac93c9c65c8632ee28fd50c282e1 | 0df68c35d649203674c40bf95e5b29f9e544f7ce | /src/cs601/project4/userservice/CreateUserHandler.java | 205407c501498db3b0f1fbf5dd6c55c4510b8fc4 | [] | no_license | nicholas-kebbas/event-ticketing-microservices-app | 0196fa089189ad7d0c8412120dbf135325836ecf | d3750cf5f71be2b4604ac11c39734fcc98b94285 | refs/heads/master | 2022-10-16T06:38:23.427150 | 2019-07-09T22:35:26 | 2019-07-09T22:35:26 | 195,894,470 | 0 | 0 | null | 2022-10-04T23:52:59 | 2019-07-08T22:30:42 | Java | UTF-8 | Java | false | false | 2,113 | java | package cs601.project4.userservice;
import java.io.IOException;
import java.sql.SQLException;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.JsonParser;
import cs601.project4.database.Database;
import cs601.project4.database.User;
import cs601.project4.server.CS601Handler;
import cs601.project4.utility.JsonManager;
/**
* Create User in the database. Requires username as input. Returns the userId of the created user.
* @author nkebbas
*
*/
public class CreateUserHandler extends CS601Handler {
public synchronized void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
public synchronized void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
String getBody = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
/* Check for Correct JSON Issues and No null necessary parameters */
JsonObject jsonBody = JsonManager.validateJsonString(getBody);
if (jsonBody == null) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
return;
}
if (jsonBody.get("username") == null) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
return;
}
String userName = jsonBody.get("username").getAsString();
/* Now save this info to database, and pass back the ID of the new event */
User user = new User(userName);
Database db = Database.getInstance();
String intString = "";
try {
int id = db.getDBManager().createUser(user, "users");
intString = Integer.toString(id);
response.setContentType("application/json");
response.setStatus(HttpServletResponse.SC_OK);
response.getWriter().print("{" + "\"userid\": " + intString +"}");
} catch (SQLException e) {
response.setContentType("application/json");
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
e.printStackTrace();
}
}
}
| [
"[email protected]"
] | |
746253dbd7035067cc7de0066bf7122d5f1bfdf9 | addd9b4c40cd6f01505b3d79ef2763d5cb066d7c | /src/test/java/com/janle/redis/SpringRedisDemoTest.java | 84775beb8f597e82cf437f77df4ecb4b8643fb9e | [] | no_license | ljz0721cx/springredis | e75bd2627e80fa179f093fbef420bbab34257698 | c2f712086fa350a6d4e0999f39034d8d7dae57e3 | refs/heads/master | 2020-12-24T19:04:14.156193 | 2018-04-15T05:49:19 | 2018-04-15T05:49:19 | 58,058,882 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 873 | java | package com.janle.redis;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class SpringRedisDemoTest {
@Autowired
private RedisTemplate jedisTemplate;
@Test
public void testJedis() {
try {
RedisSerializer<String> serializer=jedisTemplate.getStringSerializer();
byte[] key = serializer.serialize("Janle");
System.out.println(key);
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"[email protected]"
] | |
cf26c167a0d6c59852de0772339a2f8e50fc070a | c4a2ba328ddffa6e225a2da342e23ea3221a1c2d | /src/main/java/com/bdqn/tytcake/service/impl/UserServiceImpl.java | 6fc00053aafe289ca6614ef336b643ae789aa08a | [] | no_license | gongsunlinglong/springboot | 5c40a63a30fee9a6f337c0946ca7b1606d42dfb8 | 201d4b831bbd867ec6901e76bd9c72de9af9c146 | refs/heads/master | 2020-03-22T08:39:21.900132 | 2018-07-09T08:45:52 | 2018-07-09T08:45:52 | 139,315,346 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,225 | java | package com.bdqn.tytcake.service.impl;
import com.bdqn.tytcake.dto.UserDto;
import com.bdqn.tytcake.dao.UserDao;
import com.bdqn.tytcake.entity.User;
import com.bdqn.tytcake.service.UserService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service("userService")
public class UserServiceImpl implements UserService {
@Resource
private UserDao userDao;
@Override
public void insertUser(User user) {
this.userDao.insertUser(user);
}
@Override
public void updateUser(User user) {
this.userDao.updateUser(user);
}
@Override
public void delateUser(String userAccount) {
this.userDao.delateUser(userAccount);
}
@Override
public User sleectUserById(Integer userAccount) {
return this.userDao.sleectUserById(userAccount);
}
@Override
public List<User> sleectUserAll() {
return this.userDao.sleectUserAll();
}
@Override
public Long selectUserByCount(UserDto dto) {
return this.userDao.selectUserByCount(dto);
}
@Override
public List<User> selectStudentByPage(UserDto dto) {
return this.selectStudentByPage(dto);
}
}
| [
"[email protected]"
] | |
23320ee9157d7dfb760e1f73878bbb8193259daf | 1e5569cefafda49ed2d14a2c79bf81f467ee5671 | /src/arquivomunicipalpmpp/util/HibernateUtil.java | 67e6842d65bc24392ed32c0fbb20712cb363cbe4 | [] | no_license | luishmnascimento/ArquivoMunicipalPMPP | 1e3985d92784863c2395a3b375c1bbe6e5eaebb3 | 5eba7da2dfadb1c6ee432a3c7d806de8dc064d12 | refs/heads/master | 2021-05-29T13:53:33.120502 | 2015-10-21T12:07:21 | 2015-10-21T12:07:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 800 | java | package arquivomunicipalpmpp.util;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
public class HibernateUtil
{
private static final SessionFactory sessionFactory;
private static final ThreadLocal<Session> threadLocal = new ThreadLocal<>();
static
{
try
{
sessionFactory = new AnnotationConfiguration().configure("hibernate.cfg.xml").buildSessionFactory();
} catch (Throwable e)
{
throw new ExceptionInInitializerError(e);
}
}
public static Session getInstance()
{
Session session = (Session) threadLocal.get();
session = sessionFactory.openSession();
threadLocal.set(session);
return session;
}
}
| [
"[email protected]"
] | |
f8d9e395a3cc214178f26f0d68266824709bb479 | a5bf491233db5fff4d36ffa727322e21941c870c | /src/main/java/cn/xinhang/basic/constant/Constant.java | 77059eda10bc49e74318f1c8053fdd5131a2a70c | [] | no_license | ch1214java/pethome | 267fe6e3d3e1b6984734fd347e2a743b61f2f668 | 30d5d6b157376de3ac857f11558d0f3f0b641639 | refs/heads/master | 2023-02-14T00:26:52.843434 | 2021-01-15T10:19:37 | 2021-01-15T10:19:37 | 327,842,378 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,387 | java | package cn.xinhang.basic.constant;
public class Constant {
/**
* 通过手机验证码注册
*/
public static final String PHONE_REG = "phone_reg";
/**
* 通过手机验证码登录
*/
public static final String PHONE_LOGIN = "phone_login";
/**
* 通过邮箱注册
*/
public static final String EMAIL_REG = "email_reg";
/**
* SMS短信平台相关常量
*/
public static final String SMS_UID = "chenhong_nb";
public static final String SMS_KEY = "d41d8cd98f00b204e980";
/**
* 数据状态:正常
*/
public static final Integer STATE_NORMAL = 0;
/**
* 数据状态:待审核
*/
public static final Integer STATE_AUDIT = 1;
/**
* 数据状态:待激活
*/
public static final Integer STATE_ACTIVE = 2;
/**
* 数据状态:禁用
*/
public static final Integer STATE_DISABLED = -1;
/**
* 前台用户登录
*/
public static final String FRONT = "front";
/**
* 后台用户登录
*/
public static final String ADMIN = "admin";
/**
* 当前登录用户在Redis中的key
*/
public static final String KEY_OF_LOGINUSER = "loginUser";
/**
* Redis中存贮登录用户对象的过期时间 30分钟
*/
public static final Integer EXPIRE_TIME_IN_REDIS = 30 * 60;
}
| [
"[email protected]"
] | |
00e3f6d1ff82de2acc7e7f888bbe0d3e79507a1c | 2a6e1dfd144dd8e077d08de79aec7b7ae47290e0 | /test/homework/model/WallTest.java | 12f0c5493a7982c93eedd2bd5751407694b1a475 | [] | no_license | Tophyan1/NHF3 | 1c502657b88efbbda8c61ea03a1059ea71ac97c5 | f39e57314da1fdcd9b205a2cf2b9a800bf53fc6d | refs/heads/Rewrite | 2021-07-14T12:47:45.448400 | 2020-12-01T19:54:40 | 2020-12-01T19:54:40 | 225,046,627 | 0 | 0 | null | 2020-12-01T19:56:22 | 2019-11-30T17:28:11 | Java | UTF-8 | Java | false | false | 822 | java | package homework.model;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class WallTest {
@Test
public void collisionTest1() {
Wall wall = new Wall(0, 0, 1, 1);
MovableParticle particle = new MovableParticle(new Point(50, 4), -1);
assertFalse(wall.didCollide(particle));
}
@Test
public void collisionTest2() {
Wall wall = new Wall(0, 0, 5, 5);
MovableParticle particle = new MovableParticle(new Point(-9, 3), 1);
assertTrue(wall.didCollide(particle));
}
@Test
public void collisionTest3() {
Wall wall = new Wall(0, 0, 30, 30);
MovableParticle particle = new MovableParticle(new Point(15, 15), 6);
assertTrue(wall.didCollide(particle));
}
} | [
"[email protected]"
] | |
5276329f503b49008b4a6edea40470945d2a51e9 | 183a74b885e590d4679e43c4a844703b84df4b93 | /src/main/java/kafkapublisher/infrastructure/api/PublisherController.java | ccaa1b73773c4bd1b3a6797422d63e5121324a7b | [] | no_license | chrisburki/personal-banking-wm-kafkapublisher | 887901e8e73c69bb2af9466a2c657b4f9c742768 | 276b18e537024995fc3e05b090a1ee91b1bacbd3 | refs/heads/master | 2020-04-26T02:28:06.637814 | 2019-03-19T19:43:28 | 2019-03-19T19:43:28 | 173,235,777 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 993 | java | package kafkapublisher.infrastructure.api;
import kafkapublisher.domain.message.Message;
import kafkapublisher.application.PublisherService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/publisher")
public class PublisherController {
private final PublisherService publisherService;
PublisherController(PublisherService publisherService) {
this.publisherService = publisherService;
}
@RequestMapping(value = "/messages", method = RequestMethod.POST)
public Message sendMessage(@RequestBody Message message) {
System.out.println("Message received");
System.out.println("Message Content: " + message.getContent());
publisherService.sendMessage(message.getContent());
return message;
}
}
| [
"[email protected]"
] | |
120105f5b8aca01f6adddab3c37bbf34242756ae | c05adc4ba204020b9b89749718b201cca32ba848 | /app/src/main/java/com/otipass/sql/Msg.java | 95bda0520adfabb2eb76d7ba9838ac76c603ea83 | [] | no_license | anashmamouch/alsace-presta-android | 1b7fdac7241f8f3e4b7b21f3d7874c455d4cfced | 61521080615389f0c20587d500cea4d02c3e61a2 | refs/heads/master | 2020-04-21T17:36:05.105051 | 2019-02-08T13:46:19 | 2019-02-08T13:46:19 | 169,741,037 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,702 | java | /**
================================================================================
PASS MUSEUM project
Package com.otipass.sql
@copyright Otipass 2013. All rights reserved.
@author ED ($Author: ede $)
@version $Rev: 2426 $
$Id: Msg.java 2426 2013-08-28 16:34:15Z ede $
================================================================================
*/
package com.otipass.sql;
public class Msg {
private String msg;
private int type;
private int minProfile;
private int id;
String startDate;
String endDate;
String lang;
public Msg() {
}
public Msg(String msg, int type, int id, int minProfile) {
this.msg = msg;
this.type = type;
this.id = id;
this.minProfile = minProfile;
}
public Msg(String msg, String startDate, String endDate, String lang) {
this.msg = msg;
this.startDate = startDate;
this.endDate = endDate;
this.lang = lang;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getMinProfile() {
return minProfile;
}
public void setMinProfile(int profile) {
this.minProfile = minProfile;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public String getLang() {
return lang;
}
public void setLang(String lang) {
this.lang = lang;
}
} | [
"[email protected]"
] | |
f2e842ae7b3dc48ea2304d7e6eda6800a57b236a | 2bce589f1cd67df3e1da44b45f9e8a71075fdeff | /book/src/main/java/cn/sjxy/book/web/test/BookTest.java | 7f6ad462e23faec7dc8bc8e1c5b867e11fcad294 | [] | no_license | lh1473179505/book | 83619d8a61852bdb53c247fa839efb51bdcf6082 | 77635217eb053f4e15deaceda527686210fee892 | refs/heads/master | 2022-12-23T12:06:04.211076 | 2019-06-15T08:16:02 | 2019-06-15T08:16:02 | 192,050,340 | 0 | 0 | null | 2022-11-16T12:24:35 | 2019-06-15T07:31:24 | Java | UTF-8 | Java | false | false | 2,390 | java | package cn.sjxy.book.web.test;
import java.util.List;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import cn.sjxy.book.domain.Admin;
import cn.sjxy.book.domain.Item;
import cn.sjxy.book.domain.Member;
import cn.sjxy.book.service.AdminService;
import cn.sjxy.book.service.ItemService;
import cn.sjxy.book.service.MemberService;
public class BookTest {
@Test
public void test1() {
ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
Member member = new Member();
member.setMid("10001");
member.setName("zhangsan");
member.setAge(15);
member.setSex(1);
member.setPhone("12345678977");
MemberService mService=context.getBean("memberService",MemberService.class);
mService.saveMember(member);
}
@Test
public void test2() {
ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
Admin admin = new Admin();
admin.setAid("gouzi");
admin.setPassword("1292C16E82D2EA2AC8A7767BA29031E2");
admin.setLastdate(null);
admin.setFlag(2);
admin.setStatus(1);
AdminService aService=context.getBean("adminService",AdminService.class);
//aService.insertAdmin(admin);
}
@Test
public void test3() {
ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
Item item=new Item();
item.setName("javaEE");
item.setNote("from going into a door to abundon!");
ItemService iService=context.getBean("itemService",ItemService.class);
iService.addItem(item);
}
@Test
public void testFindAllItem() {
ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
ItemService iService=context.getBean("itemService",ItemService.class);
List<Item> items=iService.selectAll();
for(Item item : items ) {
System.out.println(item);
}
}
@Test
public void testfenye() {
PageHelper.startPage(3, 5);
ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
ItemService iService=context.getBean("itemService",ItemService.class);
List<Item> list=iService.selectAll();
PageInfo pageInfo=new PageInfo(list);
List<Item> items=pageInfo.getList();
for(Item item : items ) {
System.out.println(item);
}
}
}
| [
"[email protected]"
] | |
8083e62dd39a5cb4ebd4cd3694611f815b943c0e | b6f51d80caeaf77e9e97d1914c359c906c731a17 | /src/main/java/com/pocco/pl/ussdtest/model/SessionModel.java | c5f104808166a4726bb8890a94d7646cef475780 | [] | no_license | Jumaodhiss/ussd_test_v1.0.0 | 9cfb05090257f2803964dff110ceaa70a6bc957e | 9b1b0244e083911f0a05eac8158c74711d0fc0b1 | refs/heads/master | 2020-03-27T09:08:04.389408 | 2018-08-27T15:18:31 | 2018-08-27T15:18:31 | 146,316,223 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,567 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.pocco.pl.ussdtest.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/**
*
* @author sure
*/
@Entity
@Table(name = "CustomerSessions")
public class SessionModel implements Serializable {
public SessionModel() {
}
public SessionModel(Long id, String msisdn, String sessionData) {
this.id = id;
this.msisdn = msisdn;
this.sessionData = sessionData;
}
/**
* @return the id
*/
public Long getId() {
return id;
}
/**
* @return the msisdn
*/
public String getMsisdn() {
return msisdn;
}
/**
* @param msisdn the msisdn to set
*/
public void setMsisdn(String msisdn) {
this.msisdn = msisdn;
}
/**
* @return the sessionData
*/
public String getSessionData() {
return sessionData;
}
/**
* @param sessionData the sessionData to set
*/
public void setSessionData(String sessionData) {
this.sessionData = sessionData;
}
@Id
//@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "ID")
private Long id;
@Column(name = "MSISDN")
private String msisdn;
@Column(name = "SESSIONDATA",length = 1000)
private String sessionData;
}
| [
"[email protected]"
] | |
357d76477ce4cc4eb0f78a931dfe4edaca38adbd | 10ba1ee2c970384ec1ae4d414dc907d87058d7cb | /linechart/src/main/java/com/zgq/linechart/ChartView.java | 60efee2f6329a1e84f247bc0256ee2125a138adb | [] | no_license | newerZGQ/AnyTest | b3e9b375044460e4861a63ae7596ab5b0bc0cd5e | 4366d581c78623cf30ebf249d83b8ac4655cbc72 | refs/heads/master | 2021-04-26T22:24:57.658116 | 2018-11-03T17:18:40 | 2018-11-03T17:18:40 | 124,085,756 | 1 | 0 | null | 2018-03-06T14:03:06 | 2018-03-06T13:55:20 | Java | UTF-8 | Java | false | false | 16,007 | java | package com.zgq.linechart;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Shader;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.animation.DecelerateInterpolator;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zgq.linechart.R;
/**
* 自定义折线图
* 一共需要九组数据,其中第一个和第九个不用来展示,只是为了好看,并且第0个与第一个和第八个与第九个间隔为space,
* 为了显示好看,建议第0个和最后一个小一点
*/
public class ChartView extends View {
private static final String TAG = ChartView.class.getSimpleName();
//一共七组数据,将屏幕x方向均分为7部分,每部分宽度为space,其中最左边和最右边各为二分之一space
private int space;
//xy坐标轴颜色
private int xylinecolor = 0xffe2e2e2;
//xy坐标轴宽度
private int xylinewidth = dpToPx(2);
//xy坐标轴文字颜色
private int xytextcolor = 0xff7e7e7e;
//xy坐标轴文字大小
private int xytextsize = spToPx(12);
//折线图中折线的颜色
private int linecolor = 0x8EE2D707;
//x轴各个坐标点水平间距
private int interval = dpToPx(50);
//背景颜色
private int bgcolor = 0xffffffff;
//是否在ACTION_UP时,根据速度进行自滑动,没有要求,建议关闭,过于占用GPU
private boolean isScroll = false;
//绘制XY轴坐标对应的画笔
private Paint xyPaint;
//绘制XY轴的文本对应的画笔
private Paint xyTextPaint;
//画折线对应的画笔
private Paint linePaint;
private int width;
private int height;
//x轴的原点坐标
private int xOri;
//y轴的原点坐标
private int yOri;
//第一个点X的坐标
private float xInit;
//第一个点对应的最大Y坐标
private float maxXInit;
//第一个点对应的最小X坐标
private float minXInit;
private Map<String, Integer> origiValue = new HashMap<>();
//x轴坐标对应的数据
private List<String> xValue = new ArrayList<>();
//y轴坐标对应的数据
private List<Integer> yValue = new ArrayList<>();
//折线对应的数据
private Map<String, Integer> value = new HashMap<>();
//点击的点对应的X轴的第几个点,默认1
private int[] selectIndex = new int[2];
//X轴刻度文本对应的最大矩形,为了选中时,在x轴文本画的框框大小一致
private Rect xValueRect;
//速度检测器
private VelocityTracker velocityTracker;
private Context context;
public ChartView(Context context) {
this(context, null);
}
public ChartView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public ChartView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context, attrs, defStyleAttr);
this.context = context;
initPaint();
}
/**
* 初始化畫筆
*/
private void initPaint() {
xyPaint = new Paint();
xyPaint.setAntiAlias(true);
xyPaint.setStrokeWidth(xylinewidth);
xyPaint.setStrokeCap(Paint.Cap.ROUND);
xyPaint.setColor(xylinecolor);
xyTextPaint = new Paint();
xyTextPaint.setAntiAlias(true);
xyTextPaint.setTextSize(xytextsize);
xyTextPaint.setStrokeCap(Paint.Cap.ROUND);
xyTextPaint.setColor(xytextcolor);
xyTextPaint.setStyle(Paint.Style.STROKE);
linePaint = new Paint();
initLinePaint();
}
private void initLinePaint() {
linePaint.setAntiAlias(true);
linePaint.setStrokeWidth(xylinewidth);
linePaint.setStrokeCap(Paint.Cap.ROUND);
linePaint.setColor(linecolor);
linePaint.setStyle(Paint.Style.FILL);
}
/**
* 初始化
*
* @param context
* @param attrs
* @param defStyleAttr
*/
private void init(Context context, AttributeSet attrs, int defStyleAttr) {
TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.chartView, defStyleAttr, 0);
int count = array.getIndexCount();
for (int i = 0; i < count; i++) {
int attr = array.getIndex(i);
if (attr == R.styleable.chartView_xylinecolor) {
xylinecolor = array.getColor(attr, xylinecolor);
} else if (attr == R.styleable.chartView_xylinewidth) {
xylinewidth = (int) array.getDimension(attr,
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, xylinewidth,
getResources().getDisplayMetrics()));
} else if (attr == R.styleable.chartView_xytextcolor) {
xytextcolor = array.getColor(attr, xytextcolor);
} else if (attr == R.styleable.chartView_xytextsize) {
xytextsize = (int) array.getDimension(attr,
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, xytextsize,
getResources().getDisplayMetrics()));
} else if (attr == R.styleable.chartView_linecolor) {
linecolor = array.getColor(attr, linecolor);
} else if (attr == R.styleable.chartView_bgcolor) {
bgcolor = array.getColor(attr, bgcolor);
} else if (attr == R.styleable.chartView_isScroll) {
isScroll = array.getBoolean(attr, isScroll);
}
}
array.recycle();
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
if (changed) {
//这里需要确定几个基本点,只有确定了xy轴原点坐标,第一个点的X坐标值及其最大最小值
width = getWidth();
height = getHeight();
//计算space
space = width / 7;
//计算interval
interval = width / 7;
//Y轴文本最大宽度
float textYWdith = getTextBounds("000", xyTextPaint).width();
for (int i = 0; i < yValue.size(); i++) {//求取y轴文本最大的宽度
float temp = getTextBounds(yValue.get(i) + "", xyTextPaint).width();
if (temp > textYWdith)
textYWdith = temp;
}
int dp2 = dpToPx(2);
int dp3 = dpToPx(3);
xOri = 0;
// //X轴文本最大高度
xValueRect = getTextBounds("000", xyTextPaint);
float textXHeight = xValueRect.height();
for (int i = 0; i < xValue.size(); i++) {
Rect rect = getTextBounds(xValue.get(i) + "", xyTextPaint);
if (rect.height() > textXHeight)
textXHeight = rect.height();
if (rect.width() > xValueRect.width())
xValueRect = rect;
}
yOri = (int) (height - dp2 - textXHeight - dp3 - xylinewidth - dpToPx(140));
xInit = xOri;
minXInit = width - interval * (xValue.size() - 1);
maxXInit = xInit;
}
super.onLayout(changed, left, top, right, bottom);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
protected void onDraw(Canvas canvas) {
canvas.drawColor(bgcolor);
drawBrokenLineAndPoint(canvas);
}
/**
* 绘制折线和折线交点处对应的点
*
* @param canvas
*/
private void drawBrokenLineAndPoint(Canvas canvas) {
if (xValue.size() <= 0)
return;
//重新开一个图层
int layerId = canvas.saveLayer(0, 0, width, height, null, Canvas.ALL_SAVE_FLAG);
drawBrokenLine(canvas);
drawBrokenPoint(canvas);
// 将折线超出x轴坐标的部分截取掉
linePaint.setStyle(Paint.Style.FILL);
linePaint.setColor(bgcolor);
linePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
RectF rectF = new RectF(0, 0, xOri, height);
canvas.drawRect(rectF, linePaint);
linePaint.setXfermode(null);
//保存图层
canvas.restoreToCount(layerId);
}
/**
* 绘制折线对应的点
*
* @param canvas
*/
private void drawBrokenPoint(Canvas canvas) {
linePaint.reset();
float dp2 = dpToPx(2);
float dp4 = dpToPx(4);
float dp7 = dpToPx(7);
//绘制节点对应的原点
for (int i = 0; i < xValue.size(); i++) {
float x = xInit + space / 2 + interval * (i - 1);
float y = yOri - yOri * (1 - 0.1f) * value.get(xValue.get(i)) / yValue.get(yValue.size() - 1);
if (i == 8) {
continue;
}
//绘制选中的点
if ((i == (selectIndex[0] - 1)) || (i == (selectIndex[1] - 1))) {
linePaint.setStyle(Paint.Style.FILL);
linePaint.setColor(0xffd0f3f2);
canvas.drawCircle(x, y, dp7, linePaint);
linePaint.setColor(0xff81dddb);
canvas.drawCircle(x, y, dp4, linePaint);
drawFloatTextBox(canvas, x, y - dp7, origiValue.get(xValue.get(i)));
}
//绘制普通的节点
linePaint.setStyle(Paint.Style.FILL);
linePaint.setColor(Color.WHITE);
canvas.drawCircle(x, y, dp2, linePaint);
linePaint.setStyle(Paint.Style.STROKE);
linePaint.setColor(linecolor);
canvas.drawCircle(x, y, dp2, linePaint);
}
}
/**
* 绘制显示Y值的浮动框
*
* @param canvas
* @param x
* @param y
* @param text
*/
private void drawFloatTextBox(Canvas canvas, float x, float y, int text) {
int dp6 = dpToPx(6);
int dp18 = dpToPx(18);
//p1
Path path = new Path();
path.moveTo(x, y);
//p2
path.lineTo(x - dp6, y - dp6);
//p3
path.lineTo(x - dp18, y - dp6);
//p4
path.lineTo(x - dp18, y - dp6 - dp18);
//p5
path.lineTo(x + dp18, y - dp6 - dp18);
//p6
path.lineTo(x + dp18, y - dp6);
//p7
path.lineTo(x + dp6, y - dp6);
//p1
path.lineTo(x, y);
canvas.drawPath(path, linePaint);
linePaint.setColor(Color.WHITE);
linePaint.setTextSize(spToPx(14));
Rect rect = getTextBounds(text + "", linePaint);
canvas.drawText(text + "", x - rect.width() / 2, y - dp6 - (dp18 - rect.height()) / 2, linePaint);
}
/**
* 绘制折线
*
* @param canvas
*/
private void drawBrokenLine(Canvas canvas) {
initLinePaint();
linePaint.setStyle(Paint.Style.STROKE);
linePaint.setColor(linecolor);
//绘制折线
Path backPath = new Path();
Path linePath = new Path();
float x = xInit + interval * 0;
float y = yOri - yOri * (1 - 0.1f) * value.get(xValue.get(0)) / yValue.get(yValue.size() - 1);
backPath.moveTo(x, y);
linePath.moveTo(x, y);
for (int i = 1; i < xValue.size(); i++) {
if (i == 1) {
x = xInit + space / 2;
y = yOri - yOri * (1 - 0.1f) * value.get(xValue.get(i)) / yValue.get(yValue.size() - 1);
backPath.lineTo(x, y);
linePath.lineTo(x, y);
continue;
}
if (i == 8) {
x = xInit + space + interval * (i - 2);
y = yOri - yOri * (1 - 0.1f) * value.get(xValue.get(i)) / yValue.get(yValue.size() - 1);
backPath.lineTo(x, y);
linePath.lineTo(x, y);
continue;
}
x = xInit + space / 2 + interval * (i - 1);
y = yOri - yOri * (1 - 0.1f) * value.get(xValue.get(i)) / yValue.get(yValue.size() - 1);
backPath.lineTo(x, y);
linePath.lineTo(x, y);
}
backPath.lineTo(x, getHeight());
backPath.lineTo(0, getHeight());
backPath.close();
canvas.drawPath(linePath, linePaint);
canvas.drawPath(backPath, getShadeColorPaint(linePaint));
}
// 修改笔的颜色
private Paint getShadeColorPaint(Paint paint) {
paint.setStyle(Paint.Style.FILL);
Shader mShader = new LinearGradient(getWidth() / 2, 0, getWidth() / 2, getHeight() - dpToPx(50),
new int[]{context.getResources().getColor(R.color.colorWhiteTransparent),
android.R.color.transparent}, null, Shader.TileMode.CLAMP);
paint.setShader(mShader);
return paint;
}
public void setSelectIndex(int[] selectIndex) {
this.selectIndex = selectIndex;
invalidate();
}
public void setValue(Map<String, Integer> value) {
this.value = value;
invalidate();
}
public void setValue(Map<String, Integer> value, List<String> xValue,
List<Integer> yValue, int normalize) {
normalizeValue(value, xValue, yValue, normalize);
int indexMax = 0;
int tmp = 0;
for (int i = 0; i < xValue.size(); i++) {
if (value.get(xValue.get(i)) > tmp) {
tmp = value.get(xValue.get(i));
indexMax = i;
}
}
int[] selected = new int[2];
selected[0] = indexMax + 1;
selected[1] = 8;
setSelectIndex(selected);
invalidate();
}
private void normalizeValue(Map<String, Integer> value, List<String> xValue,
List<Integer> yValue, int normalize) {
int max = 0;
for (int i = 0; i < yValue.size(); i++) {
int tmp = value.get(xValue.get(i));
if (tmp > max) {
max = tmp;
}
}
float scale = 0;
if (max != 0) {
scale = normalize / (float) max;
}
for (int i = 0; i < xValue.size(); i++) {
origiValue.put(xValue.get(i), value.get(xValue.get(i)));
int valueGraph = (int) (value.get(xValue.get(i)) * scale);
value.put(xValue.get(i), valueGraph);
}
this.value = value;
this.xValue = xValue;
this.yValue = yValue;
}
public Map<String, Integer> getValue() {
return value;
}
/**
* 获取丈量文本的矩形
*
* @param text
* @param paint
* @return
*/
private Rect getTextBounds(String text, Paint paint) {
Rect rect = new Rect();
paint.getTextBounds(text, 0, text.length(), rect);
return rect;
}
/**
* dp转化成为px
*
* @param dp
* @return
*/
private int dpToPx(int dp) {
float density = getContext().getResources().getDisplayMetrics().density;
return (int) (dp * density + 0.5f * (dp >= 0 ? 1 : -1));
}
/**
* sp转化为px
*
* @param sp
* @return
*/
private int spToPx(int sp) {
float scaledDensity = getContext().getResources().getDisplayMetrics().scaledDensity;
return (int) (scaledDensity * sp + 0.5f * (sp >= 0 ? 1 : -1));
}
} | [
"[email protected]"
] | |
208ea67a334bae3cdb86f4eee95ba0717f7dd806 | 45718a814e6b0d325672916b1a8f9f3f33ccf573 | /app/src/androidTest/java/com/example/rp/navigation/ApplicationTest.java | b9374189193c67b197c251ae31038a49d6cd195d | [] | no_license | rajacsp/energymobile11 | 1f0308b4ce04f984e1afcd0eacc606afd2426b57 | 7f44d9eb80875e06efc67e7527c339c1fda023f8 | refs/heads/master | 2021-01-23T21:22:19.932551 | 2016-09-18T00:58:59 | 2016-09-18T00:58:59 | 68,486,305 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 356 | java | package com.example.rp.navigation;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
} | [
"[email protected]"
] | |
3e5b54943a6be724091a40076aef363884f8733f | c6411963bbd2769460b2a6f0450baef93d39e7a6 | /src/yuhnovskaya/Control2/task3.java | 7671fcc6b2851017e7752d09e9337aa496bcf347 | [] | no_license | Shumski-Sergey/M-JC1-25-19 | 06b919e91058666bf000a5d9866937e249d552a3 | 1133dad04ec9bec4bdb8343841657a488365a1ec | refs/heads/master | 2022-04-27T14:48:25.457486 | 2020-04-17T16:24:00 | 2020-04-17T16:24:00 | 228,884,905 | 1 | 18 | null | 2020-04-06T12:13:05 | 2019-12-18T16:57:48 | Java | UTF-8 | Java | false | false | 841 | java | package src.yuhnovskaya.Control2;
import java.io.*;
/**
* Created by user on 04.03.2020.
*/
public class task3 {
public static void main(String[]avgs){
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
int digit=(int)Math.random()*100;
final int NUMBER_OF_DIGITS=100;
try{ BufferedWriter writer=new BufferedWriter((new OutputStreamWriter(new FileOutputStream("src/result"))));
for (int i=0; i<NUMBER_OF_DIGITS; i++)
writer.write(digit+"\n");
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
try{FileInputStream fin=new FileInputStream("str/result");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}
| [
"Olga"
] | Olga |
98a47ea5a5203c9e7701682a97c4423210d36a20 | ed0f4f5cde07b87349e5a75721aeb8b64d27a4d5 | /ORE/src/ore/servlet/ClusterStart.java | 125e4d15bc1023b3ba69f935eda46dab7ca1284d | [] | no_license | hajarLRI/wwwore | 3bfb9ca1e03c0e5bfb6ccbf871abab7894a54192 | 097a3901c2c51fc8364a58459e6fbe3c9a0f0be3 | refs/heads/master | 2021-01-02T12:57:29.302338 | 2011-03-14T00:16:38 | 2011-03-14T00:16:38 | 34,676,052 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,058 | java | package ore.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import ore.cluster.ClusterManager;
import ore.jms.Receiver;
import ore.subscriber.Subscriber;
import ore.subscriber.SubscriberManager;
import ore.util.HTTPServletUtil;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.eclipse.jetty.continuation.Continuation;
import org.eclipse.jetty.continuation.ContinuationSupport;
public class ClusterStart extends HttpServlet {
private static final long serialVersionUID = 1L;
public static boolean longPolling = false;
public static String clientIP = null;
public static ActiveMQConnectionFactory connectionFactory;
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
String selfIP = request.getParameter("selfIP");
String peerIP = request.getParameter("peerIP");
//clientIP = request.getParameter("clientIP");
//clientIP = null;
if(false){
boolean done = false;
while(!done) {
try {
connectionFactory = new ActiveMQConnectionFactory("tcp://"+clientIP);
done = true;
} catch (Exception e ) {
System.out.print("Connection is null");
try {
Thread.sleep(1000);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
}
}
}
String mode = request.getParameter("mode");
String longPollingString = request.getParameter("longPolling");
boolean longPoll= Boolean.parseBoolean(longPollingString);
longPolling = longPoll;
String[] peerIPs = null;
if(peerIP != null) {
peerIP = peerIP.replace('~', ':');
peerIPs = peerIP.split("_");
}
if(selfIP != null) {
selfIP = selfIP.replace('~', ':');
}
ClusterManager.init(selfIP, peerIPs, mode);
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"[email protected]@58f18ea7-f5e9-91a9-3360-f4ac606ce033"
] | [email protected]@58f18ea7-f5e9-91a9-3360-f4ac606ce033 |
f50b73b2c72bf8a68feb7359e9c52683af9c389f | d003aae9cfec7c8cc5474258261695647ddc879e | /src/main/java/com/yiyuaninfo/Activity/MediaMoreActivity.java | 1bfc6f4ed66878cbcaa0cd0dce1a0c18ccf62654 | [] | no_license | kekejl/yiyuan | f069adf7c116fdde9e11b01b750c933560c6e6db | 7baf69aafc09a7eb711ad7153c13703720818a98 | refs/heads/master | 2020-04-11T05:25:46.304113 | 2018-03-08T03:24:18 | 2018-03-08T03:24:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,455 | java | package com.yiyuaninfo.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.yiyuaninfo.Interface.GeniusBiz;
import com.yiyuaninfo.Interface.GeniusMoreBiz;
import com.yiyuaninfo.R;
import com.yiyuaninfo.adapter.MediaHeaderAdapter;
import com.yiyuaninfo.entity.Genius;
import com.yiyuaninfo.util.EmptyUtil;
import com.yiyuaninfo.util.Network;
import com.yiyuaninfo.util.RetrofitUtil;
import com.yiyuaninfo.util.ToastUtils;
import com.yiyuaninfo.view.MyDecoration;
import java.util.HashMap;
import java.util.Map;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
/**
* Created by gaocongcong on 2017/9/26.
*/
public class MediaMoreActivity extends BaseActivity {
private RecyclerView recyclerView;
private MediaHeaderAdapter adapter;
private String lastid;
private EmptyUtil emptyUtil;
@Override
protected int getContentView() {
return R.layout.activity_mediamore;
}
@Override
protected void init(Bundle savedInstanceState) {
setToolBarTitle("牛人榜");
recyclerView = (RecyclerView) findViewById(R.id.rv_mediamore);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.addItemDecoration(new MyDecoration(this, MyDecoration.VERTICAL_LIST));
emptyUtil=new EmptyUtil(this,recyclerView);
emptyUtil.initErrorPage();
getData();
}
private void getData() {
Map<String, String> params = new HashMap<>();
params.put("act", "niumore");
RetrofitUtil.getretrofit().create(GeniusMoreBiz.class).getData(params).enqueue(new Callback<Genius>() {
@Override
public void onResponse(Call<Genius> call, Response<Genius> response) {
if(response.body()==null){
emptyUtil.showErrorPage();
}else {
adapter = new MediaHeaderAdapter(response.body().getNiu_arr());
lastid = response.body().getLastid();
recyclerView.setAdapter(adapter);
adapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
if(Network.isConnected()){
getMoreData();
}else {
ToastUtils.showToast("暂无网络");
adapter.loadMoreFail();
}
}
}, recyclerView);
adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Genius.NiuArrBean entity=(Genius.NiuArrBean)adapter.getData().get(position);
Intent intent=new Intent(MediaMoreActivity.this,MediaActivity.class);
Bundle bundle=new Bundle();
bundle.putSerializable("entity",entity);
intent.putExtras(bundle);
startActivity(intent);
}
});
}
}
@Override
public void onFailure(Call<Genius> call, Throwable t) {
}
});
}
private void getMoreData() {
Map<String, String> params = new HashMap<>();
params.put("act", "niumore");
params.put("lastid", lastid);
RetrofitUtil.getretrofit().create(GeniusMoreBiz.class).getData(params).enqueue(new Callback<Genius>() {
@Override
public void onResponse(Call<Genius> call, Response<Genius> response) {
if (response.body().getNiu_arr().size() != 0) {
lastid=response.body().getLastid();
adapter.addData(response.body().getNiu_arr());
adapter.loadMoreComplete();
} else {
adapter.loadMoreEnd();
}
}
@Override
public void onFailure(Call<Genius> call, Throwable t) {
adapter.loadMoreFail();
}
});
}
}
| [
"[email protected]"
] | |
062fbb49b3d3a38d656b9e90bcba1c9b516e2885 | 53d67cbf24c35dcc5b1f5956e3c8301626213b52 | /app/com/thesecretserver/service/AssignSiteResponse.java | 00486f8a55c64b909cff0bf9b7e77613f099e765 | [
"Apache-2.0"
] | permissive | ukwa/w3act | 30fb672dcbab5245940b03b28a7d8c3bbc0e933c | d705e74b1c2d9b15e67450dece27b65a1860fac8 | refs/heads/master | 2023-07-12T12:13:04.439699 | 2023-06-22T13:06:55 | 2023-06-22T13:06:55 | 12,322,922 | 12 | 5 | Apache-2.0 | 2023-01-06T13:45:42 | 2013-08-23T12:51:49 | Java | UTF-8 | Java | false | false | 1,697 | java |
package com.thesecretserver.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="AssignSiteResult" type="{urn:thesecretserver.com}WebServiceResult" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"assignSiteResult"
})
@XmlRootElement(name = "AssignSiteResponse")
public class AssignSiteResponse {
@XmlElement(name = "AssignSiteResult")
protected WebServiceResult assignSiteResult;
/**
* Gets the value of the assignSiteResult property.
*
* @return
* possible object is
* {@link WebServiceResult }
*
*/
public WebServiceResult getAssignSiteResult() {
return assignSiteResult;
}
/**
* Sets the value of the assignSiteResult property.
*
* @param value
* allowed object is
* {@link WebServiceResult }
*
*/
public void setAssignSiteResult(WebServiceResult value) {
this.assignSiteResult = value;
}
}
| [
"[email protected]"
] | |
63bda0aefdb966c1cb8836f856f2269574b6ca29 | 498dd2daff74247c83a698135e4fe728de93585a | /clients/google-api-services-dialogflow/v3/2.0.0/com/google/api/services/dialogflow/v3/model/GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig.java | 5bd216295193803b9ddc1bf5f0b3b6a3fc5aaff2 | [
"Apache-2.0"
] | permissive | googleapis/google-api-java-client-services | 0e2d474988d9b692c2404d444c248ea57b1f453d | eb359dd2ad555431c5bc7deaeafca11af08eee43 | refs/heads/main | 2023-08-23T00:17:30.601626 | 2023-08-20T02:16:12 | 2023-08-20T02:16:12 | 147,399,159 | 545 | 390 | Apache-2.0 | 2023-09-14T02:14:14 | 2018-09-04T19:11:33 | null | UTF-8 | Java | false | false | 3,878 | java | /*
* 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.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.dialogflow.v3.model;
/**
* Represents configuration for a [Service Directory](https://cloud.google.com/service-directory)
* service.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Dialogflow API. For a detailed explanation see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig extends com.google.api.client.json.GenericJson {
/**
* Generic Service configuration of this webhook.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GoogleCloudDialogflowCxV3beta1WebhookGenericWebService genericWebService;
/**
* Required. The name of [Service Directory](https://cloud.google.com/service-directory) service.
* Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory
* must be the same as the location of the agent.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String service;
/**
* Generic Service configuration of this webhook.
* @return value or {@code null} for none
*/
public GoogleCloudDialogflowCxV3beta1WebhookGenericWebService getGenericWebService() {
return genericWebService;
}
/**
* Generic Service configuration of this webhook.
* @param genericWebService genericWebService or {@code null} for none
*/
public GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig setGenericWebService(GoogleCloudDialogflowCxV3beta1WebhookGenericWebService genericWebService) {
this.genericWebService = genericWebService;
return this;
}
/**
* Required. The name of [Service Directory](https://cloud.google.com/service-directory) service.
* Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory
* must be the same as the location of the agent.
* @return value or {@code null} for none
*/
public java.lang.String getService() {
return service;
}
/**
* Required. The name of [Service Directory](https://cloud.google.com/service-directory) service.
* Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory
* must be the same as the location of the agent.
* @param service service or {@code null} for none
*/
public GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig setService(java.lang.String service) {
this.service = service;
return this;
}
@Override
public GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig set(String fieldName, Object value) {
return (GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig) super.set(fieldName, value);
}
@Override
public GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig clone() {
return (GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig) super.clone();
}
}
| [
"[email protected]"
] | |
05c10bcc54a9db75688640c557ebd9c83638b162 | 58a50ac968c82dfe108578e55b83f107837ff869 | /Dou/src/Dou/CardType.java | e2994e21075da8b70e2c883f1da1d4f38db5c504 | [] | no_license | Elijiah/Test | 61d29de301db44824826d589de1a65cbfff77b8d | 2f8d837874fcbf385ba7bb329a1e97f35816add3 | refs/heads/master | 2021-08-27T22:24:04.287315 | 2017-12-10T14:38:44 | 2017-12-10T14:38:44 | 113,425,836 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 342 | java | package Dou;
public enum CardType {
c1,//单牌。
c2,//对子。
c3,//3不带。
c4,//炸弹。
c31,//3带1。
c32,//3带2。
c411,//4带2个单,或者一对
c422,//4带2对
c123,//连子。
c1122,//连队。
c111222,//飞机。
c11122234,//飞机带单排.
c1112223344,//飞机带对子.
c0//不能出牌
} | [
"[email protected]"
] | |
1c44fac06e84d5e1f05afd3a472638743f79c2d4 | 4042f2284eabe8f860db11ccbc6933c881a83b76 | /dubbo-jt-interface/src/main/java/com/jt/dubbo/pojo/OrderShipping.java | 713956c4b4b7973e344c54d32a7933c80592c183 | [] | no_license | Aleiisyoung/dubbo-sys | 20d6eaa6fd885f30dc9905428a621b91be42d431 | dde9732e410eb98ea91a2fb8309fce82f84d0dc6 | refs/heads/master | 2020-03-28T19:21:17.687473 | 2018-09-16T08:16:09 | 2018-09-16T08:16:09 | 148,967,256 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,344 | java | package com.jt.dubbo.pojo;
import java.util.Date;
import javax.persistence.Id;
import javax.persistence.Table;
import com.jt.common.po.BasePojo;
@Table(name = "tb_order_shipping")
public class OrderShipping extends BasePojo {
@Id
private String orderId;
private String receiverName;
private String receiverPhone;
private String receiverMobile;
private String receiverState;
private String receiverCity;
private String receiverDistrict;
private String receiverAddress;
private String receiverZip;
private Date created;
private Date updated;
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getReceiverName() {
return receiverName;
}
public void setReceiverName(String receiverName) {
this.receiverName = receiverName;
}
public String getReceiverPhone() {
return receiverPhone;
}
public void setReceiverPhone(String receiverPhone) {
this.receiverPhone = receiverPhone;
}
public String getReceiverMobile() {
return receiverMobile;
}
public void setReceiverMobile(String receiverMobile) {
this.receiverMobile = receiverMobile;
}
public String getReceiverState() {
return receiverState;
}
public void setReceiverState(String receiverState) {
this.receiverState = receiverState;
}
public String getReceiverCity() {
return receiverCity;
}
public void setReceiverCity(String receiverCity) {
this.receiverCity = receiverCity;
}
public String getReceiverDistrict() {
return receiverDistrict;
}
public void setReceiverDistrict(String receiverDistrict) {
this.receiverDistrict = receiverDistrict;
}
public String getReceiverAddress() {
return receiverAddress;
}
public void setReceiverAddress(String receiverAddress) {
this.receiverAddress = receiverAddress;
}
public String getReceiverZip() {
return receiverZip;
}
public void setReceiverZip(String receiverZip) {
this.receiverZip = receiverZip;
}
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public Date getUpdated() {
return updated;
}
public void setUpdated(Date updated) {
this.updated = updated;
}
} | [
"[email protected]"
] | |
24d48ce8def5a748b995b73f5f169994b3501b77 | bd19ce320217b9badeb687ca9829d9076be820d4 | /domain/src/main/java/com/thinkzi/oodrive/domain/repository/IItemRepository.java | 034ef8f8a929583581d4ac5cc7fd497f04630862 | [] | no_license | thinkerheart/Oodrive | 6fce8321d987ab9ed27e21538129fa45e0db18a4 | 51e03a161b5c7e3a84055c66b9d7eee08eeaa702 | refs/heads/master | 2022-05-16T16:16:21.255894 | 2022-05-09T16:01:52 | 2022-05-09T16:01:52 | 205,962,550 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 811 | java | package com.thinkzi.oodrive.domain.repository;
import com.thinkzi.oodrive.domain.entity.Item;
import com.thinkzi.oodrive.domain.entity.User;
import io.reactivex.Completable;
import io.reactivex.Observable;
import io.reactivex.Single;
/**
* provide item data repository interface
* */
public interface IItemRepository {
/**
* get current user and retrieve the root item from server
* */
Single<User> getRemoteCurrentUser();
/**
* get content of a folder from server
*/
Observable<Item> getRemoteFolderContent(String _id);
/**
* create new folder with _name in a folder identified by _id
* */
Single<Item> createNewFolder(String _id, String _name);
/**
* delete an item identified by _id
* */
Completable deleteItem(String _id);
}
| [
"[email protected]"
] | |
0b842ff937664c1a63973c8c4cd01061ccbc04ca | 8ab0d969ebe528eab1585b120f2968ac51fb79ff | /src/day42_customClasses_encapsulation/MyCoffies.java | b9ace2c329f5e5457fa5f86af409802486d83485 | [] | no_license | MukhabbatYusupova/JavaProgramming | bad3974a5333565b65ff4f272c466c95bfab95eb | c95284d89fb59222be08e90f02c04a4666006fdc | refs/heads/master | 2020-05-18T09:01:42.487128 | 2019-06-13T22:47:00 | 2019-06-13T22:47:00 | 184,311,705 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 904 | java | package day42_customClasses_encapsulation;
public class MyCoffies {
public static void main(String[] args) {
Coffee coffee1 = new Coffee();
coffee1.name = "iced cramel macchiato";
coffee1.size = "grande";
coffee1.price = 4.75;
coffee1.cal =150;
coffee1.getCoffeeInfo();
Coffee coffee2 = new Coffee();
coffee2.setName("java chip");
coffee2.size = "venti";
coffee2.price = 5.95;
coffee2.cal =600;
coffee2.getCoffeeInfo();
Coffee coffee3 = new Coffee();
coffee3.setName("iced coffee"); // == coffee3.name = "iced coffee";
coffee3.setSize("small"); // incorrect size
coffee3.setPrice(2.45);
coffee3.setCal(60);
coffee3.getCoffeeInfo();
coffee3.setSize("tall"); // corrected
coffee3.getCoffeeInfo();
Coffee coffee4 = new Coffee();
coffee4.setCoffeeInfo("flat white", "tall", 3.95, 170);
coffee4.getCoffeeInfo();
}
}
| [
"[email protected]"
] | |
30f89c37117e2d5000895a3d548474b20a0d3550 | 4f12b5aed366cd4fe21cb897056f755457ba5aef | /codes/java0/src/main/java/com/gengbinsu/java0/bio/HttpServer02.java | b68e529f56872961071b1035ebf7033b164547ae | [] | no_license | sugengbin/JAVA-000 | 2a413b8d7ea662c1bff365ee2fe1b71147e74e0f | a640bdec6bfddf5593f7e1d575363749e7fce888 | refs/heads/main | 2023-01-08T14:33:44.630304 | 2020-11-04T08:12:50 | 2020-11-04T08:12:50 | 304,185,439 | 0 | 0 | null | 2020-10-15T02:14:17 | 2020-10-15T02:14:16 | null | UTF-8 | Java | false | false | 2,113 | java | package com.gengbinsu.java0.bio;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
/**
* -Xmx512m
* Created by gengbinsu 2020年11月3日
*/
public class HttpServer02 {
public static void main(String[] args) throws IOException{
ServerSocket serverSocket = new ServerSocket(8802);
while (true) {
try {
final Socket socket = serverSocket.accept();
new Thread(() -> {// 对比server01,使用线程处理,提高并发性能,RPS提高一倍
service(socket);
}).start();
} catch (IOException e) {
e.printStackTrace();
}
}
// λ sb -u https://localhost:8802/ -c 40 -N 30
// Starting at 2020/11/3 16:11:20
// [Press C to stop the test]
// 1350 (RPS: 35)
// 1365 (RPS: 35.1) ---------------Finished!----------------
// 1371 (RPS: 35.2) Finished at 2020/11/3 16:11:59 (took 00:00:39.2035891)
// Status 303: 1376
//
// RPS: 42.8 (requests/second)
// Max: 1137ms
// Min: 46ms
// Avg: 378.5ms
//
// 50% below 343ms
// 60% below 417ms
// 70% below 479ms
// 80% below 537ms
// 90% below 626ms
// 95% below 715ms
// 98% below 828ms
// 99% below 964ms
// 99.9% below 1085ms
}
private static void service(Socket socket) {
try {
Thread.sleep(20);
PrintWriter printWriter = new PrintWriter(socket.getOutputStream(), true);
printWriter.println("HTTP/1.1 200 OK");
printWriter.println("Content-Type:text/html;charset=utf-8");
String body = "hello,nio";
printWriter.println("Content-Length:" + body.getBytes().length);
printWriter.println();
printWriter.write(body);
printWriter.close();
socket.close();
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
} | [
"[email protected]"
] | |
52a2d12cb7f1a98c1c29fa5e334e6bcc4f32fdbd | 844b7cf15296179ceacf692d2d21c78720da8c16 | /src/main/java/com/github/mkopylec/webdevcalendar/api/TimeSlotBoundaryValidator.java | e714b0cddb0132d366e31550a5a8cb535b198ce8 | [] | no_license | mkopylec/web-dev-calendar | 3d8dc45093e2c54a9a7701868483f814a0be4fc9 | 095fb18c1ed58a819cfe317229b99ebae34300bd | refs/heads/master | 2020-12-24T15:32:30.082518 | 2015-07-02T18:01:55 | 2015-07-02T18:01:55 | 38,448,430 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 934 | java | package com.github.mkopylec.webdevcalendar.api;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.time.LocalDateTime;
import static com.github.mkopylec.webdevcalendar.domain.MeetingSlotsSchedule.TIME_SLOT_MINUTE_STEP;
public class TimeSlotBoundaryValidator implements ConstraintValidator<TimeSlotBoundary, LocalDateTime> {
@Override
public void initialize(TimeSlotBoundary constraint) {
}
@Override
public boolean isValid(LocalDateTime value, ConstraintValidatorContext context) {
return isFullOrHalfAnHour(value) && isFullMinute(value);
}
private boolean isFullMinute(LocalDateTime value) {
return value.getSecond() == 0
&& value.getNano() == 0;
}
private boolean isFullOrHalfAnHour(LocalDateTime value) {
return value.getMinute() == 0 || value.getMinute() == TIME_SLOT_MINUTE_STEP;
}
}
| [
"[email protected]"
] | |
9367f126fb81c18fb7ec3504268c0adfeb5a44ae | bb00a4b2cc074b43cfe568b701435b9678bd3f66 | /031interfacesFuncionaisELambda/src/application/TesteFunction.java | 41deb73af86413df1e77cd137db81b81ed7e53c6 | [] | no_license | nailaoli/curso-de-java | d6b3f233cb4279deade4859e12ae7b3120b09097 | 7e9cf4bf7b470b9dcdfe2df77161cd684e257d7f | refs/heads/master | 2020-05-07T01:00:00.569258 | 2020-04-23T15:41:39 | 2020-04-23T15:41:39 | 180,254,682 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 3,140 | java | //Represents a function that accepts one argument and produces a result.
//This is a functional interface whose functional method is apply(Object).
//Function recebe um objeto como entrada e devolve um objeto como saída
//Function<Entrada, Saida>
//https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html
package application;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.function.Function;
import java.util.stream.Collectors;
import entities.Produto;
public class TesteFunction {
public static void main (String[] args) {
Locale.setDefault(Locale.US);
// Produto(nome, preço)
List<Produto> produtos = new ArrayList<>();
produtos.add(new Produto("Tv", 900.00));
produtos.add(new Produto("Mouse", 50.00));
produtos.add(new Produto("Tablet", 350.50));
produtos.add(new Produto("HD Case", 80.90));
// Percorrer a lista de produtos e criar uma nova lista com os nomes em caixa alta
// ---- Método 1 - Implementação da interface
// Obs.: apenas para fim didático, a classe foi criada aqui mesmo
class NomeMaiusculoFunction implements Function<Produto, String> {
@Override
public String apply(Produto produto) {
return produto.getNome().toUpperCase();
}
}
// A função "map" (não confundir com a estrutura de dados Map) é uma função que aplica uma função a todos
// os elementos de uma Stream
// 1)Converte List para stream: .stream()
// 2)Aplica a função a todos os elementos da stream: .map(FUNÇÃO)
// 3)Converte stream para List: .collect(Collectors.toList())
List<String> nomes = produtos.stream().map(new NomeMaiusculoFunction()).collect(Collectors.toList());
nomes.forEach(System.out::println);
// output:
// TV
// MOUSE
// TABLET
// HD CASE
// ---- Método 2 - Reference method com método estático
// Foi criado o método estático nomeMaiusculoEstatico na classe Produto
List<String> nomes2 = produtos.stream().map(Produto::nomeMaiusculoEstatico).collect(Collectors.toList());
nomes2.forEach(System.out::println);
// output:
// TV
// MOUSE
// TABLET
// HD CASE
// ---- Método 3 - Reference method com método não estático
List<String> nomes3 = produtos.stream().map(Produto::nomeMaiusculoNaoEstatico).collect(Collectors.toList());
nomes3.forEach(System.out::println);
// output:
// TV
// MOUSE
// TABLET
// HD CASE
// ---- Método 4 - Expressão lambda declarada
Function<Produto,String> nomeMaiusculo = p -> p.getNome().toUpperCase();
// Function<Produto, String> nomeMaiusculo = p -> {
// return p.getNome().toUpperCase();
// };
List<String> nomes4 = produtos.stream().map(nomeMaiusculo).collect(Collectors.toList());
nomes4.forEach(System.out::println);
// output:
// TV
// MOUSE
// TABLET
// HD CASE
// ---- Método 5 - Expressão lambda inline
List<String> nomes5 = produtos.stream().map(p -> p.getNome().toUpperCase()).collect(Collectors.toList());
nomes5.forEach(System.out::println);
// output:
// TV
// MOUSE
// TABLET
// HD CASE
}
}
| [
"[email protected]"
] | |
cc3e4311e566403dea746728e570ca167aa23e79 | 25ceb1cd952c40e6e5c3fe437e2958fc72d6dadd | /src/valueIter/Driver.java | 190db35d2db281c55f612fd9f7d94ccb9413ae0e | [] | no_license | swiftsword94/assign4 | d87ea78f356396e36d2593a5f30fbba584e632e0 | cd4b34bcd980a2674e6d435b152a7c450651c979 | refs/heads/master | 2021-01-20T00:37:26.972573 | 2017-05-02T01:49:06 | 2017-05-02T01:49:06 | 89,161,353 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,090 | java | package valueIter;
public class Driver
{
public void test()
{
Graph graph = new Graph(4);
Node s1 = new Node(0, new Double(0), 0d);
Node s2 = new Node(1, new Double(0), 0d);
Node s3 = new Node(2, new Double(1), 1d);
Node s4 = new Node(3, new Double(0), 0d);
s1.reward = 0.0;
s2.reward = 0.0;
s3.reward = 1.0;
s4.reward = 0.0;
s1.addAction(new Node[]{s1, s2}, new Double[]{0.2, 0.8});
s1.addAction(new Node[]{s1, s4}, new Double[]{0.2, 0.8});
s2.addAction(new Node[]{s2, s3}, new Double[]{0.2, 0.8});
s2.addAction(new Node[]{s2, s1}, new Double[]{0.2, 0.8});
s3.addAction(new Node[]{s2}, new Double[]{1.0});
s3.addAction(new Node[]{s4}, new Double[]{1.0});
s4.addAction(new Node[]{s4, s3}, new Double[]{0.1, 0.9});
s4.addAction(new Node[]{s4, s1}, new Double[]{0.2, 0.8});
graph.addNode(s1);
graph.addNode(s2);
graph.addNode(s3);
graph.addNode(s4);
graph.initUtility(.9d, .000000000000001d);
System.out.println("FINAL: ");
graph.printUtil(graph.map);
}
public static void main(String[] args)
{
new Driver().test();
}
}
| [
"[email protected]"
] | |
64a61afe1b28e8f9f97831af881ed538d41a7c31 | 3b5e18c11024edf50846841569d5d4a625a89bd3 | /app/src/main/java/com/spadatech/mobile/android/foodframer/models/MealItem.java | dfd87edfae8e501f35e08ecf2c288cda03ede10c | [] | no_license | feludens/FoodFramer | 5625f8b3042f484c74815138310815d97940f7db | e2a5e09df9171ad8fc279e523a110ffd995eb812 | refs/heads/master | 2021-01-21T07:54:16.432194 | 2016-05-23T22:34:37 | 2016-05-23T22:34:37 | 55,561,307 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 873 | java | package com.spadatech.mobile.android.foodframer.models;
/**
* Created by Felipe S. Pereira on 4/13/16.
*/
public class MealItem {
// Table name
public static final String TABLE = "MealItems";
// Table Columns
public static final String KEY_MEAL_ITEM_ID = "MealItemId";
public static final String KEY_MEAL_ITEM_NAME = "MealItemName";
public static final String KEY_MEAL_ITEM_MEAL_ID = "MealId";
private int id;
private String name;
private int mealId;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getMealId() {
return mealId;
}
public void setMealId(int mealId) {
this.mealId = mealId;
}
}
| [
"[email protected]"
] | |
8e12208e46bac8701ab1b50f3a6dae4620d10f4a | 5f41b17d415dc5f2bd2af688ee5a87acfe731bb0 | /src/main/java/com/chixing/util/PageModel.java | e87c23c73e9a0cf8223b60686b1ecee88dffda50 | [
"Apache-2.0"
] | permissive | JanlYsone/sleeves | 1240180f7e66cd82eecef7cc6188711d067011ba | 13994f1bf185a7ee82f5f21b71cb91673df20630 | refs/heads/master | 2022-01-22T11:50:13.687483 | 2018-12-04T07:22:16 | 2018-12-04T07:22:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,235 | java | package com.chixing.util;
import java.util.List;
/**
* 1. 每页显示记录数
* 2. 总记录数
* 3. 总页数
* 4. 当前页码
* 5. 从第几条记录开始显示
* 6. 到第几条记录结束显示
* 7. 当前页显示记录对象集合
*/
public class PageModel<T> {
private final Integer pageSize = 3; //每页显示记录数
private Integer totalRecord ; //总记录数
private Integer totalPages; //总页数
private Integer currentPageCode; //当前页码
private Integer startRecord; //从第几条记录开始显示
private Integer endRecord; // 到第几条记录结束显示
private List<T> modelList; //当前页显示记录对象集合
public Integer getPageSize() {
return pageSize;
}
public Integer getTotalRecord() {
return totalRecord;
}
public void setTotalRecord(Integer totalRecord) {
this.totalRecord = totalRecord;
}
public Integer getTotalPages() {
return totalPages;
}
public void setTotalPages(Integer totalPages) {
this.totalPages = totalPages;
}
public Integer getCurrentPageCode() {
return currentPageCode;
}
public void setCurrentPageCode(Integer currentPageCode) {
this.currentPageCode = currentPageCode;
}
public Integer getStartRecord() {
return startRecord;
}
public void setStartRecord(Integer startRecord) {
this.startRecord = startRecord;
}
public Integer getEndRecord() {
return endRecord;
}
public void setEndRecord(Integer endRecord) {
this.endRecord = endRecord;
}
public List<T> getModelList() {
return modelList;
}
public void setModelList(List<T> modelList) {
this.modelList = modelList;
}
@Override
public String toString() {
return "PageModel{" +
"pageSize=" + pageSize +
", totalRecord=" + totalRecord +
", totalPages=" + totalPages +
", currentPageCode=" + currentPageCode +
", startRecord=" + startRecord +
", endRecord=" + endRecord +
", modelList=" + modelList +
'}';
}
}
| [
"[email protected]"
] | |
b9867030bff19cb5eec5986cd2fdd388b76548e9 | 3a7efeaf50ce8364cb1dd32ac2ae6027b4c594f6 | /app/src/ca/chaves/familyBrowser/app/setup/SetupActivity.java | 0759fd27f2598bb14c40761464a11313c7ccb6ec | [] | no_license | dac/familyBrowser | 96978eb210890141bdb9eb6e77d0d99b587169b4 | 4aec587d7eb395fe1efdb674449ae3bd8dba91bf | refs/heads/master | 2018-12-29T08:27:50.075224 | 2014-07-01T19:22:19 | 2014-07-01T19:22:19 | 21,399,559 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,305 | java | package ca.chaves.familyBrowser.app.setup;
import ca.chaves.android.setup.AbstractSetupActivity;
import ca.chaves.android.util.Debug;
/**
* This is the "Setup Activity" to initialize all assets in this application. This activity is NOT meant to be used
* normally - it is needed just to initialize the run-time environment prior running all unit-tests.
*
* @see "http://code.google.com/p/android-family-browser/"
* @author <a href="mailto:[email protected]">David A Chaves</a>
*/
public class SetupActivity
extends AbstractSetupActivity
{
// -----------------
// Protected methods
// -----------------
@Override
protected void showEulaIfNeeded( final boolean missingEula )
{
// always accept the EULA automatically - needed for the unit-tests to work
new SaveEulaTask().execute();
}
/**
* Do after all time-consuming initializations are complete. This function is executed from the UI thread.
*/
@Override
protected void continueIfPossible()
{
Debug.enter();
if ( !setupOkay || setupErrorMessage != null )
{
// some files not installed!
flash( setupErrorMessage );
}
// bye, bye, Application!
finish(); // SetupActivity
Debug.leave();
}
}
| [
"[email protected]"
] | |
a1672414b86eadedf63d3719d53214a4d954d035 | 1b01a74858745f171c8cea8ea4857e8588df6ed8 | /app/src/test/java/com/inuk/dabz/omsapplication/ExampleUnitTest.java | c448b85424a91e1d51e3d0c89053ff8138166545 | [] | no_license | abhosale/OMSApplication | e8164989bbf06152e550b1c842c423eccf14fca7 | ddfd1bff892b8401e6425276694b7a0f06f9ac39 | refs/heads/master | 2021-01-22T22:21:19.230996 | 2017-05-29T19:59:20 | 2017-05-29T19:59:20 | 92,771,352 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 406 | java | package com.inuk.dabz.omsapplication;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"[email protected]"
] | |
4de0c06f964eefd7b7ff1d5c08bc0ed875251b9b | 87006469a24b4d0f7f1c081172aa37fec99aa65d | /twitter4j-core/src/main/java/twitter4j/UserStreamImpl.java | 8256c2cf1a91f2010cacbd87da22f11ff2f9b756 | [
"BSD-3-Clause",
"JSON"
] | permissive | jloomis/twitter4j | d1ccf5d1c7558ab9d88e92573726199eca818ccf | 8c2aae7cabe0202a0380ffa6cbf846b5fa63e785 | refs/heads/master | 2021-01-16T00:23:35.154849 | 2011-02-10T06:41:19 | 2011-02-10T06:41:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,327 | java | /*
Copyright (c) 2007-2011, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Yusuke Yamamoto nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY Yusuke Yamamoto ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL Yusuke Yamamoto BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package twitter4j;
import twitter4j.conf.Configuration;
import twitter4j.internal.async.Dispatcher;
import twitter4j.internal.http.HttpResponse;
import twitter4j.internal.json.DataObjectFactoryUtil;
import twitter4j.internal.org.json.JSONException;
import twitter4j.internal.org.json.JSONObject;
import java.io.IOException;
import java.io.InputStream;
/**
* @author Yusuke Yamamoto - yusuke at mac.com
* @since Twitter4J 2.1.8
*/
class UserStreamImpl extends StatusStreamImpl implements UserStream {
/*package*/ UserStreamImpl(Dispatcher dispatcher, InputStream stream, Configuration conf) throws IOException {
super(dispatcher, stream, conf);
}
/*package*/ UserStreamImpl(Dispatcher dispatcher, HttpResponse response, Configuration conf) throws IOException {
super(dispatcher, response, conf);
}
/**
* {@inheritDoc}
*/
public void next(UserStreamListener listener) throws TwitterException {
StreamListener[] list = new StreamListener[1];
list[0] = listener;
this.listeners = list;
handleNextElement();
}
public void next(StreamListener[] listeners) throws TwitterException {
this.listeners = listeners;
handleNextElement();
}
protected String parseLine(String line) {
this.line = line;
return line;
}
@Override
protected void onSender(JSONObject json) throws TwitterException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onDirectMessage(new DirectMessageJSONImpl(json));
}
}
@Override
protected void onDirectMessage(JSONObject json) throws TwitterException, JSONException {
DirectMessage directMessage = asDirectMessage(json);
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onDirectMessage(directMessage);
}
}
@Override
protected void onScrubGeo(JSONObject json) throws TwitterException {
// Not implemented yet
logger.info("Geo-tagging deletion notice (not implemented yet): " + line);
}
@Override
protected void onFriends(JSONObject json) throws TwitterException, JSONException {
int[] friendIds = asFriendList(json);
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onFriendList(friendIds);
}
}
@Override
protected void onFavorite(JSONObject source, JSONObject target, JSONObject targetObject) throws TwitterException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onFavorite(asUser(source), asUser(target), asStatus(targetObject));
}
}
@Override
protected void onUnfavorite(JSONObject source, JSONObject target, JSONObject targetObject) throws TwitterException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUnfavorite(asUser(source), asUser(target), asStatus(targetObject));
}
}
@Override
protected void onRetweet(JSONObject source, JSONObject target, JSONObject targetObject) throws TwitterException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onRetweet(asUser(source), asUser(target), asStatus(targetObject));
}
}
@Override
protected void onFollow(JSONObject source, JSONObject target) throws TwitterException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onFollow(asUser(source), asUser(target));
}
}
@Override
protected void onUserListMemberAddition(JSONObject addedMember, JSONObject owner, JSONObject target) throws TwitterException, JSONException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUserListMemberAddition(asUser(addedMember), asUser(owner), asUserList(target));
}
}
@Override
protected void onUserListMemberDeletion(JSONObject deletedMember, JSONObject owner, JSONObject target) throws TwitterException, JSONException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUserListMemberDeletion(asUser(deletedMember), asUser(owner), asUserList(target));
}
}
@Override
protected void onUserListSubscription(JSONObject source, JSONObject owner, JSONObject target) throws TwitterException, JSONException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUserListSubscription(asUser(source), asUser(owner), asUserList(target));
}
}
@Override
protected void onUserListUnsubscription(JSONObject source, JSONObject owner, JSONObject target) throws TwitterException, JSONException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUserListUnsubscription(asUser(source), asUser(owner), asUserList(target));
}
}
@Override
protected void onUserListCreation(JSONObject source, JSONObject target) throws TwitterException, JSONException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUserListCreation(asUser(source), asUserList(target));
}
}
@Override
protected void onUserListUpdated(JSONObject source, JSONObject target) throws TwitterException, JSONException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUserListUpdate(asUser(source), asUserList(target));
}
}
@Override
protected void onUserListDestroyed(JSONObject source, JSONObject target) throws TwitterException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUserListDeletion(asUser(source), asUserList(target));
}
}
@Override
protected void onUserUpdate(JSONObject source, JSONObject target) throws TwitterException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUserProfileUpdate(asUser(source));
}
}
@Override
protected void onBlock(JSONObject source, JSONObject target) throws TwitterException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onBlock(asUser(source), asUser(target));
}
}
@Override
protected void onUnblock(JSONObject source, JSONObject target) throws TwitterException {
for (StreamListener listener : listeners) {
((UserStreamListener) listener).onUnblock(asUser(source), asUser(target));
}
}
@Override
public void onException(Exception e) {
for (StreamListener listener : listeners) {
listener.onException(e);
}
}
}
| [
"[email protected]"
] | |
62bbd5057f65428c46e58c7f3a7ecbbc64db6b11 | bd0f49e442a9f2142665c297232873add3177ddb | /src/java/acciones/CrearPQRSAdmin.java | c33b95edf36645ab7fa94d429f2ee5fb77796825 | [] | no_license | oscar7685/pqrs | ef823e04f6e0b21f2ee300293d0f734eb14997cb | 29a32088303635b4337199753ccf0dd0c62ebb3b | refs/heads/master | 2020-12-24T07:54:12.419282 | 2016-06-10T05:13:10 | 2016-06-10T05:13:10 | 42,027,342 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,076 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package acciones;
import entidades.Reclamante;
import entidades.ResponsableArea;
import interfaz.Action;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import sesionbeans.AreaFacade;
import sesionbeans.ReclamanteFacade;
import sesionbeans.ResponsableAreaFacade;
/**
*
* @author Ususario
*/
public class CrearPQRSAdmin implements Action {
ReclamanteFacade reclamanteFacade = lookupReclamanteFacadeBean();
AreaFacade areaFacade = lookupAreaFacadeBean();
@Override
public String procesar(HttpServletRequest request) throws IOException, ServletException {
HttpSession session = request.getSession();
session.setAttribute("areas", areaFacade.findAll());
session.setAttribute("peticionarios", reclamanteFacade.findAll());
return "pqrs/crearPQRSAdmin.jsp";
}
private AreaFacade lookupAreaFacadeBean() {
try {
Context c = new InitialContext();
return (AreaFacade) c.lookup("java:global/pqrs/AreaFacade!sesionbeans.AreaFacade");
} catch (NamingException ne) {
Logger.getLogger(getClass().getName()).log(Level.SEVERE, "exception caught", ne);
throw new RuntimeException(ne);
}
}
private ReclamanteFacade lookupReclamanteFacadeBean() {
try {
Context c = new InitialContext();
return (ReclamanteFacade) c.lookup("java:global/pqrs/ReclamanteFacade!sesionbeans.ReclamanteFacade");
} catch (NamingException ne) {
Logger.getLogger(getClass().getName()).log(Level.SEVERE, "exception caught", ne);
throw new RuntimeException(ne);
}
}
}
| [
"Oscar@Oscar-PC"
] | Oscar@Oscar-PC |
7e118b733fb9e782ecc62639b6035d5b15b7e759 | fbfcb88a9bfdc2868077a7035a74c98dc3eb25a0 | /src/combiz/business/pr/PrstatusSrv.java | 6f448ef334498185145d80575e32c94cb47450e7 | [] | no_license | jackwysxw/combiz | 817af9399251ff286d2a4c1d525953e8f66c8e06 | 9a84f3b4e8866a5030462eafa683bf5d7ad4bf40 | refs/heads/master | 2020-04-25T14:46:23.301900 | 2016-09-26T07:04:16 | 2016-09-26T07:04:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 173 | java | package combiz.business.pr;
import combiz.domain.pr.Prstatus;
import combiz.system.IBOBaseSrv;
import java.util.List;
public interface PrstatusSrv extends IBOBaseSrv
{
}
| [
"[email protected]"
] | |
b49066ca8bb7f55b4465c3cff9d49984ecc61591 | d92f0a9e00cac87dbf928bb450481fd6710ced65 | /PolenPruNN/src/ui/ClassificationPanel.java | 63b3da833d5697db8bcea5d24888dc3d833da2c5 | [] | no_license | davergina/PolenPruNN | 0ddb14c6674d98fb2c4f0dfaf32528e83ef4460d | 6d789496b6e52819893cfd9fe4008d62e16fff6a | refs/heads/master | 2021-01-10T12:50:49.454512 | 2016-03-19T06:52:18 | 2016-03-19T06:52:18 | 54,029,107 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,646 | java | package ui;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.filechooser.FileNameExtensionFilter;
import algo.nn.NeuralNetwork;
import constants.InputHandler;
import controller.MainController;
import controller.GlobalVariables;
import controller.data.Data;
import controller.data.DataLocationHandler;
import controller.data.DataReader;
import feature.glcm.Haralick;
import helper.file.Directory;
import ij.process.ColorProcessor;
import image.ImageProcessor;
import ui.constants.ColorFactory;
public class ClassificationPanel extends JPanel {
/**
*
*/
private static final long serialVersionUID = -3057847128933029231L;
private GradientPaint honey;
private JButton selectClassifierButton;
private JButton selectImageButton;
private JButton singleClassificationButton;
private JButton batchClassificationButton;
private JFileChooser imageFileChooser;
private ImageProcessor imageProcessor;
private File testFile;
private File singleImageFile;
private Data testData;
private JLabel inputIcon;
private BufferedImage input, temp, processed;
private JFileChooser testFileChooser;
public static ClassificationPanel instance = null;
public static ClassificationPanel getInstance() {
if (instance == null) {
instance = new ClassificationPanel();
}
return instance;
}
public ClassificationPanel() {
init();
initCompoenents();
addComponenets();
setDatasetFolder();
}
private void setDatasetFolder() {
// TODO Auto-generated method stub
}
private void addComponenets() {
// TODO Auto-generated method stub
selectClassifierButton.setBounds(50, 50, 150, 30);
add(selectClassifierButton);
selectImageButton.setBounds(50, 90, 150, 30);
add(selectImageButton);
batchClassificationButton.setBounds(50, 130, 150, 30);
// add(batchClassificationButton);
inputIcon.setBounds(300, 50, 200, 200);
add(inputIcon);
singleClassificationButton.setBounds(300, 270, 150, 30);
add(singleClassificationButton);
singleClassificationButton.setVisible(false);
}
private void initCompoenents() {
// TODO Auto-generated method stub
// this.add(HeaderPanel.getInstance());
selectClassifierButton = new JButton("Select Classifier");
selectClassifierButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
selectClassifierClicked();
}
});
selectImageButton = new JButton("Select Image");
selectImageButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
selectImageButtonClicked();
}
});
singleClassificationButton = new JButton("Classify");
singleClassificationButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
singleClassificationButtonClicked();
}
});
batchClassificationButton = new JButton("Batch Classifcation");
batchClassificationButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
batchClassificationButtonClicked();
}
});
testFileChooser = new JFileChooser(Directory.DATA);
inputIcon = new JLabel();
imageFileChooser = new JFileChooser();
imageFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
imageFileChooser.setFileFilter(new FileNameExtensionFilter("", "jpg",
"jpeg"));
imageProcessor = new ImageProcessor();
}
protected void singleClassificationButtonClicked() {
// TODO Auto-generated method stub
classifyCurrentImage();
}
protected void batchClassificationButtonClicked() {
// TODO Auto-generated method stub
}
protected void selectImageButtonClicked() {
// TODO Auto-generated method stub
showInput();
}
protected void selectClassifierClicked() {
// TODO Auto-generated method stub
}
private void classifyCurrentImage() {
// TODO Auto-generated method stub
// processed = imageProcessor.process(temp, 200, 200);
ArrayList<BufferedImage> imagesToClassify = new ArrayList<BufferedImage>();
ArrayList<Integer> equivalentOutputList = new ArrayList<Integer>();
imagesToClassify.add(temp);
equivalentOutputList.add(Integer.parseInt(singleImageFile.getParentFile().getName()));
double[] weights = InputHandler.getInstance().getTrainedABC().getSolution();
double[][] totalSample = imageProcessor.createInputVectorArray(imagesToClassify);
double[][] output = imageProcessor.createOutputVector(equivalentOutputList);
System.out.println("New Network");
System.out.println("");
NeuralNetwork nn = new NeuralNetwork();
nn.reset(new ArrayList<Integer>(), new ArrayList<Integer>());
nn.buildNetwork(weights, InputHandler.getInstance(), totalSample, output);
System.out.println("Correct: "+nn.getTotalCorrect());
}
private void showInput() {
singleImageFile = selectInputImage();
if (singleImageFile != null) {
showInput(singleImageFile);
}
}
private void showInput(File inputFile) {
// filenameLabel.setText("<html>"+inputFile.getName()+"</html>");
// filenameLabel.setText(inputFile.getName());
// filenameLabel.setToolTipText(inputFile.getName());
try {
input = ImageIO.read(inputFile);
} catch (IOException e1) {
// Debugger.printError("IO error in "+this.getClass().getName());
}
temp = imageProcessor.resizeImage(input, 200, 200);
inputIcon.setIcon(new ImageIcon(temp));
singleClassificationButton.setVisible(true);
updateUI();
}
private File selectInputImage() {
File file = null;
imageFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
if (imageFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
file = imageFileChooser.getSelectedFile();
return file;
}
protected void prepareTrainingButtonClicked() {
// TODO Auto-generated method stub
new Thread( new Runnable() {
@Override
public void run() {
System.out.println("Locating Files...");
DataReader dl = new DataReader(testFile);
System.out.println("Done locating... \nPreparing Files");
if(dl.read()) { //Reads the Datafile
testData = dl.getData();
// DataReader dl2 = new DataReader(progressPane, testFile);
// if(dl2.read()) {
// testData = dl2.getData();
// hasData = true;
// new MessageDialog("Done preparing.").setVisible(true);
// }
System.out.println("Done Preparing...");
}
// setComponents(true);
}
}).start();
}
protected void trainingFileClicked() {
// TODO Auto-generated method stub
testFileChooser.showOpenDialog(this);
testFile = testFileChooser.getSelectedFile();
if(testFile!=null){
System.out.println(""+testFile.getName());
}
}
private void init() {
// TODO Auto-generated method stub
this.setLayout(null);
this.setLocation(200, 0);
this.setSize(600, 600);
}
public int getNumberOfInputs() {
// TODO Auto-generated method stub
return 1;
}
public void incrementRuntime(int i) {
// TODO Auto-generated method stub
System.out.println("training");
}
public void incrementCycle(int i) {
// TODO Auto-generated method stub
System.out.println("cycle = "+i);
}
public void returnResult(double globalMin, double[] ds, double elapsedTime,
int i) {
// TODO Auto-generated method stub
}
public void resetButtons() {
// TODO Auto-generated method stub
}
// @Override
// public void paintComponent(Graphics g) {
// Graphics2D g2 = (Graphics2D) g;
// honey = ColorFactory.fill(ColorFactory.DEFAULT_BACKGROUND, getHeight());
//
// g2.setPaint(honey);
// g2.fillRect(0, 0, 600, 600);
//
// paintChildren(g2);
//
// g2.dispose();
// g.dispose();
// }
}
| [
"[email protected]"
] | |
d48e630ac8272feedbfa561161e12b7457bc75c0 | 7aea7f0e309d2204d118c92ccdddf6bc5dbeacce | /src/SpeedConverter.java | 8fe3a7a8109e88287c1d6fac9f9a86a2a5b27494 | [] | no_license | The-Popa/SpeedConverter | 5a2bd5aaa313b380eb107e7e43c37871d472646b | 9e4aa637d3dbd910510e3852c882b6a6e3ea05f6 | refs/heads/master | 2022-04-22T18:03:08.220840 | 2020-04-28T10:35:19 | 2020-04-28T10:35:19 | 259,606,532 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 615 | java | public class SpeedConverter {
public static long toMilesPerHour(double kilometersPerHour) {
if(kilometersPerHour < 0) {
return -1;
}
return Math.round(kilometersPerHour / 1.609);
}
public static void printConversion(double kilometersPerHour) {
if(kilometersPerHour < 0) {
System.out.println("Invalid Value");
} else {
long milesPerHour = toMilesPerHour(kilometersPerHour);
System.out.println(kilometersPerHour +
" km/h = " + milesPerHour +
" mi/h ");
}
}
}
| [
"[email protected]"
] | |
bc0db541cb85d6c8b57cefd65dd10c0b11d4e52f | ae5eb1a38b4d22c82dfd67c86db73592094edc4b | /project112/src/test/java/org/gradle/test/performance/largejavamultiproject/project112/p564/Test11299.java | d783413c650369f250b6ad47eb5ed976f52fbf37 | [] | no_license | big-guy/largeJavaMultiProject | 405cc7f55301e1fd87cee5878a165ec5d4a071aa | 1cd6a3f9c59e9b13dffa35ad27d911114f253c33 | refs/heads/main | 2023-03-17T10:59:53.226128 | 2021-03-04T01:01:39 | 2021-03-04T01:01:39 | 344,307,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,112 | java | package org.gradle.test.performance.largejavamultiproject.project112.p564;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test11299 {
Production11299 objectUnderTest = new Production11299();
@Test
public void testProperty0() {
String value = "value";
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
String value = "value";
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
String value = "value";
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
} | [
"[email protected]"
] | |
e69cfd0a162d25b7a4a30daa810e438b55b80a4c | 1e0ad4729419d7ef523d5e4062f432f9718f61ba | /service-admin/src/main/java/com/xq/serviceadmin/customizeService/UserServiceth.java | 13a7e37958ea111d61a3ff9e322b6fb04356d748 | [] | no_license | whiteClovers/kuku-music | ddc3c115a51ccdd236f6bcec7077539c34c037f8 | b299fa0f6d2559a45cec26a959e787c50fd20a94 | refs/heads/master | 2022-12-14T01:13:20.684898 | 2019-06-03T10:59:16 | 2019-06-03T10:59:16 | 185,901,166 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 385 | java | package com.xq.serviceadmin.customizeService;
import com.xq.serviceadmin.entity.User;
import org.springframework.stereotype.Service;
/**
* @program: kukuMusic
* @description:
* @author: Mr.Fu
* @create: 2019-05-05 15:18
**/
@Service
public interface UserServiceth {
public User login(String phone, String password);
public User getUserFromNickName(String nickName);
}
| [
"[email protected]"
] | |
22eabd9e168f2e6f277241ae0cc8d74d1c5ba956 | 5921c7658db3a28448c1eea8dd63a463f11d79b3 | /GeekForGeek/NextGreaterRightSide.java | e30818fcd7fbf161641eec16b6bd7bc3025eb9f1 | [] | no_license | imsaiful/myctcianswer | fa66c0bcc635dd71049708b7db4793e9eb2f75a7 | e95c34259bb9cb58acce4130bb0552ae81c1637e | refs/heads/master | 2020-03-23T22:29:37.622866 | 2019-04-25T16:21:37 | 2019-04-25T16:21:37 | 142,179,179 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 696 | java | /*Next Greater Element
Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element for an element x is the first greater element on the right side of x in array. Elements for which no greater element exist, consider next greater element as -1.*/
class NextGreaterRightSide{
public static void main(String[] args) {
int[] a={13, 7, 6, 12};
int[] temp=new int[a.length];
int n=a.length-1;
boolean flag=false;
for(int i=n;i>=0;i--){
int j=i+1;
flag=false;
while(j<=n){
if(a[i]<a[j]){
temp[i]=a[j];
break;
}
j++;
}
}
for(int i=0;i<n;i++){
System.out.print(temp[i]+" ");
}
System.out.print(temp[n]);
}
}
| [
"[email protected]"
] | |
7891fb6d196d75108abdeab1079c01343df5f4f1 | e6f0bc837ffbed6feba29b5cefbff3d1f14b4827 | /src/main/java/com/contentbig/kgdatalake/graphql/generated/DeleteProductPayloadTueryDefinition.java | 70f8ffca0cff022465eff1ef5ba5e284becc39cb | [
"Apache-2.0"
] | permissive | covid19angels/kgis-datalake-dgraph | 1b152657a105e8c9fb503a5f47464aab853d7557 | 66e3bfabcd24dc1bfd6b8776f563b117362dbf2d | refs/heads/master | 2021-05-23T00:05:36.151365 | 2020-04-22T09:38:52 | 2020-04-22T09:38:52 | 253,148,309 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 248 | java | // Generated from graphql_java_gen gem with template TueryDefinition.java.erb
package com.contentbig.kgdatalake.graphql.generated;
public interface DeleteProductPayloadTueryDefinition {
void define(DeleteProductPayloadTuery _queryBuilder);
} | [
"[email protected]"
] | |
abc6779f5d617c5e7faf7e21adb394f41f54a013 | b1f51f8ba05ad83ecfbd80e6e7f140e70850bf01 | /ACE_ERP/src/pms/menu/help/Si110H_01.java | 5f92e0659f616f3f07e7a1edd8d121bae1c415d3 | [] | no_license | hyundaimovex-asanwas/asanwas-homepage | 27e0ba1ed7b41313069e732f3dc9df20053caddd | 75e30546f11258d8b70159cfbe8ee36b18371bd0 | refs/heads/master | 2023-06-07T03:41:10.170367 | 2021-07-01T10:23:54 | 2021-07-01T10:23:54 | 376,739,168 | 1 | 1 | null | null | null | null | UHC | Java | false | false | 2,481 | java | package pms.menu.help;
/***********************************************************************
* 작업 등록 / 디테일1 : 외주 협력사 + 공종 조회
************************************************************************/
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.servlet.ServletException;
import oracle.jdbc.OracleTypes;
import com.gauce.GauceDataSet;
import com.gauce.http.HttpGauceRequest;
import com.gauce.http.HttpGauceResponse;
import com.gauce.io.GauceInputStream;
import com.gauce.io.GauceOutputStream;
import sales.common.HDUtil;
import sales.common.StringUtil;
import pms.common.SuperServlet;
public class Si110H_01 extends SuperServlet {
private static final long serialVersionUID = 1L;
public void makeSql() {
for(int i=0; i<arr_sql.length; i++){
arr_sql[i] = new StringBuffer();
}
arr_sql[0].append ("{call PMS.PR_SI110I_23(?,?) }" );
}
public void init(Connection conn, HttpGauceRequest greq, HttpGauceResponse gres) throws ServletException, Exception {
}
// 조회 method
public void select(Connection conn, HttpGauceRequest greq, HttpGauceResponse gres) throws ServletException, Exception {
CallableStatement cstmt = null;
ResultSet rs = null;
/* DataSet */
GauceDataSet ds1 = null;
try {
GauceInputStream gis = greq.getGauceInputStream();
GauceOutputStream gos = gres.getGauceOutputStream();
// DataSet 생성
ds1 = new GauceDataSet();
int dsType = HDUtil.nullCheckNum(greq.getParameter("dsType"));
int v_site_sid = HDUtil.nullCheckNum(greq.getParameter("v_site_sid"));
//StringUtil.printMsg("v_keyword", v_keyword, this);
cstmt = conn.prepareCall(arr_sql[0].toString());
cstmt.setInt(1, v_site_sid);
cstmt.registerOutParameter(2, OracleTypes.CURSOR); //결과를 받을 커서
cstmt.executeQuery();
rs = (ResultSet)cstmt.getObject(2); //커서 OUT param.
gos.write(getDataSet(rs, ds1));
} catch (SQLException sqle){
//gres.writeException("ERROR", sqle.getErrorCode()+"", sqle.getMessage());
throw sqle;
} catch (Exception e){
//res.writeException("ERROR", "", e.toString());
throw e;
} finally {
if(rs!=null) rs.close();
if(cstmt!=null) cstmt.close();
}
}
public void apply(Connection conn, HttpGauceRequest greq, HttpGauceResponse gres) throws ServletException, Exception {
}
}
| [
"[email protected]"
] | |
00155cc5590195cf839837b3bf485ea930cd480d | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /miniapplcdp-20200113/src/main/java/com/aliyun/miniapplcdp20200113/models/CreateDomainResponse.java | 0d3b2c9198ed5d02b18d576db1cfa3ce193e9355 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 1,042 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.miniapplcdp20200113.models;
import com.aliyun.tea.*;
public class CreateDomainResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public CreateDomainResponseBody body;
public static CreateDomainResponse build(java.util.Map<String, ?> map) throws Exception {
CreateDomainResponse self = new CreateDomainResponse();
return TeaModel.build(map, self);
}
public CreateDomainResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public CreateDomainResponse setBody(CreateDomainResponseBody body) {
this.body = body;
return this;
}
public CreateDomainResponseBody getBody() {
return this.body;
}
}
| [
"[email protected]"
] | |
b7ef555e04ec8c9226c87304438bfbc64e8ceadc | 95d20c83d8aff34e314c56a3ecb2b87c9fa9fc86 | /Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/BreakpointsDecompilerMarginProvider.java | 2921048c8328e8ebafd3c4a0667e8c9c70d6f3a9 | [
"GPL-1.0-or-later",
"GPL-3.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | NationalSecurityAgency/ghidra | 969fe0d2ca25cb8ac72f66f0f90fc7fb2dbfa68d | 7cc135eb6bfabd166cbc23f7951dae09a7e03c39 | refs/heads/master | 2023-08-31T21:20:23.376055 | 2023-08-29T23:08:54 | 2023-08-29T23:08:54 | 173,228,436 | 45,212 | 6,204 | Apache-2.0 | 2023-09-14T18:00:39 | 2019-03-01T03:27:48 | Java | UTF-8 | Java | false | false | 4,405 | java | /* ###
* IP: GHIDRA
*
* 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 ghidra.app.plugin.core.debug.gui.breakpoint;
import java.awt.*;
import java.awt.event.*;
import java.math.BigInteger;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import javax.swing.JPanel;
import docking.widgets.fieldpanel.LayoutModel;
import docking.widgets.fieldpanel.listener.IndexMapper;
import docking.widgets.fieldpanel.listener.LayoutModelListener;
import ghidra.app.decompiler.ClangLine;
import ghidra.app.decompiler.component.margin.DecompilerMarginProvider;
import ghidra.app.decompiler.component.margin.LayoutPixelIndexMap;
import ghidra.app.services.LogicalBreakpoint;
import ghidra.app.services.LogicalBreakpoint.State;
import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramLocation;
import ghidra.trace.model.breakpoint.TraceBreakpointKind;
public class BreakpointsDecompilerMarginProvider extends JPanel
implements DecompilerMarginProvider, LayoutModelListener {
private Program program;
private LayoutModel model;
private LayoutPixelIndexMap pixmap;
private final DebuggerBreakpointMarkerPlugin plugin;
public BreakpointsDecompilerMarginProvider(DebuggerBreakpointMarkerPlugin plugin) {
this.plugin = plugin;
setPreferredSize(new Dimension(16, 0));
addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
doToggleBreakpoint(e);
}
});
}
@Override
public void setProgram(Program program, LayoutModel model, LayoutPixelIndexMap pixmap) {
this.program = program;
setLayoutManager(model);
this.pixmap = pixmap;
repaint();
}
private void setLayoutManager(LayoutModel model) {
if (this.model == model) {
return;
}
if (this.model != null) {
this.model.removeLayoutModelListener(this);
}
this.model = model;
if (this.model != null) {
this.model.addLayoutModelListener(this);
}
}
@Override
public Component getComponent() {
return this;
}
@Override
public void modelSizeChanged(IndexMapper indexMapper) {
repaint();
}
@Override
public void dataChanged(BigInteger start, BigInteger end) {
repaint();
}
@Override
public void paint(Graphics g) {
super.paint(g);
if (plugin.breakpointService == null) {
return;
}
Rectangle visible = getVisibleRect();
BigInteger startIdx = pixmap.getIndex(visible.y);
BigInteger endIdx = pixmap.getIndex(visible.y + visible.height);
List<ClangLine> lines = plugin.decompilerMarginService.getDecompilerPanel().getLines();
for (BigInteger index = startIdx; index.compareTo(endIdx) <= 0; index =
index.add(BigInteger.ONE)) {
int i = index.intValue();
if (i >= lines.size()) {
continue;
}
ClangLine line = lines.get(i);
List<ProgramLocation> locs =
DebuggerBreakpointMarkerPlugin.getLocationsFromLine(program, line);
State state = plugin.computeState(locs);
if (state.icon != null) {
state.icon.paintIcon(this, g, 0, pixmap.getPixel(index));
}
}
}
private void doToggleBreakpoint(MouseEvent e) {
if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) {
int i = pixmap.getIndex(e.getY()).intValue();
List<ClangLine> lines = plugin.decompilerMarginService.getDecompilerPanel().getLines();
List<ProgramLocation> locs =
DebuggerBreakpointMarkerPlugin.nearestLocationsToLine(program, i, lines);
if (locs == null || locs.isEmpty()) {
return;
}
Set<LogicalBreakpoint> col = plugin.collectBreakpoints(locs);
plugin.breakpointService.toggleBreakpointsAt(col, locs.get(0), () -> {
plugin.placeBreakpointDialog.prompt(plugin.getTool(), plugin.breakpointService,
"Set breakpoint", locs.get(0), 1, Set.of(TraceBreakpointKind.SW_EXECUTE), "");
// Not great, but I'm not sticking around for the dialog
return CompletableFuture.completedFuture(Set.of());
});
}
}
}
| [
"[email protected]"
] | |
98582eb65b6a9eabd3e11ec9c0cefd7e95ac95c6 | 5b082805c24b089041025be7c5a44a5468af11b4 | /android/app/src/main/java/com/foragekitchen/demoapp/MainActivity.java | f3649c89905f941fd5b38338f4ead7bbaac6fb42 | [] | no_license | AksRustagi/unity-ar-react-native | 211b5ea7ab52ed3ac2f19610c567bf6767d1a397 | 638037313da2ce32b1ce2160b4b292033f65b9c7 | refs/heads/master | 2022-12-08T10:29:53.055021 | 2020-09-04T10:41:13 | 2020-09-04T10:41:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 697 | java | package com.foragekitchen.demoapp;
import com.facebook.react.ReactActivity;
import android.content.Intent;
import android.content.res.Configuration;
public class MainActivity extends ReactActivity {
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Intent intent = new Intent("onConfigurationChanged");
intent.putExtra("newConfig", newConfig);
this.sendBroadcast(intent);
}
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "demoapp";
}
}
| [
"[email protected]"
] | |
a7ee427b30debe3d0ae2b448b6caadd592d1f234 | 0f49b49589215b9a3b6be5816bacd4f884d8557b | /src/main/java/ir/markazandroid/UniEngine/security/device/DeviceSecurity.java | ad34b954e249b2fefee51df6b8ba6c26989d6d46 | [] | no_license | ali8569/UniEngine | 3bf6989ce8d7749651583a7d8e4793c51e8954a2 | e6e7ca667a200a9a39a84168067a23c415ee8211 | refs/heads/master | 2022-05-27T05:42:19.011988 | 2019-06-29T17:06:28 | 2019-06-29T17:06:28 | 184,983,610 | 0 | 0 | null | 2022-05-20T20:57:21 | 2019-05-05T05:31:25 | Java | UTF-8 | Java | false | false | 3,258 | java | package ir.markazandroid.UniEngine.security.device;
import ir.markazandroid.UniEngine.security.api.RestAuthenticationEntryPoint;
import ir.markazandroid.UniEngine.security.api.RestAuthenticationSuccessHandler;
import ir.markazandroid.UniEngine.security.api.RestLogoutSuccessHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository;
/**
* Created by Ali on 07/11/2017.
*/
@EnableWebSecurity
@Order(103)
public class DeviceSecurity extends WebSecurityConfigurerAdapter {
private final RestAuthenticationEntryPoint restAuthenticationEntryPoint;
private final PersistentTokenRepository tokenRepository;
private final RestLogoutSuccessHandler restLogoutSuccessHandler;
private final UUIDAuthenticationProvider UUIDAuthenticationProvider;
@Autowired
public DeviceSecurity(RestAuthenticationEntryPoint restAuthenticationEntryPoint,
PersistentTokenRepository tokenRepository,
RestLogoutSuccessHandler restLogoutSuccessHandler, UUIDAuthenticationProvider uuidAuthenticationProvider) {
this.restAuthenticationEntryPoint = restAuthenticationEntryPoint;
this.tokenRepository = tokenRepository;
this.restLogoutSuccessHandler = restLogoutSuccessHandler;
UUIDAuthenticationProvider = uuidAuthenticationProvider;
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.requestMatchers().antMatchers("/deviceApi/**").and()
.sessionManagement()
.maximumSessions(1)
.and()
.and()
.authorizeRequests()
//add //.anyRequest().hasRole(UniEngineApplication.ROLE_DEVICE.getRole())
//add //.antMatchers("/deviceApi/authentication/login").permitAll()
//.antMatchers("/api/**","/socket/phone/**"/*,"/socket/phone/**"*/).hasRole("PHONE")
//rem
.anyRequest().permitAll()
.and()
.csrf().disable()
.exceptionHandling()
.authenticationEntryPoint(restAuthenticationEntryPoint)
.and()
.apply(new TokenAuthenticationConfigurerAdapter())
.loginProcessingUrl("/deviceApi/authentication/login")
.successHandler(new RestAuthenticationSuccessHandler("/deviceApi/device/getMe"))
.failureHandler(new SimpleUrlAuthenticationFailureHandler());
}
@Override
protected void configure(AuthenticationManagerBuilder auth) {
auth.authenticationProvider(UUIDAuthenticationProvider);
}
}
| [
"[email protected]"
] | |
a29071f578b86bd3212c2934f4d6445421bc8b39 | 536e9c85a76b48a86adbbd799fa24e56c37a8b8b | /aftermarkets/aftermarketsstorefront/web/src/com/aftermarkets/storefront/url/DefaultPreviewDataModelUrlResolver.java | 31b2810c6196fbf7a6d07609423ac3b21caece55 | [] | no_license | armuruganandham/aftermarkets | 74f0f7160b2e8099bedd2a600909b38c7f2dbd7e | f2c374dc11bfdc7151b5f47101eef09d462caa81 | refs/heads/master | 2021-08-30T22:47:46.313799 | 2017-12-19T17:36:26 | 2017-12-19T17:36:26 | 114,682,037 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,894 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package com.aftermarkets.storefront.url;
import de.hybris.platform.category.model.CategoryModel;
import de.hybris.platform.cms2.model.pages.AbstractPageModel;
import de.hybris.platform.cms2.model.pages.CategoryPageModel;
import de.hybris.platform.cms2.model.pages.ContentPageModel;
import de.hybris.platform.cms2.model.pages.ProductPageModel;
import de.hybris.platform.cms2.model.preview.PreviewDataModel;
import de.hybris.platform.cms2.model.site.CMSSiteModel;
import de.hybris.platform.commerceservices.url.UrlResolver;
import de.hybris.platform.core.model.product.ProductModel;
import java.util.Map;
import org.springframework.beans.factory.annotation.Required;
/**
* Responsible for generating correct URL for given page.
*/
public class DefaultPreviewDataModelUrlResolver implements UrlResolver<PreviewDataModel>
{
private UrlResolver<ProductModel> productModelUrlResolver;
private UrlResolver<CategoryModel> categoryModelUrlResolver;
private Map<String, String> pageMapping;
protected UrlResolver<ProductModel> getProductModelUrlResolver()
{
return productModelUrlResolver;
}
@Required
public void setProductModelUrlResolver(final UrlResolver<ProductModel> productModelUrlResolver)
{
this.productModelUrlResolver = productModelUrlResolver;
}
protected UrlResolver<CategoryModel> getCategoryModelUrlResolver()
{
return categoryModelUrlResolver;
}
@Required
public void setCategoryModelUrlResolver(final UrlResolver<CategoryModel> categoryModelUrlResolver)
{
this.categoryModelUrlResolver = categoryModelUrlResolver;
}
protected Map<String, String> getPageMapping()
{
return pageMapping;
}
@Required
public void setPageMapping(final Map<String, String> pageMapping)
{
this.pageMapping = pageMapping;
}
/**
* Returns the relative URL for the specified page <code>page</code>.
*
* @return relative URL for the specified page
*/
@Override
public String resolve(final PreviewDataModel previewDataModel)
{
if (previewDataModel != null)
{
final AbstractPageModel page = previewDataModel.getPage();
final String url = processPage(page, getPageMapping());
if (url != null)
{
return url;
}
if (page instanceof ContentPageModel)
{
// Construct URL to preview the Page by UID
return "/preview-content?uid=" + page.getUid();
}
if (page instanceof CategoryPageModel)
{
return getCategoryModelUrlResolver().resolve(getPreviewValueForCategoryPage(previewDataModel));
}
if (page instanceof ProductPageModel)
{
return getProductModelUrlResolver().resolve(getPreviewValueForProductPage(previewDataModel));
}
}
return "/";
}
protected String processPage(final AbstractPageModel page, final Map<String, String> pageMapping)
{
if (pageMapping != null && page != null)
{
final String urlForUid = checkPageUid(page, pageMapping);
if (urlForUid != null)
{
return urlForUid;
}
final String urlForLabel = checkPageLabel(page, pageMapping);
if (urlForLabel != null)
{
return urlForLabel;
}
}
return null;
}
protected String checkPageLabel(final AbstractPageModel page, final Map<String, String> pageMapping)
{
// For ContentPages also lookup by label
if (page instanceof ContentPageModel)
{
final String pageLabel = ((ContentPageModel) page).getLabel();
if (pageLabel != null)
{
final String url = pageMapping.get(pageLabel);
if (url != null && !url.isEmpty())
{
return url;
}
}
}
return null;
}
protected String checkPageUid(final AbstractPageModel page, final Map<String, String> pageMapping)
{
// Lookup the page mapping by page UID
final String pageUid = page.getUid();
if (pageUid != null)
{
final String url = pageMapping.get(pageUid);
if (url != null && !url.isEmpty())
{
return url;
}
}
return null;
}
protected CategoryModel getPreviewValueForCategoryPage(final PreviewDataModel previewCtx)
{
final CMSSiteModel currentSite = previewCtx.getActiveSite();
CategoryModel ret = previewCtx.getPreviewCategory();
if (ret == null && currentSite != null)
{
ret = currentSite.getDefaultPreviewCategory();
}
return ret;
}
protected ProductModel getPreviewValueForProductPage(final PreviewDataModel previewCtx)
{
final CMSSiteModel currentSite = previewCtx.getActiveSite();
ProductModel ret = previewCtx.getPreviewProduct();
if (ret == null && currentSite != null)
{
ret = currentSite.getDefaultPreviewProduct();
}
return ret;
}
}
| [
"[email protected]"
] | |
e06ddc2f09b5015eeb66aad09f1b4944732da726 | f0f72aff0d8f1cf722cb7fd9af0d2902752ec7bb | /DarkHoloAuto/app/src/main/java/com/tl/uic/appDarkHoloAuto/TabAdapter.java | a4b66bcb248155abd79e1144881b827515ae3712 | [] | no_license | AaronGregoryAcoustic/SampleCode_Tealeaf_Android_DarkHoloAuto | 20ede9969d79c59a860636cd2dfa8fd8021fad91 | 19712cb58ecc342b7cf87b02fc2e33b82c65c025 | refs/heads/master | 2023-08-16T03:18:08.877125 | 2021-09-24T01:01:13 | 2021-09-24T01:01:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,155 | java | /********************************************************************************************
* Copyright (C) 2020 Acoustic, L.P. All rights reserved.
*
* NOTICE: This file contains material that is confidential and proprietary to
* Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
* industrial property rights of Acoustic, L.P. except as may be provided in an agreement with
* Acoustic, L.P. Any unauthorized copying or distribution of content from this file is
* prohibited.
********************************************************************************************/
package com.tl.uic.appDarkHoloAuto;
import android.content.Context;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import java.util.ArrayList;
import java.util.List;
public class TabAdapter extends FragmentPagerAdapter {
private final List<Fragment> mFragmentList = new ArrayList<>();
private final List<String> mFragmentTitleList = new ArrayList<>();
private Context context;
private Fragment mCurrentFragment;
public Fragment getCurrentFragment() {
return mCurrentFragment;
}
@Override
public void setPrimaryItem(ViewGroup container, int position, Object object) {
if (getCurrentFragment() != object) {
mCurrentFragment = ((Fragment) object);
}
super.setPrimaryItem(container, position, object);
}
TabAdapter(FragmentManager fm, Context context) {
super(fm);
this.context = context;
}
@Override
public Fragment getItem(int position) {
return mFragmentList.get(position);
}
public void addFragment(Fragment fragment, String title) {
mFragmentList.add(fragment);
mFragmentTitleList.add(title);
}
@Nullable
@Override
public CharSequence getPageTitle(int position) {
return mFragmentTitleList.get(position);
}
@Override
public int getCount() {
return mFragmentList.size();
}
}
| [
"[email protected]"
] | |
6747ea345cab895ea5ade1a362fd852ff079dcca | a8494cf6cb4b25b7a9cc3dbda022f50e26e73168 | /src/main/java/app/controller/UserEmploymentStatusController.java | 165785615e6cd33d6ba73855042f3a7df6cfe102 | [] | no_license | SteveZhangF/ddd | ab1c763ac7d2c33d2e7b8d8e1ff4a29aa02a82d9 | b0882f985cf3ec6f21ab0a420f9f814969841fee | refs/heads/master | 2021-01-10T15:05:42.506250 | 2015-12-12T08:34:48 | 2015-12-12T08:34:48 | 43,917,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,114 | java | /*
* Copyright (c) 2015. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
* Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
* Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
* Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
* Vestibulum commodo. Ut rhoncus gravida arcu.
*/
package app.controller;
import app.model.userfield.EmploymentStatus;
import app.service.userFields.EmploymentStatusService;
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.*;
import java.sql.Date;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.List;
/**
* Created by steve on 11/10/15.
*/
@RestController
public class UserEmploymentStatusController {
@Autowired
EmploymentStatusService employmentStatusService;
// get list by user id
@RequestMapping(value = "/employmentStatus/user/{userId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List> getEmploymentStatusByUserId(@PathVariable("userId") int userId) {
List<EmploymentStatus> list = employmentStatusService.getListByUserId(userId);
return new ResponseEntity<List>(list, HttpStatus.OK);
}
@RequestMapping(value = "/employmentStatus/delete/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity employmentStatusService(@RequestBody String[] jtIds) {
for (String uuid : jtIds) {
EmploymentStatus employmentStatus = employmentStatusService.get(uuid);
if (employmentStatus != null) {
employmentStatusService.delete(employmentStatus);
}
}
return new ResponseEntity(HttpStatus.OK);
}
@RequestMapping(value = "/employmentStatus/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity saveEmploymentStatus(@RequestBody EmploymentStatus employmentStatus) {
Timestamp date = new Timestamp(new java.util.Date().getTime());
employmentStatus.setCreateTime(date);
employmentStatus.setUpdateTime(date);
employmentStatusService.save(employmentStatus);
return new ResponseEntity(HttpStatus.OK);
}
@RequestMapping(value = "/employmentStatus/", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity updateEmploymentStatus(@RequestBody EmploymentStatus employmentStatus) {
if (employmentStatusService.get(employmentStatus.getUuid()) == null)
return new ResponseEntity(HttpStatus.NOT_FOUND);
Timestamp date = new Timestamp(new java.util.Date().getTime());
employmentStatus.setUpdateTime(date);
employmentStatusService.update(employmentStatus);
return new ResponseEntity(HttpStatus.OK);
}
}
| [
"[email protected]"
] | |
17d16313bd65d4cbf6ae594044de55a6717ed247 | 6249a2b3928e2509b8a5d909ef9d8e18221d9637 | /revolsys-core/src/main/java/com/revolsys/geometry/geomgraph/Depth.java | c20cbae561183ed41cc5841b1aacc97d1fb2d8ab | [
"Apache-2.0"
] | permissive | revolsys/com.revolsys.open | dbcdc3bdcee3276dc3680311948e91ec64e1264e | 7f4385c632094eb5ed67c0646ee3e2e258fba4e4 | refs/heads/main | 2023-08-22T17:18:48.499931 | 2023-05-31T01:59:22 | 2023-05-31T01:59:22 | 2,709,026 | 5 | 11 | NOASSERTION | 2023-05-31T01:59:23 | 2011-11-04T12:33:49 | Java | UTF-8 | Java | false | false | 4,727 | java | /*
* The JTS Topology Suite is a collection of Java classes that
* implement the fundamental operations required to validate a given
* geo-spatial data set to a known topological specification.
*
* Copyright (C) 2001 Vivid Solutions
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, contact:
*
* Vivid Solutions
* Suite #1A
* 2328 Government Street
* Victoria BC V8T 5G5
* Canada
*
* (250)385-6040
* www.vividsolutions.com
*/
package com.revolsys.geometry.geomgraph;
import java.util.Arrays;
import com.revolsys.geometry.model.Location;
/**
* A Depth object records the topological depth of the sides
* of an Edge for up to two Geometries.
* @version 1.7
*/
public class Depth {
private final static int NULL_VALUE = -1;
public static int depthAtLocation(final Location location) {
if (location == Location.EXTERIOR) {
return 0;
}
if (location == Location.INTERIOR) {
return 1;
}
return NULL_VALUE;
}
private final int[][] depth = new int[2][3];
public Depth() {
// initialize depth array to a sentinel value
for (final int[] depths : this.depth) {
Arrays.fill(depths, NULL_VALUE);
}
}
public void add(final int geomIndex, final int posIndex, final Location location) {
if (location == Location.INTERIOR) {
this.depth[geomIndex][posIndex]++;
}
}
public void add(final Label lbl) {
int i = 0;
for (final int[] depths : this.depth) {
for (int j = 1; j < 3; j++) {
final Location loc = lbl.getLocation(i, j);
if (loc == Location.EXTERIOR || loc == Location.INTERIOR) {
// initialize depth if it is null, otherwise add this location value
if (isNull(i, j)) {
depths[j] = depthAtLocation(loc);
} else {
depths[j] += depthAtLocation(loc);
}
}
}
i++;
}
}
public int getDelta(final int geomIndex) {
return this.depth[geomIndex][Position.RIGHT] - this.depth[geomIndex][Position.LEFT];
}
public int getDepth(final int geomIndex, final int posIndex) {
return this.depth[geomIndex][posIndex];
}
public Location getLocation(final int geomIndex, final int posIndex) {
if (this.depth[geomIndex][posIndex] <= 0) {
return Location.EXTERIOR;
}
return Location.INTERIOR;
}
/**
* A Depth object is null (has never been initialized) if all depths are null.
*/
public boolean isNull() {
for (final int[] depths : this.depth) {
for (final int depth : depths) {
if (depth != NULL_VALUE) {
return false;
}
}
}
return true;
}
public boolean isNull(final int geomIndex) {
return this.depth[geomIndex][1] == NULL_VALUE;
}
public boolean isNull(final int geomIndex, final int posIndex) {
return this.depth[geomIndex][posIndex] == NULL_VALUE;
}
/**
* Normalize the depths for each geometry, if they are non-null.
* A normalized depth
* has depth values in the set { 0, 1 }.
* Normalizing the depths
* involves reducing the depths by the same amount so that at least
* one of them is 0. If the remaining value is > 0, it is set to 1.
*/
public void normalize() {
for (final int[] depths : this.depth) {
int minDepth = depths[1];
if (!(minDepth == NULL_VALUE)) {
if (depths[2] < minDepth) {
minDepth = depths[2];
}
if (minDepth < 0) {
minDepth = 0;
}
for (int j = 1; j < 3; j++) {
int newValue = 0;
if (depths[j] > minDepth) {
newValue = 1;
}
depths[j] = newValue;
}
}
}
}
public void setDepth(final int geomIndex, final int posIndex, final int depthValue) {
this.depth[geomIndex][posIndex] = depthValue;
}
@Override
public String toString() {
return "A: " + this.depth[0][1] + "," + this.depth[0][2] + " B: " + this.depth[1][1] + ","
+ this.depth[1][2];
}
}
| [
"[email protected]"
] | |
3ab2bd79d38e2b3731af4251de46abd855947480 | 9895b40dcad6f0b2413b8608aaf5d971de5499c7 | /Libraries/Library-FrameworkFramework/src/main/java/com/framework/security/Base64Coder.java | 7952e2d16e763b6a54472e979902c344e394f59b | [] | no_license | TangHaifeng-John/Framework | 286d8f6e30a8e52c9d42a11ec56b17863d057d51 | 2edfdc12042d2770f733bae0412dea535ead098f | refs/heads/master | 2020-09-09T10:54:50.026390 | 2019-10-20T07:58:11 | 2019-10-20T07:58:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,511 | java | package com.framework.security;
//EPL, Eclipse Public License, V1.0 or later, http://www.eclipse.org/legal
//LGPL, GNU Lesser General Public License, V2.1 or later, http://www.gnu.org/licenses/lgpl.html
//GPL, GNU General Public License, V2 or later, http://www.gnu.org/licenses/gpl.html
//AL, Apache License, V2.0 or later, http://www.apache.org/licenses
//BSD, BSD License, http://www.opensource.org/licenses/bsd-license.php
/**
* A Base64 encoder/decoder.
* <p>
* <p>
* This class is used to encode and decode data in Base64 format as described in RFC 1521.
* <p>
* <p>
* Project home page: <a href="http://www.source-code.biz/base64coder/java/">www.source-code
* .biz/base64coder/java</a><br>
* Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland<br>
* Multi-licensed: EPL / LGPL / GPL / AL / BSD.
*/
/**
* @Title: Base64Coder.java
* @Description: TODO
*/
public class Base64Coder {
// The line separator string of the operating system.
private static final String systemLineSeparator = System
.getProperty("line.separator");
// Mapping table from 6-bit nibbles to Base64 characters.
private static char[] map1 = new char[64];
// Mapping table from Base64 characters to 6-bit nibbles.
private static byte[] map2 = new byte[128];
static {
int i = 0;
for (char c = 'A'; c <= 'Z'; c++)
map1[i++] = c;
for (char c = 'a'; c <= 'z'; c++)
map1[i++] = c;
for (char c = '0'; c <= '9'; c++)
map1[i++] = c;
map1[i++] = '+';
map1[i++] = '/';
}
static {
for (int i = 0; i < map2.length; i++)
map2[i] = -1;
for (int i = 0; i < 64; i++)
map2[map1[i]] = (byte) i;
}
// Dummy constructor.
private Base64Coder() {
}
/**
* Encodes a string into Base64 format. No blanks or line breaks are
* inserted.
*
* @param s A String to be encoded.
* @return A String containing the Base64 encoded data.
*/
public static String encodeString(String s) {
return new String(encode(s.getBytes()));
}
/**
* Encodes a byte array into Base 64 format and breaks the output into lines
* of 76 characters. This method is compatible with
* <code>sun.misc.BASE64Encoder.encodeBuffer(byte[])</code>.
*
* @param in An array containing the data bytes to be encoded.
* @return A String containing the Base64 encoded data, broken into lines.
*/
public static String encodeLines(byte[] in) {
return encodeLines(in, 0, in.length, 76, systemLineSeparator);
}
/**
* Encodes a byte array into Base 64 format and breaks the output into
* lines.
*
* @param in An array containing the data bytes to be encoded.
* @param iOff Offset of the first byte in <code>in</code> to be processed.
* @param iLen Number of bytes to be processed in <code>in</code>, starting
* at <code>iOff</code>.
* @param lineLen Line length for the output data. Should be a multiple of 4.
* @param lineSeparator The line separator to be used to separate the output lines.
* @return A String containing the Base64 encoded data, broken into lines.
*/
public static String encodeLines(byte[] in, int iOff, int iLen,
int lineLen, String lineSeparator) {
int blockLen = (lineLen * 3) / 4;
if (blockLen <= 0)
throw new IllegalArgumentException();
int lines = (iLen + blockLen - 1) / blockLen;
int bufLen = ((iLen + 2) / 3) * 4 + lines * lineSeparator.length();
StringBuilder buf = new StringBuilder(bufLen);
int ip = 0;
while (ip < iLen) {
int l = Math.min(iLen - ip, blockLen);
buf.append(encode(in, iOff + ip, l));
buf.append(lineSeparator);
ip += l;
}
return buf.toString();
}
/**
* Encodes a byte array into Base64 format. No blanks or line breaks are
* inserted in the output.
*
* @param in An array containing the data bytes to be encoded.
* @return A character array containing the Base64 encoded data.
*/
public static char[] encode(byte[] in) {
return encode(in, 0, in.length);
}
/**
* Encodes a byte array into Base64 format. No blanks or line breaks are
* inserted in the output.
*
* @param in An array containing the data bytes to be encoded.
* @param iLen Number of bytes to process in <code>in</code>.
* @return A character array containing the Base64 encoded data.
*/
public static char[] encode(byte[] in, int iLen) {
return encode(in, 0, iLen);
}
/**
* Encodes a byte array into Base64 format. No blanks or line breaks are
* inserted in the output.
*
* @param in An array containing the data bytes to be encoded.
* @param iOff Offset of the first byte in <code>in</code> to be processed.
* @param iLen Number of bytes to process in <code>in</code>, starting at
* <code>iOff</code>.
* @return A character array containing the Base64 encoded data.
*/
public static char[] encode(byte[] in, int iOff, int iLen) {
int oDataLen = (iLen * 4 + 2) / 3; // output length without padding
int oLen = ((iLen + 2) / 3) * 4; // output length including padding
char[] out = new char[oLen];
int ip = iOff;
int iEnd = iOff + iLen;
int op = 0;
while (ip < iEnd) {
int i0 = in[ip++] & 0xff;
int i1 = ip < iEnd ? in[ip++] & 0xff : 0;
int i2 = ip < iEnd ? in[ip++] & 0xff : 0;
int o0 = i0 >>> 2;
int o1 = ((i0 & 3) << 4) | (i1 >>> 4);
int o2 = ((i1 & 0xf) << 2) | (i2 >>> 6);
int o3 = i2 & 0x3F;
out[op++] = map1[o0];
out[op++] = map1[o1];
out[op] = op < oDataLen ? map1[o2] : '=';
op++;
out[op] = op < oDataLen ? map1[o3] : '=';
op++;
}
return out;
}
/**
* Decodes a string from Base64 format. No blanks or line breaks are allowed
* within the Base64 encoded input data.
*
* @param s A Base64 String to be decoded.
* @return A String containing the decoded data.
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
*/
public static String decodeString(String s) {
return new String(decode(s));
}
/**
* Decodes a byte array from Base64 format and ignores line separators, tabs
* and blanks. CR, LF, Tab and Space characters are ignored in the input
* data. This method is compatible with
* <code>sun.misc.BASE64Decoder.decodeBuffer(String)</code>.
*
* @param s A Base64 String to be decoded.
* @return An array containing the decoded data bytes.
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
*/
public static byte[] decodeLines(String s) {
char[] buf = new char[s.length() + 3];
int p = 0;
for (int ip = 0; ip < s.length(); ip++) {
char c = s.charAt(ip);
if (c != ' ' && c != '\r' && c != '\n' && c != '\t')
buf[p++] = c;
}
while ((p % 4) != 0)
buf[p++] = '0';
return decode(buf, 0, p);
}
/**
* Decodes a byte array from Base64 format. No blanks or line breaks are
* allowed within the Base64 encoded input data.
*
* @param s A Base64 String to be decoded.
* @return An array containing the decoded data bytes.
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
*/
public static byte[] decode(String s) {
return decode(s.toCharArray());
}
/**
* Decodes a byte array from Base64 format. No blanks or line breaks are
* allowed within the Base64 encoded input data.
*
* @param in A character array containing the Base64 encoded data.
* @return An array containing the decoded data bytes.
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
*/
public static byte[] decode(char[] in) {
return decode(in, 0, in.length);
}
/**
* Decodes a byte array from Base64 format. No blanks or line breaks are
* allowed within the Base64 encoded input data.
*
* @param in A character array containing the Base64 encoded data.
* @param iOff Offset of the first character in <code>in</code> to be
* processed.
* @param iLen Number of characters to process in <code>in</code>, starting
* at <code>iOff</code>.
* @return An array containing the decoded data bytes.
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
*/
public static byte[] decode(char[] in, int iOff, int iLen) {
if (iLen % 4 != 0)
throw new IllegalArgumentException(
"Length of Base64 encoded input string is not a multiple of 4.");
while (iLen > 0 && in[iOff + iLen - 1] == '=')
iLen--;
int oLen = (iLen * 3) / 4;
byte[] out = new byte[oLen];
int ip = iOff;
int iEnd = iOff + iLen;
int op = 0;
while (ip < iEnd) {
int i0 = in[ip++];
int i1 = in[ip++];
int i2 = ip < iEnd ? in[ip++] : 'A';
int i3 = ip < iEnd ? in[ip++] : 'A';
if (i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127)
throw new IllegalArgumentException(
"Illegal character in Base64 encoded data.");
int b0 = map2[i0];
int b1 = map2[i1];
int b2 = map2[i2];
int b3 = map2[i3];
if (b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0)
throw new IllegalArgumentException(
"Illegal character in Base64 encoded data.");
int o0 = (b0 << 2) | (b1 >>> 4);
int o1 = ((b1 & 0xf) << 4) | (b2 >>> 2);
int o2 = ((b2 & 3) << 6) | b3;
out[op++] = (byte) o0;
if (op < oLen)
out[op++] = (byte) o1;
if (op < oLen)
out[op++] = (byte) o2;
}
return out;
}
} // end class Base64Coder | [
"[email protected]"
] | |
71978590f9f87f78765a6d0ad4416a601b01dcca | d85b8ae4499b404eabfa344acb528cf30c6ebbf3 | /SpringDay08DB/src/mapper/BookMapper.java | 87fda443c7adbfb45b6a74a401281c7d9a487752 | [] | no_license | irrationnelle/SpringWorkspace | ed44100de143a0aa57642b9a51283071091cf837 | c0e3de0a6ba112f7f80589681bf2e6aa3eadcf78 | refs/heads/master | 2020-06-12T13:28:31.656252 | 2017-01-03T08:48:31 | 2017-01-03T08:48:31 | 75,814,600 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 320 | java | package mapper;
import java.util.List;
import java.util.Map;
import vo.Book;
// xml_interface.BookMapper
public interface BookMapper {
public int insertBook(Book book);
public int deleteBook(Map<String, Integer> paramMap);
public Book selectBook(int book_num);
public List<Book> selectBookList();
}
| [
"[email protected]"
] | |
3cee5099237ed63b1f3d795d00c41f5a336adad0 | ce8072567c0ec0866db9799fd2600ccb63ce294f | /src/main/java/com/robot/controller/Index.java | b887665bd20aa081b594aaf55ee2a97b6d6aca51 | [] | no_license | xxx0624/QARobot | a78c747badcb26b613d989b2c79b91db726a4054 | ffa90592e2b0c9dcc657e17860586f5e1502d5a7 | refs/heads/master | 2020-12-29T02:19:28.069111 | 2017-01-11T10:08:00 | 2017-01-11T10:08:00 | 68,808,948 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 503 | java | package com.robot.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
/**
* Created by xing on 2016/10/5.
*/
@Controller
public class Index {
@RequestMapping(value = "/home")
public ModelAndView home() {
return new ModelAndView("home");
}
@RequestMapping(value = "/qa")
public ModelAndView tag(){
return new ModelAndView("qa");
}
}
| [
"[email protected]"
] | |
b93291a6e2f08057f96851384102ea214c12e3a8 | 5bb4a4b0364ec05ffb422d8b2e76374e81c8c979 | /sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/implementation/VpnClientIPsecParametersImpl.java | 943860d3344fb66360fe2856520453c5bfb05f37 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-or-later",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | FabianMeiswinkel/azure-sdk-for-java | bd14579af2f7bc63e5c27c319e2653db990056f1 | 41d99a9945a527b6d3cc7e1366e1d9696941dbe3 | refs/heads/main | 2023-08-04T20:38:27.012783 | 2020-07-15T21:56:57 | 2020-07-15T21:56:57 | 251,590,939 | 3 | 1 | MIT | 2023-09-02T00:50:23 | 2020-03-31T12:05:12 | Java | UTF-8 | Java | false | false | 2,145 | java | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.network.v2019_11_01.implementation;
import com.microsoft.azure.management.network.v2019_11_01.VpnClientIPsecParameters;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.network.v2019_11_01.DhGroup;
import com.microsoft.azure.management.network.v2019_11_01.IkeEncryption;
import com.microsoft.azure.management.network.v2019_11_01.IkeIntegrity;
import com.microsoft.azure.management.network.v2019_11_01.IpsecEncryption;
import com.microsoft.azure.management.network.v2019_11_01.IpsecIntegrity;
import com.microsoft.azure.management.network.v2019_11_01.PfsGroup;
class VpnClientIPsecParametersImpl extends WrapperImpl<VpnClientIPsecParametersInner> implements VpnClientIPsecParameters {
private final NetworkManager manager;
VpnClientIPsecParametersImpl(VpnClientIPsecParametersInner inner, NetworkManager manager) {
super(inner);
this.manager = manager;
}
@Override
public NetworkManager manager() {
return this.manager;
}
@Override
public DhGroup dhGroup() {
return this.inner().dhGroup();
}
@Override
public IkeEncryption ikeEncryption() {
return this.inner().ikeEncryption();
}
@Override
public IkeIntegrity ikeIntegrity() {
return this.inner().ikeIntegrity();
}
@Override
public IpsecEncryption ipsecEncryption() {
return this.inner().ipsecEncryption();
}
@Override
public IpsecIntegrity ipsecIntegrity() {
return this.inner().ipsecIntegrity();
}
@Override
public PfsGroup pfsGroup() {
return this.inner().pfsGroup();
}
@Override
public int saDataSizeKilobytes() {
return this.inner().saDataSizeKilobytes();
}
@Override
public int saLifeTimeSeconds() {
return this.inner().saLifeTimeSeconds();
}
}
| [
"[email protected]"
] | |
14c48f59c4d21aff3acc284c408fd218df1aae87 | c854fd257d5e8855770e9817d826744528736810 | /src/main/java/cn/zhixuyuan/ZhixuyuanApplication.java | 94e6d21806f640c2e37be1e3b98bc13956ea1eb4 | [] | no_license | wang-xiaojian/zhixuyuan | 1ed7c56e9969d09d778e9dcaa113f6273f1e06de | 4ae6daf119316da787ad524bcd941b57153a0a15 | refs/heads/master | 2022-11-10T18:01:14.805780 | 2020-07-03T03:22:30 | 2020-07-03T03:22:30 | 276,538,696 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 354 | java | package cn.zhixuyuan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ZhixuyuanApplication {
public static void main(String[] args) {
SpringApplication.run(ZhixuyuanApplication.class, args);
System.out.println(1);
}
}
| [
"[email protected]"
] | |
27ec7bbaafed55df019abc86cb0296b7e84f6aa8 | 2e8f2e3f08b0bf92b1adbda195f34ecb419e99d2 | /server/src/main/java/br/com/stand/artilharia/exception/NotFoundException.java | 26ebebc83cdddc35815c16aafba7988f0d8d20de | [] | no_license | forcella/namosca_web | 44599db1be744a27a316a27183101136795c5882 | d9284a1ba551d28953a9981ec5a672e6967ff4b4 | refs/heads/master | 2021-07-07T14:10:52.446863 | 2019-12-11T23:39:19 | 2019-12-11T23:39:19 | 224,036,049 | 0 | 0 | null | 2021-01-05T18:03:19 | 2019-11-25T20:33:11 | JavaScript | UTF-8 | Java | false | false | 353 | java | package br.com.stand.artilharia.exception;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class NotFoundException extends CustomException {
private static final long serialVersionUID = 4099874611502515942L;
public NotFoundException(String message, String hint, String error) {
super(message, hint, error);
}
} | [
"[email protected]"
] | |
1ecf5a7c0198f14399278e13ab842daa5a10ca00 | 5f583eab767965ecf904b225620c45ae0d9f6442 | /app/build/generated/source/r/debug/android/support/design/R.java | f48cfec589e297f1077dcaaa7a80e7aa19ae9275 | [] | no_license | rmanenti/android.example.crud | 5a9d35684e9ff611f243d03966950195eb9bf0af | 6aae3e94f4d3a531374229ab4b33594a864ec6a4 | refs/heads/master | 2020-12-24T19:28:44.038176 | 2016-05-21T12:46:41 | 2016-05-21T12:47:12 | 59,358,531 | 0 | 0 | null | null | null | null | 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 = 0x7f040000;
public static final int abc_fade_out = 0x7f040001;
public static final int abc_grow_fade_in_from_bottom = 0x7f040002;
public static final int abc_popup_enter = 0x7f040003;
public static final int abc_popup_exit = 0x7f040004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f040005;
public static final int abc_slide_in_bottom = 0x7f040006;
public static final int abc_slide_in_top = 0x7f040007;
public static final int abc_slide_out_bottom = 0x7f040008;
public static final int abc_slide_out_top = 0x7f040009;
public static final int design_bottom_sheet_slide_in = 0x7f04000a;
public static final int design_bottom_sheet_slide_out = 0x7f04000b;
public static final int design_fab_in = 0x7f04000c;
public static final int design_fab_out = 0x7f04000d;
public static final int design_snackbar_in = 0x7f04000e;
public static final int design_snackbar_out = 0x7f04000f;
}
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 = 0x7f060003;
public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f060001;
public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f060004;
public static final int abc_allow_stacked_button_bar = 0x7f060000;
public static final int abc_config_actionMenuItemAllCaps = 0x7f060005;
public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f060002;
public static final int abc_config_closeDialogWhenTouchOutside = 0x7f060006;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f060007;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark = 0x7f0a0047;
public static final int abc_background_cache_hint_selector_material_light = 0x7f0a0048;
public static final int abc_color_highlight_material = 0x7f0a0049;
public static final int abc_input_method_navigation_guard = 0x7f0a0000;
public static final int abc_primary_text_disable_only_material_dark = 0x7f0a004a;
public static final int abc_primary_text_disable_only_material_light = 0x7f0a004b;
public static final int abc_primary_text_material_dark = 0x7f0a004c;
public static final int abc_primary_text_material_light = 0x7f0a004d;
public static final int abc_search_url_text = 0x7f0a004e;
public static final int abc_search_url_text_normal = 0x7f0a0001;
public static final int abc_search_url_text_pressed = 0x7f0a0002;
public static final int abc_search_url_text_selected = 0x7f0a0003;
public static final int abc_secondary_text_material_dark = 0x7f0a004f;
public static final int abc_secondary_text_material_light = 0x7f0a0050;
public static final int accent_material_dark = 0x7f0a0004;
public static final int accent_material_light = 0x7f0a0005;
public static final int background_floating_material_dark = 0x7f0a0006;
public static final int background_floating_material_light = 0x7f0a0007;
public static final int background_material_dark = 0x7f0a0008;
public static final int background_material_light = 0x7f0a0009;
public static final int bright_foreground_disabled_material_dark = 0x7f0a000a;
public static final int bright_foreground_disabled_material_light = 0x7f0a000b;
public static final int bright_foreground_inverse_material_dark = 0x7f0a000c;
public static final int bright_foreground_inverse_material_light = 0x7f0a000d;
public static final int bright_foreground_material_dark = 0x7f0a000e;
public static final int bright_foreground_material_light = 0x7f0a000f;
public static final int button_material_dark = 0x7f0a0010;
public static final int button_material_light = 0x7f0a0011;
public static final int design_fab_shadow_end_color = 0x7f0a0015;
public static final int design_fab_shadow_mid_color = 0x7f0a0016;
public static final int design_fab_shadow_start_color = 0x7f0a0017;
public static final int design_fab_stroke_end_inner_color = 0x7f0a0018;
public static final int design_fab_stroke_end_outer_color = 0x7f0a0019;
public static final int design_fab_stroke_top_inner_color = 0x7f0a001a;
public static final int design_fab_stroke_top_outer_color = 0x7f0a001b;
public static final int design_snackbar_background_color = 0x7f0a001c;
public static final int design_textinput_error_color_dark = 0x7f0a001d;
public static final int design_textinput_error_color_light = 0x7f0a001e;
public static final int dim_foreground_disabled_material_dark = 0x7f0a001f;
public static final int dim_foreground_disabled_material_light = 0x7f0a0020;
public static final int dim_foreground_material_dark = 0x7f0a0021;
public static final int dim_foreground_material_light = 0x7f0a0022;
public static final int foreground_material_dark = 0x7f0a0023;
public static final int foreground_material_light = 0x7f0a0024;
public static final int highlighted_text_material_dark = 0x7f0a0025;
public static final int highlighted_text_material_light = 0x7f0a0026;
public static final int hint_foreground_material_dark = 0x7f0a0027;
public static final int hint_foreground_material_light = 0x7f0a0028;
public static final int material_blue_grey_800 = 0x7f0a0029;
public static final int material_blue_grey_900 = 0x7f0a002a;
public static final int material_blue_grey_950 = 0x7f0a002b;
public static final int material_deep_teal_200 = 0x7f0a002c;
public static final int material_deep_teal_500 = 0x7f0a002d;
public static final int material_grey_100 = 0x7f0a002e;
public static final int material_grey_300 = 0x7f0a002f;
public static final int material_grey_50 = 0x7f0a0030;
public static final int material_grey_600 = 0x7f0a0031;
public static final int material_grey_800 = 0x7f0a0032;
public static final int material_grey_850 = 0x7f0a0033;
public static final int material_grey_900 = 0x7f0a0034;
public static final int primary_dark_material_dark = 0x7f0a0035;
public static final int primary_dark_material_light = 0x7f0a0036;
public static final int primary_material_dark = 0x7f0a0037;
public static final int primary_material_light = 0x7f0a0038;
public static final int primary_text_default_material_dark = 0x7f0a0039;
public static final int primary_text_default_material_light = 0x7f0a003a;
public static final int primary_text_disabled_material_dark = 0x7f0a003b;
public static final int primary_text_disabled_material_light = 0x7f0a003c;
public static final int ripple_material_dark = 0x7f0a003d;
public static final int ripple_material_light = 0x7f0a003e;
public static final int secondary_text_default_material_dark = 0x7f0a003f;
public static final int secondary_text_default_material_light = 0x7f0a0040;
public static final int secondary_text_disabled_material_dark = 0x7f0a0041;
public static final int secondary_text_disabled_material_light = 0x7f0a0042;
public static final int switch_thumb_disabled_material_dark = 0x7f0a0043;
public static final int switch_thumb_disabled_material_light = 0x7f0a0044;
public static final int switch_thumb_material_dark = 0x7f0a0051;
public static final int switch_thumb_material_light = 0x7f0a0052;
public static final int switch_thumb_normal_material_dark = 0x7f0a0045;
public static final int switch_thumb_normal_material_light = 0x7f0a0046;
}
public static final class dimen {
public static final int abc_action_bar_content_inset_material = 0x7f07000d;
public static final int abc_action_bar_default_height_material = 0x7f070001;
public static final int abc_action_bar_default_padding_end_material = 0x7f07000e;
public static final int abc_action_bar_default_padding_start_material = 0x7f07000f;
public static final int abc_action_bar_icon_vertical_padding_material = 0x7f070019;
public static final int abc_action_bar_overflow_padding_end_material = 0x7f07001a;
public static final int abc_action_bar_overflow_padding_start_material = 0x7f07001b;
public static final int abc_action_bar_progress_bar_size = 0x7f070002;
public static final int abc_action_bar_stacked_max_height = 0x7f07001c;
public static final int abc_action_bar_stacked_tab_max_width = 0x7f07001d;
public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f07001e;
public static final int abc_action_bar_subtitle_top_margin_material = 0x7f07001f;
public static final int abc_action_button_min_height_material = 0x7f070020;
public static final int abc_action_button_min_width_material = 0x7f070021;
public static final int abc_action_button_min_width_overflow_material = 0x7f070022;
public static final int abc_alert_dialog_button_bar_height = 0x7f070000;
public static final int abc_button_inset_horizontal_material = 0x7f070023;
public static final int abc_button_inset_vertical_material = 0x7f070024;
public static final int abc_button_padding_horizontal_material = 0x7f070025;
public static final int abc_button_padding_vertical_material = 0x7f070026;
public static final int abc_config_prefDialogWidth = 0x7f070005;
public static final int abc_control_corner_material = 0x7f070027;
public static final int abc_control_inset_material = 0x7f070028;
public static final int abc_control_padding_material = 0x7f070029;
public static final int abc_dialog_fixed_height_major = 0x7f070006;
public static final int abc_dialog_fixed_height_minor = 0x7f070007;
public static final int abc_dialog_fixed_width_major = 0x7f070008;
public static final int abc_dialog_fixed_width_minor = 0x7f070009;
public static final int abc_dialog_list_padding_vertical_material = 0x7f07002a;
public static final int abc_dialog_min_width_major = 0x7f07000a;
public static final int abc_dialog_min_width_minor = 0x7f07000b;
public static final int abc_dialog_padding_material = 0x7f07002b;
public static final int abc_dialog_padding_top_material = 0x7f07002c;
public static final int abc_disabled_alpha_material_dark = 0x7f07002d;
public static final int abc_disabled_alpha_material_light = 0x7f07002e;
public static final int abc_dropdownitem_icon_width = 0x7f07002f;
public static final int abc_dropdownitem_text_padding_left = 0x7f070030;
public static final int abc_dropdownitem_text_padding_right = 0x7f070031;
public static final int abc_edit_text_inset_bottom_material = 0x7f070032;
public static final int abc_edit_text_inset_horizontal_material = 0x7f070033;
public static final int abc_edit_text_inset_top_material = 0x7f070034;
public static final int abc_floating_window_z = 0x7f070035;
public static final int abc_list_item_padding_horizontal_material = 0x7f070036;
public static final int abc_panel_menu_list_width = 0x7f070037;
public static final int abc_search_view_preferred_width = 0x7f070038;
public static final int abc_search_view_text_min_width = 0x7f07000c;
public static final int abc_seekbar_track_background_height_material = 0x7f070039;
public static final int abc_seekbar_track_progress_height_material = 0x7f07003a;
public static final int abc_select_dialog_padding_start_material = 0x7f07003b;
public static final int abc_switch_padding = 0x7f070018;
public static final int abc_text_size_body_1_material = 0x7f07003c;
public static final int abc_text_size_body_2_material = 0x7f07003d;
public static final int abc_text_size_button_material = 0x7f07003e;
public static final int abc_text_size_caption_material = 0x7f07003f;
public static final int abc_text_size_display_1_material = 0x7f070040;
public static final int abc_text_size_display_2_material = 0x7f070041;
public static final int abc_text_size_display_3_material = 0x7f070042;
public static final int abc_text_size_display_4_material = 0x7f070043;
public static final int abc_text_size_headline_material = 0x7f070044;
public static final int abc_text_size_large_material = 0x7f070045;
public static final int abc_text_size_medium_material = 0x7f070046;
public static final int abc_text_size_menu_material = 0x7f070047;
public static final int abc_text_size_small_material = 0x7f070048;
public static final int abc_text_size_subhead_material = 0x7f070049;
public static final int abc_text_size_subtitle_material_toolbar = 0x7f070003;
public static final int abc_text_size_title_material = 0x7f07004a;
public static final int abc_text_size_title_material_toolbar = 0x7f070004;
public static final int design_appbar_elevation = 0x7f07004d;
public static final int design_bottom_sheet_modal_elevation = 0x7f07004e;
public static final int design_bottom_sheet_modal_peek_height = 0x7f07004f;
public static final int design_fab_border_width = 0x7f070050;
public static final int design_fab_elevation = 0x7f070051;
public static final int design_fab_image_size = 0x7f070052;
public static final int design_fab_size_mini = 0x7f070053;
public static final int design_fab_size_normal = 0x7f070054;
public static final int design_fab_translation_z_pressed = 0x7f070055;
public static final int design_navigation_elevation = 0x7f070056;
public static final int design_navigation_icon_padding = 0x7f070057;
public static final int design_navigation_icon_size = 0x7f070058;
public static final int design_navigation_max_width = 0x7f070010;
public static final int design_navigation_padding_bottom = 0x7f070059;
public static final int design_navigation_separator_vertical_padding = 0x7f07005a;
public static final int design_snackbar_action_inline_max_width = 0x7f070011;
public static final int design_snackbar_background_corner_radius = 0x7f070012;
public static final int design_snackbar_elevation = 0x7f07005b;
public static final int design_snackbar_extra_spacing_horizontal = 0x7f070013;
public static final int design_snackbar_max_width = 0x7f070014;
public static final int design_snackbar_min_width = 0x7f070015;
public static final int design_snackbar_padding_horizontal = 0x7f07005c;
public static final int design_snackbar_padding_vertical = 0x7f07005d;
public static final int design_snackbar_padding_vertical_2lines = 0x7f070016;
public static final int design_snackbar_text_size = 0x7f07005e;
public static final int design_tab_max_width = 0x7f07005f;
public static final int design_tab_scrollable_min_width = 0x7f070017;
public static final int design_tab_text_size = 0x7f070060;
public static final int design_tab_text_size_2line = 0x7f070061;
public static final int disabled_alpha_material_dark = 0x7f070062;
public static final int disabled_alpha_material_light = 0x7f070063;
public static final int highlight_alpha_material_colored = 0x7f070064;
public static final int highlight_alpha_material_dark = 0x7f070065;
public static final int highlight_alpha_material_light = 0x7f070066;
public static final int item_touch_helper_max_drag_scroll_per_frame = 0x7f070067;
public static final int item_touch_helper_swipe_escape_max_velocity = 0x7f070068;
public static final int item_touch_helper_swipe_escape_velocity = 0x7f070069;
public static final int notification_large_icon_height = 0x7f07006a;
public static final int notification_large_icon_width = 0x7f07006b;
public static final int notification_subtext_size = 0x7f07006c;
}
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 = 0x7f02004b;
public static final int design_snackbar_background = 0x7f02004c;
public static final int notification_template_icon_bg = 0x7f02004f;
}
public static final class id {
public static final int action0 = 0x7f0b0085;
public static final int action_bar = 0x7f0b005a;
public static final int action_bar_activity_content = 0x7f0b0000;
public static final int action_bar_container = 0x7f0b0059;
public static final int action_bar_root = 0x7f0b0055;
public static final int action_bar_spinner = 0x7f0b0001;
public static final int action_bar_subtitle = 0x7f0b003b;
public static final int action_bar_title = 0x7f0b003a;
public static final int action_context_bar = 0x7f0b005b;
public static final int action_divider = 0x7f0b0089;
public static final int action_menu_divider = 0x7f0b0002;
public static final int action_menu_presenter = 0x7f0b0003;
public static final int action_mode_bar = 0x7f0b0057;
public static final int action_mode_bar_stub = 0x7f0b0056;
public static final int action_mode_close_button = 0x7f0b003c;
public static final int activity_chooser_view_content = 0x7f0b003d;
public static final int alertTitle = 0x7f0b0049;
public static final int always = 0x7f0b0033;
public static final int beginning = 0x7f0b0031;
public static final int bottom = 0x7f0b001d;
public static final int buttonPanel = 0x7f0b0044;
public static final int cancel_action = 0x7f0b0086;
public static final int center = 0x7f0b001e;
public static final int center_horizontal = 0x7f0b001f;
public static final int center_vertical = 0x7f0b0020;
public static final int checkbox = 0x7f0b0052;
public static final int chronometer = 0x7f0b008c;
public static final int clip_horizontal = 0x7f0b002c;
public static final int clip_vertical = 0x7f0b002d;
public static final int collapseActionView = 0x7f0b0034;
public static final int contentPanel = 0x7f0b004a;
public static final int custom = 0x7f0b0050;
public static final int customPanel = 0x7f0b004f;
public static final int decor_content_parent = 0x7f0b0058;
public static final int default_activity_button = 0x7f0b0040;
public static final int design_bottom_sheet = 0x7f0b006a;
public static final int design_menu_item_action_area = 0x7f0b0071;
public static final int design_menu_item_action_area_stub = 0x7f0b0070;
public static final int design_menu_item_text = 0x7f0b006f;
public static final int design_navigation_view = 0x7f0b006e;
public static final int disableHome = 0x7f0b000e;
public static final int edit_query = 0x7f0b005c;
public static final int end = 0x7f0b0021;
public static final int end_padder = 0x7f0b0091;
public static final int enterAlways = 0x7f0b0015;
public static final int enterAlwaysCollapsed = 0x7f0b0016;
public static final int exitUntilCollapsed = 0x7f0b0017;
public static final int expand_activities_button = 0x7f0b003e;
public static final int expanded_menu = 0x7f0b0051;
public static final int fill = 0x7f0b002e;
public static final int fill_horizontal = 0x7f0b002f;
public static final int fill_vertical = 0x7f0b0022;
public static final int fixed = 0x7f0b0038;
public static final int home = 0x7f0b0004;
public static final int homeAsUp = 0x7f0b000f;
public static final int icon = 0x7f0b0042;
public static final int ifRoom = 0x7f0b0035;
public static final int image = 0x7f0b003f;
public static final int info = 0x7f0b0090;
public static final int item_touch_helper_previous_elevation = 0x7f0b0005;
public static final int left = 0x7f0b0023;
public static final int line1 = 0x7f0b008a;
public static final int line3 = 0x7f0b008e;
public static final int listMode = 0x7f0b000b;
public static final int list_item = 0x7f0b0041;
public static final int media_actions = 0x7f0b0088;
public static final int middle = 0x7f0b0032;
public static final int mini = 0x7f0b0030;
public static final int multiply = 0x7f0b0027;
public static final int navigation_header_container = 0x7f0b006d;
public static final int never = 0x7f0b0036;
public static final int none = 0x7f0b0010;
public static final int normal = 0x7f0b000c;
public static final int parallax = 0x7f0b001b;
public static final int parentPanel = 0x7f0b0046;
public static final int pin = 0x7f0b001c;
public static final int progress_circular = 0x7f0b0006;
public static final int progress_horizontal = 0x7f0b0007;
public static final int radio = 0x7f0b0054;
public static final int right = 0x7f0b0024;
public static final int screen = 0x7f0b0028;
public static final int scroll = 0x7f0b0018;
public static final int scrollIndicatorDown = 0x7f0b004e;
public static final int scrollIndicatorUp = 0x7f0b004b;
public static final int scrollView = 0x7f0b004c;
public static final int scrollable = 0x7f0b0039;
public static final int search_badge = 0x7f0b005e;
public static final int search_bar = 0x7f0b005d;
public static final int search_button = 0x7f0b005f;
public static final int search_close_btn = 0x7f0b0064;
public static final int search_edit_frame = 0x7f0b0060;
public static final int search_go_btn = 0x7f0b0066;
public static final int search_mag_icon = 0x7f0b0061;
public static final int search_plate = 0x7f0b0062;
public static final int search_src_text = 0x7f0b0063;
public static final int search_voice_btn = 0x7f0b0067;
public static final int select_dialog_listview = 0x7f0b0068;
public static final int shortcut = 0x7f0b0053;
public static final int showCustom = 0x7f0b0011;
public static final int showHome = 0x7f0b0012;
public static final int showTitle = 0x7f0b0013;
public static final int snackbar_action = 0x7f0b006c;
public static final int snackbar_text = 0x7f0b006b;
public static final int snap = 0x7f0b0019;
public static final int spacer = 0x7f0b0045;
public static final int split_action_bar = 0x7f0b0008;
public static final int src_atop = 0x7f0b0029;
public static final int src_in = 0x7f0b002a;
public static final int src_over = 0x7f0b002b;
public static final int start = 0x7f0b0025;
public static final int status_bar_latest_event_content = 0x7f0b0087;
public static final int submit_area = 0x7f0b0065;
public static final int tabMode = 0x7f0b000d;
public static final int text = 0x7f0b008f;
public static final int text2 = 0x7f0b008d;
public static final int textSpacerNoButtons = 0x7f0b004d;
public static final int time = 0x7f0b008b;
public static final int title = 0x7f0b0043;
public static final int title_template = 0x7f0b0048;
public static final int top = 0x7f0b0026;
public static final int topPanel = 0x7f0b0047;
public static final int touch_outside = 0x7f0b0069;
public static final int up = 0x7f0b0009;
public static final int useLogo = 0x7f0b0014;
public static final int view_offset_helper = 0x7f0b000a;
public static final int withText = 0x7f0b0037;
public static final int wrap_content = 0x7f0b001a;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f090002;
public static final int abc_config_activityShortDur = 0x7f090003;
public static final int abc_max_action_buttons = 0x7f090000;
public static final int bottom_sheet_slide_duration = 0x7f090004;
public static final int cancel_button_image_alpha = 0x7f090005;
public static final int design_snackbar_text_max_lines = 0x7f090001;
public static final int status_bar_notification_info_maxnum = 0x7f090006;
}
public static final class layout {
public static final int abc_action_bar_title_item = 0x7f030000;
public static final int abc_action_bar_up_container = 0x7f030001;
public static final int abc_action_bar_view_list_nav_layout = 0x7f030002;
public static final int abc_action_menu_item_layout = 0x7f030003;
public static final int abc_action_menu_layout = 0x7f030004;
public static final int abc_action_mode_bar = 0x7f030005;
public static final int abc_action_mode_close_item_material = 0x7f030006;
public static final int abc_activity_chooser_view = 0x7f030007;
public static final int abc_activity_chooser_view_list_item = 0x7f030008;
public static final int abc_alert_dialog_button_bar_material = 0x7f030009;
public static final int abc_alert_dialog_material = 0x7f03000a;
public static final int abc_dialog_title_material = 0x7f03000b;
public static final int abc_expanded_menu_layout = 0x7f03000c;
public static final int abc_list_menu_item_checkbox = 0x7f03000d;
public static final int abc_list_menu_item_icon = 0x7f03000e;
public static final int abc_list_menu_item_layout = 0x7f03000f;
public static final int abc_list_menu_item_radio = 0x7f030010;
public static final int abc_popup_menu_item_layout = 0x7f030011;
public static final int abc_screen_content_include = 0x7f030012;
public static final int abc_screen_simple = 0x7f030013;
public static final int abc_screen_simple_overlay_action_mode = 0x7f030014;
public static final int abc_screen_toolbar = 0x7f030015;
public static final int abc_search_dropdown_item_icons_2line = 0x7f030016;
public static final int abc_search_view = 0x7f030017;
public static final int abc_select_dialog_material = 0x7f030018;
public static final int design_bottom_sheet_dialog = 0x7f030019;
public static final int design_layout_snackbar = 0x7f03001a;
public static final int design_layout_snackbar_include = 0x7f03001b;
public static final int design_layout_tab_icon = 0x7f03001c;
public static final int design_layout_tab_text = 0x7f03001d;
public static final int design_menu_item_action_area = 0x7f03001e;
public static final int design_navigation_item = 0x7f03001f;
public static final int design_navigation_item_header = 0x7f030020;
public static final int design_navigation_item_separator = 0x7f030021;
public static final int design_navigation_item_subheader = 0x7f030022;
public static final int design_navigation_menu = 0x7f030023;
public static final int design_navigation_menu_item = 0x7f030024;
public static final int notification_media_action = 0x7f030029;
public static final int notification_media_cancel_action = 0x7f03002a;
public static final int notification_template_big_media = 0x7f03002b;
public static final int notification_template_big_media_narrow = 0x7f03002c;
public static final int notification_template_lines = 0x7f03002d;
public static final int notification_template_media = 0x7f03002e;
public static final int notification_template_part_chronometer = 0x7f03002f;
public static final int notification_template_part_time = 0x7f030030;
public static final int select_dialog_item_material = 0x7f030032;
public static final int select_dialog_multichoice_material = 0x7f030033;
public static final int select_dialog_singlechoice_material = 0x7f030034;
public static final int support_simple_spinner_dropdown_item = 0x7f030035;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f050000;
public static final int abc_action_bar_home_description_format = 0x7f050001;
public static final int abc_action_bar_home_subtitle_description_format = 0x7f050002;
public static final int abc_action_bar_up_description = 0x7f050003;
public static final int abc_action_menu_overflow_description = 0x7f050004;
public static final int abc_action_mode_done = 0x7f050005;
public static final int abc_activity_chooser_view_see_all = 0x7f050006;
public static final int abc_activitychooserview_choose_application = 0x7f050007;
public static final int abc_capital_off = 0x7f050008;
public static final int abc_capital_on = 0x7f050009;
public static final int abc_search_hint = 0x7f05000a;
public static final int abc_searchview_description_clear = 0x7f05000b;
public static final int abc_searchview_description_query = 0x7f05000c;
public static final int abc_searchview_description_search = 0x7f05000d;
public static final int abc_searchview_description_submit = 0x7f05000e;
public static final int abc_searchview_description_voice = 0x7f05000f;
public static final int abc_shareactionprovider_share_with = 0x7f050010;
public static final int abc_shareactionprovider_share_with_application = 0x7f050011;
public static final int abc_toolbar_collapse_description = 0x7f050012;
public static final int appbar_scrolling_view_behavior = 0x7f050015;
public static final int bottom_sheet_behavior = 0x7f050016;
public static final int character_counter_pattern = 0x7f050017;
public static final int status_bar_notification_info_overflow = 0x7f050013;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f080087;
public static final int AlertDialog_AppCompat_Light = 0x7f080088;
public static final int Animation_AppCompat_Dialog = 0x7f080089;
public static final int Animation_AppCompat_DropDownUp = 0x7f08008a;
public static final int Animation_Design_BottomSheetDialog = 0x7f08008b;
public static final int Base_AlertDialog_AppCompat = 0x7f08008d;
public static final int Base_AlertDialog_AppCompat_Light = 0x7f08008e;
public static final int Base_Animation_AppCompat_Dialog = 0x7f08008f;
public static final int Base_Animation_AppCompat_DropDownUp = 0x7f080090;
public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f080092;
public static final int Base_DialogWindowTitle_AppCompat = 0x7f080091;
public static final int Base_TextAppearance_AppCompat = 0x7f080037;
public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f080038;
public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f080039;
public static final int Base_TextAppearance_AppCompat_Button = 0x7f080021;
public static final int Base_TextAppearance_AppCompat_Caption = 0x7f08003a;
public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f08003b;
public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f08003c;
public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f08003d;
public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f08003e;
public static final int Base_TextAppearance_AppCompat_Headline = 0x7f08003f;
public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f08000c;
public static final int Base_TextAppearance_AppCompat_Large = 0x7f080040;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f08000d;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f080041;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f080042;
public static final int Base_TextAppearance_AppCompat_Medium = 0x7f080043;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f08000e;
public static final int Base_TextAppearance_AppCompat_Menu = 0x7f080044;
public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f080093;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f080045;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f080046;
public static final int Base_TextAppearance_AppCompat_Small = 0x7f080047;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f08000f;
public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f080048;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f080010;
public static final int Base_TextAppearance_AppCompat_Title = 0x7f080049;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f080011;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f080080;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f08004a;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f08004b;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f08004c;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f08004d;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f08004e;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f08004f;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f080050;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f080081;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f080094;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f080051;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f080052;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f080053;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f080054;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f080095;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f080055;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f080056;
public static final int Base_ThemeOverlay_AppCompat = 0x7f08009e;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f08009f;
public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0800a0;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0800a1;
public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0800a2;
public static final int Base_Theme_AppCompat = 0x7f080057;
public static final int Base_Theme_AppCompat_CompactMenu = 0x7f080096;
public static final int Base_Theme_AppCompat_Dialog = 0x7f080012;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f080002;
public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f080097;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f080098;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f080099;
public static final int Base_Theme_AppCompat_Light = 0x7f080058;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f08009a;
public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f080013;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f080003;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f08009b;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f08009c;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f08009d;
public static final int Base_V11_Theme_AppCompat_Dialog = 0x7f080014;
public static final int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f080015;
public static final int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f08001d;
public static final int Base_V12_Widget_AppCompat_EditText = 0x7f08001e;
public static final int Base_V21_Theme_AppCompat = 0x7f080059;
public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f08005a;
public static final int Base_V21_Theme_AppCompat_Light = 0x7f08005b;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f08005c;
public static final int Base_V22_Theme_AppCompat = 0x7f08007e;
public static final int Base_V22_Theme_AppCompat_Light = 0x7f08007f;
public static final int Base_V23_Theme_AppCompat = 0x7f080082;
public static final int Base_V23_Theme_AppCompat_Light = 0x7f080083;
public static final int Base_V7_Theme_AppCompat = 0x7f0800a3;
public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0800a4;
public static final int Base_V7_Theme_AppCompat_Light = 0x7f0800a5;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0800a6;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0800a7;
public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0800a8;
public static final int Base_Widget_AppCompat_ActionBar = 0x7f0800a9;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0800aa;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0800ab;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f08005d;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f08005e;
public static final int Base_Widget_AppCompat_ActionButton = 0x7f08005f;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f080060;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f080061;
public static final int Base_Widget_AppCompat_ActionMode = 0x7f0800ac;
public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0800ad;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f08001f;
public static final int Base_Widget_AppCompat_Button = 0x7f080062;
public static final int Base_Widget_AppCompat_ButtonBar = 0x7f080066;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0800af;
public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f080063;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f080064;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0800ae;
public static final int Base_Widget_AppCompat_Button_Colored = 0x7f080084;
public static final int Base_Widget_AppCompat_Button_Small = 0x7f080065;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f080067;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f080068;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0800b0;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f080000;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0800b1;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f080069;
public static final int Base_Widget_AppCompat_EditText = 0x7f080020;
public static final int Base_Widget_AppCompat_ImageButton = 0x7f08006a;
public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0800b2;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0800b3;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0800b4;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f08006b;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f08006c;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f08006d;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f08006e;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f08006f;
public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f080070;
public static final int Base_Widget_AppCompat_ListView = 0x7f080071;
public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f080072;
public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f080073;
public static final int Base_Widget_AppCompat_PopupMenu = 0x7f080074;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f080075;
public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0800b5;
public static final int Base_Widget_AppCompat_ProgressBar = 0x7f080016;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f080017;
public static final int Base_Widget_AppCompat_RatingBar = 0x7f080076;
public static final int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f080085;
public static final int Base_Widget_AppCompat_RatingBar_Small = 0x7f080086;
public static final int Base_Widget_AppCompat_SearchView = 0x7f0800b6;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0800b7;
public static final int Base_Widget_AppCompat_SeekBar = 0x7f080077;
public static final int Base_Widget_AppCompat_Spinner = 0x7f080078;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f080004;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f080079;
public static final int Base_Widget_AppCompat_Toolbar = 0x7f0800b8;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f08007a;
public static final int Base_Widget_Design_TabLayout = 0x7f0800b9;
public static final int Platform_AppCompat = 0x7f080018;
public static final int Platform_AppCompat_Light = 0x7f080019;
public static final int Platform_ThemeOverlay_AppCompat = 0x7f08007b;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f08007c;
public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f08007d;
public static final int Platform_V11_AppCompat = 0x7f08001a;
public static final int Platform_V11_AppCompat_Light = 0x7f08001b;
public static final int Platform_V14_AppCompat = 0x7f080022;
public static final int Platform_V14_AppCompat_Light = 0x7f080023;
public static final int Platform_Widget_AppCompat_Spinner = 0x7f08001c;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f080029;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f08002a;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f08002b;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f08002c;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f08002d;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f08002e;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f080034;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f08002f;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f080030;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f080031;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f080032;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f080033;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f080035;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f080036;
public static final int TextAppearance_AppCompat = 0x7f0800ba;
public static final int TextAppearance_AppCompat_Body1 = 0x7f0800bb;
public static final int TextAppearance_AppCompat_Body2 = 0x7f0800bc;
public static final int TextAppearance_AppCompat_Button = 0x7f0800bd;
public static final int TextAppearance_AppCompat_Caption = 0x7f0800be;
public static final int TextAppearance_AppCompat_Display1 = 0x7f0800bf;
public static final int TextAppearance_AppCompat_Display2 = 0x7f0800c0;
public static final int TextAppearance_AppCompat_Display3 = 0x7f0800c1;
public static final int TextAppearance_AppCompat_Display4 = 0x7f0800c2;
public static final int TextAppearance_AppCompat_Headline = 0x7f0800c3;
public static final int TextAppearance_AppCompat_Inverse = 0x7f0800c4;
public static final int TextAppearance_AppCompat_Large = 0x7f0800c5;
public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0800c6;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0800c7;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0800c8;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0800c9;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0800ca;
public static final int TextAppearance_AppCompat_Medium = 0x7f0800cb;
public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0800cc;
public static final int TextAppearance_AppCompat_Menu = 0x7f0800cd;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0800ce;
public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0800cf;
public static final int TextAppearance_AppCompat_Small = 0x7f0800d0;
public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0800d1;
public static final int TextAppearance_AppCompat_Subhead = 0x7f0800d2;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0800d3;
public static final int TextAppearance_AppCompat_Title = 0x7f0800d4;
public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0800d5;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0800d6;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0800d7;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0800d8;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0800d9;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0800da;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0800db;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0800dc;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0800dd;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0800de;
public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0800df;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0800e0;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0800e1;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0800e2;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0800e3;
public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0800e4;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0800e5;
public static final int TextAppearance_Design_CollapsingToolbar_Expanded = 0x7f0800e6;
public static final int TextAppearance_Design_Counter = 0x7f0800e7;
public static final int TextAppearance_Design_Counter_Overflow = 0x7f0800e8;
public static final int TextAppearance_Design_Error = 0x7f0800e9;
public static final int TextAppearance_Design_Hint = 0x7f0800ea;
public static final int TextAppearance_Design_Snackbar_Message = 0x7f0800eb;
public static final int TextAppearance_Design_Tab = 0x7f0800ec;
public static final int TextAppearance_StatusBar_EventContent = 0x7f080024;
public static final int TextAppearance_StatusBar_EventContent_Info = 0x7f080025;
public static final int TextAppearance_StatusBar_EventContent_Line2 = 0x7f080026;
public static final int TextAppearance_StatusBar_EventContent_Time = 0x7f080027;
public static final int TextAppearance_StatusBar_EventContent_Title = 0x7f080028;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0800ed;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0800ee;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0800ef;
public static final int ThemeOverlay_AppCompat = 0x7f080104;
public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f080105;
public static final int ThemeOverlay_AppCompat_Dark = 0x7f080106;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f080107;
public static final int ThemeOverlay_AppCompat_Light = 0x7f080108;
public static final int Theme_AppCompat = 0x7f0800f0;
public static final int Theme_AppCompat_CompactMenu = 0x7f0800f1;
public static final int Theme_AppCompat_DayNight = 0x7f080005;
public static final int Theme_AppCompat_DayNight_DarkActionBar = 0x7f080006;
public static final int Theme_AppCompat_DayNight_Dialog = 0x7f080007;
public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f08000a;
public static final int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f080008;
public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f080009;
public static final int Theme_AppCompat_DayNight_NoActionBar = 0x7f08000b;
public static final int Theme_AppCompat_Dialog = 0x7f0800f2;
public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0800f5;
public static final int Theme_AppCompat_Dialog_Alert = 0x7f0800f3;
public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0800f4;
public static final int Theme_AppCompat_Light = 0x7f0800f6;
public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0800f7;
public static final int Theme_AppCompat_Light_Dialog = 0x7f0800f8;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0800fb;
public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0800f9;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0800fa;
public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0800fc;
public static final int Theme_AppCompat_NoActionBar = 0x7f0800fd;
public static final int Theme_Design = 0x7f0800fe;
public static final int Theme_Design_BottomSheetDialog = 0x7f0800ff;
public static final int Theme_Design_Light = 0x7f080100;
public static final int Theme_Design_Light_BottomSheetDialog = 0x7f080101;
public static final int Theme_Design_Light_NoActionBar = 0x7f080102;
public static final int Theme_Design_NoActionBar = 0x7f080103;
public static final int Widget_AppCompat_ActionBar = 0x7f080109;
public static final int Widget_AppCompat_ActionBar_Solid = 0x7f08010a;
public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f08010b;
public static final int Widget_AppCompat_ActionBar_TabText = 0x7f08010c;
public static final int Widget_AppCompat_ActionBar_TabView = 0x7f08010d;
public static final int Widget_AppCompat_ActionButton = 0x7f08010e;
public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f08010f;
public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f080110;
public static final int Widget_AppCompat_ActionMode = 0x7f080111;
public static final int Widget_AppCompat_ActivityChooserView = 0x7f080112;
public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f080113;
public static final int Widget_AppCompat_Button = 0x7f080114;
public static final int Widget_AppCompat_ButtonBar = 0x7f08011a;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f08011b;
public static final int Widget_AppCompat_Button_Borderless = 0x7f080115;
public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f080116;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f080117;
public static final int Widget_AppCompat_Button_Colored = 0x7f080118;
public static final int Widget_AppCompat_Button_Small = 0x7f080119;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f08011c;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f08011d;
public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f08011e;
public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f08011f;
public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f080120;
public static final int Widget_AppCompat_EditText = 0x7f080121;
public static final int Widget_AppCompat_ImageButton = 0x7f080122;
public static final int Widget_AppCompat_Light_ActionBar = 0x7f080123;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f080124;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f080125;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f080126;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f080127;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f080128;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f080129;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f08012a;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f08012b;
public static final int Widget_AppCompat_Light_ActionButton = 0x7f08012c;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f08012d;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f08012e;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f08012f;
public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f080130;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f080131;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f080132;
public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f080133;
public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f080134;
public static final int Widget_AppCompat_Light_PopupMenu = 0x7f080135;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f080136;
public static final int Widget_AppCompat_Light_SearchView = 0x7f080137;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f080138;
public static final int Widget_AppCompat_ListPopupWindow = 0x7f080139;
public static final int Widget_AppCompat_ListView = 0x7f08013a;
public static final int Widget_AppCompat_ListView_DropDown = 0x7f08013b;
public static final int Widget_AppCompat_ListView_Menu = 0x7f08013c;
public static final int Widget_AppCompat_PopupMenu = 0x7f08013d;
public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f08013e;
public static final int Widget_AppCompat_PopupWindow = 0x7f08013f;
public static final int Widget_AppCompat_ProgressBar = 0x7f080140;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f080141;
public static final int Widget_AppCompat_RatingBar = 0x7f080142;
public static final int Widget_AppCompat_RatingBar_Indicator = 0x7f080143;
public static final int Widget_AppCompat_RatingBar_Small = 0x7f080144;
public static final int Widget_AppCompat_SearchView = 0x7f080145;
public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f080146;
public static final int Widget_AppCompat_SeekBar = 0x7f080147;
public static final int Widget_AppCompat_Spinner = 0x7f080148;
public static final int Widget_AppCompat_Spinner_DropDown = 0x7f080149;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f08014a;
public static final int Widget_AppCompat_Spinner_Underlined = 0x7f08014b;
public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f08014c;
public static final int Widget_AppCompat_Toolbar = 0x7f08014d;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f08014e;
public static final int Widget_Design_AppBarLayout = 0x7f08014f;
public static final int Widget_Design_BottomSheet_Modal = 0x7f080150;
public static final int Widget_Design_CollapsingToolbar = 0x7f080151;
public static final int Widget_Design_CoordinatorLayout = 0x7f080152;
public static final int Widget_Design_FloatingActionButton = 0x7f080153;
public static final int Widget_Design_NavigationView = 0x7f080154;
public static final int Widget_Design_ScrimInsetsFrameLayout = 0x7f080155;
public static final int Widget_Design_Snackbar = 0x7f080156;
public static final int Widget_Design_TabLayout = 0x7f080001;
public static final int Widget_Design_TextInputLayout = 0x7f080157;
}
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;
}
}
| [
"cygnusx1"
] | cygnusx1 |
4cc8029be4552a38df058772ee5c7616581505f2 | 74b7bc2d59a9a8de954a18184dd1c166aa49010b | /src/com/deepslice/model/LocationDetails.java | c0194c610cfc79230ce84bd67b3d1ef733e43ed1 | [] | no_license | khobaib/Deepslice | f33138e8165757ce63629082e82a5ff23e56e4fb | 6464d9ddce7d782813243862e36ce66af9136e60 | refs/heads/master | 2021-01-21T17:45:45.588043 | 2013-12-05T08:13:04 | 2013-12-05T08:13:04 | 9,477,840 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,090 | java | package com.deepslice.model;
public class LocationDetails {
String LocationID;
String LocName;
String LocSuburb;
String LocPostalCode;
String LocStreet;
String LocAddress;
String LocPhones;
String LocLatitude;
String LocLongitude;
String OpeningTime;
String ClosingTime;
//delivery address related
private String suburbId;
private String postalCode;
private String unit;
private String streetNum;
private String streetName;
private String crossStreetName;
private String deliveryInstructions;
public String getLocationID() {
return LocationID;
}
public void setLocationID(String locationID) {
LocationID = locationID;
}
public String getLocName() {
return LocName;
}
public void setLocName(String locName) {
LocName = locName;
}
public String getLocSuburb() {
return LocSuburb;
}
public void setLocSuburb(String locSuburb) {
LocSuburb = locSuburb;
}
public String getLocPostalCode() {
return LocPostalCode;
}
public void setLocPostalCode(String locPostalCode) {
LocPostalCode = locPostalCode;
}
public String getLocStreet() {
return LocStreet;
}
public void setLocStreet(String locStreet) {
LocStreet = locStreet;
}
public String getLocAddress() {
return LocAddress;
}
public void setLocAddress(String locAddress) {
LocAddress = locAddress;
}
public String getLocPhones() {
return LocPhones;
}
public void setLocPhones(String locPhones) {
LocPhones = locPhones;
}
public String getLocLatitude() {
return LocLatitude;
}
public void setLocLatitude(String locLatitude) {
LocLatitude = locLatitude;
}
public String getLocLongitude() {
return LocLongitude;
}
public void setLocLongitude(String locLongitude) {
LocLongitude = locLongitude;
}
public String getOpeningTime() {
return OpeningTime;
}
public void setOpeningTime(String openingTime) {
OpeningTime = openingTime;
}
public String getClosingTime() {
return ClosingTime;
}
public void setClosingTime(String closingTime) {
ClosingTime = closingTime;
}
public String getSuburbId() {
return suburbId;
}
public void setSuburbId(String suburbId) {
this.suburbId = suburbId;
}
public String getPostalCode() {
return postalCode;
}
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getStreetNum() {
return streetNum;
}
public void setStreetNum(String streetNum) {
this.streetNum = streetNum;
}
public String getStreetName() {
return streetName;
}
public void setStreetName(String streetName) {
this.streetName = streetName;
}
public String getCrossStreetName() {
return crossStreetName;
}
public void setCrossStreetName(String crossStreetName) {
this.crossStreetName = crossStreetName;
}
public String getDeliveryInstructions() {
return deliveryInstructions;
}
public void setDeliveryInstructions(String deliveryInstructions) {
this.deliveryInstructions = deliveryInstructions;
}
}
| [
"[email protected]"
] | |
a779fac6fb35f8789c98ddebefa799b65a55772c | 3487ffc21b37216031436bf44f2dc7edbeafbad1 | /src/question4/Rectangle.java | 5f621a4b6a7e038a965e49cd9d698edd675fd34e | [] | no_license | abhishekmankuskar/ClassAssignment | cdeed4b2b9138bf6e41e48a663450983aeee821c | ab7f2be401ceda143fc48f50cbdca106e287ddfa | refs/heads/master | 2021-04-03T23:47:25.549245 | 2020-03-26T09:16:20 | 2020-03-26T09:16:20 | 248,406,159 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 353 | java | package question4;
public class Rectangle {
private float length, width;
public Rectangle() {
length = 1;
width = 1;
}
public float getLength() {
return length;
}
public void setLength(float length) {
this.length = length;
}
public float getWidth() {
return width;
}
public void setWidth(float width) {
this.width = width;
}
} | [
"[email protected]"
] | |
18bb26d6ec10b9ca370ce9bc44ccbdf4e8a247a5 | 2966fd7c93cc9e14bae3ce32107f2d2c8a0ee3f9 | /BusinessAgent/src/main/java/com/kira/agent/dao/PropertyRepository.java | cfa20f61c87b84818edcca5cc5fdec1c0df8437d | [] | no_license | yaswanth0248/BaseMicroService | 7a582ca17e9201b6603b196094218e9b5f29e5b5 | 500c814e1e399f80293c447185e7e521483b5cef | refs/heads/master | 2023-05-25T09:36:51.776499 | 2021-06-10T07:40:28 | 2021-06-10T07:40:28 | 375,570,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 514 | java | package com.kira.agent.dao;
import java.io.Serializable;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.kira.agent.dto.BusinessPropertyDTO;
@Repository
public interface PropertyRepository extends JpaRepository<BusinessPropertyDTO, Serializable> {
Optional<BusinessPropertyDTO> findByPropertyId(Long propertyId);
List<BusinessPropertyDTO> findByCustomerId(Long customerId);
}
| [
"[email protected]"
] | |
bd8d94d7ad575333b789004b31796fb64255affd | 5d7d32c35feb5cd4ef46daf81d93d35feb1ece74 | /springboot-helloworld/src/main/java/org/spring/springboot/web/UserController.java | ca4891d266b3cbc09dc7cd03b6d0e5f4bfdfc6de | [] | no_license | yuippe/springboot_tutorial | 77b97b739a55301f741bf1bf9cc8e1dc66da527a | 8cccb495b3dec74a4a83490678de42c7cc509b3a | refs/heads/master | 2020-03-07T18:28:49.185794 | 2018-04-17T16:25:01 | 2018-04-17T16:25:01 | 127,639,812 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,955 | java | package org.spring.springboot.web;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.spring.springboot.domain.User;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value="/users")
public class UserController {
static Map<Long,User> users = Collections.synchronizedMap(new HashMap<Long,User>());
@RequestMapping(value="/", method=RequestMethod.GET)
public List<User> getUserList(){
List<User> r = new ArrayList<User>(users.values());
return r;
}
//way1 to postbody
//使用ModelAttribute修饰符,在Junit测试中可以用mvc中的addparam来添加参数
// @RequestMapping(value="/", method=RequestMethod.POST)
// public String postUser(@ModelAttribute User user) {
// // 处理"/users/"的POST请求,用来创建User
// // 除了@ModelAttribute绑定参数之外,还可以通过@RequestParam从页面中传递参数
// users.put(user.getId(), user);
// return "success";
// }
//way2 to postbody
//使用@RequestBody修饰符时,在Junit测试中不可以用mvc中的addparam来添加参数
@RequestMapping(value="/", method=RequestMethod.POST)
public String postUser(@RequestBody Map<String,Object> paramMap) {
Long id = Long.parseLong((String)paramMap.get("id"));
String name = (String)paramMap.get("name");
Integer age = Integer.parseInt((String)paramMap.get("age"));
User user = new User(id,name,age);
// 处理"/users/"的POST请求,用来创建User
// 除了@ModelAttribute绑定参数之外,还可以通过@RequestParam从页面中传递参数
users.put(user.getId(), user);
return "success";
}
@RequestMapping(value="/{id}", method=RequestMethod.GET)
public User getUser(@PathVariable Long id) {
// 处理"/users/{id}"的GET请求,用来获取url中id值的User信息
// url中的id可通过@PathVariable绑定到函数的参数中
return users.get(id);
}
@RequestMapping(value="/{id}", method=RequestMethod.PUT)
public String putUser(@PathVariable Long id, @ModelAttribute User user) {
// 处理"/users/{id}"的PUT请求,用来更新User信息
User u = users.get(id);
u.setName(user.getName());
u.setAge(user.getAge());
users.put(id, u);
return "success";
}
@RequestMapping(value="/{id}", method=RequestMethod.DELETE)
public String deleteUser(@PathVariable Long id) {
// 处理"/users/{id}"的DELETE请求,用来删除User
users.remove(id);
return "success";
}
}
| [
"[email protected]"
] | |
bce0ed58fa8a48526b4a339dd096a725615caa3b | 046f8ad87afcb77957a0cc7aa94080214d04c5cc | /Chp. 16 - More Problems (Moderate)/_16_20_T9__HashMap_Solution/T9.java | b69320b0f1d4fefee2d1f19e55d6c12daac24bf4 | [] | no_license | sindhu819/Cracking-the-Coding-Interview_solutions | 7336901d773a0e4b88febac4d01b73f486d36487 | 23b0d5533449a4fa995e445cad026f13d489517a | refs/heads/master | 2020-09-11T12:36:49.758028 | 2019-08-18T22:19:11 | 2019-08-18T22:19:11 | 222,066,798 | 0 | 1 | null | 2019-11-16T08:03:01 | 2019-11-16T08:03:01 | null | UTF-8 | Java | false | false | 1,691 | java | package _16_20_T9__HashMap_Solution;
import java.util.*;
// Algorithm: Pre-process all words into a HashMap<String, List<String>> where
// key = Number (well, only numbers that give valid words will be included)
// value = List of Valid Words
public class T9 {
private Map<Character, Character> letterToDigit;
public T9() {
letterToDigit = new HashMap<>();
for (char ch = 'a'; ch <= 'c'; ch++) letterToDigit.put(ch, '2');
for (char ch = 'd'; ch <= 'f'; ch++) letterToDigit.put(ch, '3');
for (char ch = 'g'; ch <= 'i'; ch++) letterToDigit.put(ch, '4');
for (char ch = 'j'; ch <= 'l'; ch++) letterToDigit.put(ch, '5');
for (char ch = 'm'; ch <= 'o'; ch++) letterToDigit.put(ch, '6');
for (char ch = 'p'; ch <= 's'; ch++) letterToDigit.put(ch, '7');
for (char ch = 't'; ch <= 'v'; ch++) letterToDigit.put(ch, '8');
for (char ch = 'w'; ch <= 'z'; ch++) letterToDigit.put(ch, '9');
}
public Map<String, List<String>> buildMap(String[] words) {
Map<String, List<String>> map = new HashMap<>();
for (String word : words) {
String number = getNumber(word);
map.putIfAbsent(number, new ArrayList<>());
List<String> listOfWords = map.get(number);
listOfWords.add(word);
}
return map;
}
private String getNumber(String str) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < str.length(); i++) {
char ch = letterToDigit.get(str.charAt(i));
sb.append(ch);
}
return sb.toString();
}
}
// Time Complexity: O(1) lookup (after preprocessing)
| [
"[email protected]"
] | |
399c1395687fc17034d0103c4f461c8ce02c7db3 | fe239e6216ae8bb8780399fbecbf77bde62a7e67 | /src/main/java/fr/treeptik/controller/HomeController.java | 7c187988aa01098baff10185d5b7e32e16d60d80 | [] | no_license | jborghino/Mandataire | 4af8418f3bfe0745243952cd3765249ca5389fd5 | 395c84c7a46c0fdb0b2830df6d55bc251c42f893 | refs/heads/master | 2021-03-12T23:41:50.266871 | 2014-06-02T12:29:48 | 2014-06-02T12:29:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 678 | java | package fr.treeptik.controller;
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.SessionAttributes;
import org.springframework.web.servlet.ModelAndView;
import fr.treeptik.exception.ServiceException;
@Controller
@RequestMapping(value = "/home")
public class HomeController {
@RequestMapping(value = "/init.do", method = RequestMethod.GET)
public ModelAndView initHome() throws ServiceException {
ModelAndView modelAndView = new ModelAndView("home/home");
return modelAndView;
}
}
| [
"[email protected]"
] | |
32ecbcd1886511feca5079bdb1adfed5930354b8 | d9ea37b13eaaf52064fc2f68390ec17608bf73c2 | /bgqc/src/com/bgqc/controller/TaskAction.java | aa1eb83568012b9500769640602b3693869c3abc | [] | no_license | stnoname/bgqc | b0195ae6168152c3103617c4ea6434327e9a21c0 | f0c7295005d19de7f5945aeeedd4ad020f7d5b15 | refs/heads/master | 2020-03-28T11:00:27.757754 | 2018-09-21T11:43:14 | 2018-09-21T11:43:14 | 148,168,029 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,784 | java | package com.bgqc.controller;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.bgqc.beans.CarBean;
import com.bgqc.beans.DriverBean;
import com.bgqc.beans.LayuiBean;
import com.bgqc.beans.MsgBean;
import com.bgqc.beans.RequestBean;
import com.bgqc.beans.TaskBean;
import com.bgqc.service.base.TaskService;
import com.bgqc.util.Lay;
import com.bgqc.util.Lg;
import com.github.pagehelper.PageHelper;
@Controller
public class TaskAction {
@Resource
TaskService taskservice;
@ResponseBody
@RequestMapping("addTask")
public TaskBean addTask(HttpSession session,TaskBean taskbean){
TaskBean taskbeanreturn=taskservice.addTask(taskbean);
return taskbeanreturn;
}
@ResponseBody
@RequestMapping("getTask")
public LayuiBean<TaskBean> getTask(HttpSession session,Integer page,Integer limit,TaskBean taskbean){
Lg.debug("到了getTask内");
PageHelper.startPage(page,limit);
Lg.debug("分页完毕");
List<TaskBean> list=taskservice.getTask(taskbean);
return Lay.rt(list);
}
@ResponseBody
@RequestMapping("getTaskDriver")
public LayuiBean<DriverBean> getTaskDriver(HttpSession session,Integer page,Integer limit,DriverBean driverbean){
Lg.debug("到了getTaskDriver内");
PageHelper.startPage(page,limit);
Lg.debug("分页完毕");
List<DriverBean> list=taskservice.getTaskDriver(driverbean);
return Lay.rt(list);
}
@ResponseBody
@RequestMapping("getTaskCar")
public LayuiBean<CarBean> getTaskCar(HttpSession session,Integer page,Integer limit,CarBean carbean){
Lg.debug("到了getTaskCar内");
PageHelper.startPage(page,limit);
Lg.debug("分页完毕");
List<CarBean> list=taskservice.getTaskCar(carbean);
return Lay.rt(list);
}
@ResponseBody
@RequestMapping("getTaskRequested")
public LayuiBean<RequestBean> getTaskRequested(HttpSession session,Long task_id){
Lg.debug("到了getTaskRequested内");
List<RequestBean> list=taskservice.getTaskRequested(task_id);
return Lay.rtnopage(list);
}
@ResponseBody
@RequestMapping("getTaskRequesting")
public LayuiBean<RequestBean> getTaskRequesting(HttpSession session,Integer page,Integer limit){
Lg.debug("到了getTaskRequesting内");
PageHelper.startPage(page,limit);
Lg.debug("分页完毕");
List<RequestBean> list=taskservice.getTaskRequesting();
return Lay.rt(list);
}
@ResponseBody
@RequestMapping("addTaskRequest")
public MsgBean addTaskRequest(HttpSession session,RequestBean requestbean){
MsgBean mb=taskservice.addTaskRequest(requestbean);
return mb;
}
@ResponseBody
@RequestMapping("removeTaskRequest")
public MsgBean removeTaskRequest(HttpSession session,RequestBean requestbean){
MsgBean mb=taskservice.removeTaskRequest(requestbean);
return mb;
}
@ResponseBody
@RequestMapping("refuseTaskRequest")
public MsgBean refuseTaskRequest(HttpSession session,RequestBean requestbean){
MsgBean mb=taskservice.refuseTaskRequest(requestbean);
return mb;
}
@ResponseBody
@RequestMapping("decideTask")
public MsgBean decideTask(HttpSession session,TaskBean taskbean){
MsgBean mb=taskservice.decideTask(taskbean);
return mb;
}
@ResponseBody
@RequestMapping("editTaskDriver")
public MsgBean editTaskDriver(HttpSession session,TaskBean taskbean){
MsgBean mb=taskservice.editTaskDriver(taskbean);
return mb;
}
@ResponseBody
@RequestMapping("editTaskCar")
public MsgBean editTaskCar(HttpSession session,TaskBean taskbean){
MsgBean mb=taskservice.editTaskCar(taskbean);
return mb;
}
@ResponseBody
@RequestMapping("editTaskmaybegintime")
public MsgBean editTaskmaybegintime(HttpSession session,TaskBean taskbean){
MsgBean mb=taskservice.editTaskmaybegintime(taskbean);
return mb;
}
@ResponseBody
@RequestMapping("goTask")
public MsgBean goTask(HttpSession session,TaskBean taskbean){
MsgBean mb=taskservice.goTask(taskbean);
return mb;
}
@ResponseBody
@RequestMapping("backTask")
public MsgBean backTask(HttpSession session,TaskBean taskbean){
MsgBean mb=taskservice.backTask(taskbean);
return mb;
}
@ResponseBody
@RequestMapping("delTask")
public MsgBean delTask(HttpSession session,TaskBean taskbean){
MsgBean mb=taskservice.delTask(taskbean);
return mb;
}
@ResponseBody
@RequestMapping("redecideTask")
public MsgBean redecideTask(HttpSession session,TaskBean taskbean){
MsgBean mb=taskservice.redecideTask(taskbean);
return mb;
}
}
| [
"ltnon@DESKTOP-K23IFJU"
] | ltnon@DESKTOP-K23IFJU |
b164398592ba7a78a7ee024e49fd67bde250868c | e93751ffd32eace173939607aa8c8a4db7b8cccb | /src/comp1110/labtest1/Movie.java | 59c22b307b9b976c56054f9154776038a17e585a | [] | no_license | JinhMa/comp1110-labtest1 | 0194649ca41731d3031ee2e89033cc35a963f4f6 | 9a83f65652d8489186d944849a236d53c0d3570b | refs/heads/master | 2020-06-30T15:48:39.883083 | 2019-08-06T15:17:58 | 2019-08-06T15:17:58 | 200,876,246 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 783 | java | package comp1110.labtest1;
import java.util.Scanner;
public class Movie {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String movieName = scan.nextLine();
int runningTime = scan.nextInt();
int hours = runningTime/60;
int mins = runningTime % 60;
System.out.printf("%s runs for ", movieName);
if(hours == 1)
System.out.printf("%d hour", hours);
if(hours > 1)
System.out.printf("%d hours", hours);
if(hours != 0 && mins != 0)
System.out.printf(" and ");
if(mins == 1)
System.out.printf("%d minute", mins);
if(mins > 1)
System.out.printf("%d minutes", mins);
System.out.println();
}
}
| [
"[email protected]"
] | |
91465eef8dc6a3fbc5ece97f32ce5f2288d41279 | 31844eb756e0b3256da4478e1994c1976a7007b5 | /src/model/AnimationReader.java | 1a9ae27225e237b9cde3921ab38f4fffc4942e78 | [] | no_license | Hannahyuting/Animation-Player | 8187e5ab9fcc511c10f1201e8cc7ffa918bd5659 | fc024080f685c96922b82587173db0e14731b714 | refs/heads/master | 2023-04-13T17:31:43.663967 | 2021-04-25T00:55:07 | 2021-04-25T00:55:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,480 | java | package model;
import java.util.Objects;
import java.util.Scanner;
import java.util.regex.Pattern;
/**
* A helper to read animation data and construct an animation from it.
*/
public class AnimationReader {
/**
* A factory for producing new animations, given a source of shapes and a
* builder for constructing animations.
*
* <p>
* The input file format consists of two types of lines:
* <ul>
* <li>Shape lines: the keyword "shape" followed by two identifiers (i.e.
* alphabetic strings with no spaces), giving the unique name of the shape,
* and the type of shape it is.</li>
* <li>Motion lines: the keyword "motion" followed by an identifier giving the name
* of the shape to move, and 16 integers giving the initial and final conditions of the motion:
* eight numbers giving the time, the x and y coordinates, the width and height,
* and the red, green and blue color values at the start of the motion; followed by
* eight numbers for the end of the motion. See {@link AnimationBuilder#addMotion}</li>
* </ul>
* </p>
*
* @param readable The source of data for the animation
* @param builder A builder for helping to construct a new animation
* @param <IModel> The main model interface type describing animations
* @return
*/
public static <IModel> IModel parseFile(Readable readable, AnimationBuilder<IModel> builder) {
Objects.requireNonNull(readable, "Must have non-null readable source");
Objects.requireNonNull(builder, "Must provide a non-null AnimationBuilder");
Scanner s = new Scanner(readable);
// Split at whitespace, and ignore # comment lines
s.useDelimiter(Pattern.compile("(\\p{Space}+|#.*)+"));
while (s.hasNext()) {
String word = s.next();
switch (word) {
case "canvas":
readCanvas(s, builder);
break;
case "shape":
readShape(s, builder);
break;
case "motion":
readMotion(s, builder);
break;
default:
throw new IllegalStateException("Unexpected keyword: " + word + s.nextLine());
}
}
return builder.build();
}
private static <Doc> void readCanvas(Scanner s, AnimationBuilder<Doc> builder) {
int[] vals = new int[4];
String[] fieldNames = {"left", "top", "width", "height"};
for (int i = 0; i < 4; i++) {
vals[i] = getInt(s, "Canvas", fieldNames[i]);
}
builder.setBounds(vals[0], vals[1], vals[2], vals[3]);
}
private static <Doc> void readShape(Scanner s, AnimationBuilder<Doc> builder) {
String name;
String type;
if (s.hasNext()) {
name = s.next();
} else {
throw new IllegalStateException("Shape: Expected a name, but no more input available");
}
if (s.hasNext()) {
type = s.next();
} else {
throw new IllegalStateException("Shape: Expected a type, but no more input available");
}
builder.declareShape(name, type);
}
private static <Doc> void readMotion(Scanner s, AnimationBuilder<Doc> builder) {
String[] fieldNames = new String[]{
"initial time",
"initial x-coordinate", "initial y-coordinate",
"initial width", "initial height",
"initial red value", "initial green value", "initial blue value",
"final time",
"final x-coordinate", "final y-coordinate",
"final width", "final height",
"final red value", "final green value", "final blue value",
};
int[] vals = new int[16];
String name;
if (s.hasNext()) {
name = s.next();
} else {
throw new IllegalStateException("Motion: Expected a shape name, but no more input available");
}
for (int i = 0; i < 16; i++) {
vals[i] = getInt(s, "Motion", fieldNames[i]);
}
builder.addMotion(name,
vals[0], vals[1], vals[2 ], vals[3 ], vals[4 ], vals[5 ], vals[6 ], vals[7 ],
vals[8], vals[9], vals[10], vals[11], vals[12], vals[13], vals[14], vals[15]);
}
private static int getInt(Scanner s, String label, String fieldName) {
if (s.hasNextInt()) {
return s.nextInt();
} else if (s.hasNext()) {
throw new IllegalStateException(
String.format("%s: expected integer for %s, got: %s", label, fieldName, s.next()));
} else {
throw new IllegalStateException(
String.format("%s: expected integer for %s, but no more input available",
label, fieldName));
}
}
}
| [
"[email protected]"
] | |
d5fb1f6c06d341b44e7a11026ce59202885c5f9e | f9aa989ba776e657e53238a04947e4ae92cf4030 | /src/main/java/workshop/toy/repositories/GenderRepository.java | f0423b97fa00f5832f7aaec12adc65f054149997 | [] | no_license | tinakun13/FishQueenToyProject | c28ddef9f86891aec346439d09692e9532881086 | dc3a1391b263cb5ab7e6a24ce0b1180e5d96731a | refs/heads/master | 2020-03-12T19:50:31.386618 | 2018-04-27T11:44:51 | 2018-04-27T11:44:51 | 130,792,808 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 377 | java | package workshop.toy.repositories;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.CrudRepository;
import workshop.toy.models.Gender;
import java.util.List;
public interface GenderRepository extends CrudRepository<Gender, Integer> {
@Query("SELECT * FROM GENDER ORDER BY ID")
List<Gender> getGenderList();
}
| [
"[email protected]"
] | |
abd8733d9bc1bde012db4e892b1ef94114219ec1 | 7beaee42120b8bd962b4da2be704ce772559e33d | /reflectors-http/src/main/java/org/httpkit/server/Frame.java | 2ed7fa76fa5133555908292815dbaf556fbb68fb | [
"Apache-2.0"
] | permissive | huangzhen/reflectors | 36ba056769ee21a05e7959ce89fd0bb822c6aee9 | e6acd888825a98e6747ea75456a517910f5e39a2 | refs/heads/master | 2020-03-17T06:10:32.297864 | 2018-09-17T10:26:58 | 2018-09-17T10:26:58 | 133,344,600 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,502 | java | package org.httpkit.server;
import org.httpkit.HttpUtils;
import java.nio.ByteBuffer;
public abstract class Frame {
public final byte[] data;
public Frame(byte data[]) {
this.data = data;
}
public static class BinaryFrame extends Frame {
public BinaryFrame(byte[] data) {
super(data);
}
}
public static class CloseFrame extends Frame {
public final static short CLOSE_NORMAL = 1000;
// indicates that an endpoint is "going away", such as a server going
// down
// or a browser having navigated away from a page.
public final static short CLOSE_AWAY = 1001;
// public final static short CLOSE_PROTOCOL_ERROR = 1002;
// public final static short CLOSE_NOT_IMPL = 1003;
// This is a generic status code that can be returned when there is no
// other
// more suitable status code (e.g., 1003 or 1009)
// public final static short CLOSE_VIOLATES_POLICY = 1008;
public final static short CLOSE_MESG_BIG = 1009;
// public final static short CLOSE_SEVER_ERROR = 1011;
// private static byte[] bytes(short code) {
// return ByteBuffer.allocate(2).putShort(code).array();
// }
// public static final CloseFrame NORMAL = new
// CloseFrame(bytes(CLOSE_NORMAL));
// public static final CloseFrame AWAY = new
// CloseFrame(bytes(CLOSE_AWAY));
// public static final CloseFrame MESG_BIG = new
// CloseFrame(bytes(CLOSE_MESG_BIG));
// public static final CloseFrame SERVER_ERROR = new
// CloseFrame(bytes(CLOSE_MESG_BIG));
public CloseFrame(byte[] data) {
super(data);
}
public int getStatus() {
if (data.length >= 2) {
return ByteBuffer.wrap(data, 0, 2).getShort();
}
return CLOSE_NORMAL;
}
}
public static class PingFrame extends Frame {
public PingFrame(byte[] data) {
super(data);
}
}
public static class PongFrame extends Frame {
public PongFrame(byte[] data) {
super(data);
}
}
public static class TextFrame extends Frame {
private final String msg;
public TextFrame(byte[] data) {
super(data);
this.msg = new String(data, HttpUtils.UTF_8);
}
public String getText() {
return msg;
}
}
}
| [
"[email protected]"
] | |
2107771589ff898817a03b3c58406afae6b99712 | b9bd37427ccf08143b09bd36136100d8f4d07499 | /module/AirportMap.java | f9e052cb3eda0c8efd5c45c18172a60278f24d8a | [] | no_license | egk265/UCSD-Object-Oriented-Programming-in-Java | adaedea106b5f97e256ee23fcefde989cb16e18c | 2f6762bb64bf4013d2d213559287c57ca8db869d | refs/heads/main | 2023-06-14T09:11:56.934376 | 2021-07-08T10:52:05 | 2021-07-08T10:52:05 | 384,092,065 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,797 | java | package module6;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import de.fhpotsdam.unfolding.UnfoldingMap;
import de.fhpotsdam.unfolding.data.PointFeature;
import de.fhpotsdam.unfolding.data.ShapeFeature;
import de.fhpotsdam.unfolding.marker.Marker;
import de.fhpotsdam.unfolding.marker.SimpleLinesMarker;
import de.fhpotsdam.unfolding.marker.SimplePointMarker;
import de.fhpotsdam.unfolding.providers.OpenStreetMap;
import de.fhpotsdam.unfolding.utils.MapUtils;
import de.fhpotsdam.unfolding.geo.Location;
import parsing.ParseFeed;
import processing.core.PApplet;
/** An applet that shows airports (and routes)
* on a world map.
* @author Adam Setters and the UC San Diego Intermediate Software Development
* MOOC team
*
*/
public class AirportMap extends PApplet {
UnfoldingMap map;
private List<Marker> airportList;
List<Marker> routeList;
// NEW IN MODULE 5
private CommonMarker lastSelected;
//private CommonMarker lastClicked;
public void setup() {
// setting up PAppler
size(900,700, OPENGL);
// setting up map and default events
//map = new UnfoldingMap(this, 50, 50, 750, 550);
map = new UnfoldingMap(this, 200, 50, 650, 600, new OpenStreetMap.OpenStreetMapProvider());
MapUtils.createDefaultEventDispatcher(this, map);
// get features from airport data
List<PointFeature> features = ParseFeed.parseAirports(this, "airports.dat");
// list for markers, hashmap for quicker access when matching with routes
airportList = new ArrayList<Marker>();
HashMap<Integer, Location> airports = new HashMap<Integer, Location>();
// create markers from features
for(PointFeature feature : features) {
AirportMarker m = new AirportMarker(feature);
m.setRadius(5);
airportList.add(m);
// put airport in hashmap with OpenFlights unique id for key
airports.put(Integer.parseInt(feature.getId()), feature.getLocation());
}
// parse route data
List<ShapeFeature> routes = ParseFeed.parseRoutes(this, "routes.dat");
routeList = new ArrayList<Marker>();
for(ShapeFeature route : routes) {
// get source and destination airportIds
int source = Integer.parseInt((String)route.getProperty("source"));
int dest = Integer.parseInt((String)route.getProperty("destination"));
// get locations for airports on route
if(airports.containsKey(source) && airports.containsKey(dest)) {
route.addLocation(airports.get(source));
route.addLocation(airports.get(dest));
}
SimpleLinesMarker sl = new SimpleLinesMarker(route.getLocations(), route.getProperties());
//System.out.println(sl.getProperties());
//UNCOMMENT IF YOU WANT TO SEE ALL ROUTES
routeList.add(sl);
}
//UNCOMMENT IF YOU WANT TO SEE ALL ROUTES
map.addMarkers(routeList);
map.addMarkers(airportList);
}
public void draw() {
background(0);
map.draw();
}
/** Event handler that gets called automatically when the
* mouse moves.
*/
@Override
public void mouseMoved()
{
// clear the last selection
if (lastSelected != null) {
lastSelected.setSelected(false);
lastSelected = null;
}else
{
selectMarkerIfHover(airportList);
//selectMarkerIfHover(routeList);
}
}
// If there is a marker selected
private void selectMarkerIfHover(List<Marker> markers)
{
// Abort if there's already a marker selected
if (lastSelected != null) {
return;
}
for (Marker m : markers)
{
CommonMarker marker = (CommonMarker)m;
if (marker.isInside(map, mouseX, mouseY)) {
lastSelected = marker;
marker.setSelected(true);
return;
}
}
}
}
| [
"[email protected]"
] | |
a4b68693c96f58741ed99b2b4760c67f30551e26 | 31aa78b01c1438148bab51cae0bb9eeaffb0770d | /src/Problems/SurroundedRegions.java | 0bae029ef591b3c764c603c8d6454af7fc111c5a | [] | no_license | ChopinXBP/LeetCode-Babel | b11a688d539fc75e5926d2080baed498a6dd64f2 | d888dd73fe96c6c58d5fecd69420e765cafe201c | refs/heads/master | 2021-06-29T18:22:33.726023 | 2021-01-22T04:59:19 | 2021-01-22T04:59:19 | 211,246,259 | 10 | 1 | null | 2020-07-06T15:40:23 | 2019-09-27T05:56:58 | Java | UTF-8 | Java | false | false | 1,628 | java | package Problems;
/**
*
* Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'.
* A region is captured by flipping all 'O's into 'X's in that surrounded region.
* 给定一个二维的矩阵,包含 'X' 和 'O'(字母 O)。
* 找到所有被 'X' 围绕的区域,并将这些区域里所有的 'O' 用 'X' 填充。
*
*/
public class SurroundedRegions {
//单独标记所有边界的O,将所有非边界O改为X
public void solve(char[][] board) {
if(board.length == 0){
return;
}
int row = board.length;
int col = board[0].length;
for(int i = 0; i < row; i++){
DFS(i, 0, row, col, board);
DFS(i, col - 1, row, col, board);
}
for(int j = 1; j < col-1; j++){
DFS(0, j, row, col, board);
DFS(row - 1, j, row, col, board);
}
for(int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
if(board[i][j] == '#'){
board[i][j] = 'O';
}else if(board[i][j] == 'O'){
board[i][j] = 'X';
}
}
}
}
//DFS将所有边界的‘O’标记为‘#’
public void DFS(int x, int y, int row, int col, char[][] board){
if(x < row && x >= 0 && y < col && y >= 0 && board[x][y] == 'O'){
board[x][y] = '#';
DFS(x + 1, y, row, col, board);
DFS(x - 1, y, row, col, board);
DFS(x, y + 1, row, col, board);
DFS(x, y - 1, row, col, board);
}
}
}
| [
"l"
] | l |
bdc2046475cc6ca74763c08b1bb412e286bd5001 | 5dc327ecb03ad5585af673abc11bfc0794f11e88 | /ActiveLearningforMT/src/query/link/EntropyLink.java | ac48904e6130ce97b0bbc210b730883fe9068b15 | [] | no_license | vambati/vambati | 3930a88fc390bda9ce864c38bb48ae97c458a1bd | 07eaf1f93350fe984c7722df268391882fa63b42 | refs/heads/master | 2021-01-10T02:09:03.222903 | 2011-08-15T01:34:41 | 2011-08-15T01:34:41 | 48,715,557 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,382 | java | package query.link;
import model.smt.TranslationLEXICON;
import data.*;
import query.*;
public class EntropyLink implements QuerySelector {
TranslationLEXICON LEX = null;
public EntropyLink(String sgtFile,String tgsFile){
// Loading the translation lexicons
LEX = new TranslationLEXICON(sgtFile,tgsFile);
LEX.computeEntropies();
}
// Confidence in alignment
public double computeScore(Entry e) {
AlignmentEntry ae = (AlignmentEntry) e;
String[] st = ae.source.split("\\s+");
String[] tt = ae.target.split("\\s+");
for(int x: ae.LINKS.keySet()){
double entropy_sgt = LEX.getSGTEntropy(st[x]);
for(int y: ae.LINKS.get(x).keySet()){
double entropy_tgs = LEX.getTGSEntropy(tt[y]);
double linkscore = 2 * (entropy_sgt * entropy_tgs) /(entropy_sgt + entropy_tgs); // Cost minimize it
linkscore = entropy_sgt;
linkscore = 1.0 / linkscore; // pose as COST
ae.LINKS.get(x).put(y,linkscore);
}
}
return 0.0;
}
public double computeLinkScore(String src,String tgt){
double entropy_sgt = LEX.getSGTEntropy(src);
double entropy_tgs = LEX.getTGSEntropy(tgt);
double linkscore = 2 * (entropy_sgt * entropy_tgs) /(entropy_sgt + entropy_tgs); // Cost minimize it
linkscore = 1.0 / linkscore; // pose as COST
return linkscore;
}
} | [
"vamshi.ambati@d52a760b-b300-2a56-a2a0-c08b96c82ba3"
] | vamshi.ambati@d52a760b-b300-2a56-a2a0-c08b96c82ba3 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.