blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
b0cc9cad5ad05ad59512fb2b214275ae6c20a2f1
363aff4d02607d7ab81f1fa047c33f71be44553b
/src/main/java/com/timtrense/prometheusopcua/PrometheusMetricsServer.java
bfb7a0cd68f82b9115260ccc184448d91d3dc1c1
[ "Apache-2.0" ]
permissive
trensetim/prometheus-opcua
7bb5f19a1f3049040e6fe6215b549d318616463a
379d681135f55c59b4afbc55ab253f89d8a425bc
refs/heads/main
2023-05-13T23:59:08.616362
2021-06-09T06:56:55
2021-06-09T06:56:55
375,075,193
1
0
null
null
null
null
UTF-8
Java
false
false
1,602
java
package com.timtrense.prometheusopcua; import lombok.NonNull; import lombok.extern.log4j.Log4j2; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.servlet.ServletHandler; import org.eclipse.jetty.servlet.ServletHolder; import java.util.Arrays; import java.util.Objects; import java.util.stream.Collectors; /** * The http server for the {@link PrometheusMetricsServlet} * * @author Tim Trense */ @Log4j2 public class PrometheusMetricsServer extends Server { public PrometheusMetricsServer( @NonNull Configuration configuration, @NonNull Buffer buffer ) { super( configuration.getHttpPort() ); ServletHolder servletHolder = new ServletHolder(); servletHolder.setServlet( new PrometheusMetricsServlet( buffer ) ); ServletHandler servletHandler = new ServletHandler(); servletHandler.addServletWithMapping( servletHolder, "/metrics" ); setHandler( servletHandler ); } @Override protected void doStart() throws Exception { log.info( "starting http server on {}", Arrays.stream( getConnectors() ) .map( c -> (ServerConnector)c ) .map( c -> String.join( ",", c.getProtocols() ) + " " + Objects.requireNonNullElse( c.getHost(), "*" ) + ":" + c.getPort() ) .collect( Collectors.joining( ", " ) ) ); super.doStart(); } }
d4c545f13be7758c62b702d52aea3670e9526151
f4f4c99dd73842343e10fe0dd4c623c5e61f05ca
/src/com/wise/baba/biz/LruImageCache.java
dd47f0062ab3b4557050fb28f823a0a90db9fc79
[]
no_license
wisegps/baba
f20ac16345ef6edbd08c2ec23ee62ed3b1c21fe8
da8d9f117681581c6824db30464e047ce3978a6a
refs/heads/master
2021-01-17T07:03:31.981585
2017-02-14T03:16:16
2017-02-14T03:16:16
23,483,333
3
2
null
null
null
null
UTF-8
Java
false
false
1,135
java
package com.wise.baba.biz; import android.graphics.Bitmap; import android.support.v4.util.LruCache; import com.android.volley.toolbox.ImageLoader.ImageCache; public class LruImageCache implements ImageCache{ private static LruCache<String, Bitmap> mMemoryCache; private static LruImageCache lruImageCache; private LruImageCache(){ // Get the Max available memory int maxMemory = (int) Runtime.getRuntime().maxMemory(); int cacheSize = maxMemory / 8; mMemoryCache = new LruCache<String, Bitmap>(cacheSize){ @Override protected int sizeOf(String key, Bitmap bitmap){ return bitmap.getRowBytes() * bitmap.getHeight(); } }; } public static LruImageCache instance(){ if(lruImageCache == null){ lruImageCache = new LruImageCache(); } return lruImageCache; } @Override public Bitmap getBitmap(String arg0) { return mMemoryCache.get(arg0); } @Override public void putBitmap(String arg0, Bitmap arg1) { if(getBitmap(arg0) == null){ mMemoryCache.put(arg0, arg1); } } }
[ "c@c-PC" ]
c@c-PC
b58985bc196238026b1ece7aaaa16bab967ecd60
0491bc6fd39afa2543646f290e43353cfd77f6f4
/Java/Strings/CountBracketReversal.java
9c3a2c210083deed7e50837dc8dc7a851f699c31
[]
no_license
tomarsid-98/Data-Structures-Important-Questions
a9f39fde053d78e4582526c5a879640c2e9ff92d
b87222d67d1e5f6f2ee1a55551d666a1b8eb55b9
refs/heads/main
2023-07-13T20:49:44.304603
2021-08-27T21:23:23
2021-08-27T21:23:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,290
java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Stack; public class CountBracketReversal { public static void main(String[] args) throws Exception { new CountBracketReversal().run(); } private void run() throws Exception { BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); int t = Integer.parseInt(read.readLine()); while (t-- > 0) { String S = read.readLine(); System.out.println(bracket(S)); } } private int bracket(String str) { int len = str.length(); if (len%2 != 0) return -1; Stack<Character> op=new Stack<>(); for (int i=0; i<len; i++) { char c = str.charAt(i); if (c =='}' && !op.empty()) { if (op.peek()=='{') op.pop(); else op.push(c); } else op.push(c); } int red_len = op.size(); int n = 0; while (!op.empty() && op.peek() == '{') { op.pop(); n++; } return (red_len/2 + n%2); } }
53a9a75b8c55997847982e3756741de3adf855e1
0b351568271456c3888998a3965f3d2166c52464
/src/test/java/com/crm/qa/testcases/HomePageTest.java
086cbf222b15698f2a80f90dddaed4131d33ee59
[]
no_license
sanford110/FreeCRMTest
f8f80e412bc35256701e19ad698e279e6335b9b7
a2253d0a9ae7d5497b146f16ca68fedf20586671
refs/heads/master
2020-05-01T15:01:45.786071
2019-03-25T08:04:40
2019-03-25T08:04:40
177,536,028
0
0
null
null
null
null
UTF-8
Java
false
false
1,362
java
package com.crm.qa.testcases; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import com.crm.qa.base.TestBase; import com.crm.qa.pages.ContactsPage; import com.crm.qa.pages.HomePage; import com.crm.qa.pages.LoginPage; import com.crm.qa.util.TestUtil; public class HomePageTest extends TestBase { LoginPage loginPage; HomePage homePage; TestUtil testUtil; ContactsPage contactsPage; public HomePageTest() { super(); } @BeforeMethod public void setUp() throws InterruptedException { initialization(); testUtil = new TestUtil(); contactsPage = new ContactsPage(); loginPage = new LoginPage(); homePage = loginPage.login(prop.getProperty("username"), prop.getProperty("password")); } @Test(priority=1) public void verifyHomePageTitleTest() { String homePageTitle = homePage.verifyHomePageTitle(); Assert.assertEquals(homePageTitle, "CRMPRO", "HomePageTitle not matched"); } @Test(priority=2) public void verifyUserNameTest() { testUtil.switchToFrame(); Assert.assertTrue(homePage.verifyCorrectUserName()); } @Test(priority=3) public void verifyContactsLinkTest() { testUtil.switchToFrame(); contactsPage = homePage.clickOnContactsLink(); } @AfterMethod public void teamDown() { driver.quit(); } }
0078a12cda35f93b383413c32e4275e495913a10
c5f911ed5a575823fd42130b4fa65cc83b2fb969
/src/main/java/com/eagle/kyc/service/dto/PasswordChangeDTO.java
14ef3bf5895bf23df6ed3fae7127dca8a48d21cf
[]
no_license
sunilsangwan4/sunilkyc
d22ad2cf52b93d0b5bd2a3e5a713b29472ef92a2
7538ef28324a543f7bde482be4caab3020a22977
refs/heads/master
2021-06-28T21:45:24.563598
2018-11-20T08:51:56
2018-11-20T08:51:56
156,077,316
0
1
null
2020-09-18T12:12:23
2018-11-04T11:58:08
Java
UTF-8
Java
false
false
857
java
package com.eagle.kyc.service.dto; /** * A DTO representing a password change required data - current and new password. */ public class PasswordChangeDTO { private String currentPassword; private String newPassword; public PasswordChangeDTO() { // Empty constructor needed for Jackson. } public PasswordChangeDTO(String currentPassword, String newPassword) { this.currentPassword = currentPassword; this.newPassword = newPassword; } public String getCurrentPassword() { return currentPassword; } public void setCurrentPassword(String currentPassword) { this.currentPassword = currentPassword; } public String getNewPassword() { return newPassword; } public void setNewPassword(String newPassword) { this.newPassword = newPassword; } }
85347b2e7627c9ba15b7b788f3c3c77f6cb25b8a
ea7a30c7f3b2b162a95072203e7f3f19ae627a84
/src/main/java/com/by/wechat/service/impl/WeChatConfigServiceImpl.java
e5763d3762277c2cb39cfd79cd486781e0e10600
[]
no_license
dirknowitzki123/wechat
654cb6465a8fb5323287f02a42de6d2bdf7d7885
b40a96f02c0f0942c0f6f71f6e62b62d976cff94
refs/heads/master
2020-04-25T15:08:33.007656
2019-02-27T07:45:15
2019-02-27T07:45:15
172,867,717
1
0
null
null
null
null
UTF-8
Java
false
false
2,838
java
package com.by.wechat.service.impl; import java.util.HashMap; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.by.core.util.StringUtils; import com.by.wechat.config.WeChatConfig; import com.by.wechat.service.IWeChatConfigService; import com.by.wechat.util.WeChatHttpUtil; /** * Created by yiqr on 2017/6/12. */ @Service public class WeChatConfigServiceImpl implements IWeChatConfigService { private Log log = LogFactory.getLog(WeChatConfigServiceImpl.class); private static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET"; private static final String JSAPI_TICKET_URL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi"; public String getToken() { Map<String,String> reMap = new HashMap<String, String>(); //获取access_token String accessTokenUrl = ACCESS_TOKEN_URL .replace("APPID", WeChatConfig.getAppid()) .replace("APPSECRET", WeChatConfig.getAppsecret()); String accessTokenStr = WeChatHttpUtil.get(accessTokenUrl); if(StringUtils.isNotEmpty(accessTokenStr)){ JSONObject accessTokenJson = JSON.parseObject(accessTokenStr); String accessToken = accessTokenJson.getString("access_token"); WeChatConfig.setAccessToken(accessToken); reMap.put("accessToken",accessToken); } //获取api_ticket String apiTicketUrl = JSAPI_TICKET_URL.replace("ACCESS_TOKEN", WeChatConfig.getAccessToken()); String apiTicketStr = WeChatHttpUtil.get(apiTicketUrl); if(StringUtils.isNotEmpty(apiTicketStr)){ JSONObject apiTicketJson = JSON.parseObject(accessTokenStr); String jsapiTicket = apiTicketJson.getString("ticket"); WeChatConfig.setJsapiTicket(jsapiTicket); reMap.put("jsapiTicket",jsapiTicket); } log.info("###TOKEN:" + WeChatConfig.getToken()); log.info("###ACCESS_TOKEN:" + WeChatConfig.getAccessToken()); log.info("###JSAPI_TICKET:" + WeChatConfig.getJsapiTicket()); return JSON.toJSONString(reMap); } /** * 定时任务获取oken */ @Scheduled(fixedRate = 1000*60*60*2) public void timingToken(){ getToken(); } public String query() { Map<String, String> reMap = new HashMap<String, String>(); reMap.put("accessToken",WeChatConfig.getAccessToken()); reMap.put("jsapiTicket",WeChatConfig.getJsapiTicket()); return JSON.toJSONString(reMap); } }
212d34292cae523290cb8833f2aace0bc9ee5d56
6b780b1f637fd9ee1229e08a7efdc9399c6e2db2
/hazelcast/src/test/java/com/hazelcast/spi/merge/PutIfAbsentMergePolicyTest.java
c56ef37d3630740788e8d6b46e8ce40f21c1396e
[ "Apache-2.0" ]
permissive
sancar/hazelcast
fc25cc7840f8bc67d61ed47c8dd1605a67db2d90
664d44822862bb54ef211cbac613de372c4d47eb
refs/heads/master
2022-12-22T16:55:08.778072
2018-04-05T14:16:40
2018-04-05T14:16:40
12,152,804
2
0
Apache-2.0
2021-09-16T12:35:21
2013-08-16T06:59:07
Java
UTF-8
Java
false
false
3,127
java
/* * Copyright (c) 2008-2018, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hazelcast.spi.merge; import com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder; import com.hazelcast.nio.serialization.Data; import com.hazelcast.spi.merge.SplitBrainMergeTypes.MapMergeTypes; import com.hazelcast.spi.serialization.SerializationService; import com.hazelcast.test.HazelcastParallelClassRunner; import com.hazelcast.test.annotation.ParallelTest; import com.hazelcast.test.annotation.QuickTest; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @RunWith(HazelcastParallelClassRunner.class) @Category({QuickTest.class, ParallelTest.class}) public class PutIfAbsentMergePolicyTest { private static final SerializationService SERIALIZATION_SERVICE = new DefaultSerializationServiceBuilder().build(); private static final Data EXISTING = SERIALIZATION_SERVICE.toData("EXISTING"); private static final Data MERGING = SERIALIZATION_SERVICE.toData("MERGING"); private SplitBrainMergePolicy<Data, MapMergeTypes> mergePolicy; @Before public void setup() { mergePolicy = new PutIfAbsentMergePolicy<Data, MapMergeTypes>(); } @Test @SuppressWarnings("ConstantConditions") public void merge_existingValueAbsent() { MapMergeTypes existing = null; MapMergeTypes merging = mergingValueWithGivenValue(MERGING); assertEquals(MERGING, mergePolicy.merge(merging, existing)); } @Test public void merge_existingValuePresent() { MapMergeTypes existing = mergingValueWithGivenValue(EXISTING); MapMergeTypes merging = mergingValueWithGivenValue(MERGING); assertEquals(EXISTING, mergePolicy.merge(merging, existing)); } @Test public void merge_bothValuesNull() { MapMergeTypes existing = mergingValueWithGivenValue(null); MapMergeTypes merging = mergingValueWithGivenValue(null); assertNull(mergePolicy.merge(merging, existing)); } private MapMergeTypes mergingValueWithGivenValue(Data value) { MapMergeTypes mergingValue = mock(MapMergeTypes.class); try { when(mergingValue.getValue()).thenReturn(value); return mergingValue; } catch (Exception e) { throw new RuntimeException(e); } } }
704ed84403a059d6411167362991072c12f1ba46
fa80aeb2e54494dc8b597b1e34824b6a7425b995
/blueocean-rest-impl/src/main/java/io/jenkins/blueocean/service/embedded/rest/ExtensionClassContainerImpl.java
9eeff5ec4ef9e2518000d5941d280305ddc0b5dc
[ "MIT" ]
permissive
suwantoc/blueocean-plugin
50572bbfbf591b6a7870bf0dfbd0e8908be3b9e0
f9b8bcbd4e4252a30429f3444a04aa46dfeb9811
refs/heads/master
2021-01-18T01:13:23.199684
2016-07-15T15:08:17
2016-07-15T15:08:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
952
java
package io.jenkins.blueocean.service.embedded.rest; import hudson.Extension; import io.jenkins.blueocean.commons.ServiceException; import io.jenkins.blueocean.rest.ApiHead; import io.jenkins.blueocean.rest.hal.Link; import io.jenkins.blueocean.rest.model.BlueExtensionClass; import io.jenkins.blueocean.rest.model.BlueExtensionClassContainer; /** * @author Vivek Pandey */ @Extension public class ExtensionClassContainerImpl extends BlueExtensionClassContainer { @Override public BlueExtensionClass get(String name) { try { Class clz = this.getClass().getClassLoader().loadClass(name); return new ExtensionClassImpl(this,clz); } catch (ClassNotFoundException e) { throw new ServiceException.NotFoundException(String.format("Class %s is not known", name)); } } @Override public Link getLink() { return ApiHead.INSTANCE().getLink().rel(getUrlName()); } }
d9ecde842534c437fdc5268fddccf70b5aaeec59
613f7baed5ff6d9146e9e53a312d1105cce3292f
/Labo2/SER_PLEX_Depart/WFC-Interfaces/src/main/java/ch/heigvd/iict/ser/imdb/models/Movie.java
c408b109c34c25f7954c66e6fbd662c52948b157
[]
no_license
Nortalle/LaboPlex
657641fa6ba4aab8ab6e63e974223fc1b77968ba
b2ab7d5d700a2a316fea04a9938188d46ac83c07
refs/heads/master
2020-03-09T12:35:01.979466
2018-05-20T18:53:21
2018-05-20T18:53:21
128,789,565
1
0
null
null
null
null
UTF-8
Java
false
false
2,482
java
package ch.heigvd.iict.ser.imdb.models; import java.io.Serializable; import java.util.Set; public class Movie implements Serializable { private static final long serialVersionUID = 5382858186892929803L; private long id = -1L; private String title = null; private String plot = null; private Set<String> languages = null; private String budget = null; private Set<String> genres = null; private Set<String> keywords = null; private int runtime = -1; private Set<Role> actorsIds = null; private Set<Long> directorsIds = null; private Set<Long> editorsIds = null; private Set<Long> producersIds = null; private Set<Long> writersIds = null; private String image = null; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getPlot() { return plot; } public void setPlot(String plot) { this.plot = plot; } public Set<String> getLanguages() { return languages; } public void setLanguages(Set<String> languages) { this.languages = languages; } public String getBudget() { return budget; } public void setBudget(String budget) { this.budget = budget; } public Set<String> getGenres() { return genres; } public void setGenres(Set<String> genres) { this.genres = genres; } public Set<String> getKeywords() { return keywords; } public void setKeywords(Set<String> keywords) { this.keywords = keywords; } public int getRuntime() { return runtime; } public void setRuntime(int runtime) { this.runtime = runtime; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public Set<Role> getActorsIds() { return actorsIds; } public void setActorsIds(Set<Role> actorsIds) { this.actorsIds = actorsIds; } public Set<Long> getDirectorsIds() { return directorsIds; } public void setDirectorsIds(Set<Long> directorsIds) { this.directorsIds = directorsIds; } public Set<Long> getEditorsIds() { return editorsIds; } public void setEditorsIds(Set<Long> editorsIds) { this.editorsIds = editorsIds; } public Set<Long> getProducersIds() { return producersIds; } public void setProducersIds(Set<Long> producersIds) { this.producersIds = producersIds; } public Set<Long> getWritersIds() { return writersIds; } public void setWritersIds(Set<Long> writersIds) { this.writersIds = writersIds; } }
9ab38bd1190dfe00f782a1c5fca7fc58ee57ee06
911a3245905dbe4dd808e82a215d6ebf0820ca0f
/src/day54_Abstraction/CarTask/Tesla.java
8b3ca5627680c79263ff2c50c99823d6f828f92a
[]
no_license
Alex-B-I/Summer2020_B20
1d9f29279ff018fb1a1ae5b972bacb264bd011d9
197893a8d88838f8c5d4366c3bdfbb12ebfd5fdd
refs/heads/master
2023-02-11T15:57:19.218730
2021-01-05T00:47:26
2021-01-05T00:47:26
296,141,595
0
1
null
null
null
null
UTF-8
Java
false
false
181
java
package day54_Abstraction.CarTask; public class Tesla extends Car { @Override public void start() { System.out.println("Starting Tesla by: voice control"); } }
5e08ced8e6181c7765be0dd81ef52ac0d5da61a7
200c4d5aa9d55c7cfad6aa5f3d448c9aaa5a17f5
/Application3/app/src/test/java/com/example/administrator/application3/ExampleUnitTest.java
9ab50633da07ef81cc03f205b169371308e94e3c
[]
no_license
yxj8791619/2014011382
4926bee3a3c1169eebef6b42e9680708912cebf3
a237adc25c81ce6ad099515053b711b0ef27f547
refs/heads/master
2021-01-18T18:55:44.905480
2016-12-02T05:39:44
2016-12-02T05:39:44
67,198,926
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
package com.example.administrator.application3; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
7f4f41c36adcb480438353308954f9281ad38183
4aafa3d841152ea177d5277de33fa52d6231962c
/src/main/java/com/xhp/crowdfunding_backend/dao/Impl/ApprovalDaoImpl.java
5a3b82224e383829e92ff9d04905cf1fb43a38ee
[]
no_license
cherry1996/crowdfunding_backend
71b25ddb2c283fd73055cb81d7f1f889e37f126f
20c3b33a506351d712c9211a7000d63cbf043601
refs/heads/master
2020-03-14T02:07:25.645271
2018-04-28T09:00:36
2018-04-28T09:00:36
131,392,750
0
0
null
null
null
null
UTF-8
Java
false
false
3,777
java
package com.xhp.crowdfunding_backend.dao.Impl; import com.xhp.crowdfunding_backend.entity.Approval; import com.xhp.crowdfunding_backend.dao.ApprovalDao; import com.xhp.crowdfunding_backend.common.Pagination; import com.xhp.crowdfunding_backend.common.PageRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.PreparedStatementCreator; import org.springframework.jdbc.core.PreparedStatementSetter; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.support.GeneratedKeyHolder; import org.springframework.jdbc.support.KeyHolder; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import org.springframework.dao.EmptyResultDataAccessException; import java.sql.*; import java.util.List; import java.util.UUID; /** * @author yuchu * @email * @date 2018-04-28 16:06:55 */ @Repository public class ApprovalDaoImpl implements ApprovalDao { @Autowired private JdbcTemplate jdbcTemplate; @Override @Transactional(readOnly = true) public Approval findOne(String aid) { try { return jdbcTemplate.queryForObject("select * from approval where aid=?", new Object[]{aid}, new ApprovalRowMapper()); } catch (EmptyResultDataAccessException e) { return null; } } @Override @Transactional(readOnly = true) public List<Approval> findAll() { return jdbcTemplate.query("select * from approval", new ApprovalRowMapper()); } @Override @Transactional(readOnly = true) public Pagination getPage(PageRequest pageRequest) { return new Pagination("select * from approval", pageRequest, jdbcTemplate); } @Override public Approval create(Approval approval) { String aid = UUID.randomUUID().toString().replaceAll("-", ""); approval.setAid(aid); final String sql = "insert into approval values( ? , ? , ? , ? )" ; jdbcTemplate.update(sql, new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, approval.getAid()); ps.setString(2, approval.getAstate()); ps.setString(3, approval.getPid()); ps.setDate(4, new java.sql.Date(approval.getAdate().getTime())); } }); return approval; } @Override public void update(Approval approval) { final String sql = "update approval set Astate=?,Pid=?,Adate=? where Aid=?" ; jdbcTemplate.update(sql, new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setString(4, approval.getAid()); ps.setString(1, approval.getAstate()); ps.setString(2, approval.getPid()); ps.setDate(3, new java.sql.Date(approval.getAdate().getTime())); } }); } @Override public boolean delete(String aid) { String sql = "delete from approval where Aid=?" ; Object[] params = new Object[]{aid}; int rowNum = jdbcTemplate.update(sql, params); return rowNum > 0 ? true : false; } } class ApprovalRowMapper implements RowMapper<Approval> { @Override public Approval mapRow(ResultSet rs, int rowNum) throws SQLException { Approval approval = new Approval(); approval.setAid(rs.getString("aid")); approval.setAstate(rs.getString("astate")); approval.setPid(rs.getString("pid")); approval.setAdate(rs.getDate("adate")); return approval; } }
de7a6aebd34b5729e71bfd417c9771660ad5455b
177b74fe180596461bc12ee9d13ad172ab9c3a57
/NimHumanPlayer.java
c2ff20f3a2ad43f5eba4bb507588b424028097ed
[]
no_license
yuanhungl0127/NimBasicGame_A03-JavaProgramming
67ee1088e55cb9d97274375e7273dffe100b22bd
d97823b8b8a3dd98006917525d2d249482808235
refs/heads/master
2022-10-22T10:10:23.298303
2020-06-14T09:48:50
2020-06-14T09:48:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
606
java
/** * COMP90041 Programming and Software Developing Assignment 3: * Nim is a two-player game that the first one who remove the last one stone will lose * * @author Yuan * Name: Yuan Hung Lin * StudentID: 1119147 * Username: yuanhungl */ public class NimHumanPlayer extends NimPlayer { public NimHumanPlayer(String userName, String familyName, String givenName) { super(userName, familyName, givenName); } @Override public int removeStone() { System.out.printf("\n%s's turn - remove how many?\n", this.getGivenName()); return Nimsys.scan.nextInt(); } }
1a9557494976e2b7c806f760d1a9597a29d08581
745bf73f1fce0a23b4653d703d83f53b157c4a55
/src/main/java/org/jurassicraft/server/item/itemblock/CultivateItemBlock.java
9f928067a1269135814bf21f0c293eb5a85f7950
[ "LicenseRef-scancode-public-domain" ]
permissive
TheXnator/JurassiCraft2
d1c479176c686db9416b71ac443423f2dbf40b03
850c3f5d0896d19e3626ed9c3589c77d958d85b7
refs/heads/master
2021-01-16T23:14:27.043344
2016-07-02T08:42:00
2016-07-02T08:42:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
820
java
package org.jurassicraft.server.item.itemblock; import net.minecraft.block.Block; import net.minecraft.item.EnumDyeColor; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import org.jurassicraft.server.lang.LangHelper; public class CultivateItemBlock extends ItemBlock { public CultivateItemBlock(Block block) { super(block); this.setMaxDamage(0); this.setHasSubtypes(true); } @Override public int getMetadata(int metadata) { return metadata; } @Override public String getItemStackDisplayName(ItemStack stack) { EnumDyeColor color = EnumDyeColor.byMetadata(stack.getItemDamage()); return new LangHelper("tile.cultivate.name").withProperty("color", "color." + color.getName() + ".name").build(); } }
d0ea76bb113360050ddc138f719b0f9b1cbeced3
275268aeb9926e77d82836b73e3b375bd27570cb
/samples/sse-real-time-web/src/main/java/com/waylau/rest/resource/AlarmResource.java
9b72e736624f6ca962a9972e942b7bea9ba5c672
[]
no_license
waylau/java-ee-enterprise-development-samples
8f279bbf3f69bd92490d7b92d025ef27c78ca1b7
43cf4e8e13e5a9186e4dfa253c79d4d32b753349
refs/heads/master
2022-05-05T11:54:37.082403
2021-03-30T15:54:08
2021-03-30T15:54:08
236,307,774
9
2
null
2022-03-31T22:05:04
2020-01-26T12:15:36
null
UTF-8
Java
false
false
1,682
java
package com.waylau.rest.resource; import java.io.IOException; import java.util.Date; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.glassfish.jersey.media.sse.EventOutput; import org.glassfish.jersey.media.sse.OutboundEvent; import org.glassfish.jersey.media.sse.SseFeature; import com.waylau.rest.bean.Alarm; /** * 说明:告警 SSE * * @author <a href="http://www.waylau.com">waylau.com</a> 2015年9月8日 */ @Path("alarm-events") public class AlarmResource { private EventOutput eventOutput = new EventOutput(); private OutboundEvent.Builder eventBuilder; private OutboundEvent event ; /** * 提供 SSE 事件输出通道的资源方法 * @return eventOutput */ @GET @Produces(SseFeature.SERVER_SENT_EVENTS) public EventOutput getServerSentEvents() { // 不断循环执行 while (true) { Alarm message = new Alarm(new Date(),Short.valueOf("11"), "10", "锅炉砸掉了"); eventBuilder = new OutboundEvent.Builder(); eventBuilder.id(message.getId()+""); eventBuilder.name("message");; eventBuilder.mediaType(MediaType.APPLICATION_JSON_TYPE); eventBuilder.data(Alarm.class, message ); // 推送服务器时间的信息给客户端 event = eventBuilder.build(); try { eventOutput.write(event); } catch (IOException e) { e.printStackTrace(); } finally { try { eventOutput.close(); return eventOutput; } catch (IOException e) { e.printStackTrace(); } } } } }
357d2dd214421d3dd78f3155396184d3a20508cb
aedc14e0254951efd21eb00c57955053e9f94a90
/src/main/java/com/faforever/client/replay/ReplayServerImpl.java
1cc323e259a9745452c1aefb49e8958fd1519cd6
[ "MIT" ]
permissive
JeroenDeDauw/downlords-faf-client
6b5d6a3731f8df0e1b93c7d4da30c5ff6adc4230
065b40a17c17bcc8644fbe8a6d4a9f10e7531962
refs/heads/develop
2021-01-22T05:43:06.882135
2017-02-22T20:22:03
2017-02-22T20:22:03
81,694,911
0
0
null
2017-02-12T01:26:01
2017-02-12T01:26:01
null
UTF-8
Java
false
false
7,127
java
package com.faforever.client.replay; import com.faforever.client.config.ClientProperties; import com.faforever.client.game.Game; import com.faforever.client.game.GameService; import com.faforever.client.i18n.I18n; import com.faforever.client.notification.Action; import com.faforever.client.notification.NotificationService; import com.faforever.client.notification.PersistentNotification; import com.faforever.client.notification.Severity; import com.faforever.client.remote.domain.GameState; import com.faforever.client.update.ClientUpdateService; import com.faforever.client.user.UserService; import com.google.common.primitives.Bytes; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import javax.inject.Inject; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.lang.invoke.MethodHandles; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketException; import java.util.Collections; import java.util.HashMap; import java.util.concurrent.CompletableFuture; import static com.github.nocatch.NoCatch.noCatch; @Lazy @Component public class ReplayServerImpl implements ReplayServer { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private static final int REPLAY_BUFFER_SIZE = 0x200; /** * This is a prefix used in the FA live replay protocol that needs to be stripped away when storing to a file. */ private static final byte[] LIVE_REPLAY_PREFIX = new byte[]{'P', '/'}; private final ClientProperties clientProperties; private final NotificationService notificationService; private final I18n i18n; private final GameService gameService; private final UserService userService; private final ReplayFileWriter replayFileWriter; private final ClientUpdateService clientUpdateService; private LocalReplayInfo replayInfo; private ServerSocket serverSocket; private boolean stoppedGracefully; @Inject public ReplayServerImpl(ClientProperties clientProperties, NotificationService notificationService, I18n i18n, GameService gameService, UserService userService, ReplayFileWriter replayFileWriter, ClientUpdateService clientUpdateService) { this.clientProperties = clientProperties; this.notificationService = notificationService; this.i18n = i18n; this.gameService = gameService; this.userService = userService; this.replayFileWriter = replayFileWriter; this.clientUpdateService = clientUpdateService; } /** * Returns the current millis the same way as python does since this is what's stored in the replay files *yay*. */ private static double pythonTime() { return System.currentTimeMillis() / 1000; } @Override public void stop() { if (serverSocket == null) { throw new IllegalStateException("Server has never been started"); } stoppedGracefully = true; noCatch(() -> serverSocket.close()); } @Override public CompletableFuture<Void> start(int uid) { stoppedGracefully = false; CompletableFuture<Void> future = new CompletableFuture<>(); new Thread(() -> { Integer localReplayServerPort = clientProperties.getReplay().getLocalServerPort(); String remoteReplayServerHost = clientProperties.getReplay().getRemoteHost(); Integer remoteReplayServerPort = clientProperties.getReplay().getRemotePort(); logger.debug("Opening local replay server on port {}", localReplayServerPort); logger.debug("Connecting to replay server at '{}:{}'", remoteReplayServerHost, remoteReplayServerPort); try (ServerSocket localSocket = new ServerSocket(localReplayServerPort); Socket remoteReplayServerSocket = new Socket(remoteReplayServerHost, remoteReplayServerPort)) { this.serverSocket = localSocket; future.complete(null); recordAndRelay(uid, localSocket, new BufferedOutputStream(remoteReplayServerSocket.getOutputStream())); } catch (IOException e) { if (stoppedGracefully) { return; } future.completeExceptionally(e); logger.warn("Error in replay server", e); notificationService.addNotification(new PersistentNotification( i18n.get("replayServer.listeningFailed", localReplayServerPort), Severity.WARN, Collections.singletonList(new Action(i18n.get("replayServer.retry"), event -> start(uid))) ) ); } }).start(); return future; } private void initReplayInfo(int uid) { replayInfo = new LocalReplayInfo(); replayInfo.setUid(uid); replayInfo.setLaunchedAt(pythonTime()); replayInfo.setVersionInfo(new HashMap<>()); replayInfo.getVersionInfo().put("lobby", String.format("dfaf-%s", clientUpdateService.getCurrentVersion().getCanonical()) ); } private void recordAndRelay(int uid, ServerSocket serverSocket, OutputStream fafReplayOutputStream) throws IOException { Socket socket = serverSocket.accept(); logger.debug("Accepted connection from {}", socket.getRemoteSocketAddress()); initReplayInfo(uid); ByteArrayOutputStream replayData = new ByteArrayOutputStream(); boolean connectionToServerLost = false; byte[] buffer = new byte[REPLAY_BUFFER_SIZE]; try (InputStream inputStream = socket.getInputStream()) { int bytesRead; while ((bytesRead = inputStream.read(buffer)) != -1) { if (replayData.size() == 0 && Bytes.indexOf(buffer, LIVE_REPLAY_PREFIX) != -1) { int dataBeginIndex = Bytes.indexOf(buffer, (byte) 0x00) + 1; replayData.write(buffer, dataBeginIndex, bytesRead - dataBeginIndex); } else { replayData.write(buffer, 0, bytesRead); } if (!connectionToServerLost) { try { fafReplayOutputStream.write(buffer, 0, bytesRead); } catch (SocketException e) { // In case we lose connection to the replay server, just stop writing to it logger.warn("Connection to replay server lost ({})", e.getMessage()); connectionToServerLost = true; } } } } catch (Exception e) { logger.warn("Error while recording replay", e); throw e; } finally { try { fafReplayOutputStream.flush(); } catch (IOException e) { logger.warn("Could not flush FAF replay output stream", e); } } logger.debug("FAF has disconnected, writing replay data to file"); finishReplayInfo(); replayFileWriter.writeReplayDataToFile(replayData, replayInfo); } private void finishReplayInfo() { Game game = gameService.getByUid(replayInfo.getUid()); replayInfo.updateFromGameInfoBean(game); replayInfo.setGameEnd(pythonTime()); replayInfo.setRecorder(userService.getUsername()); replayInfo.setState(GameState.CLOSED); replayInfo.setComplete(true); } }
10bc6ec949891cce428d9b6155afa01189a6131a
4838e726c9364b2f011ec769e82d3651e53326fd
/albert-app/src/main/java/albert/practice/mapStruct/decorator/AddressDecorator.java
64c436ae3f974c4cc8fcbb6a9a68c29e255273f6
[]
no_license
junyuo/AlbertJavaProject
a7c4c14b287601ac6119a2471997359b35df29ad
fa713514e1283dc7a4d766c2be02af25119c4c69
refs/heads/master
2020-06-11T03:44:16.134175
2017-09-22T08:13:45
2017-09-22T08:13:45
76,011,880
0
0
null
null
null
null
UTF-8
Java
false
false
998
java
package albert.practice.mapStruct.decorator; import java.text.DecimalFormat; import albert.practice.mapStruct.Address; import albert.practice.mapStruct.DeliveryAddressDto; import albert.practice.mapStruct.Person; import albert.practice.mapStruct.ShoppingItems; import albert.practice.mapStruct.mapper.AddressMapper; public class AddressDecorator implements AddressMapper { private final AddressMapper delegate; private DecimalFormat decimalFormat = new DecimalFormat("NT$#,###,###,##0"); public AddressDecorator(AddressMapper delegate) { this.delegate = delegate; } @Override public DeliveryAddressDto covertPersonAndAddressToDeliveryAddressDto(Person person, Address address, ShoppingItems shoppingItems) { DeliveryAddressDto dto = delegate.covertPersonAndAddressToDeliveryAddressDto(person, address, shoppingItems); dto.setReceiver(person.getFirstName() + " " + person.getLastName()); dto.setTotalString(decimalFormat.format(shoppingItems.getTotal())); return dto; } }
e7efd140cf150fda9d2006c783d313259ede3df9
efb7e1551be707408ce7365d609c0503fcd5d0d2
/src/main/java/com/tadahtech/fadecloud/kd/csc/JedisManager.java
25c42826727e470df1e3bff32cfaf63a4f298000
[]
no_license
TadahTech/KingdomDefense
a153b37c39a9fa86224e643647d80ff56f2ca6e8
6b2e242ec92c5a8d90b00f896e4cb9ff202c5707
refs/heads/master
2021-05-30T12:10:15.815682
2015-10-19T21:30:21
2015-10-19T21:30:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,985
java
package com.tadahtech.fadecloud.kd.csc; import org.bukkit.configuration.file.FileConfiguration; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig; /** * @author Tim [calebbfmv] * Created by Tim [calebbfmv] on 11/12/2014. */ public class JedisManager { public static String CHANNEL = "NationsCSC"; private String host, password; private FileConfiguration config; private JedisPool pool; public JedisManager(FileConfiguration config) { this.config = config; connect(); } private void connect() { try { String host = config.getString("host"); String password = config.getString("password", ""); this.host = host; int redisPort = config.getInt("port", 6379); int database = config.getInt("database", 1); pool = new JedisPool(new JedisPoolConfig(), host, redisPort, Integer.MAX_VALUE, password == null || password.isEmpty() ? null : password, database); this.pool = new JedisPool(host); subscribe(); } catch (Exception e) { System.out.println("ERROR Connecting to Redis! Is it running? Exception: " + e.getMessage()); } } private void subscribe() { new Thread(() -> { Jedis subscriber = new Jedis(host); subscriber.subscribe(new MessageListener(), CHANNEL); }).start(); } public void sendInfo(Packet packet, String message, String server) { Jedis jedis = pool.getResource(); try { jedis.publish(CHANNEL, packet.getName() + "%" + message + "%" + server); } catch (Exception e) { System.out.println("Something went wrong! Reestablishing connection to the database"); connect(); } finally { pool.returnResource(jedis); } } public JedisPool getPool() { return pool; } }
f851a7089de52c7b0df41c30e61e12d7d3283497
b8411ebb061dd56427b5aa0bb99e2e01a0e69023
/pinju-model/src/main/java/com/yuwang/pinju/domain/trade/TenpaySinglepayRecvParamDO.java
2657ca938161badb1888dc9118878a83ac2241cd
[]
no_license
sgrass/double11_bugfix_asst_acct
afce8261bb275474f792e1cb41d9ff4fabad06b0
8eea9a16b43600c0c7574db5353c3d3b86cf4694
refs/heads/master
2021-01-19T04:48:03.445861
2017-04-06T06:34:17
2017-04-06T06:34:17
87,394,668
0
1
null
null
null
null
UTF-8
Java
false
false
3,248
java
package com.yuwang.pinju.domain.trade; /** * @Project: pinju-model * @Description: 财付通单笔支付接收参数DO * @author shihongbo */ public class TenpaySinglepayRecvParamDO { /** * 业务代码, 财付通支付支付接口填 1 */ private String cmdno; /** * 支付结果(0为支付成功,其它为失败) */ private String payResult; /** * 支付结果信息 */ private String payInfo; /** * 商户号 */ private String bargainorId; /** * 财付通交易单号 */ private String transactionId; /** * 商户系统内部的定单号 */ private String spBillno; /** * 支付总金额 */ private String totalFee; /** * 现金支付币种,目前只支持人民币,默认为1。 */ private String feeType; /** * 商户附加信息 */ private String attach; /** * 用户支付时间戳 */ private String payTime; /** * 现金支付金额 */ private String fee1; /** * 现金券支付金额 */ private String fee2; /** * 其它金额 */ private String fee3; /** * 折扣金额 */ private String vfee; /** * 返回内容 */ private String backInfo; public String getBackInfo() { return backInfo; } public void setBackInfo(String backInfo) { this.backInfo = backInfo; } public String getCmdno() { return cmdno; } public void setCmdno(String cmdno) { this.cmdno = cmdno; } public String getPayResult() { return payResult; } public void setPayResult(String payResult) { this.payResult = payResult; } public String getPayInfo() { return payInfo; } public void setPayInfo(String payInfo) { this.payInfo = payInfo; } public String getBargainorId() { return bargainorId; } public void setBargainorId(String bargainorId) { this.bargainorId = bargainorId; } public String getTransactionId() { return transactionId; } public void setTransactionId(String transactionId) { this.transactionId = transactionId; } public String getSpBillno() { return spBillno; } public void setSpBillno(String spBillno) { this.spBillno = spBillno; } public String getTotalFee() { return totalFee; } public void setTotalFee(String totalFee) { this.totalFee = totalFee; } public String getFeeType() { return feeType; } public void setFeeType(String feeType) { this.feeType = feeType; } public String getAttach() { return attach; } public void setAttach(String attach) { this.attach = attach; } public String getPayTime() { return payTime; } public void setPayTime(String payTime) { this.payTime = payTime; } public String getFee1() { return fee1; } public void setFee1(String fee1) { this.fee1 = fee1; } public String getFee2() { return fee2; } public void setFee2(String fee2) { this.fee2 = fee2; } public String getFee3() { return fee3; } public void setFee3(String fee3) { this.fee3 = fee3; } public String getVfee() { return vfee; } public void setVfee(String vfee) { this.vfee = vfee; } }
18c95af4081d769792e78c0112639d1381f1c088
48ec1bc3f16d6a91186fbb1b90877503dc5fe6a0
/src/main/java/com/csii/ljj/springbootcache02/config/MyCacheCOnfig.java
5c6a187b12e74f2aa8bd5f63e4323c7ffefcc67b
[ "MIT" ]
permissive
Lanjingjing123/springboot-cache-02
3219b4c5613aaa37b536c6f75a7c6c9b9ac4eb62
24582f347c731f3c56720b330eb5456db8e3ba74
refs/heads/master
2020-12-31T22:49:45.645026
2020-06-10T09:32:03
2020-06-10T09:32:03
239,061,939
0
0
null
2020-06-10T09:32:05
2020-02-08T03:15:53
Java
UTF-8
Java
false
false
649
java
package com.csii.ljj.springbootcache02.config; import org.springframework.cache.interceptor.KeyGenerator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import java.lang.reflect.Method; import java.util.Arrays; @Configuration public class MyCacheCOnfig { @Bean("myKeyGenerator") public KeyGenerator keyGenerator(){ return new KeyGenerator() { @Override public Object generate(Object o, Method method, Object... objects) { return method.getName()+"["+ Arrays.asList(objects).toString()+"]"; } }; } }
35b34c4567d571a9c7d84c7e8700c4f037588084
907c200614aad168cd67ab6b7bd37bf5a5d4133c
/src/main/java/net/zyuiop/bungeebridgemod/commands/CommandMute.java
b7db44f60d1df28387d80d5f48ed912672e41433
[]
no_license
BridgeAPIs/BungeeBridgeMod
f96b1c2343473dd27e4a4a1ef849a2613b37d4e5
d23c363abab59e7706302600f416a8e8a64ffc6f
refs/heads/master
2021-01-13T01:00:05.075633
2015-09-26T16:10:05
2015-09-26T16:10:05
43,209,219
0
1
null
null
null
null
UTF-8
Java
false
false
5,445
java
package net.zyuiop.bungeebridgemod.commands; import net.bridgesapis.bungeebridge.BungeeBridge; import net.bridgesapis.bungeebridge.core.database.Publisher; import net.zyuiop.bungeebridgemod.BungeeBridgeMod; import net.zyuiop.bungeebridgemod.moderation.JsonCaseLine; import net.zyuiop.bungeebridgemod.moderation.JsonModMessage; import net.zyuiop.bungeebridgemod.moderation.ModerationTools; import net.bridgesapis.bungeebridge.utils.Misc; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.chat.ComponentBuilder; import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.zyuiop.crosspermissions.api.permissions.PermissionUser; import org.apache.commons.lang3.StringUtils; import redis.clients.jedis.Jedis; import java.util.Arrays; import java.util.Date; import java.util.UUID; public class CommandMute extends ModCommand { public CommandMute(BungeeBridgeMod bridge) { super("mute", "modo.mute", bridge); } @Override public void execute(final CommandSender sender, final String[] args) { if (args.length < 1) { sender.sendMessage(new ComponentBuilder("Utilisation : /mute <joueur> <durée> <motif>").color(ChatColor.RED).create()); sender.sendMessage(new ComponentBuilder("Unmute : /mute <joueur>").color(ChatColor.GREEN).create()); return; } final String player = args[0]; bridge.getExecutor().addTask(() -> { UUID id = bridge.getUuidTranslator().getUUID(player, true); if (id == null) { sender.sendMessage(new ComponentBuilder("Le joueur recherché n'a pas été trouvé.").color(ChatColor.RED).create()); return; } if (! ModerationTools.canSanction(id)) { sender.sendMessage(new ComponentBuilder("Il est impossible de sanctionner ce joueur (E_PERM_HIGHER).").color(ChatColor.RED).create()); return; } Jedis jedis = bridge.getConnector().getResource(); String data = jedis.get("mute:" + id); if (data != null && args.length == 1) { jedis.del("mute:" + id); jedis.close(); bridge.getPublisher().publish(new Publisher.PendingMessage("mute.remove", "" + id)); sender.sendMessage(new ComponentBuilder("Le joueur a bien été unmute.").color(ChatColor.GREEN).create()); return; } jedis.close(); if (args.length < 2) { sender.sendMessage(new ComponentBuilder("Utilisation : /mute <joueur> <durée> <motif>").color(ChatColor.RED).create()); sender.sendMessage(new ComponentBuilder("Unmute : /mute <joueur>").color(ChatColor.GREEN).create()); return; } Date end = Misc.parseTime(args[1]); long time = (end.getTime() - new Date().getTime()) / 1000; PermissionUser user = (sender instanceof ProxiedPlayer) ? bridge.getPermissionsBridge().getApi().getUser(((ProxiedPlayer) sender).getUniqueId()) : null; if (time > 600 && !(user != null && user.hasPermission("mute.longtime"))) { sender.sendMessage(new ComponentBuilder("Votre groupe ne vous autorise pas a mute un joueur plus de 10 minutes.").color(ChatColor.RED).create()); return; } jedis = bridge.getConnector().getResource(); jedis.set("mute:" + id, end.getTime() + ""); jedis.expireAt("mute:" + id, end.getTime() / 1000); String motif = (args.length > 2) ? StringUtils.join(Arrays.copyOfRange(args, 2, args.length), " ") : "Vous êtes muet."; jedis.set("mute:" + id + ":reason", motif); jedis.expireAt("mute:" + id + ":reason", end.getTime() / 1000); jedis.close(); bridge.getPublisher().publish(new Publisher.PendingMessage("mute.add", id + " " + end.getTime() + " " + motif)); String f_time = Misc.formatTime(((end.getTime() - System.currentTimeMillis())/1000) + 1); TextComponent duration = new TextComponent(f_time); duration.setColor(ChatColor.AQUA); TextComponent message = new TextComponent("Le joueur est maintenant muet pour une durée de "); message.setColor(ChatColor.GREEN); message.addExtra(duration); sender.sendMessage(message); String fromPseudo = ((sender instanceof ProxiedPlayer) ? ((ProxiedPlayer) sender).getDisplayName() : "CONSOLE"); JsonCaseLine sanction = new JsonCaseLine(); sanction.setAddedBy(fromPseudo); sanction.setDuration(f_time); sanction.setMotif(motif); sanction.setType("Mute"); sanction.setDurationTime((end.getTime() - System.currentTimeMillis()) / 1000); if (time > 3600 * 24 * 45) sanction.setGrave(); ModerationTools.checkFile(id, player, sender); ModerationTools.addSanction(sanction, id); JsonModMessage.build(sender, "Joueur " + player + " muet pour le motif " + motif + ". Durée : " + sanction.getDuration()).send(); }); } }
d8f82e770f3cd3a4d2acfc24b77c52f9bfbee88e
2c841827cac6b905a32d89a12bef52eefecc3667
/StockApplication/app/src/main/java/com/example/stockapplication/constant/Strings.java
0e9008a6ce6d8bccb60526d5345bcbee5216ebdd
[]
no_license
GayatriKauthale/StockOne
e40dd3739e5637b937a25db7b7c8a80a45adddbd
9a40a08bf4a59a817c729f1a380aef3c75912fb5
refs/heads/main
2023-02-19T19:31:05.727141
2021-01-24T10:15:31
2021-01-24T10:15:31
332,417,092
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
package com.example.stockapplication.constant; public class Strings { public static class ApiContents { public static final String NAB = "nbe"; public static final String Region = "US"; public static final String apiKeys = "30a731bd94mshb535be26f436ae9p192cf0jsn483aac68998e"; public static final String host = "apidojo-yahoo-finance-v1.p.rapidapi.com"; } public class SignUpDataObserver { public static final String EMAIL_ID = "EmailId"; public static final String PASSWORD = "Password"; } }
303d434d859c4be3455b3276be9f9da4d32ce925
396949129274044f02a61dfa374925b0b736f9cb
/spring-boot-backend/src/main/java/com/miratech/test_task_todo_list_bogdanov_roman/repositories/TaskRepository.java
06ed6842ccfa10d60533417240ef61e97862d473
[]
no_license
RomanDnipro/miratech_test_task_todo_list_bogdanov_roman
227a38badca84b36d617082a814e18f3e47f71da
0d61aff44e8f7fe24942880330936fe63f7f062c
refs/heads/master
2021-05-08T10:49:05.292562
2018-04-20T13:49:11
2018-04-20T13:49:11
119,866,435
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.miratech.test_task_todo_list_bogdanov_roman.repositories; import com.miratech.test_task_todo_list_bogdanov_roman.models.Task; import org.springframework.data.mongodb.repository.MongoRepository; import org.springframework.stereotype.Repository; @Repository public interface TaskRepository extends MongoRepository<Task, Long> { }
a1b2587f18cc7025b35ba3455c1e0c56a77e89eb
c3dd9ab8c1f92ef038fbfc5d442710e97e3ca323
/src/assignment/MainProgram.java
55fb93b0bd491146aca62078cfa10e0bfdd274e6
[]
no_license
alvinlee90/EH2745-Assignment-1
0ce3ef1949aca9bc8bb9908b285dc499fd7db75a
9f67a24c032fb53b17584d77857bc9cc19a79cfc
refs/heads/master
2020-03-15T12:47:06.883592
2018-05-14T18:47:24
2018-05-14T18:47:24
131,149,279
0
0
null
null
null
null
UTF-8
Java
false
false
5,311
java
package assignment; import java.util.ArrayList; public class MainProgram { private static final String DATABASE = "cim"; // Array to store the data from the XML files (both EQ and SSH) private static ArrayList<CimData> cimData = new ArrayList<CimData>(); // Object to manage the SQL database private static Database database; // Function to parse EQ and SHH files; stores all the data into a CimData object // in preparation for the database public static void parseXMLFiles(String eqFile, String sshFile) { // Parse EQ and SSH file System.out.println("Parsing EQ file..."); cimData.add(new CimData(eqFile)); System.out.println("Parsing SSH file..."); cimData.add(new CimData(sshFile)); } // Function to initialize the database; creates all the tables required // and populates the tables with the data from the EQ and SHH file. Finally, // it populates the missing relations for the [base voltage id] public static void initializeDatabase() { // Create database database = new Database(DATABASE); // Create tables (1 for each class) for (String query : cimData.get(0).CreateTables()) { database.createTable(query); } // Insert elements into the respective table insertTables(); // Fill in values where base voltage ID is null database.updateBaseVoltageID(); } // Function to call all the SQL queries to populate the database with // information from the EQ and SSH files public static void insertTables() { // -------------- Base Voltage -------------- for (CimData object : cimData) { for (String query : object.insertBaseVoltage()) { database.insertTable(query); } } // -------------- Sub-station -------------- for (CimData object : cimData) { for (String query : object.insertSubstation()) { database.insertTable(query); } } // -------------- Voltage Level -------------- for (CimData object : cimData) { for (String query : object.insertVoltageLevel()) { database.insertTable(query); } } // -------------- Generating Unit -------------- for (CimData object : cimData) { for (String query : object.insertGeneratingUnit()) { database.insertTable(query); } } // -------------- Regulating Control -------------- for (CimData object : cimData) { for (String query : object.insertRegulatingControl()) { database.insertTable(query); } } // -------------- Power Transformer -------------- for (CimData object : cimData) { for (String query : object.insertPowerTransformer()) { database.insertTable(query); } } // -------------- Energy Consumer -------------- for (CimData object : cimData) { for (String query : object.insertEnergyConsumer()) { database.insertTable(query); } } // -------------- Power Transformer End -------------- for (CimData object : cimData) { for (String query : object.insertPowerTransformerEnd()) { database.insertTable(query); } } // -------------- Breaker -------------- for (CimData object : cimData) { for (String query : object.insertBreaker()) { database.insertTable(query); } } // -------------- Ratio Tap Changer -------------- for (CimData object : cimData) { for (String query : object.insertRatioTapChanger()) { database.insertTable(query); } } // -------------- Bus-bar Section -------------- for (CimData object : cimData) { for (String query : object.insertBusbar()) { database.insertTable(query); } } // -------------- Connectivity Node -------------- for (CimData object : cimData) { for (String query : object.insertConnectNode()) { database.insertTable(query); } } // -------------- Terminal -------------- for (CimData object : cimData) { for (String query : object.insertTerminal()) { database.insertTable(query); } } // -------------- Line -------------- for (CimData object : cimData) { for (String query : object.insertLine()) { database.insertTable(query); } } // -------------- Shunt -------------- for (CimData object : cimData) { for (String query : object.insertShunt()) { database.insertTable(query); } } // -------------- Synchronous Machine -------------- for (CimData object : cimData) { for (String query : object.insertSyncMachine()) { database.insertTable(query); } } } public static void main (String[] args) { // Check the number of arguments // args[0] = EQ file; args[1] = SSH file if (args.length != 2) { System.err.println("[Main] Error: invalid number of EQ and SSH filepaths"); return; } try { // Parse data parseXMLFiles(args[0], args[1]); // Initialize database (create database, create tables, insert elements) initializeDatabase(); NetworkTraversal networkTraversal = new NetworkTraversal(database); // networkTraversal.printBranches(); // database.printTables(); } catch (Exception e) { e.printStackTrace(); } finally { // Drop the database and close connection // database.dropDatabase(); } } }
c8b076cbaf31d54e785d3cb438c487f330e91e59
54cf1b955000c9a3c03f94bfcd1e6655a0852de1
/app/src/androidTest/java/com/dotu/simpletodo/ApplicationTest.java
ab20b1bf0aaee7f8edabf5df4f2135b3d5267662
[ "Apache-2.0" ]
permissive
bdotu/Todo-App
bd2f5f93203584236d6d1abb491b2f8c2f96075b
0a67d9460c4d301b587c96771bba1c7d8212beaa
refs/heads/master
2020-04-02T23:09:32.983304
2016-06-24T04:02:43
2016-06-24T04:02:43
61,853,988
0
0
null
null
null
null
UTF-8
Java
false
false
350
java
package com.dotu.simpletodo; 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); } }
8bfc08dd0e2d0eb133c31ad06918d0572f98abff
2dd93308521168bb52b0134233cf84c5e3a3ad52
/app/src/main/java/udacity/bakingapp/StepsView.java
ac9aeedf73c548ae4eb1b28cac92777b1591324a
[]
no_license
pex-1/udacity-project-4-baking-app
a0555ae3070e5750f7f290c8918169f50e5e1f07
c071ddf1e6ed7365d4575063883fb2000cb49c2b
refs/heads/master
2020-03-29T19:43:44.405580
2018-09-26T08:02:38
2018-09-26T08:02:38
150,278,190
0
0
null
null
null
null
UTF-8
Java
false
false
4,025
java
package udacity.bakingapp; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Configuration; import android.preference.PreferenceManager; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.widget.Toast; import com.google.gson.Gson; import java.util.ArrayList; import udacity.bakingapp.fragments.FragmentDetails; import udacity.bakingapp.fragments.FragmentSteps; import udacity.bakingapp.model.IngredientsList; import udacity.bakingapp.model.Recipe; import udacity.bakingapp.model.Steps; import udacity.bakingapp.widget.AppWidgetService; public class StepsView extends AppCompatActivity implements FragmentSteps.StepsPositionListener{ private FragmentDetails fragmentDetail; private boolean mTwoPane; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_steps_view); /* portrait = getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT ? true: false; */ ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); if(findViewById(R.id.two_pane_layout) != null){ mTwoPane = true; fragmentDetail = new FragmentDetails(); getSupportFragmentManager().beginTransaction() .add(R.id.detail_container, fragmentDetail) .commit(); }else { mTwoPane = false; } } @Override public void positionChange(int position) { //fragmentDetail.updatePosition(position); if(mTwoPane){ FragmentDetails fragment = new FragmentDetails(); fragment.updatePosition(position); getSupportFragmentManager().beginTransaction() .replace(R.id.detail_container, fragment) .commit(); }else { Recipe recipe = getIntent().getParcelableExtra("recipe"); Steps step = recipe.getSteps().get(position); Intent intent = new Intent(this, DetailView.class); intent.putExtra("step", step); startActivity(intent); } } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { if(item.getItemId() == R.id.add_widget){ ArrayList<String> ingredientsList = new ArrayList<>(); Recipe recipe = getIntent().getParcelableExtra("recipe"); for(int i = 0; i < recipe.getIngredients().size(); i++){ ingredientsList.add(recipe.getIngredients().get(i).getIngredient()); } IngredientsList recipeIngredients = new IngredientsList(recipe.getName(), ingredientsList); String json = new Gson().toJson(recipeIngredients); //Log.e("Json string: ", json); SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString("widgetData", json); editor.commit(); AppWidgetService.updateWidget(this); } else{ Intent intent = new Intent(getApplicationContext(), MainActivity.class); startActivity(intent); } /* SharedPreferences preference = PreferenceManager.getDefaultSharedPreferences(context); String val = preference.getString("widgetData", "null"); Gson gson = new Gson(); IngredientsList ingredientsList = gson.fromJson(entry.getValue().toString(), IngredientsList.class); */ return true; } }
d15832fd98c73a740a6a60a463eeb7e828b51443
8beff2947aff3acb27f40ea98956c414578641e0
/src/main/java/com/powerboot/system/service/impl/LoginLogServiceImpl.java
075c5c0ca0a60cec1f6e796bef774e52164de8bb
[]
no_license
tufeng1992/online-earning-boss
06f6ad41cee1d7f27674bc84af570740bf5e9099
4db5af387262cef9465978fbbfd2bdafaaac38a6
refs/heads/main
2023-07-13T12:58:48.584877
2021-08-27T15:10:32
2021-08-27T15:10:32
357,754,347
0
0
null
null
null
null
UTF-8
Java
false
false
1,252
java
package com.powerboot.system.service.impl; import com.google.common.collect.Maps; import com.powerboot.system.dao.LoginLogDao; import com.powerboot.system.domain.LoginLogDO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; import com.powerboot.system.service.LoginLogService; @Service public class LoginLogServiceImpl implements LoginLogService { @Autowired private LoginLogDao logDao; @Override public LoginLogDO get(Long id){ return logDao.get(id); } @Override public int countByUserId(Long userId) { Map<String, Object> params = Maps.newHashMap(); params.put("userId", userId); return logDao.count(params); } @Override public List<LoginLogDO> list(Map<String, Object> map){ return logDao.list(map); } @Override public int count(Map<String, Object> map){ return logDao.count(map); } @Override public int save(LoginLogDO log){ return logDao.save(log); } @Override public int update(LoginLogDO log){ return logDao.update(log); } @Override public int remove(Long id){ return logDao.remove(id); } @Override public int batchRemove(Long[] ids){ return logDao.batchRemove(ids); } }
95d967d78810dd1f8eee5f77c2cce6c398d31639
df4554dea3b778809901048aafb18e973bf446b6
/NumberLineList.java
60f36f4c291cdf2d7f3ff21aaebb2c2a70d8bdb4
[]
no_license
tharinDmahale/Custom-Data-Structures-2-Enum-Version-
46fb4fb1829d594cc970c7a7e3409858ac8ec357
3b6196995d8b15af52b4e56c738047dd2194afce
refs/heads/master
2023-07-19T03:34:14.657290
2021-09-25T04:46:21
2021-09-25T04:46:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
25,826
java
// Java NumberLineList Class import java.util.LinkedList; public class NumberLineList { private final DataType TYPE; private LinkedList <Integer> integerListP; private LinkedList <Integer> integerListN; private LinkedList <Double> doubleListP; private LinkedList <Double> doubleListN; private LinkedList <Character> characterListP; private LinkedList <Character> characterListN; private LinkedList <String> stringListP; private LinkedList <String> stringListN; public NumberLineList() { // Default Constructor this.TYPE = DataType.STRING; this.stringListP = new LinkedList<>(); this.stringListN = new LinkedList<>(); } public NumberLineList(DataType type) { // Parameterized Constructor this.TYPE = type; if (this.TYPE == DataType.INTEGER) { this.integerListP = new LinkedList<>(); this.integerListN = new LinkedList<>(); } else if (this.TYPE == DataType.DOUBLE) { this.doubleListP = new LinkedList<>(); this.doubleListN = new LinkedList<>(); } else if (this.TYPE == DataType.CHARACTER) { this.characterListP = new LinkedList<>(); this.characterListN = new LinkedList<>(); } else if (this.TYPE == DataType.STRING) { this.stringListP = new LinkedList<>(); this.stringListN = new LinkedList<>(); } else { System.out.println("Java NumberLineList Class Object - NumberLineList type '" + type + "' is invalid"); System.exit(1); } } final int toPositive(int num) { int positiveNum; if (num <= -1) { String signedStringNum = Integer.toString(num); int lastIndex = signedStringNum.length(); String unsignedStringNum = signedStringNum.substring(1, lastIndex); positiveNum = Integer.parseInt(unsignedStringNum); } else { positiveNum = num; } return positiveNum; } final int toNegative(int num) { int negativeNum; if (num >= 1) { String unsignedStringNum = Integer.toString(num); String signedStringNum = ("-" + unsignedStringNum); negativeNum = Integer.parseInt(signedStringNum); } else { negativeNum = num; } return negativeNum; } public void add(int value, char end) { if (this.TYPE == DataType.INTEGER) { if (end == '-') { this.integerListN.addLast(value); } else if (end == '+') { this.integerListP.addLast(value); } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'add()' has incompatible argument '" + end + "'"); System.exit(1); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'add()' has incompatible argument '" + value + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void add(double value, char end) { if (this.TYPE == DataType.DOUBLE) { if (end == '-') { this.doubleListN.addLast(value); } else if (end == '+') { this.doubleListP.addLast(value); } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'add()' has incompatible argument '" + end + "'"); System.exit(1); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'add()' has incompatible argument '" + value + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void add(char value, char end) { if (this.TYPE == DataType.CHARACTER) { if (end == '-') { this.characterListN.addLast(value); } else if (end == '+') { this.characterListP.addLast(value); } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'add()' has incompatible argument '" + end + "'"); System.exit(1); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'add()' has incompatible argument '" + value + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void add(String value, char end) { if (this.TYPE == DataType.STRING) { if (end == '-') { this.stringListN.addLast(value); } else if (end == '+') { this.stringListP.addLast(value); } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'add()' has incompatible argument '" + end + "'"); System.exit(1); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'add()' has incompatible argument '" + value + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void addAt(int index, int value) { if (this.TYPE == DataType.INTEGER) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.integerListN.add(actualIndex, value); } else { this.integerListP.add(index, value); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'addAt()' has incompatible argument '" + value + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void addAt(int index, double value) { if (this.TYPE == DataType.DOUBLE) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.doubleListN.add(actualIndex, value); } else { this.doubleListP.add(index, value); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'addAt()' has incompatible argument '" + value + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void addAt(int index, char value) { if (this.TYPE == DataType.CHARACTER) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.characterListN.add(actualIndex, value); } else { this.characterListP.add(index, value); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'addAt()' has incompatible argument '" + value + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void addAt(int index, String value) { if (this.TYPE == DataType.STRING) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.stringListN.add(actualIndex, value); } else { this.stringListP.add(index, value); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'addAt()' has incompatible argument '" + value + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void reset(int index, int newValue) { if (this.TYPE == DataType.INTEGER) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.integerListN.set(actualIndex, newValue); } else { this.integerListP.set(index, newValue); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'reset()' has incompatible argument '" + newValue + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void reset(int index, double newValue) { if (this.TYPE == DataType.DOUBLE) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.doubleListN.set(actualIndex, newValue); } else { this.doubleListP.set(index, newValue); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'reset()' has incompatible argument '" + newValue + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void reset(int index, char newValue) { if (this.TYPE == DataType.CHARACTER) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.characterListN.set(actualIndex, newValue); } else { this.characterListP.set(index, newValue); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'reset()' has incompatible argument '" + newValue + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void reset(int index, String newValue) { if (this.TYPE == DataType.STRING) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.stringListN.set(actualIndex, newValue); } else { this.stringListP.set(index, newValue); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'reset()' has incompatible argument '" + newValue + "'"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void delete(int index) { if (this.TYPE == DataType.INTEGER) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.integerListN.remove(actualIndex); } else { this.integerListP.remove(index); } } else if (this.TYPE == DataType.DOUBLE) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.doubleListN.remove(actualIndex); } else { this.doubleListP.remove(index); } } else if (this.TYPE == DataType.CHARACTER) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.characterListN.remove(actualIndex); } else { this.characterListP.remove(index); } } else if (this.TYPE == DataType.STRING) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); this.stringListN.remove(actualIndex); } else { this.stringListP.remove(index); } } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'delete()' has incompatible datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public void deleteAll() { if (this.TYPE == DataType.INTEGER) { this.integerListN.clear(); this.integerListP.clear(); } else if (this.TYPE == DataType.DOUBLE) { this.doubleListN.clear(); this.doubleListP.clear(); } else if (this.TYPE == DataType.CHARACTER) { this.characterListN.clear(); this.characterListP.clear(); } else if (this.TYPE == DataType.STRING) { this.stringListN.clear(); this.stringListP.clear(); } else { System.out.println("Java NumberLineList Class Object - NumberLineList method 'deleteAll()' has incompatible datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } } public int getInteger(int index) { int value; if (this.TYPE == DataType.INTEGER) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); value = this.integerListN.get(actualIndex); } else { value = this.integerListP.get(index); } } else { value = 0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'getInteger()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return value; } public double getDouble(int index) { double value; if (this.TYPE == DataType.DOUBLE) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); value = this.doubleListN.get(actualIndex); } else { value = this.doubleListP.get(index); } } else { value = 0.0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'getDouble()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return value; } public char getCharacter(int index) { char value; if (this.TYPE == DataType.CHARACTER) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); value = this.characterListN.get(actualIndex); } else { value = this.characterListP.get(index); } } else { value = ' '; System.out.println("Java NumberLineList Class Object - NumberLineList method 'getCharacter()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return value; } public String getString(int index) { String value; if (this.TYPE == DataType.STRING) { if (index <= -1) { int actualIndex = (toPositive(index) - 1); value = this.stringListN.get(actualIndex); } else { value = this.stringListP.get(index); } } else { value = ""; System.out.println("Java NumberLineList Class Object - NumberLineList method 'getString()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return value; } public int position(int value) { int logicalIndex; if (this.TYPE == DataType.INTEGER) { if (this.integerListN.contains(value)) { int actualIndex = this.integerListN.indexOf(value); logicalIndex = toNegative((actualIndex + 1)); } else if (this.integerListP.contains(value)) { logicalIndex = this.integerListP.indexOf(value); } else { logicalIndex = 0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'position()' has no value equivalent to '" + value + "'"); System.exit(1); } } else { logicalIndex = 0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'positive()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return logicalIndex; } public int position(double value) { int logicalIndex; if (this.TYPE == DataType.DOUBLE) { if (this.doubleListN.contains(value)) { int actualIndex = this.doubleListN.indexOf(value); logicalIndex = toNegative((actualIndex + 1)); } else if (this.doubleListP.contains(value)) { logicalIndex = this.doubleListP.indexOf(value); } else { logicalIndex = 0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'position()' has no value equivalent to '" + value + "'"); System.exit(1); } } else { logicalIndex = 0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'positive()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return logicalIndex; } public int position(char value) { int logicalIndex; if (this.TYPE == DataType.CHARACTER) { if (this.characterListN.contains(value)) { int actualIndex = this.characterListN.indexOf(value); logicalIndex = toNegative((actualIndex + 1)); } else if (this.characterListP.contains(value)) { logicalIndex = this.characterListP.indexOf(value); } else { logicalIndex = 0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'position()' has no value equivalent to '" + value + "'"); System.exit(1); } } else { logicalIndex = 0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'positive()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return logicalIndex; } public int position(String value) { int logicalIndex; if (this.TYPE == DataType.STRING) { if (this.stringListN.contains(value)) { int actualIndex = this.stringListN.indexOf(value); logicalIndex = toNegative((actualIndex + 1)); } else if (this.stringListP.contains(value)) { logicalIndex = this.stringListP.indexOf(value); } else { logicalIndex = 0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'position()' has no value equivalent to '" + value + "'"); System.exit(1); } } else { logicalIndex = 0; System.out.println("Java NumberLineList Class Object - NumberLineList method 'positive()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return logicalIndex; } public boolean presence(int value) { boolean presence; if (this.TYPE == DataType.INTEGER) { if (this.integerListN.contains(value)) { presence = true; } else if (this.integerListP.contains(value)) { presence = true; } else { presence = false; } } else { presence = false; System.out.println("Java NumberLineList Class Object - NumberLineList method 'presence()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return presence; } public boolean presence(double value) { boolean presence; if (this.TYPE == DataType.DOUBLE) { if (this.doubleListN.contains(value)) { presence = true; } else if (this.doubleListP.contains(value)) { presence = true; } else { presence = false; } } else { presence = false; System.out.println("Java NumberLineList Class Object - NumberLineList method 'presence()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return presence; } public boolean presence(char value) { boolean presence; if (this.TYPE == DataType.CHARACTER) { if (this.characterListN.contains(value)) { presence = true; } else if (this.characterListP.contains(value)) { presence = true; } else { presence = false; } } else { presence = false; System.out.println("Java NumberLineList Class Object - NumberLineList method 'presence()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return presence; } public boolean presence(String value) { boolean presence; if (this.TYPE == DataType.STRING) { if (this.stringListN.contains(value)) { presence = true; } else if (this.stringListP.contains(value)) { presence = true; } else { presence = false; } } else { presence = false; System.out.println("Java NumberLineList Class Object - NumberLineList method 'presence()' is incompatible with the list datatype"); System.out.println(" - NumberLineList type: " + this.TYPE); System.exit(1); } return presence; } public int getSize() { int size; if (this.TYPE == DataType.INTEGER) { size = (this.integerListN.size() + this.integerListP.size()); } else if (this.TYPE == DataType.DOUBLE) { size = (this.doubleListN.size() + this.doubleListP.size()); } else if (this.TYPE == DataType.CHARACTER) { size = (this.characterListN.size() + this.characterListP.size()); } else if (this.TYPE == DataType.STRING) { size = (this.stringListN.size() + this.stringListP.size()); } else { size = 0; } return size; } }
e7a0d090f879630d120c4a1d035bb3ed011b961d
deceaba323fe7d5edc92044744ce8194ca54dd25
/ZhiZunAPos/src/com/zhizun/pos/activity/ChannelActivity.java
c92d45d4de2bed6007c0e47d99afe73eb59bf677
[]
no_license
zhizun/ZhiZunAPos
5bd67787123195bb4e22b58931a3f7cf2f1d9b45
79a79b63378161cd5cd97193550bce1d44e2bd37
refs/heads/master
2020-05-03T20:23:16.970146
2015-09-25T08:08:23
2015-09-25T08:08:23
42,719,251
1
0
null
null
null
null
UTF-8
Java
false
false
9,747
java
package com.zhizun.pos.activity; import java.util.ArrayList; import com.ch.epw.view.DragGrid; import com.ch.epw.view.OtherGridView; import com.zhizun.pos.R; import com.zhizun.pos.adapter.DragAdapter; import com.zhizun.pos.adapter.OtherAdapter; import com.zhizun.pos.app.AppContext; import com.zhizun.pos.base.BaseActivity; import com.zhizun.pos.bean.ChannelItem; import com.zhizun.pos.bean.ChannelManage; import android.os.Bundle; import android.os.Handler; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.util.Log; import android.view.Menu; import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.view.animation.Animation; import android.view.animation.Animation.AnimationListener; import android.view.animation.AnimationSet; import android.view.animation.TranslateAnimation; import android.widget.AdapterView; import android.widget.GridView; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.AdapterView.OnItemClickListener; import android.widget.TextView; /** * 频道管理 */ public class ChannelActivity extends BaseActivity implements OnItemClickListener { public static String TAG = "ChannelActivity"; /** 用户栏目的GRIDVIEW */ private DragGrid userGridView; /** 其它栏目的GRIDVIEW */ private OtherGridView otherGridView; /** 用户栏目对应的适配器,可以拖动 */ DragAdapter userAdapter; /** 其它栏目对应的适配器 */ OtherAdapter otherAdapter; /** 其它栏目列表 */ ArrayList<ChannelItem> otherChannelList = new ArrayList<ChannelItem>(); /** 用户栏目列表 */ ArrayList<ChannelItem> userChannelList = new ArrayList<ChannelItem>(); /** 是否在移动,由于这边是动画结束后才进行的数据更替,设置这个限制为了避免操作太频繁造成的数据错乱。 */ boolean isMove = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.channel); initView(); initData(); } /** 初始化数据*/ private void initData() { userChannelList = ((ArrayList<ChannelItem>)ChannelManage.getManage(AppContext.getApp().getSQLHelper()).getUserChannel()); otherChannelList = ((ArrayList<ChannelItem>)ChannelManage.getManage(AppContext.getApp().getSQLHelper()).getOtherChannel()); userAdapter = new DragAdapter(this, userChannelList); userGridView.setAdapter(userAdapter); otherAdapter = new OtherAdapter(this, otherChannelList); otherGridView.setAdapter(otherAdapter); //设置GRIDVIEW的ITEM的点击监听 otherGridView.setOnItemClickListener(this); userGridView.setOnItemClickListener(this); } /** 初始化布局*/ private void initView() { userGridView = (DragGrid) findViewById(R.id.userGridView); otherGridView = (OtherGridView) findViewById(R.id.otherGridView); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } /** GRIDVIEW对应的ITEM点击监听接口 */ @Override public void onItemClick(AdapterView<?> parent, final View view, final int position,long id) { //如果点击的时候,之前动画还没结束,那么就让点击事件无效 if(isMove){ return; } switch (parent.getId()) { case R.id.userGridView: //position为 0,1 的不可以进行任何操作 if (position != 0 && position != 1) { final ImageView moveImageView = getView(view); if (moveImageView != null) { TextView newTextView = (TextView) view.findViewById(R.id.text_item); final int[] startLocation = new int[2]; newTextView.getLocationInWindow(startLocation); final ChannelItem channel = ((DragAdapter) parent.getAdapter()).getItem(position);//获取点击的频道内容 otherAdapter.setVisible(false); //添加到最后一个 otherAdapter.addItem(channel); new Handler().postDelayed(new Runnable() { public void run() { try { int[] endLocation = new int[2]; //获取终点的坐标 otherGridView.getChildAt(otherGridView.getLastVisiblePosition()).getLocationInWindow(endLocation); MoveAnim(moveImageView, startLocation , endLocation, channel,userGridView); userAdapter.setRemove(position); } catch (Exception localException) { } } }, 50L); } } break; case R.id.otherGridView: final ImageView moveImageView = getView(view); if (moveImageView != null){ TextView newTextView = (TextView) view.findViewById(R.id.text_item); final int[] startLocation = new int[2]; newTextView.getLocationInWindow(startLocation); final ChannelItem channel = ((OtherAdapter) parent.getAdapter()).getItem(position); userAdapter.setVisible(false); //添加到最后一个 userAdapter.addItem(channel); new Handler().postDelayed(new Runnable() { public void run() { try { int[] endLocation = new int[2]; //获取终点的坐标 userGridView.getChildAt(userGridView.getLastVisiblePosition()).getLocationInWindow(endLocation); MoveAnim(moveImageView, startLocation , endLocation, channel,otherGridView); otherAdapter.setRemove(position); } catch (Exception localException) { } } }, 50L); } break; default: break; } } /** * 点击ITEM移动动画 * @param moveView * @param startLocation * @param endLocation * @param moveChannel * @param clickGridView */ private void MoveAnim(View moveView, int[] startLocation,int[] endLocation, final ChannelItem moveChannel, final GridView clickGridView) { int[] initLocation = new int[2]; //获取传递过来的VIEW的坐标 moveView.getLocationInWindow(initLocation); //得到要移动的VIEW,并放入对应的容器中 final ViewGroup moveViewGroup = getMoveViewGroup(); final View mMoveView = getMoveView(moveViewGroup, moveView, initLocation); //创建移动动画 TranslateAnimation moveAnimation = new TranslateAnimation( startLocation[0], endLocation[0], startLocation[1], endLocation[1]); moveAnimation.setDuration(300L);//动画时间 //动画配置 AnimationSet moveAnimationSet = new AnimationSet(true); moveAnimationSet.setFillAfter(false);//动画效果执行完毕后,View对象不保留在终止的位置 moveAnimationSet.addAnimation(moveAnimation); mMoveView.startAnimation(moveAnimationSet); moveAnimationSet.setAnimationListener(new AnimationListener() { @Override public void onAnimationStart(Animation animation) { isMove = true; } @Override public void onAnimationRepeat(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { moveViewGroup.removeView(mMoveView); // instanceof 方法判断2边实例是不是一样,判断点击的是DragGrid还是OtherGridView if (clickGridView instanceof DragGrid) { otherAdapter.setVisible(true); otherAdapter.notifyDataSetChanged(); userAdapter.remove(); }else{ userAdapter.setVisible(true); userAdapter.notifyDataSetChanged(); otherAdapter.remove(); } isMove = false; } }); } /** * 获取移动的VIEW,放入对应ViewGroup布局容器 * @param viewGroup * @param view * @param initLocation * @return */ private View getMoveView(ViewGroup viewGroup, View view, int[] initLocation) { int x = initLocation[0]; int y = initLocation[1]; viewGroup.addView(view); LinearLayout.LayoutParams mLayoutParams = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); mLayoutParams.leftMargin = x; mLayoutParams.topMargin = y; view.setLayoutParams(mLayoutParams); return view; } /** * 创建移动的ITEM对应的ViewGroup布局容器 */ private ViewGroup getMoveViewGroup() { ViewGroup moveViewGroup = (ViewGroup) getWindow().getDecorView(); LinearLayout moveLinearLayout = new LinearLayout(this); moveLinearLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); moveViewGroup.addView(moveLinearLayout); return moveLinearLayout; } /** * 获取点击的Item的对应View, * @param view * @return */ private ImageView getView(View view) { view.destroyDrawingCache(); view.setDrawingCacheEnabled(true); Bitmap cache = Bitmap.createBitmap(view.getDrawingCache()); view.setDrawingCacheEnabled(false); ImageView iv = new ImageView(this); iv.setImageBitmap(cache); return iv; } /** 退出时候保存选择后数据库的设置 */ private void saveChannel() { ChannelManage.getManage(AppContext.getApp().getSQLHelper()).deleteAllChannel(); ChannelManage.getManage(AppContext.getApp().getSQLHelper()).saveUserChannel(userAdapter.getChannnelLst()); ChannelManage.getManage(AppContext.getApp().getSQLHelper()).saveOtherChannel(otherAdapter.getChannnelLst()); } @Override public void onBackPressed() { saveChannel(); if(userAdapter.isListChanged()){ Intent intent = new Intent(getApplicationContext(), MainActivity.class); setResult(MainActivity.CHANNELRESULT, intent); finish(); Log.d(TAG, "数据发生改变"); }else{ super.onBackPressed(); } overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right); } }
ac894a7e3ba2c957137be911891ae9f4bf3c77c8
4814f87a760d6ca0377c4da1f41a4ddfbd48ee31
/app/src/main/java/club/zhisimina/templateapp/customerview/flowLayout/TagView.java
cdde7e0b0cf213fa8d80439ece10bed04876fd40
[]
no_license
fupengpeng/TemplateApp
f43cd0d5b5d58db0f309f7dc122aa2f92f2bb47e
311db556aed1039a6e8255e14aa8d0e29c9719dc
refs/heads/master
2020-03-08T08:26:14.532581
2018-04-19T07:09:14
2018-04-19T07:09:14
128,021,905
0
0
null
null
null
null
UTF-8
Java
false
false
1,477
java
package club.zhisimina.templateapp.customerview.flowLayout; import android.content.Context; import android.view.View; import android.widget.Checkable; import android.widget.FrameLayout; /** * Created by zhy on 15/9/10. */ public class TagView extends FrameLayout implements Checkable { private boolean isChecked; private static final int[] CHECK_STATE = new int[]{android.R.attr.state_checked}; public TagView(Context context) { super(context); } public View getTagView() { return getChildAt(0); } @Override public int[] onCreateDrawableState(int extraSpace) { int[] states = super.onCreateDrawableState(extraSpace + 1); if (isChecked()) { mergeDrawableStates(states, CHECK_STATE); } return states; } /** * Change the checked state of the view * * @param checked The new checked state */ @Override public void setChecked(boolean checked) { if (this.isChecked != checked) { this.isChecked = checked; refreshDrawableState(); } } /** * @return The current checked state of the view */ @Override public boolean isChecked() { return isChecked; } /** * Change the checked state of the view to the inverse of its current state */ @Override public void toggle() { setChecked(!isChecked); } }
ab1eae0ab6bdd67e00f0b2f73bb9e75bd9cae5c5
21b736028889a32f1dcba96e8236f80cc9973df5
/src/org/datacontract/schemas/_2004/_07/system_collections_generic/ArrayOfKeyValuePairOfstringanyTypeDocument.java
36b08f797f764e91798f7e001bfc1369736a6a8a
[]
no_license
nbuddharaju/Java2CRMCRUD
3cfcf487ce9fe9c8791484387f32da2e83ccef15
aaba26757df088dda780aa6fe873c7d8356f4d56
refs/heads/master
2021-01-19T04:07:07.528318
2016-05-28T08:52:28
2016-05-28T08:52:28
59,885,531
0
2
null
null
null
null
UTF-8
Java
false
false
11,540
java
/* * An XML document type. * Localname: ArrayOfKeyValuePairOfstringanyType * Namespace: http://schemas.datacontract.org/2004/07/System.Collections.Generic * Java type: org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument * * Automatically generated - do not modify. */ package org.datacontract.schemas._2004._07.system_collections_generic; /** * A document containing one ArrayOfKeyValuePairOfstringanyType(@http://schemas.datacontract.org/2004/07/System.Collections.Generic) element. * * This is a complex type. */ public interface ArrayOfKeyValuePairOfstringanyTypeDocument extends org.apache.xmlbeans.XmlObject { public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType) org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ArrayOfKeyValuePairOfstringanyTypeDocument.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s89F572913020FF22DE00DBDBAAFD31DF").resolveHandle("arrayofkeyvaluepairofstringanytyped94edoctype"); /** * Gets the "ArrayOfKeyValuePairOfstringanyType" element */ org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyType getArrayOfKeyValuePairOfstringanyType(); /** * Tests for nil "ArrayOfKeyValuePairOfstringanyType" element */ boolean isNilArrayOfKeyValuePairOfstringanyType(); /** * Sets the "ArrayOfKeyValuePairOfstringanyType" element */ void setArrayOfKeyValuePairOfstringanyType(org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyType arrayOfKeyValuePairOfstringanyType); /** * Appends and returns a new empty "ArrayOfKeyValuePairOfstringanyType" element */ org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyType addNewArrayOfKeyValuePairOfstringanyType(); /** * Nils the "ArrayOfKeyValuePairOfstringanyType" element */ void setNilArrayOfKeyValuePairOfstringanyType(); /** * A factory class with static methods for creating instances * of this type. */ public static final class Factory { public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument newInstance() { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument newInstance(org.apache.xmlbeans.XmlOptions options) { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); } /** @param xmlAsString the string value to parse */ public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); } /** @param file the file from which to load an xml document */ public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); } public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return (org.datacontract.schemas._2004._07.system_collections_generic.ArrayOfKeyValuePairOfstringanyTypeDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); } private Factory() { } // No instance of this class allowed } }
1746ad6fb26313959dde35e172b1bd15fbd996d1
2e15cff17d8bcff3f2b3004fb137947923c32caf
/platforms/android/build/generated/source/r/debug/android/support/v7/appcompat/R.java
e46adc0edbe93f4e860b612fe2c536d6c1a0c49f
[]
no_license
edwardpress/ionic3withpspdfkit
13665496cd1e022ee070432187dae6646d7b3ac8
461221ed6bf9265d3e49f9dd851352b045d6261d
refs/heads/master
2020-04-07T23:36:51.422478
2018-11-27T03:19:48
2018-11-27T03:19:48
158,819,179
0
0
null
null
null
null
UTF-8
Java
false
false
106,164
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.v7.appcompat; public final class R { public static final class anim { public static final int abc_fade_in = 0x7f050000; public static final int abc_fade_out = 0x7f050001; public static final int abc_grow_fade_in_from_bottom = 0x7f050002; public static final int abc_popup_enter = 0x7f050003; public static final int abc_popup_exit = 0x7f050004; public static final int abc_shrink_fade_out_from_bottom = 0x7f050005; public static final int abc_slide_in_bottom = 0x7f050006; public static final int abc_slide_in_top = 0x7f050007; public static final int abc_slide_out_bottom = 0x7f050008; public static final int abc_slide_out_top = 0x7f050009; public static final int tooltip_enter = 0x7f050011; public static final int tooltip_exit = 0x7f050012; } public static final class attr { public static final int actionBarDivider = 0x7f0100a7; public static final int actionBarItemBackground = 0x7f0100a8; public static final int actionBarPopupTheme = 0x7f0100a1; public static final int actionBarSize = 0x7f0100a6; public static final int actionBarSplitStyle = 0x7f0100a3; public static final int actionBarStyle = 0x7f0100a2; public static final int actionBarTabBarStyle = 0x7f01009d; public static final int actionBarTabStyle = 0x7f01009c; public static final int actionBarTabTextStyle = 0x7f01009e; public static final int actionBarTheme = 0x7f0100a4; public static final int actionBarWidgetTheme = 0x7f0100a5; public static final int actionButtonStyle = 0x7f0100c2; public static final int actionDropDownStyle = 0x7f0100be; public static final int actionLayout = 0x7f010153; public static final int actionMenuTextAppearance = 0x7f0100a9; public static final int actionMenuTextColor = 0x7f0100aa; public static final int actionModeBackground = 0x7f0100ad; public static final int actionModeCloseButtonStyle = 0x7f0100ac; public static final int actionModeCloseDrawable = 0x7f0100af; public static final int actionModeCopyDrawable = 0x7f0100b1; public static final int actionModeCutDrawable = 0x7f0100b0; public static final int actionModeFindDrawable = 0x7f0100b5; public static final int actionModePasteDrawable = 0x7f0100b2; public static final int actionModePopupWindowStyle = 0x7f0100b7; public static final int actionModeSelectAllDrawable = 0x7f0100b3; public static final int actionModeShareDrawable = 0x7f0100b4; public static final int actionModeSplitBackground = 0x7f0100ae; public static final int actionModeStyle = 0x7f0100ab; public static final int actionModeWebSearchDrawable = 0x7f0100b6; public static final int actionOverflowButtonStyle = 0x7f01009f; public static final int actionOverflowMenuStyle = 0x7f0100a0; public static final int actionProviderClass = 0x7f010155; public static final int actionViewClass = 0x7f010154; public static final int activityChooserViewStyle = 0x7f0100ca; public static final int alertDialogButtonGroupStyle = 0x7f0100ef; public static final int alertDialogCenterButtons = 0x7f0100f0; public static final int alertDialogStyle = 0x7f0100ee; public static final int alertDialogTheme = 0x7f0100f1; public static final int allowStacking = 0x7f01010a; public static final int alpha = 0x7f010127; public static final int alphabeticModifiers = 0x7f010150; public static final int arrowHeadLength = 0x7f010139; public static final int arrowShaftLength = 0x7f01013a; public static final int autoCompleteTextViewStyle = 0x7f0100f6; public static final int autoSizeMaxTextSize = 0x7f010090; public static final int autoSizeMinTextSize = 0x7f01008f; public static final int autoSizePresetSizes = 0x7f01008e; public static final int autoSizeStepGranularity = 0x7f01008d; public static final int autoSizeTextType = 0x7f01008c; public static final int background = 0x7f010065; public static final int backgroundSplit = 0x7f010067; public static final int backgroundStacked = 0x7f010066; public static final int backgroundTint = 0x7f0101bc; public static final int backgroundTintMode = 0x7f0101bd; public static final int barLength = 0x7f01013b; public static final int borderlessButtonStyle = 0x7f0100c7; public static final int buttonBarButtonStyle = 0x7f0100c4; public static final int buttonBarNegativeButtonStyle = 0x7f0100f4; public static final int buttonBarNeutralButtonStyle = 0x7f0100f5; public static final int buttonBarPositiveButtonStyle = 0x7f0100f3; public static final int buttonBarStyle = 0x7f0100c3; public static final int buttonGravity = 0x7f0101b1; public static final int buttonPanelSideLayout = 0x7f01007a; public static final int buttonStyle = 0x7f0100f7; public static final int buttonStyleSmall = 0x7f0100f8; public static final int buttonTint = 0x7f010128; public static final int buttonTintMode = 0x7f010129; public static final int checkboxStyle = 0x7f0100f9; public static final int checkedTextViewStyle = 0x7f0100fa; public static final int closeIcon = 0x7f010175; public static final int closeItemLayout = 0x7f010077; public static final int collapseContentDescription = 0x7f0101b3; public static final int collapseIcon = 0x7f0101b2; public static final int color = 0x7f010135; public static final int colorAccent = 0x7f0100e6; public static final int colorBackgroundFloating = 0x7f0100ed; public static final int colorButtonNormal = 0x7f0100ea; public static final int colorControlActivated = 0x7f0100e8; public static final int colorControlHighlight = 0x7f0100e9; public static final int colorControlNormal = 0x7f0100e7; public static final int colorError = 0x7f010106; public static final int colorPrimary = 0x7f0100e4; public static final int colorPrimaryDark = 0x7f0100e5; public static final int colorSwitchThumbNormal = 0x7f0100eb; public static final int commitIcon = 0x7f01017a; public static final int contentDescription = 0x7f010156; public static final int contentInsetEnd = 0x7f010070; public static final int contentInsetEndWithActions = 0x7f010074; public static final int contentInsetLeft = 0x7f010071; public static final int contentInsetRight = 0x7f010072; public static final int contentInsetStart = 0x7f01006f; public static final int contentInsetStartWithNavigation = 0x7f010073; public static final int controlBackground = 0x7f0100ec; public static final int customNavigationLayout = 0x7f010068; public static final int defaultQueryHint = 0x7f010174; public static final int dialogPreferredPadding = 0x7f0100bc; public static final int dialogTheme = 0x7f0100bb; public static final int displayOptions = 0x7f01005e; public static final int divider = 0x7f010064; public static final int dividerHorizontal = 0x7f0100c9; public static final int dividerPadding = 0x7f01014f; public static final int dividerVertical = 0x7f0100c8; public static final int drawableSize = 0x7f010137; public static final int drawerArrowStyle = 0x7f010000; public static final int dropDownListViewStyle = 0x7f0100db; public static final int dropdownListPreferredItemHeight = 0x7f0100bf; public static final int editTextBackground = 0x7f0100d0; public static final int editTextColor = 0x7f0100cf; public static final int editTextStyle = 0x7f0100fb; public static final int elevation = 0x7f010075; public static final int expandActivityOverflowButtonDrawable = 0x7f010079; public static final int font = 0x7f01014a; public static final int fontFamily = 0x7f010091; public static final int fontProviderAuthority = 0x7f010143; public static final int fontProviderCerts = 0x7f010146; public static final int fontProviderFetchStrategy = 0x7f010147; public static final int fontProviderFetchTimeout = 0x7f010148; public static final int fontProviderPackage = 0x7f010144; public static final int fontProviderQuery = 0x7f010145; public static final int fontStyle = 0x7f010149; public static final int fontWeight = 0x7f01014b; public static final int gapBetweenBars = 0x7f010138; public static final int goIcon = 0x7f010176; public static final int height = 0x7f010001; public static final int hideOnContentScroll = 0x7f01006e; public static final int homeAsUpIndicator = 0x7f0100c1; public static final int homeLayout = 0x7f010069; public static final int icon = 0x7f010062; public static final int iconTint = 0x7f010158; public static final int iconTintMode = 0x7f010159; public static final int iconifiedByDefault = 0x7f010172; public static final int imageButtonStyle = 0x7f0100d1; public static final int indeterminateProgressStyle = 0x7f01006b; public static final int initialActivityCount = 0x7f010078; public static final int isLightTheme = 0x7f010002; public static final int itemPadding = 0x7f01006d; public static final int layout = 0x7f010171; public static final int listChoiceBackgroundIndicator = 0x7f0100e3; public static final int listDividerAlertDialog = 0x7f0100bd; public static final int listItemLayout = 0x7f01007e; public static final int listLayout = 0x7f01007b; public static final int listMenuViewStyle = 0x7f010103; public static final int listPopupWindowStyle = 0x7f0100dc; public static final int listPreferredItemHeight = 0x7f0100d6; public static final int listPreferredItemHeightLarge = 0x7f0100d8; public static final int listPreferredItemHeightSmall = 0x7f0100d7; public static final int listPreferredItemPaddingLeft = 0x7f0100d9; public static final int listPreferredItemPaddingRight = 0x7f0100da; public static final int logo = 0x7f010063; public static final int logoDescription = 0x7f0101b6; public static final int maxButtonHeight = 0x7f0101b0; public static final int measureWithLargestChild = 0x7f01014d; public static final int multiChoiceItemLayout = 0x7f01007c; public static final int navigationContentDescription = 0x7f0101b5; public static final int navigationIcon = 0x7f0101b4; public static final int navigationMode = 0x7f01005d; public static final int numericModifiers = 0x7f010151; public static final int overlapAnchor = 0x7f010162; public static final int paddingBottomNoButtons = 0x7f010164; public static final int paddingEnd = 0x7f0101ba; public static final int paddingStart = 0x7f0101b9; public static final int paddingTopNoTitle = 0x7f010165; public static final int panelBackground = 0x7f0100e0; public static final int panelMenuListTheme = 0x7f0100e2; public static final int panelMenuListWidth = 0x7f0100e1; public static final int popupMenuStyle = 0x7f0100cd; public static final int popupTheme = 0x7f010076; public static final int popupWindowStyle = 0x7f0100ce; public static final int preserveIconSpacing = 0x7f01015a; public static final int progressBarPadding = 0x7f01006c; public static final int progressBarStyle = 0x7f01006a; public static final int queryBackground = 0x7f01017c; public static final int queryHint = 0x7f010173; public static final int radioButtonStyle = 0x7f0100fc; public static final int ratingBarStyle = 0x7f0100fd; public static final int ratingBarStyleIndicator = 0x7f0100fe; public static final int ratingBarStyleSmall = 0x7f0100ff; public static final int searchHintIcon = 0x7f010178; public static final int searchIcon = 0x7f010177; public static final int searchViewStyle = 0x7f0100d5; public static final int seekBarStyle = 0x7f010100; public static final int selectableItemBackground = 0x7f0100c5; public static final int selectableItemBackgroundBorderless = 0x7f0100c6; public static final int showAsAction = 0x7f010152; public static final int showDividers = 0x7f01014e; public static final int showText = 0x7f010189; public static final int showTitle = 0x7f01007f; public static final int singleChoiceItemLayout = 0x7f01007d; public static final int spinBars = 0x7f010136; public static final int spinnerDropDownItemStyle = 0x7f0100c0; public static final int spinnerStyle = 0x7f010101; public static final int splitTrack = 0x7f010188; public static final int srcCompat = 0x7f010085; public static final int state_above_anchor = 0x7f010163; public static final int subMenuArrow = 0x7f01015b; public static final int submitBackground = 0x7f01017d; public static final int subtitle = 0x7f01005f; public static final int subtitleTextAppearance = 0x7f0101a9; public static final int subtitleTextColor = 0x7f0101b8; public static final int subtitleTextStyle = 0x7f010061; public static final int suggestionRowLayout = 0x7f01017b; public static final int switchMinWidth = 0x7f010186; public static final int switchPadding = 0x7f010187; public static final int switchStyle = 0x7f010102; public static final int switchTextAppearance = 0x7f010185; public static final int textAllCaps = 0x7f01008b; public static final int textAppearanceLargePopupMenu = 0x7f0100b8; public static final int textAppearanceListItem = 0x7f0100dd; public static final int textAppearanceListItemSecondary = 0x7f0100de; public static final int textAppearanceListItemSmall = 0x7f0100df; public static final int textAppearancePopupMenuHeader = 0x7f0100ba; public static final int textAppearanceSearchResultSubtitle = 0x7f0100d3; public static final int textAppearanceSearchResultTitle = 0x7f0100d2; public static final int textAppearanceSmallPopupMenu = 0x7f0100b9; public static final int textColorAlertDialogListItem = 0x7f0100f2; public static final int textColorSearchUrl = 0x7f0100d4; public static final int theme = 0x7f0101bb; public static final int thickness = 0x7f01013c; public static final int thumbTextPadding = 0x7f010184; public static final int thumbTint = 0x7f01017f; public static final int thumbTintMode = 0x7f010180; public static final int tickMark = 0x7f010088; public static final int tickMarkTint = 0x7f010089; public static final int tickMarkTintMode = 0x7f01008a; public static final int tint = 0x7f010086; public static final int tintMode = 0x7f010087; public static final int title = 0x7f01005c; public static final int titleMargin = 0x7f0101aa; public static final int titleMarginBottom = 0x7f0101ae; public static final int titleMarginEnd = 0x7f0101ac; public static final int titleMarginStart = 0x7f0101ab; public static final int titleMarginTop = 0x7f0101ad; public static final int titleMargins = 0x7f0101af; public static final int titleTextAppearance = 0x7f0101a8; public static final int titleTextColor = 0x7f0101b7; public static final int titleTextStyle = 0x7f010060; public static final int toolbarNavigationButtonStyle = 0x7f0100cc; public static final int toolbarStyle = 0x7f0100cb; public static final int tooltipForegroundColor = 0x7f010105; public static final int tooltipFrameBackground = 0x7f010104; public static final int tooltipText = 0x7f010157; public static final int track = 0x7f010181; public static final int trackTint = 0x7f010182; public static final int trackTintMode = 0x7f010183; public static final int voiceIcon = 0x7f010179; public static final int windowActionBar = 0x7f010092; public static final int windowActionBarOverlay = 0x7f010094; public static final int windowActionModeOverlay = 0x7f010095; public static final int windowFixedHeightMajor = 0x7f010099; public static final int windowFixedHeightMinor = 0x7f010097; public static final int windowFixedWidthMajor = 0x7f010096; public static final int windowFixedWidthMinor = 0x7f010098; public static final int windowMinWidthMajor = 0x7f01009a; public static final int windowMinWidthMinor = 0x7f01009b; public static final int windowNoTitle = 0x7f010093; } public static final class bool { public static final int abc_action_bar_embed_tabs = 0x7f0d0000; public static final int abc_allow_stacked_button_bar = 0x7f0d0001; public static final int abc_config_actionMenuItemAllCaps = 0x7f0d0003; public static final int abc_config_closeDialogWhenTouchOutside = 0x7f0d0004; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f0d0005; } public static final class color { public static final int abc_background_cache_hint_selector_material_dark = 0x7f0f00b7; public static final int abc_background_cache_hint_selector_material_light = 0x7f0f00b8; public static final int abc_btn_colored_borderless_text_material = 0x7f0f00b9; public static final int abc_btn_colored_text_material = 0x7f0f00ba; public static final int abc_color_highlight_material = 0x7f0f00bb; public static final int abc_hint_foreground_material_dark = 0x7f0f00bc; public static final int abc_hint_foreground_material_light = 0x7f0f00bd; public static final int abc_input_method_navigation_guard = 0x7f0f0001; public static final int abc_primary_text_disable_only_material_dark = 0x7f0f00be; public static final int abc_primary_text_disable_only_material_light = 0x7f0f00bf; public static final int abc_primary_text_material_dark = 0x7f0f00c0; public static final int abc_primary_text_material_light = 0x7f0f00c1; public static final int abc_search_url_text = 0x7f0f00c2; public static final int abc_search_url_text_normal = 0x7f0f0002; public static final int abc_search_url_text_pressed = 0x7f0f0003; public static final int abc_search_url_text_selected = 0x7f0f0004; public static final int abc_secondary_text_material_dark = 0x7f0f00c3; public static final int abc_secondary_text_material_light = 0x7f0f00c4; public static final int abc_tint_btn_checkable = 0x7f0f00c5; public static final int abc_tint_default = 0x7f0f00c6; public static final int abc_tint_edittext = 0x7f0f00c7; public static final int abc_tint_seek_thumb = 0x7f0f00c8; public static final int abc_tint_spinner = 0x7f0f00c9; public static final int abc_tint_switch_track = 0x7f0f00ca; public static final int accent_material_dark = 0x7f0f0005; public static final int accent_material_light = 0x7f0f0006; public static final int background_floating_material_dark = 0x7f0f0007; public static final int background_floating_material_light = 0x7f0f0008; public static final int background_material_dark = 0x7f0f0009; public static final int background_material_light = 0x7f0f000a; public static final int bright_foreground_disabled_material_dark = 0x7f0f000b; public static final int bright_foreground_disabled_material_light = 0x7f0f000c; public static final int bright_foreground_inverse_material_dark = 0x7f0f000d; public static final int bright_foreground_inverse_material_light = 0x7f0f000e; public static final int bright_foreground_material_dark = 0x7f0f000f; public static final int bright_foreground_material_light = 0x7f0f0010; public static final int button_material_dark = 0x7f0f0011; public static final int button_material_light = 0x7f0f0012; public static final int dim_foreground_disabled_material_dark = 0x7f0f0020; public static final int dim_foreground_disabled_material_light = 0x7f0f0021; public static final int dim_foreground_material_dark = 0x7f0f0022; public static final int dim_foreground_material_light = 0x7f0f0023; public static final int error_color_material = 0x7f0f0024; public static final int foreground_material_dark = 0x7f0f0025; public static final int foreground_material_light = 0x7f0f0026; public static final int highlighted_text_material_dark = 0x7f0f0027; public static final int highlighted_text_material_light = 0x7f0f0028; public static final int material_blue_grey_800 = 0x7f0f0029; public static final int material_blue_grey_900 = 0x7f0f002a; public static final int material_blue_grey_950 = 0x7f0f002b; public static final int material_deep_teal_200 = 0x7f0f002c; public static final int material_deep_teal_500 = 0x7f0f002d; public static final int material_grey_100 = 0x7f0f002e; public static final int material_grey_300 = 0x7f0f002f; public static final int material_grey_50 = 0x7f0f0030; public static final int material_grey_600 = 0x7f0f0031; public static final int material_grey_800 = 0x7f0f0032; public static final int material_grey_850 = 0x7f0f0033; public static final int material_grey_900 = 0x7f0f0034; public static final int notification_action_color_filter = 0x7f0f0000; public static final int notification_icon_bg_color = 0x7f0f0035; public static final int notification_material_background_media_default_color = 0x7f0f0036; public static final int primary_dark_material_dark = 0x7f0f0037; public static final int primary_dark_material_light = 0x7f0f0038; public static final int primary_material_dark = 0x7f0f0039; public static final int primary_material_light = 0x7f0f003a; public static final int primary_text_default_material_dark = 0x7f0f003b; public static final int primary_text_default_material_light = 0x7f0f003c; public static final int primary_text_disabled_material_dark = 0x7f0f003d; public static final int primary_text_disabled_material_light = 0x7f0f003e; public static final int ripple_material_dark = 0x7f0f00ab; public static final int ripple_material_light = 0x7f0f00ac; public static final int secondary_text_default_material_dark = 0x7f0f00ad; public static final int secondary_text_default_material_light = 0x7f0f00ae; public static final int secondary_text_disabled_material_dark = 0x7f0f00af; public static final int secondary_text_disabled_material_light = 0x7f0f00b0; public static final int switch_thumb_disabled_material_dark = 0x7f0f00b1; public static final int switch_thumb_disabled_material_light = 0x7f0f00b2; public static final int switch_thumb_material_dark = 0x7f0f00d3; public static final int switch_thumb_material_light = 0x7f0f00d4; public static final int switch_thumb_normal_material_dark = 0x7f0f00b3; public static final int switch_thumb_normal_material_light = 0x7f0f00b4; public static final int tooltip_background_dark = 0x7f0f00b5; public static final int tooltip_background_light = 0x7f0f00b6; } public static final class dimen { public static final int abc_action_bar_content_inset_material = 0x7f0b0010; public static final int abc_action_bar_content_inset_with_nav = 0x7f0b0011; public static final int abc_action_bar_default_height_material = 0x7f0b0001; public static final int abc_action_bar_default_padding_end_material = 0x7f0b0012; public static final int abc_action_bar_default_padding_start_material = 0x7f0b0013; public static final int abc_action_bar_elevation_material = 0x7f0b0021; public static final int abc_action_bar_icon_vertical_padding_material = 0x7f0b0022; public static final int abc_action_bar_overflow_padding_end_material = 0x7f0b0023; public static final int abc_action_bar_overflow_padding_start_material = 0x7f0b0024; public static final int abc_action_bar_progress_bar_size = 0x7f0b0002; public static final int abc_action_bar_stacked_max_height = 0x7f0b0025; public static final int abc_action_bar_stacked_tab_max_width = 0x7f0b0026; public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f0b0027; public static final int abc_action_bar_subtitle_top_margin_material = 0x7f0b0028; public static final int abc_action_button_min_height_material = 0x7f0b0029; public static final int abc_action_button_min_width_material = 0x7f0b002a; public static final int abc_action_button_min_width_overflow_material = 0x7f0b002b; public static final int abc_alert_dialog_button_bar_height = 0x7f0b0000; public static final int abc_button_inset_horizontal_material = 0x7f0b002c; public static final int abc_button_inset_vertical_material = 0x7f0b002d; public static final int abc_button_padding_horizontal_material = 0x7f0b002e; public static final int abc_button_padding_vertical_material = 0x7f0b002f; public static final int abc_cascading_menus_min_smallest_width = 0x7f0b0030; public static final int abc_config_prefDialogWidth = 0x7f0b0005; public static final int abc_control_corner_material = 0x7f0b0031; public static final int abc_control_inset_material = 0x7f0b0032; public static final int abc_control_padding_material = 0x7f0b0033; public static final int abc_dialog_fixed_height_major = 0x7f0b0006; public static final int abc_dialog_fixed_height_minor = 0x7f0b0007; public static final int abc_dialog_fixed_width_major = 0x7f0b0008; public static final int abc_dialog_fixed_width_minor = 0x7f0b0009; public static final int abc_dialog_list_padding_bottom_no_buttons = 0x7f0b0034; public static final int abc_dialog_list_padding_top_no_title = 0x7f0b0035; public static final int abc_dialog_min_width_major = 0x7f0b000a; public static final int abc_dialog_min_width_minor = 0x7f0b000b; public static final int abc_dialog_padding_material = 0x7f0b0036; public static final int abc_dialog_padding_top_material = 0x7f0b0037; public static final int abc_dialog_title_divider_material = 0x7f0b0038; public static final int abc_disabled_alpha_material_dark = 0x7f0b0039; public static final int abc_disabled_alpha_material_light = 0x7f0b003a; public static final int abc_dropdownitem_icon_width = 0x7f0b003b; public static final int abc_dropdownitem_text_padding_left = 0x7f0b003c; public static final int abc_dropdownitem_text_padding_right = 0x7f0b003d; public static final int abc_edit_text_inset_bottom_material = 0x7f0b003e; public static final int abc_edit_text_inset_horizontal_material = 0x7f0b003f; public static final int abc_edit_text_inset_top_material = 0x7f0b0040; public static final int abc_floating_window_z = 0x7f0b0041; public static final int abc_list_item_padding_horizontal_material = 0x7f0b0042; public static final int abc_panel_menu_list_width = 0x7f0b0043; public static final int abc_progress_bar_height_material = 0x7f0b0044; public static final int abc_search_view_preferred_height = 0x7f0b0045; public static final int abc_search_view_preferred_width = 0x7f0b0046; public static final int abc_seekbar_track_background_height_material = 0x7f0b0047; public static final int abc_seekbar_track_progress_height_material = 0x7f0b0048; public static final int abc_select_dialog_padding_start_material = 0x7f0b0049; public static final int abc_switch_padding = 0x7f0b001d; public static final int abc_text_size_body_1_material = 0x7f0b004a; public static final int abc_text_size_body_2_material = 0x7f0b004b; public static final int abc_text_size_button_material = 0x7f0b004c; public static final int abc_text_size_caption_material = 0x7f0b004d; public static final int abc_text_size_display_1_material = 0x7f0b004e; public static final int abc_text_size_display_2_material = 0x7f0b004f; public static final int abc_text_size_display_3_material = 0x7f0b0050; public static final int abc_text_size_display_4_material = 0x7f0b0051; public static final int abc_text_size_headline_material = 0x7f0b0052; public static final int abc_text_size_large_material = 0x7f0b0053; public static final int abc_text_size_medium_material = 0x7f0b0054; public static final int abc_text_size_menu_header_material = 0x7f0b0055; public static final int abc_text_size_menu_material = 0x7f0b0056; public static final int abc_text_size_small_material = 0x7f0b0057; public static final int abc_text_size_subhead_material = 0x7f0b0058; public static final int abc_text_size_subtitle_material_toolbar = 0x7f0b0003; public static final int abc_text_size_title_material = 0x7f0b0059; public static final int abc_text_size_title_material_toolbar = 0x7f0b0004; public static final int compat_button_inset_horizontal_material = 0x7f0b005d; public static final int compat_button_inset_vertical_material = 0x7f0b005e; public static final int compat_button_padding_horizontal_material = 0x7f0b005f; public static final int compat_button_padding_vertical_material = 0x7f0b0060; public static final int compat_control_corner_material = 0x7f0b0061; public static final int disabled_alpha_material_dark = 0x7f0b0080; public static final int disabled_alpha_material_light = 0x7f0b0081; public static final int highlight_alpha_material_colored = 0x7f0b0085; public static final int highlight_alpha_material_dark = 0x7f0b0086; public static final int highlight_alpha_material_light = 0x7f0b0087; public static final int hint_alpha_material_dark = 0x7f0b0088; public static final int hint_alpha_material_light = 0x7f0b0089; public static final int hint_pressed_alpha_material_dark = 0x7f0b008a; public static final int hint_pressed_alpha_material_light = 0x7f0b008b; public static final int notification_action_icon_size = 0x7f0b008f; public static final int notification_action_text_size = 0x7f0b0090; public static final int notification_big_circle_margin = 0x7f0b0091; public static final int notification_content_margin_start = 0x7f0b001e; public static final int notification_large_icon_height = 0x7f0b0092; public static final int notification_large_icon_width = 0x7f0b0093; public static final int notification_main_column_padding_top = 0x7f0b001f; public static final int notification_media_narrow_margin = 0x7f0b0020; public static final int notification_right_icon_size = 0x7f0b0094; public static final int notification_right_side_padding_top = 0x7f0b001c; public static final int notification_small_icon_background_padding = 0x7f0b0095; public static final int notification_small_icon_size_as_large = 0x7f0b0096; public static final int notification_subtext_size = 0x7f0b0097; public static final int notification_top_pad = 0x7f0b0098; public static final int notification_top_pad_large_text = 0x7f0b0099; public static final int tooltip_corner_radius = 0x7f0b010a; public static final int tooltip_horizontal_padding = 0x7f0b010b; public static final int tooltip_margin = 0x7f0b010c; public static final int tooltip_precise_anchor_extra_offset = 0x7f0b010d; public static final int tooltip_precise_anchor_threshold = 0x7f0b010e; public static final int tooltip_vertical_padding = 0x7f0b010f; public static final int tooltip_y_offset_non_touch = 0x7f0b0110; public static final int tooltip_y_offset_touch = 0x7f0b0111; } 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_switch_to_on_mtrl_00001 = 0x7f02000b; public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f02000c; public static final int abc_cab_background_internal_bg = 0x7f02000d; public static final int abc_cab_background_top_material = 0x7f02000e; public static final int abc_cab_background_top_mtrl_alpha = 0x7f02000f; public static final int abc_control_background_material = 0x7f020010; public static final int abc_dialog_material_background = 0x7f020011; public static final int abc_edit_text_material = 0x7f020012; public static final int abc_ic_ab_back_material = 0x7f020013; public static final int abc_ic_arrow_drop_right_black_24dp = 0x7f020014; public static final int abc_ic_clear_material = 0x7f020015; public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f020016; public static final int abc_ic_go_search_api_material = 0x7f020017; public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f020018; public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f020019; public static final int abc_ic_menu_overflow_material = 0x7f02001a; public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f02001b; public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f02001c; public static final int abc_ic_menu_share_mtrl_alpha = 0x7f02001d; public static final int abc_ic_search_api_material = 0x7f02001e; public static final int abc_ic_star_black_16dp = 0x7f02001f; public static final int abc_ic_star_black_36dp = 0x7f020020; public static final int abc_ic_star_black_48dp = 0x7f020021; public static final int abc_ic_star_half_black_16dp = 0x7f020022; public static final int abc_ic_star_half_black_36dp = 0x7f020023; public static final int abc_ic_star_half_black_48dp = 0x7f020024; public static final int abc_ic_voice_search_api_material = 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_indicator_material = 0x7f020035; public static final int abc_ratingbar_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_tick_mark_material = 0x7f02003e; public static final int abc_seekbar_track_material = 0x7f02003f; public static final int abc_spinner_mtrl_am_alpha = 0x7f020040; public static final int abc_spinner_textfield_background_material = 0x7f020041; public static final int abc_switch_thumb_material = 0x7f020042; public static final int abc_switch_track_mtrl_alpha = 0x7f020043; public static final int abc_tab_indicator_material = 0x7f020044; public static final int abc_tab_indicator_mtrl_alpha = 0x7f020045; public static final int abc_text_cursor_material = 0x7f020046; public static final int abc_text_select_handle_left_mtrl_dark = 0x7f020047; public static final int abc_text_select_handle_left_mtrl_light = 0x7f020048; public static final int abc_text_select_handle_middle_mtrl_dark = 0x7f020049; public static final int abc_text_select_handle_middle_mtrl_light = 0x7f02004a; public static final int abc_text_select_handle_right_mtrl_dark = 0x7f02004b; public static final int abc_text_select_handle_right_mtrl_light = 0x7f02004c; public static final int abc_textfield_activated_mtrl_alpha = 0x7f02004d; public static final int abc_textfield_default_mtrl_alpha = 0x7f02004e; public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f02004f; public static final int abc_textfield_search_default_mtrl_alpha = 0x7f020050; public static final int abc_textfield_search_material = 0x7f020051; public static final int abc_vector_test = 0x7f020052; public static final int notification_action_background = 0x7f02005c; public static final int notification_bg = 0x7f02005d; public static final int notification_bg_low = 0x7f02005e; public static final int notification_bg_low_normal = 0x7f02005f; public static final int notification_bg_low_pressed = 0x7f020060; public static final int notification_bg_normal = 0x7f020061; public static final int notification_bg_normal_pressed = 0x7f020062; public static final int notification_icon_background = 0x7f020063; public static final int notification_template_icon_bg = 0x7f0200f1; public static final int notification_template_icon_low_bg = 0x7f0200f2; public static final int notification_tile_bg = 0x7f020064; public static final int notify_panel_notification_icon_bg = 0x7f020065; public static final int tooltip_frame_dark = 0x7f0200ef; public static final int tooltip_frame_light = 0x7f0200f0; } public static final class id { public static final int action0 = 0x7f10010a; public static final int action_bar = 0x7f1000ea; public static final int action_bar_activity_content = 0x7f100000; public static final int action_bar_container = 0x7f1000e9; public static final int action_bar_root = 0x7f1000e5; public static final int action_bar_spinner = 0x7f100001; public static final int action_bar_subtitle = 0x7f1000c9; public static final int action_bar_title = 0x7f1000c8; public static final int action_container = 0x7f100107; public static final int action_context_bar = 0x7f1000eb; public static final int action_divider = 0x7f10010e; public static final int action_image = 0x7f100108; public static final int action_menu_divider = 0x7f100002; public static final int action_menu_presenter = 0x7f100003; public static final int action_mode_bar = 0x7f1000e7; public static final int action_mode_bar_stub = 0x7f1000e6; public static final int action_mode_close_button = 0x7f1000ca; public static final int action_text = 0x7f100109; public static final int actions = 0x7f100117; public static final int activity_chooser_view_content = 0x7f1000cb; public static final int add = 0x7f10009f; public static final int alertTitle = 0x7f1000de; public static final int async = 0x7f1000b5; public static final int blocking = 0x7f1000b6; public static final int buttonPanel = 0x7f1000d1; public static final int cancel_action = 0x7f10010b; public static final int checkbox = 0x7f1000e1; public static final int chronometer = 0x7f100113; public static final int contentPanel = 0x7f1000d4; public static final int custom = 0x7f1000db; public static final int customPanel = 0x7f1000da; public static final int decor_content_parent = 0x7f1000e8; public static final int default_activity_button = 0x7f1000ce; public static final int edit_query = 0x7f1000ec; public static final int end_padder = 0x7f100119; public static final int expand_activities_button = 0x7f1000cc; public static final int expanded_menu = 0x7f1000e0; public static final int forever = 0x7f1000b7; public static final int home = 0x7f100005; public static final int icon = 0x7f1000d0; public static final int icon_group = 0x7f100118; public static final int image = 0x7f1000cd; public static final int info = 0x7f100114; public static final int italic = 0x7f1000b8; public static final int line1 = 0x7f100007; public static final int line3 = 0x7f100008; public static final int listMode = 0x7f10008b; public static final int list_item = 0x7f1000cf; public static final int media_actions = 0x7f10010d; public static final int message = 0x7f1001a9; public static final int multiply = 0x7f10009a; public static final int none = 0x7f100090; public static final int normal = 0x7f10008c; public static final int notification_background = 0x7f100115; public static final int notification_main_column = 0x7f100110; public static final int notification_main_column_container = 0x7f10010f; public static final int parentPanel = 0x7f1000d3; public static final int progress_circular = 0x7f10000a; public static final int progress_horizontal = 0x7f10000b; public static final int radio = 0x7f1000e3; public static final int right_icon = 0x7f100116; public static final int right_side = 0x7f100111; public static final int screen = 0x7f10009b; public static final int scrollIndicatorDown = 0x7f1000d9; public static final int scrollIndicatorUp = 0x7f1000d5; public static final int scrollView = 0x7f1000d6; public static final int search_badge = 0x7f1000ee; public static final int search_bar = 0x7f1000ed; public static final int search_button = 0x7f1000ef; public static final int search_close_btn = 0x7f1000f4; public static final int search_edit_frame = 0x7f1000f0; public static final int search_go_btn = 0x7f1000f6; public static final int search_mag_icon = 0x7f1000f1; public static final int search_plate = 0x7f1000f2; public static final int search_src_text = 0x7f1000f3; public static final int search_voice_btn = 0x7f1000f7; public static final int select_dialog_listview = 0x7f1000f8; public static final int shortcut = 0x7f1000e2; public static final int spacer = 0x7f1000d2; public static final int split_action_bar = 0x7f10007e; public static final int src_atop = 0x7f10009c; public static final int src_in = 0x7f10009d; public static final int src_over = 0x7f10009e; public static final int status_bar_latest_event_content = 0x7f10010c; public static final int submenuarrow = 0x7f1000e4; public static final int submit_area = 0x7f1000f5; public static final int tabMode = 0x7f10008d; public static final int text = 0x7f10007f; public static final int text2 = 0x7f100080; public static final int textSpacerNoButtons = 0x7f1000d8; public static final int textSpacerNoTitle = 0x7f1000d7; public static final int time = 0x7f100112; public static final int title = 0x7f100083; public static final int titleDividerNoCustom = 0x7f1000df; public static final int title_template = 0x7f1000dd; public static final int topPanel = 0x7f1000dc; public static final int uniform = 0x7f1000a0; public static final int up = 0x7f100089; public static final int wrap_content = 0x7f1000a1; } public static final class integer { public static final int abc_config_activityDefaultDur = 0x7f0e0001; public static final int abc_config_activityShortDur = 0x7f0e0002; public static final int cancel_button_image_alpha = 0x7f0e0005; public static final int config_tooltipAnimTime = 0x7f0e0006; public static final int status_bar_notification_info_maxnum = 0x7f0e000a; } public static final class layout { public static final int abc_action_bar_title_item = 0x7f040000; public static final int abc_action_bar_up_container = 0x7f040001; public static final int abc_action_bar_view_list_nav_layout = 0x7f040002; public static final int abc_action_menu_item_layout = 0x7f040003; public static final int abc_action_menu_layout = 0x7f040004; public static final int abc_action_mode_bar = 0x7f040005; public static final int abc_action_mode_close_item_material = 0x7f040006; public static final int abc_activity_chooser_view = 0x7f040007; public static final int abc_activity_chooser_view_list_item = 0x7f040008; public static final int abc_alert_dialog_button_bar_material = 0x7f040009; public static final int abc_alert_dialog_material = 0x7f04000a; public static final int abc_alert_dialog_title_material = 0x7f04000b; public static final int abc_dialog_title_material = 0x7f04000c; public static final int abc_expanded_menu_layout = 0x7f04000d; public static final int abc_list_menu_item_checkbox = 0x7f04000e; public static final int abc_list_menu_item_icon = 0x7f04000f; public static final int abc_list_menu_item_layout = 0x7f040010; public static final int abc_list_menu_item_radio = 0x7f040011; public static final int abc_popup_menu_header_item_layout = 0x7f040012; public static final int abc_popup_menu_item_layout = 0x7f040013; public static final int abc_screen_content_include = 0x7f040014; public static final int abc_screen_simple = 0x7f040015; public static final int abc_screen_simple_overlay_action_mode = 0x7f040016; public static final int abc_screen_toolbar = 0x7f040017; public static final int abc_search_dropdown_item_icons_2line = 0x7f040018; public static final int abc_search_view = 0x7f040019; public static final int abc_select_dialog_material = 0x7f04001a; public static final int notification_action = 0x7f040029; public static final int notification_action_tombstone = 0x7f04002a; public static final int notification_media_action = 0x7f04002b; public static final int notification_media_cancel_action = 0x7f04002c; public static final int notification_template_big_media = 0x7f04002d; public static final int notification_template_big_media_custom = 0x7f04002e; public static final int notification_template_big_media_narrow = 0x7f04002f; public static final int notification_template_big_media_narrow_custom = 0x7f040030; public static final int notification_template_custom_big = 0x7f040031; public static final int notification_template_icon_group = 0x7f040032; public static final int notification_template_lines_media = 0x7f040033; public static final int notification_template_media = 0x7f040034; public static final int notification_template_media_custom = 0x7f040035; public static final int notification_template_part_chronometer = 0x7f040036; public static final int notification_template_part_time = 0x7f040037; public static final int select_dialog_item_material = 0x7f040089; public static final int select_dialog_multichoice_material = 0x7f04008a; public static final int select_dialog_singlechoice_material = 0x7f04008b; public static final int support_simple_spinner_dropdown_item = 0x7f04008c; public static final int tooltip = 0x7f04008d; } public static final class string { public static final int abc_action_bar_home_description = 0x7f090000; public static final int abc_action_bar_home_description_format = 0x7f090001; public static final int abc_action_bar_home_subtitle_description_format = 0x7f090002; public static final int abc_action_bar_up_description = 0x7f090003; public static final int abc_action_menu_overflow_description = 0x7f090004; public static final int abc_action_mode_done = 0x7f090005; public static final int abc_activity_chooser_view_see_all = 0x7f090006; public static final int abc_activitychooserview_choose_application = 0x7f090007; public static final int abc_capital_off = 0x7f090008; public static final int abc_capital_on = 0x7f090009; public static final int abc_font_family_body_1_material = 0x7f090144; public static final int abc_font_family_body_2_material = 0x7f090145; public static final int abc_font_family_button_material = 0x7f090146; public static final int abc_font_family_caption_material = 0x7f090147; public static final int abc_font_family_display_1_material = 0x7f090148; public static final int abc_font_family_display_2_material = 0x7f090149; public static final int abc_font_family_display_3_material = 0x7f09014a; public static final int abc_font_family_display_4_material = 0x7f09014b; public static final int abc_font_family_headline_material = 0x7f09014c; public static final int abc_font_family_menu_material = 0x7f09014d; public static final int abc_font_family_subhead_material = 0x7f09014e; public static final int abc_font_family_title_material = 0x7f09014f; public static final int abc_search_hint = 0x7f09000a; public static final int abc_searchview_description_clear = 0x7f09000b; public static final int abc_searchview_description_query = 0x7f09000c; public static final int abc_searchview_description_search = 0x7f09000d; public static final int abc_searchview_description_submit = 0x7f09000e; public static final int abc_searchview_description_voice = 0x7f09000f; public static final int abc_shareactionprovider_share_with = 0x7f090010; public static final int abc_shareactionprovider_share_with_application = 0x7f090011; public static final int abc_toolbar_collapse_description = 0x7f090012; public static final int search_menu_title = 0x7f090013; public static final int status_bar_notification_info_overflow = 0x7f090014; } public static final class style { public static final int AlertDialog_AppCompat = 0x7f0c00ac; public static final int AlertDialog_AppCompat_Light = 0x7f0c00ad; public static final int Animation_AppCompat_Dialog = 0x7f0c00ae; public static final int Animation_AppCompat_DropDownUp = 0x7f0c00af; public static final int Animation_AppCompat_Tooltip = 0x7f0c00b0; public static final int Base_AlertDialog_AppCompat = 0x7f0c00b2; public static final int Base_AlertDialog_AppCompat_Light = 0x7f0c00b3; public static final int Base_Animation_AppCompat_Dialog = 0x7f0c00b4; public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0c00b5; public static final int Base_Animation_AppCompat_Tooltip = 0x7f0c00b6; public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0c00b9; public static final int Base_DialogWindowTitle_AppCompat = 0x7f0c00b8; public static final int Base_TextAppearance_AppCompat = 0x7f0c003a; public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0c003b; public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0c003c; public static final int Base_TextAppearance_AppCompat_Button = 0x7f0c0028; public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0c003d; public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0c003e; public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0c003f; public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0c0040; public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0c0041; public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0c0042; public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0c000c; public static final int Base_TextAppearance_AppCompat_Large = 0x7f0c0043; public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0c000d; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c0044; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c0045; public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0c0046; public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0c000e; public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0c0047; public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0c00ba; public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c0048; public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0c0049; public static final int Base_TextAppearance_AppCompat_Small = 0x7f0c004a; public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0c000f; public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0c004b; public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c0010; public static final int Base_TextAppearance_AppCompat_Title = 0x7f0c004c; public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0c0011; public static final int Base_TextAppearance_AppCompat_Tooltip = 0x7f0c00bb; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c009b; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c004d; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c004e; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c004f; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c0050; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c0051; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c0052; public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0c0053; public static final int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0c00a3; public static final int Base_TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0c00a4; public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c009c; public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c00bc; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0c0054; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c0055; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c0056; public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0c0057; public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c0058; public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c00bd; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c0059; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c005a; public static final int Base_ThemeOverlay_AppCompat = 0x7f0c00c2; public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0c00c3; public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0c00c4; public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c00c5; public static final int Base_ThemeOverlay_AppCompat_Dialog = 0x7f0c0018; public static final int Base_ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0c0019; public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0c00c6; public static final int Base_Theme_AppCompat = 0x7f0c005b; public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0c00be; public static final int Base_Theme_AppCompat_Dialog = 0x7f0c0012; public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0c0002; public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0c0013; public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0c00bf; public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0c0014; public static final int Base_Theme_AppCompat_Light = 0x7f0c005c; public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0c00c0; public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0c0015; public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c0003; public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0c0016; public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0c00c1; public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c0017; public static final int Base_V11_ThemeOverlay_AppCompat_Dialog = 0x7f0c001c; public static final int Base_V11_Theme_AppCompat_Dialog = 0x7f0c001a; public static final int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f0c001b; public static final int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f0c0024; public static final int Base_V12_Widget_AppCompat_EditText = 0x7f0c0025; public static final int Base_V21_ThemeOverlay_AppCompat_Dialog = 0x7f0c0061; public static final int Base_V21_Theme_AppCompat = 0x7f0c005d; public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0c005e; public static final int Base_V21_Theme_AppCompat_Light = 0x7f0c005f; public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0c0060; public static final int Base_V22_Theme_AppCompat = 0x7f0c0099; public static final int Base_V22_Theme_AppCompat_Light = 0x7f0c009a; public static final int Base_V23_Theme_AppCompat = 0x7f0c009d; public static final int Base_V23_Theme_AppCompat_Light = 0x7f0c009e; public static final int Base_V26_Theme_AppCompat = 0x7f0c00a7; public static final int Base_V26_Theme_AppCompat_Light = 0x7f0c00a8; public static final int Base_V26_Widget_AppCompat_Toolbar = 0x7f0c00a9; public static final int Base_V7_ThemeOverlay_AppCompat_Dialog = 0x7f0c00cc; public static final int Base_V7_Theme_AppCompat = 0x7f0c00c8; public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0c00c9; public static final int Base_V7_Theme_AppCompat_Light = 0x7f0c00ca; public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0c00cb; public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0c00cd; public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0c00ce; public static final int Base_V7_Widget_AppCompat_Toolbar = 0x7f0c00cf; public static final int Base_Widget_AppCompat_ActionBar = 0x7f0c00d0; public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0c00d1; public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0c00d2; public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0c0063; public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0c0064; public static final int Base_Widget_AppCompat_ActionButton = 0x7f0c0065; public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0c0066; public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0c0067; public static final int Base_Widget_AppCompat_ActionMode = 0x7f0c00d3; public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0c00d4; public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0c0026; public static final int Base_Widget_AppCompat_Button = 0x7f0c0068; public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0c006c; public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c00d6; public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0c0069; public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0c006a; public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c00d5; public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0c009f; public static final int Base_Widget_AppCompat_Button_Small = 0x7f0c006b; public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c006d; public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c006e; public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0c00d7; public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0c0000; public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0c00d8; public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0c006f; public static final int Base_Widget_AppCompat_EditText = 0x7f0c0027; public static final int Base_Widget_AppCompat_ImageButton = 0x7f0c0070; public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0c00d9; public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c00da; public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c00db; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c0071; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c0072; public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c0073; public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0c0074; public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c0075; public static final int Base_Widget_AppCompat_ListMenuView = 0x7f0c00dc; public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0c0076; public static final int Base_Widget_AppCompat_ListView = 0x7f0c0077; public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0c0078; public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0c0079; public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0c007a; public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0c007b; public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0c00dd; public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0c001d; public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c001e; public static final int Base_Widget_AppCompat_RatingBar = 0x7f0c007c; public static final int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f0c00a0; public static final int Base_Widget_AppCompat_RatingBar_Small = 0x7f0c00a1; public static final int Base_Widget_AppCompat_SearchView = 0x7f0c00de; public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0c00df; public static final int Base_Widget_AppCompat_SeekBar = 0x7f0c007d; public static final int Base_Widget_AppCompat_SeekBar_Discrete = 0x7f0c00e0; public static final int Base_Widget_AppCompat_Spinner = 0x7f0c007e; public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0c0004; public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0c007f; public static final int Base_Widget_AppCompat_Toolbar = 0x7f0c00ab; public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c0080; public static final int Platform_AppCompat = 0x7f0c001f; public static final int Platform_AppCompat_Light = 0x7f0c0020; public static final int Platform_ThemeOverlay_AppCompat = 0x7f0c0082; public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0c0083; public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0c0084; public static final int Platform_V11_AppCompat = 0x7f0c0021; public static final int Platform_V11_AppCompat_Light = 0x7f0c0022; public static final int Platform_V14_AppCompat = 0x7f0c0029; public static final int Platform_V14_AppCompat_Light = 0x7f0c002a; public static final int Platform_V21_AppCompat = 0x7f0c0085; public static final int Platform_V21_AppCompat_Light = 0x7f0c0086; public static final int Platform_V25_AppCompat = 0x7f0c00a5; public static final int Platform_V25_AppCompat_Light = 0x7f0c00a6; public static final int Platform_Widget_AppCompat_Spinner = 0x7f0c0023; public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0c002c; public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0c002d; public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0c002e; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0c002f; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0c0030; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0c0031; public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0c0037; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0c0032; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0c0033; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0c0034; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0c0035; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0c0036; public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f0c0038; public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0c0039; public static final int TextAppearance_AppCompat = 0x7f0c0108; public static final int TextAppearance_AppCompat_Body1 = 0x7f0c0109; public static final int TextAppearance_AppCompat_Body2 = 0x7f0c010a; public static final int TextAppearance_AppCompat_Button = 0x7f0c010b; public static final int TextAppearance_AppCompat_Caption = 0x7f0c010c; public static final int TextAppearance_AppCompat_Display1 = 0x7f0c010d; public static final int TextAppearance_AppCompat_Display2 = 0x7f0c010e; public static final int TextAppearance_AppCompat_Display3 = 0x7f0c010f; public static final int TextAppearance_AppCompat_Display4 = 0x7f0c0110; public static final int TextAppearance_AppCompat_Headline = 0x7f0c0111; public static final int TextAppearance_AppCompat_Inverse = 0x7f0c0112; public static final int TextAppearance_AppCompat_Large = 0x7f0c0113; public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0c0114; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0c0115; public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0c0116; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c0117; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c0118; public static final int TextAppearance_AppCompat_Medium = 0x7f0c0119; public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0c011a; public static final int TextAppearance_AppCompat_Menu = 0x7f0c011b; public static final int TextAppearance_AppCompat_Notification = 0x7f0c0087; public static final int TextAppearance_AppCompat_Notification_Info = 0x7f0c0088; public static final int TextAppearance_AppCompat_Notification_Info_Media = 0x7f0c0089; public static final int TextAppearance_AppCompat_Notification_Line2 = 0x7f0c011c; public static final int TextAppearance_AppCompat_Notification_Line2_Media = 0x7f0c011d; public static final int TextAppearance_AppCompat_Notification_Media = 0x7f0c008a; public static final int TextAppearance_AppCompat_Notification_Time = 0x7f0c008b; public static final int TextAppearance_AppCompat_Notification_Time_Media = 0x7f0c008c; public static final int TextAppearance_AppCompat_Notification_Title = 0x7f0c008d; public static final int TextAppearance_AppCompat_Notification_Title_Media = 0x7f0c008e; public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c011e; public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0c011f; public static final int TextAppearance_AppCompat_Small = 0x7f0c0120; public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0c0121; public static final int TextAppearance_AppCompat_Subhead = 0x7f0c0122; public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c0123; public static final int TextAppearance_AppCompat_Title = 0x7f0c0124; public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0c0125; public static final int TextAppearance_AppCompat_Tooltip = 0x7f0c002b; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c0126; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c0127; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c0128; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c0129; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c012a; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c012b; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0c012c; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c012d; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0c012e; public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0c012f; public static final int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0c0130; public static final int TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0c0131; public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c0132; public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c0133; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0c0134; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c0135; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c0136; public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0c0137; public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c0138; public static final int TextAppearance_Compat_Notification = 0x7f0c008f; public static final int TextAppearance_Compat_Notification_Info = 0x7f0c0090; public static final int TextAppearance_Compat_Notification_Info_Media = 0x7f0c0091; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0c0139; public static final int TextAppearance_Compat_Notification_Line2_Media = 0x7f0c013a; public static final int TextAppearance_Compat_Notification_Media = 0x7f0c0092; public static final int TextAppearance_Compat_Notification_Time = 0x7f0c0093; public static final int TextAppearance_Compat_Notification_Time_Media = 0x7f0c0094; public static final int TextAppearance_Compat_Notification_Title = 0x7f0c0095; public static final int TextAppearance_Compat_Notification_Title_Media = 0x7f0c0096; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c0142; public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c0143; public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c0144; public static final int ThemeOverlay_AppCompat = 0x7f0c0159; public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0c015a; public static final int ThemeOverlay_AppCompat_Dark = 0x7f0c015b; public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c015c; public static final int ThemeOverlay_AppCompat_Dialog = 0x7f0c015d; public static final int ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0c015e; public static final int ThemeOverlay_AppCompat_Light = 0x7f0c015f; public static final int Theme_AppCompat = 0x7f0c0145; public static final int Theme_AppCompat_CompactMenu = 0x7f0c0146; public static final int Theme_AppCompat_DayNight = 0x7f0c0005; public static final int Theme_AppCompat_DayNight_DarkActionBar = 0x7f0c0006; public static final int Theme_AppCompat_DayNight_Dialog = 0x7f0c0007; public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f0c000a; public static final int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f0c0008; public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f0c0009; public static final int Theme_AppCompat_DayNight_NoActionBar = 0x7f0c000b; public static final int Theme_AppCompat_Dialog = 0x7f0c0147; public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0c014a; public static final int Theme_AppCompat_Dialog_Alert = 0x7f0c0148; public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0c0149; public static final int Theme_AppCompat_Light = 0x7f0c014b; public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0c014c; public static final int Theme_AppCompat_Light_Dialog = 0x7f0c014d; public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c0150; public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0c014e; public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c014f; public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0c0151; public static final int Theme_AppCompat_NoActionBar = 0x7f0c0152; public static final int Widget_AppCompat_ActionBar = 0x7f0c0160; public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0c0161; public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0c0162; public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0c0163; public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0c0164; public static final int Widget_AppCompat_ActionButton = 0x7f0c0165; public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0c0166; public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0c0167; public static final int Widget_AppCompat_ActionMode = 0x7f0c0168; public static final int Widget_AppCompat_ActivityChooserView = 0x7f0c0169; public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0c016a; public static final int Widget_AppCompat_Button = 0x7f0c016b; public static final int Widget_AppCompat_ButtonBar = 0x7f0c0171; public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c0172; public static final int Widget_AppCompat_Button_Borderless = 0x7f0c016c; public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0c016d; public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c016e; public static final int Widget_AppCompat_Button_Colored = 0x7f0c016f; public static final int Widget_AppCompat_Button_Small = 0x7f0c0170; public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c0173; public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c0174; public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0c0175; public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0c0176; public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0c0177; public static final int Widget_AppCompat_EditText = 0x7f0c0178; public static final int Widget_AppCompat_ImageButton = 0x7f0c0179; public static final int Widget_AppCompat_Light_ActionBar = 0x7f0c017a; public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c017b; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0c017c; public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c017d; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0c017e; public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c017f; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c0180; public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c0181; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0c0182; public static final int Widget_AppCompat_Light_ActionButton = 0x7f0c0183; public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0c0184; public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0c0185; public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0c0186; public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0c0187; public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0c0188; public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0c0189; public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0c018a; public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0c018b; public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0c018c; public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c018d; public static final int Widget_AppCompat_Light_SearchView = 0x7f0c018e; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0c018f; public static final int Widget_AppCompat_ListMenuView = 0x7f0c0190; public static final int Widget_AppCompat_ListPopupWindow = 0x7f0c0191; public static final int Widget_AppCompat_ListView = 0x7f0c0192; public static final int Widget_AppCompat_ListView_DropDown = 0x7f0c0193; public static final int Widget_AppCompat_ListView_Menu = 0x7f0c0194; public static final int Widget_AppCompat_PopupMenu = 0x7f0c0195; public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0c0196; public static final int Widget_AppCompat_PopupWindow = 0x7f0c0197; public static final int Widget_AppCompat_ProgressBar = 0x7f0c0198; public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c0199; public static final int Widget_AppCompat_RatingBar = 0x7f0c019a; public static final int Widget_AppCompat_RatingBar_Indicator = 0x7f0c019b; public static final int Widget_AppCompat_RatingBar_Small = 0x7f0c019c; public static final int Widget_AppCompat_SearchView = 0x7f0c019d; public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0c019e; public static final int Widget_AppCompat_SeekBar = 0x7f0c019f; public static final int Widget_AppCompat_SeekBar_Discrete = 0x7f0c01a0; public static final int Widget_AppCompat_Spinner = 0x7f0c01a1; public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0c01a2; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0c01a3; public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0c01a4; public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0c01a5; public static final int Widget_AppCompat_Toolbar = 0x7f0c01a6; public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c01a7; public static final int Widget_Compat_NotificationActionContainer = 0x7f0c0097; public static final int Widget_Compat_NotificationActionText = 0x7f0c0098; } public static final class styleable { public static final int[] ActionBar = { 0x7f010001, 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, 0x7f0100c1 }; 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_contentInsetEndWithActions = 25; 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_contentInsetStartWithNavigation = 24; 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 = 26; public static final int ActionBar_height = 0; public static final int ActionBar_hideOnContentScroll = 19; public static final int ActionBar_homeAsUpIndicator = 28; 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 = 27; 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[] ActionMode = { 0x7f010001, 0x7f010060, 0x7f010061, 0x7f010065, 0x7f010067, 0x7f010077 }; 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 = { 0x7f010078, 0x7f010079 }; public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; public static final int ActivityChooserView_initialActivityCount = 0; public static final int[] AlertDialog = { 0x010100f2, 0x7f01007a, 0x7f01007b, 0x7f01007c, 0x7f01007d, 0x7f01007e, 0x7f01007f }; 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_showTitle = 6; public static final int AlertDialog_singleChoiceItemLayout = 4; public static final int[] AppCompatImageView = { 0x01010119, 0x7f010085, 0x7f010086, 0x7f010087 }; public static final int AppCompatImageView_android_src = 0; public static final int AppCompatImageView_srcCompat = 1; public static final int AppCompatImageView_tint = 2; public static final int AppCompatImageView_tintMode = 3; public static final int[] AppCompatSeekBar = { 0x01010142, 0x7f010088, 0x7f010089, 0x7f01008a }; public static final int AppCompatSeekBar_android_thumb = 0; public static final int AppCompatSeekBar_tickMark = 1; public static final int AppCompatSeekBar_tickMarkTint = 2; public static final int AppCompatSeekBar_tickMarkTintMode = 3; public static final int[] AppCompatTextHelper = { 0x01010034, 0x0101016d, 0x0101016e, 0x0101016f, 0x01010170, 0x01010392, 0x01010393 }; public static final int AppCompatTextHelper_android_drawableBottom = 2; public static final int AppCompatTextHelper_android_drawableEnd = 6; public static final int AppCompatTextHelper_android_drawableLeft = 3; public static final int AppCompatTextHelper_android_drawableRight = 4; public static final int AppCompatTextHelper_android_drawableStart = 5; public static final int AppCompatTextHelper_android_drawableTop = 1; public static final int AppCompatTextHelper_android_textAppearance = 0; public static final int[] AppCompatTextView = { 0x01010034, 0x7f01008b, 0x7f01008c, 0x7f01008d, 0x7f01008e, 0x7f01008f, 0x7f010090, 0x7f010091 }; public static final int AppCompatTextView_android_textAppearance = 0; public static final int AppCompatTextView_autoSizeMaxTextSize = 6; public static final int AppCompatTextView_autoSizeMinTextSize = 5; public static final int AppCompatTextView_autoSizePresetSizes = 4; public static final int AppCompatTextView_autoSizeStepGranularity = 3; public static final int AppCompatTextView_autoSizeTextType = 2; public static final int AppCompatTextView_fontFamily = 7; public static final int AppCompatTextView_textAllCaps = 1; public static final int[] AppCompatTheme = { 0x01010057, 0x010100ae, 0x7f010092, 0x7f010093, 0x7f010094, 0x7f010095, 0x7f010096, 0x7f010097, 0x7f010098, 0x7f010099, 0x7f01009a, 0x7f01009b, 0x7f01009c, 0x7f01009d, 0x7f01009e, 0x7f01009f, 0x7f0100a0, 0x7f0100a1, 0x7f0100a2, 0x7f0100a3, 0x7f0100a4, 0x7f0100a5, 0x7f0100a6, 0x7f0100a7, 0x7f0100a8, 0x7f0100a9, 0x7f0100aa, 0x7f0100ab, 0x7f0100ac, 0x7f0100ad, 0x7f0100ae, 0x7f0100af, 0x7f0100b0, 0x7f0100b1, 0x7f0100b2, 0x7f0100b3, 0x7f0100b4, 0x7f0100b5, 0x7f0100b6, 0x7f0100b7, 0x7f0100b8, 0x7f0100b9, 0x7f0100ba, 0x7f0100bb, 0x7f0100bc, 0x7f0100bd, 0x7f0100be, 0x7f0100bf, 0x7f0100c0, 0x7f0100c1, 0x7f0100c2, 0x7f0100c3, 0x7f0100c4, 0x7f0100c5, 0x7f0100c6, 0x7f0100c7, 0x7f0100c8, 0x7f0100c9, 0x7f0100ca, 0x7f0100cb, 0x7f0100cc, 0x7f0100cd, 0x7f0100ce, 0x7f0100cf, 0x7f0100d0, 0x7f0100d1, 0x7f0100d2, 0x7f0100d3, 0x7f0100d4, 0x7f0100d5, 0x7f0100d6, 0x7f0100d7, 0x7f0100d8, 0x7f0100d9, 0x7f0100da, 0x7f0100db, 0x7f0100dc, 0x7f0100dd, 0x7f0100de, 0x7f0100df, 0x7f0100e0, 0x7f0100e1, 0x7f0100e2, 0x7f0100e3, 0x7f0100e4, 0x7f0100e5, 0x7f0100e6, 0x7f0100e7, 0x7f0100e8, 0x7f0100e9, 0x7f0100ea, 0x7f0100eb, 0x7f0100ec, 0x7f0100ed, 0x7f0100ee, 0x7f0100ef, 0x7f0100f0, 0x7f0100f1, 0x7f0100f2, 0x7f0100f3, 0x7f0100f4, 0x7f0100f5, 0x7f0100f6, 0x7f0100f7, 0x7f0100f8, 0x7f0100f9, 0x7f0100fa, 0x7f0100fb, 0x7f0100fc, 0x7f0100fd, 0x7f0100fe, 0x7f0100ff, 0x7f010100, 0x7f010101, 0x7f010102, 0x7f010103, 0x7f010104, 0x7f010105, 0x7f010106 }; 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 = 50; public static final int AppCompatTheme_actionDropDownStyle = 46; 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 = 58; public static final int AppCompatTheme_alertDialogButtonGroupStyle = 95; public static final int AppCompatTheme_alertDialogCenterButtons = 96; public static final int AppCompatTheme_alertDialogStyle = 94; public static final int AppCompatTheme_alertDialogTheme = 97; public static final int AppCompatTheme_android_windowAnimationStyle = 1; public static final int AppCompatTheme_android_windowIsFloating = 0; public static final int AppCompatTheme_autoCompleteTextViewStyle = 102; public static final int AppCompatTheme_borderlessButtonStyle = 55; public static final int AppCompatTheme_buttonBarButtonStyle = 52; public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 100; public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 101; public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 99; public static final int AppCompatTheme_buttonBarStyle = 51; public static final int AppCompatTheme_buttonStyle = 103; public static final int AppCompatTheme_buttonStyleSmall = 104; public static final int AppCompatTheme_checkboxStyle = 105; public static final int AppCompatTheme_checkedTextViewStyle = 106; public static final int AppCompatTheme_colorAccent = 86; public static final int AppCompatTheme_colorBackgroundFloating = 93; public static final int AppCompatTheme_colorButtonNormal = 90; public static final int AppCompatTheme_colorControlActivated = 88; public static final int AppCompatTheme_colorControlHighlight = 89; public static final int AppCompatTheme_colorControlNormal = 87; public static final int AppCompatTheme_colorError = 118; public static final int AppCompatTheme_colorPrimary = 84; public static final int AppCompatTheme_colorPrimaryDark = 85; public static final int AppCompatTheme_colorSwitchThumbNormal = 91; public static final int AppCompatTheme_controlBackground = 92; public static final int AppCompatTheme_dialogPreferredPadding = 44; public static final int AppCompatTheme_dialogTheme = 43; public static final int AppCompatTheme_dividerHorizontal = 57; public static final int AppCompatTheme_dividerVertical = 56; public static final int AppCompatTheme_dropDownListViewStyle = 75; public static final int AppCompatTheme_dropdownListPreferredItemHeight = 47; public static final int AppCompatTheme_editTextBackground = 64; public static final int AppCompatTheme_editTextColor = 63; public static final int AppCompatTheme_editTextStyle = 107; public static final int AppCompatTheme_homeAsUpIndicator = 49; public static final int AppCompatTheme_imageButtonStyle = 65; public static final int AppCompatTheme_listChoiceBackgroundIndicator = 83; public static final int AppCompatTheme_listDividerAlertDialog = 45; public static final int AppCompatTheme_listMenuViewStyle = 115; public static final int AppCompatTheme_listPopupWindowStyle = 76; public static final int AppCompatTheme_listPreferredItemHeight = 70; public static final int AppCompatTheme_listPreferredItemHeightLarge = 72; public static final int AppCompatTheme_listPreferredItemHeightSmall = 71; public static final int AppCompatTheme_listPreferredItemPaddingLeft = 73; public static final int AppCompatTheme_listPreferredItemPaddingRight = 74; public static final int AppCompatTheme_panelBackground = 80; public static final int AppCompatTheme_panelMenuListTheme = 82; public static final int AppCompatTheme_panelMenuListWidth = 81; public static final int AppCompatTheme_popupMenuStyle = 61; public static final int AppCompatTheme_popupWindowStyle = 62; public static final int AppCompatTheme_radioButtonStyle = 108; public static final int AppCompatTheme_ratingBarStyle = 109; public static final int AppCompatTheme_ratingBarStyleIndicator = 110; public static final int AppCompatTheme_ratingBarStyleSmall = 111; public static final int AppCompatTheme_searchViewStyle = 69; public static final int AppCompatTheme_seekBarStyle = 112; public static final int AppCompatTheme_selectableItemBackground = 53; public static final int AppCompatTheme_selectableItemBackgroundBorderless = 54; public static final int AppCompatTheme_spinnerDropDownItemStyle = 48; public static final int AppCompatTheme_spinnerStyle = 113; public static final int AppCompatTheme_switchStyle = 114; public static final int AppCompatTheme_textAppearanceLargePopupMenu = 40; public static final int AppCompatTheme_textAppearanceListItem = 77; public static final int AppCompatTheme_textAppearanceListItemSecondary = 78; public static final int AppCompatTheme_textAppearanceListItemSmall = 79; public static final int AppCompatTheme_textAppearancePopupMenuHeader = 42; public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 67; public static final int AppCompatTheme_textAppearanceSearchResultTitle = 66; public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 41; public static final int AppCompatTheme_textColorAlertDialogListItem = 98; public static final int AppCompatTheme_textColorSearchUrl = 68; public static final int AppCompatTheme_toolbarNavigationButtonStyle = 60; public static final int AppCompatTheme_toolbarStyle = 59; public static final int AppCompatTheme_tooltipForegroundColor = 117; public static final int AppCompatTheme_tooltipFrameBackground = 116; 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[] ButtonBarLayout = { 0x7f01010a }; public static final int ButtonBarLayout_allowStacking = 0; public static final int[] ColorStateListItem = { 0x010101a5, 0x0101031f, 0x7f010127 }; public static final int ColorStateListItem_alpha = 2; public static final int ColorStateListItem_android_alpha = 1; public static final int ColorStateListItem_android_color = 0; public static final int[] CompoundButton = { 0x01010107, 0x7f010128, 0x7f010129 }; 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[] DrawerArrowToggle = { 0x7f010135, 0x7f010136, 0x7f010137, 0x7f010138, 0x7f010139, 0x7f01013a, 0x7f01013b, 0x7f01013c }; 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[] FontFamily = { 0x7f010143, 0x7f010144, 0x7f010145, 0x7f010146, 0x7f010147, 0x7f010148 }; public static final int[] FontFamilyFont = { 0x7f010149, 0x7f01014a, 0x7f01014b }; public static final int FontFamilyFont_font = 1; public static final int FontFamilyFont_fontStyle = 0; public static final int FontFamilyFont_fontWeight = 2; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 3; public static final int FontFamily_fontProviderFetchStrategy = 4; public static final int FontFamily_fontProviderFetchTimeout = 5; public static final int FontFamily_fontProviderPackage = 1; public static final int FontFamily_fontProviderQuery = 2; public static final int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f010064, 0x7f01014d, 0x7f01014e, 0x7f01014f }; 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, 0x7f010150, 0x7f010151, 0x7f010152, 0x7f010153, 0x7f010154, 0x7f010155, 0x7f010156, 0x7f010157, 0x7f010158, 0x7f010159 }; public static final int MenuItem_actionLayout = 16; public static final int MenuItem_actionProviderClass = 18; public static final int MenuItem_actionViewClass = 17; public static final int MenuItem_alphabeticModifiers = 13; 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_contentDescription = 19; public static final int MenuItem_iconTint = 21; public static final int MenuItem_iconTintMode = 22; public static final int MenuItem_numericModifiers = 14; public static final int MenuItem_showAsAction = 15; public static final int MenuItem_tooltipText = 20; public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f01015a, 0x7f01015b }; 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 MenuView_subMenuArrow = 8; public static final int[] PopupWindow = { 0x01010176, 0x010102c9, 0x7f010162 }; public static final int[] PopupWindowBackgroundState = { 0x7f010163 }; public static final int PopupWindowBackgroundState_state_above_anchor = 0; public static final int PopupWindow_android_popupAnimationStyle = 1; public static final int PopupWindow_android_popupBackground = 0; public static final int PopupWindow_overlapAnchor = 2; public static final int[] RecycleListView = { 0x7f010164, 0x7f010165 }; public static final int RecycleListView_paddingBottomNoButtons = 0; public static final int RecycleListView_paddingTopNoTitle = 1; public static final int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f010171, 0x7f010172, 0x7f010173, 0x7f010174, 0x7f010175, 0x7f010176, 0x7f010177, 0x7f010178, 0x7f010179, 0x7f01017a, 0x7f01017b, 0x7f01017c, 0x7f01017d }; 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[] Spinner = { 0x010100b2, 0x01010176, 0x0101017b, 0x01010262, 0x7f010076 }; 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, 0x7f01017f, 0x7f010180, 0x7f010181, 0x7f010182, 0x7f010183, 0x7f010184, 0x7f010185, 0x7f010186, 0x7f010187, 0x7f010188, 0x7f010189 }; 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 = 13; public static final int SwitchCompat_splitTrack = 12; public static final int SwitchCompat_switchMinWidth = 10; public static final int SwitchCompat_switchPadding = 11; public static final int SwitchCompat_switchTextAppearance = 9; public static final int SwitchCompat_thumbTextPadding = 8; public static final int SwitchCompat_thumbTint = 3; public static final int SwitchCompat_thumbTintMode = 4; public static final int SwitchCompat_track = 5; public static final int SwitchCompat_trackTint = 6; public static final int SwitchCompat_trackTintMode = 7; public static final int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x0101009a, 0x0101009b, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x010103ac, 0x7f01008b, 0x7f010091 }; public static final int TextAppearance_android_fontFamily = 10; public static final int TextAppearance_android_shadowColor = 6; public static final int TextAppearance_android_shadowDx = 7; public static final int TextAppearance_android_shadowDy = 8; public static final int TextAppearance_android_shadowRadius = 9; public static final int TextAppearance_android_textColor = 3; public static final int TextAppearance_android_textColorHint = 4; public static final int TextAppearance_android_textColorLink = 5; 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_fontFamily = 12; public static final int TextAppearance_textAllCaps = 11; public static final int[] Toolbar = { 0x010100af, 0x01010140, 0x7f01005c, 0x7f01005f, 0x7f010063, 0x7f01006f, 0x7f010070, 0x7f010071, 0x7f010072, 0x7f010073, 0x7f010074, 0x7f010076, 0x7f0101a8, 0x7f0101a9, 0x7f0101aa, 0x7f0101ab, 0x7f0101ac, 0x7f0101ad, 0x7f0101ae, 0x7f0101af, 0x7f0101b0, 0x7f0101b1, 0x7f0101b2, 0x7f0101b3, 0x7f0101b4, 0x7f0101b5, 0x7f0101b6, 0x7f0101b7, 0x7f0101b8 }; public static final int Toolbar_android_gravity = 0; public static final int Toolbar_android_minHeight = 1; public static final int Toolbar_buttonGravity = 21; public static final int Toolbar_collapseContentDescription = 23; public static final int Toolbar_collapseIcon = 22; public static final int Toolbar_contentInsetEnd = 6; public static final int Toolbar_contentInsetEndWithActions = 10; 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_contentInsetStartWithNavigation = 9; public static final int Toolbar_logo = 4; public static final int Toolbar_logoDescription = 26; public static final int Toolbar_maxButtonHeight = 20; public static final int Toolbar_navigationContentDescription = 25; public static final int Toolbar_navigationIcon = 24; public static final int Toolbar_popupTheme = 11; public static final int Toolbar_subtitle = 3; public static final int Toolbar_subtitleTextAppearance = 13; public static final int Toolbar_subtitleTextColor = 28; public static final int Toolbar_title = 2; public static final int Toolbar_titleMargin = 14; public static final int Toolbar_titleMarginBottom = 18; public static final int Toolbar_titleMarginEnd = 16; public static final int Toolbar_titleMarginStart = 15; public static final int Toolbar_titleMarginTop = 17; public static final int Toolbar_titleMargins = 19; public static final int Toolbar_titleTextAppearance = 12; public static final int Toolbar_titleTextColor = 27; public static final int[] View = { 0x01010000, 0x010100da, 0x7f0101b9, 0x7f0101ba, 0x7f0101bb }; public static final int[] ViewBackgroundHelper = { 0x010100d4, 0x7f0101bc, 0x7f0101bd }; 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; } }
a1b0e60796839988a7a2b9f5c41b228463596b64
c217503862a14bf0a86e45073cd981eb9d01cde8
/Jobsheet6/Tugas/Laptop.java
7cb667304fe1afbef331d520fe70cfbc2c0aa7b0
[]
no_license
kinanpermata/PBO-Jobsheets
6c98df5f4597599bf7cc26fda7088d6be5626ea7
3337061eff5883332f88f2d76ad64fb081df0ede
refs/heads/master
2020-08-10T13:40:39.116752
2019-11-06T01:35:07
2019-11-06T01:35:07
214,353,897
1
0
null
2019-11-06T01:35:08
2019-10-11T05:51:20
Java
UTF-8
Java
false
false
707
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 Jobsheet6.Tugas; /** * * @author ASUS */ public class Laptop extends Komputer{ public String jnsBaterai; public Laptop(){ } public Laptop(String merk, int kecProcessor, int sizeMemory, String jnsProcessor, String jnsBaterai){ super(merk, kecProcessor, sizeMemory, jnsProcessor); this.jnsBaterai = jnsBaterai; } public void tampilLaptop(){ super.tampilData(); System.out.println("Jenis Baterai: " +jnsBaterai); } }
df58927157b06687614e7dea5e8f84485d0d1cd3
f7be8b54d56acaf84545b409acb071284f988111
/callring/src/main/java/com/wan/callring/ui/widget/banner/Banner.java
8111001cdf8657fd34b4e75d755ef0ab41659b9f
[]
no_license
CherryLu/wansdk
3af88748966d03f8a3f83ba7a5e5f563638d9f91
0364ada93e16ddf3a201ebddef331d0d4278e2fa
refs/heads/master
2020-05-27T16:13:26.431401
2019-05-30T09:39:55
2019-05-30T09:43:56
188,696,257
0
0
null
null
null
null
UTF-8
Java
false
false
24,114
java
package com.wan.callring.ui.widget.banner; import android.content.Context; import android.content.res.TypedArray; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; import android.view.Gravity; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.ImageView.ScaleType; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import com.wan.callring.R; import com.wan.callring.ui.widget.banner.listener.OnBannerClickListener; import com.wan.callring.ui.widget.banner.listener.OnBannerListener; import com.wan.callring.ui.widget.banner.loader.ImageLoaderInterface; import com.wan.callring.ui.widget.banner.view.BannerViewPager; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; import static android.support.v4.view.ViewPager.OnPageChangeListener; import static android.support.v4.view.ViewPager.PageTransformer; public class Banner extends FrameLayout implements OnPageChangeListener { public String tag = "banner"; private int mIndicatorMargin = BannerConfig.PADDING_SIZE; private int mIndicatorWidth; private int mIndicatorHeight; private int indicatorSize; private int bannerBackgroundImage; private int bannerStyle = BannerConfig.CIRCLE_INDICATOR; private int delayTime = BannerConfig.TIME; private int scrollTime = BannerConfig.DURATION; private boolean isAutoPlay = BannerConfig.IS_AUTO_PLAY; private boolean isScroll = BannerConfig.IS_SCROLL; private int mIndicatorSelectedResId = R.drawable.gray_radius; private int mIndicatorUnselectedResId = R.drawable.white_radius; private int mLayoutResId = R.layout.banner; private int titleHeight; private int titleBackground; private int titleTextColor; private int titleTextSize; private int count = 0; private int currentItem; private int gravity = -1; private int lastPosition = 1; private int scaleType = 1; private List<String> titles; private List imageUrls; private List<View> imageViews; private List<ImageView> indicatorImages; private Context context; private BannerViewPager viewPager; private TextView bannerTitle, numIndicatorInside, numIndicator; private LinearLayout indicator, indicatorInside, titleView; private ImageView bannerDefaultImage; private ImageLoaderInterface imageLoader; private BannerPagerAdapter adapter; private OnPageChangeListener mOnPageChangeListener; private BannerScroller mScroller; private OnBannerClickListener bannerListener; private OnBannerListener listener; private DisplayMetrics dm; private WeakHandler handler = new WeakHandler(); public Banner(Context context) { this(context, null); } public Banner(Context context, AttributeSet attrs) { this(context, attrs, 0); } public Banner(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); this.context = context; titles = new ArrayList<>(); imageUrls = new ArrayList<>(); imageViews = new ArrayList<>(); indicatorImages = new ArrayList<>(); dm = context.getResources().getDisplayMetrics(); indicatorSize = dm.widthPixels / 80; initView(context, attrs); } private void initView(Context context, AttributeSet attrs) { imageViews.clear(); handleTypedArray(context, attrs); View view = LayoutInflater.from(context).inflate(mLayoutResId, this, true); bannerDefaultImage = (ImageView) view.findViewById(R.id.bannerDefaultImage); viewPager = (BannerViewPager) view.findViewById(R.id.bannerViewPager); titleView = (LinearLayout) view.findViewById(R.id.titleView); indicator = (LinearLayout) view.findViewById(R.id.circleIndicator); indicatorInside = (LinearLayout) view.findViewById(R.id.indicatorInside); bannerTitle = (TextView) view.findViewById(R.id.bannerTitle); numIndicator = (TextView) view.findViewById(R.id.numIndicator); numIndicatorInside = (TextView) view.findViewById(R.id.numIndicatorInside); bannerDefaultImage.setImageResource(bannerBackgroundImage); initViewPagerScroll(); } private void handleTypedArray(Context context, AttributeSet attrs) { if (attrs == null) { return; } TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.Banner); mIndicatorWidth = typedArray.getDimensionPixelSize(R.styleable.Banner_indicator_width, indicatorSize); mIndicatorHeight = typedArray.getDimensionPixelSize(R.styleable.Banner_indicator_height, indicatorSize); mIndicatorMargin = typedArray.getDimensionPixelSize(R.styleable.Banner_indicator_margin, BannerConfig.PADDING_SIZE); mIndicatorSelectedResId = typedArray.getResourceId(R.styleable.Banner_indicator_drawable_selected, R.drawable.gray_radius); mIndicatorUnselectedResId = typedArray.getResourceId(R.styleable.Banner_indicator_drawable_unselected, R.drawable.white_radius); scaleType = typedArray.getInt(R.styleable.Banner_image_scale_type, scaleType); delayTime = typedArray.getInt(R.styleable.Banner_delay_time, BannerConfig.TIME); scrollTime = typedArray.getInt(R.styleable.Banner_scroll_time, BannerConfig.DURATION); isAutoPlay = typedArray.getBoolean(R.styleable.Banner_is_auto_play, BannerConfig.IS_AUTO_PLAY); titleBackground = typedArray.getColor(R.styleable.Banner_title_background, BannerConfig.TITLE_BACKGROUND); titleHeight = typedArray.getDimensionPixelSize(R.styleable.Banner_title_height, BannerConfig.TITLE_HEIGHT); titleTextColor = typedArray.getColor(R.styleable.Banner_title_textcolor, BannerConfig.TITLE_TEXT_COLOR); titleTextSize = typedArray.getDimensionPixelSize(R.styleable.Banner_title_textsize, BannerConfig.TITLE_TEXT_SIZE); mLayoutResId = typedArray.getResourceId(R.styleable.Banner_banner_layout, mLayoutResId); bannerBackgroundImage = typedArray.getResourceId(R.styleable.Banner_banner_default_image, R.mipmap.no_banner); typedArray.recycle(); } private void initViewPagerScroll() { try { Field mField = ViewPager.class.getDeclaredField("mScroller"); mField.setAccessible(true); mScroller = new BannerScroller(viewPager.getContext()); mScroller.setDuration(scrollTime); mField.set(viewPager, mScroller); } catch (Exception e) { Log.e(tag, e.getMessage()); } } public Banner isAutoPlay(boolean isAutoPlay) { this.isAutoPlay = isAutoPlay; return this; } public Banner setImageLoader(ImageLoaderInterface imageLoader) { this.imageLoader = imageLoader; return this; } public Banner setTitleBackground(int color){ this.titleBackground = color; return this; } public Banner setDelayTime(int delayTime) { this.delayTime = delayTime; return this; } public Banner setIndicatorGravity(int type) { switch (type) { case BannerConfig.LEFT: this.gravity = Gravity.LEFT | Gravity.CENTER_VERTICAL; break; case BannerConfig.CENTER: this.gravity = Gravity.CENTER; break; case BannerConfig.RIGHT: this.gravity = Gravity.RIGHT | Gravity.CENTER_VERTICAL; break; } return this; } public Banner setBannerAnimation(Class<? extends PageTransformer> transformer) { try { setPageTransformer(true, transformer.newInstance()); } catch (Exception e) { Log.e(tag, "Please set the PageTransformer class"); } return this; } /** * Set the number of pages that should be retained to either side of the * current page in the view hierarchy in an idle state. Pages beyond this * limit will be recreated from the adapter when needed. * * @param limit How many pages will be kept offscreen in an idle state. * @return Banner */ public Banner setOffscreenPageLimit(int limit) { if (viewPager != null) { viewPager.setOffscreenPageLimit(limit); } return this; } /** * Set a {@link PageTransformer} that will be called for each attached page whenever * the scroll position is changed. This allows the application to apply custom property * transformations to each page, overriding the default sliding look and feel. * * @param reverseDrawingOrder true if the supplied PageTransformer requires page views * to be drawn from last to first instead of first to last. * @param transformer PageTransformer that will modify each page's animation properties * @return Banner */ public Banner setPageTransformer(boolean reverseDrawingOrder, PageTransformer transformer) { viewPager.setPageTransformer(reverseDrawingOrder, transformer); return this; } public Banner setBannerTitles(List<String> titles) { this.titles = titles; return this; } public Banner setBannerStyle(int bannerStyle) { this.bannerStyle = bannerStyle; return this; } public Banner setViewPagerIsScroll(boolean isScroll) { this.isScroll = isScroll; return this; } public Banner setImages(List<?> imageUrls) { this.imageUrls = imageUrls; this.count = imageUrls.size(); return this; } public void update(List<?> imageUrls, List<String> titles) { this.titles.clear(); this.titles.addAll(titles); update(imageUrls); } public void update(List<?> imageUrls) { this.imageUrls.clear(); this.imageViews.clear(); this.indicatorImages.clear(); this.imageUrls.addAll(imageUrls); this.count = this.imageUrls.size(); start(); } public void updateBannerStyle(int bannerStyle) { indicator.setVisibility(GONE); numIndicator.setVisibility(GONE); numIndicatorInside.setVisibility(GONE); indicatorInside.setVisibility(GONE); bannerTitle.setVisibility(View.GONE); titleView.setVisibility(View.GONE); this.bannerStyle = bannerStyle; start(); } public Banner start() { setBannerStyleUI(); setImageList(imageUrls); setData(); return this; } private void setTitleStyleUI() { if (titles.size() != imageUrls.size()) { throw new RuntimeException("[Banner] --> The number of titles and images is different"); } if (titleBackground != -1) { titleView.setBackgroundColor(titleBackground); } if (titleHeight != -1) { titleView.setLayoutParams(new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, titleHeight)); } if (titleTextColor != -1) { bannerTitle.setTextColor(titleTextColor); } if (titleTextSize != -1) { bannerTitle.setTextSize(TypedValue.COMPLEX_UNIT_PX, titleTextSize); } if (titles != null && titles.size() > 0) { bannerTitle.setText(titles.get(0)); bannerTitle.setVisibility(View.VISIBLE); titleView.setVisibility(View.VISIBLE); } } private void setBannerStyleUI() { int visibility =count > 1 ? View.VISIBLE : View.GONE; switch (bannerStyle) { case BannerConfig.CIRCLE_INDICATOR: indicator.setVisibility(visibility); break; case BannerConfig.NUM_INDICATOR: numIndicator.setVisibility(visibility); break; case BannerConfig.NUM_INDICATOR_TITLE: numIndicatorInside.setVisibility(visibility); setTitleStyleUI(); break; case BannerConfig.CIRCLE_INDICATOR_TITLE: indicator.setVisibility(visibility); setTitleStyleUI(); break; case BannerConfig.CIRCLE_INDICATOR_TITLE_INSIDE: indicatorInside.setVisibility(visibility); setTitleStyleUI(); break; } } private void initImages() { imageViews.clear(); if (bannerStyle == BannerConfig.CIRCLE_INDICATOR || bannerStyle == BannerConfig.CIRCLE_INDICATOR_TITLE || bannerStyle == BannerConfig.CIRCLE_INDICATOR_TITLE_INSIDE) { createIndicator(); } else if (bannerStyle == BannerConfig.NUM_INDICATOR_TITLE) { numIndicatorInside.setText("1/" + count); } else if (bannerStyle == BannerConfig.NUM_INDICATOR) { numIndicator.setText("1/" + count); } } private void setImageList(List<?> imagesUrl) { if (imagesUrl == null || imagesUrl.size() <= 0) { bannerDefaultImage.setVisibility(VISIBLE); Log.e(tag, "The image data set is empty."); return; } bannerDefaultImage.setVisibility(GONE); initImages(); for (int i = 0; i <= count + 1; i++) { View imageView = null; if (imageLoader != null) { imageView = imageLoader.createImageView(context); } if (imageView == null) { imageView = new ImageView(context); } setScaleType(imageView); Object url = null; if (i == 0) { url = imagesUrl.get(count - 1); } else if (i == count + 1) { url = imagesUrl.get(0); } else { url = imagesUrl.get(i - 1); } imageViews.add(imageView); if (imageLoader != null) imageLoader.displayImage(context, url, imageView); else Log.e(tag, "Please set images loader."); } } private void setScaleType(View imageView) { if (imageView instanceof ImageView) { ImageView view = ((ImageView) imageView); switch (scaleType) { case 0: view.setScaleType(ScaleType.CENTER); break; case 1: view.setScaleType(ScaleType.CENTER_CROP); break; case 2: view.setScaleType(ScaleType.CENTER_INSIDE); break; case 3: view.setScaleType(ScaleType.FIT_CENTER); break; case 4: view.setScaleType(ScaleType.FIT_END); break; case 5: view.setScaleType(ScaleType.FIT_START); break; case 6: view.setScaleType(ScaleType.FIT_XY); break; case 7: view.setScaleType(ScaleType.MATRIX); break; } } } private void createIndicator() { indicatorImages.clear(); indicator.removeAllViews(); indicatorInside.removeAllViews(); for (int i = 0; i < count; i++) { ImageView imageView = new ImageView(context); imageView.setScaleType(ScaleType.CENTER_CROP); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(mIndicatorWidth, mIndicatorHeight); params.leftMargin = mIndicatorMargin; params.rightMargin = mIndicatorMargin; if (i == 0) { imageView.setImageResource(mIndicatorSelectedResId); } else { imageView.setImageResource(mIndicatorUnselectedResId); } indicatorImages.add(imageView); if (bannerStyle == BannerConfig.CIRCLE_INDICATOR || bannerStyle == BannerConfig.CIRCLE_INDICATOR_TITLE) indicator.addView(imageView, params); else if (bannerStyle == BannerConfig.CIRCLE_INDICATOR_TITLE_INSIDE) indicatorInside.addView(imageView, params); } } private void setData() { currentItem = 1; if (adapter == null) { adapter = new BannerPagerAdapter(); viewPager.addOnPageChangeListener(this); } viewPager.setAdapter(adapter); viewPager.setFocusable(true); viewPager.setCurrentItem(1); if (gravity != -1) indicator.setGravity(gravity); if (isScroll && count > 1) { viewPager.setScrollable(true); } else { viewPager.setScrollable(false); } if (isAutoPlay) startAutoPlay(); } public void startAutoPlay() { handler.removeCallbacks(task); handler.postDelayed(task, delayTime); } public void stopAutoPlay() { handler.removeCallbacks(task); } private final Runnable task = new Runnable() { @Override public void run() { if (count > 1 && isAutoPlay) { currentItem = currentItem % (count + 1) + 1; // Log.i(tag, "curr:" + currentItem + " count:" + count); if (currentItem == 1) { viewPager.setCurrentItem(currentItem, false); handler.post(task); } else { viewPager.setCurrentItem(currentItem); handler.postDelayed(task, delayTime); } } } }; @Override public boolean dispatchTouchEvent(MotionEvent ev) { // Log.i(tag, ev.getAction() + "--" + isAutoPlay); if (parent != null) { parent.requestDisallowInterceptTouchEvent(true); } if (isAutoPlay) { int action = ev.getAction(); if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_OUTSIDE) { startAutoPlay(); } else if (action == MotionEvent.ACTION_DOWN) { stopAutoPlay(); } } return super.dispatchTouchEvent(ev); } /** * 返回真实的位置 * * @param position * @return 下标从0开始 */ public int toRealPosition(int position) { int realPosition = (position - 1) % count; if (realPosition < 0) realPosition += count; return realPosition; } class BannerPagerAdapter extends PagerAdapter { @Override public int getCount() { return imageViews.size(); } @Override public boolean isViewFromObject(View view, Object object) { return view == object; } @Override public Object instantiateItem(ViewGroup container, final int position) { container.addView(imageViews.get(position)); View view = imageViews.get(position); if (bannerListener != null) { view.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Log.e(tag, "你正在使用旧版点击事件接口,下标是从1开始," + "为了体验请更换为setOnBannerListener,下标从0开始计算"); bannerListener.OnBannerClick(position); } }); } if (listener != null) { view.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { listener.OnBannerClick(toRealPosition(position)); } }); } return view; } @Override public void destroyItem(ViewGroup container, int position, Object object) { container.removeView((View) object); } } @Override public void onPageScrollStateChanged(int state) { if (mOnPageChangeListener != null) { mOnPageChangeListener.onPageScrollStateChanged(state); } // Log.i(tag,"currentItem: "+currentItem); switch (state) { case 0://No operation if (currentItem == 0) { viewPager.setCurrentItem(count, false); } else if (currentItem == count + 1) { viewPager.setCurrentItem(1, false); } break; case 1://start Sliding if (currentItem == count + 1) { viewPager.setCurrentItem(1, false); } else if (currentItem == 0) { viewPager.setCurrentItem(count, false); } break; case 2://end Sliding break; } } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { if (mOnPageChangeListener != null) { mOnPageChangeListener.onPageScrolled(toRealPosition(position), positionOffset, positionOffsetPixels); } } @Override public void onPageSelected(int position) { currentItem=position; if (mOnPageChangeListener != null) { mOnPageChangeListener.onPageSelected(toRealPosition(position)); } if (bannerStyle == BannerConfig.CIRCLE_INDICATOR || bannerStyle == BannerConfig.CIRCLE_INDICATOR_TITLE || bannerStyle == BannerConfig.CIRCLE_INDICATOR_TITLE_INSIDE) { indicatorImages.get((lastPosition - 1 + count) % count).setImageResource(mIndicatorUnselectedResId); indicatorImages.get((position - 1 + count) % count).setImageResource(mIndicatorSelectedResId); lastPosition = position; } if (position == 0) position = count; if (position > count) position = 1; switch (bannerStyle) { case BannerConfig.CIRCLE_INDICATOR: break; case BannerConfig.NUM_INDICATOR: numIndicator.setText(position + "/" + count); break; case BannerConfig.NUM_INDICATOR_TITLE: numIndicatorInside.setText(position + "/" + count); bannerTitle.setText(titles.get(position - 1)); break; case BannerConfig.CIRCLE_INDICATOR_TITLE: bannerTitle.setText(titles.get(position - 1)); break; case BannerConfig.CIRCLE_INDICATOR_TITLE_INSIDE: bannerTitle.setText(titles.get(position - 1)); break; } } @Deprecated public Banner setOnBannerClickListener(OnBannerClickListener listener) { this.bannerListener = listener; return this; } /** * 废弃了旧版接口,新版的接口下标是从1开始,同时解决下标越界问题 * * @param listener * @return */ public Banner setOnBannerListener(OnBannerListener listener) { this.listener = listener; return this; } public void setOnPageChangeListener(OnPageChangeListener onPageChangeListener) { mOnPageChangeListener = onPageChangeListener; } public void releaseBanner() { handler.removeCallbacksAndMessages(null); } private ViewGroup parent; public void setParent(ViewGroup parent) { this.parent = parent; viewPager.setParent(this); } }
[ "“[email protected]”" ]
298084a1bfc7d1509dd06d128dee441a3188f0e2
0e7e61138565ea03bf491a5ce1345c7457ba0b0f
/account/src/main/java/co/pailab/lime/repository/GroupRepository.java
e7d829197858ec303e659ba7a9b20b25ae82953e
[]
no_license
hoangdh143/coxplore-services
23e35262f51d55fc238112627dd8a4524ed0f534
b83ef4f2a9d5900289c1ad3eedea86c4172bb2e3
refs/heads/master
2022-12-21T10:24:28.320609
2019-06-17T06:53:35
2019-06-17T06:53:35
192,291,012
0
0
null
2022-12-16T02:24:36
2019-06-17T06:52:16
Java
UTF-8
Java
false
false
550
java
package co.pailab.lime.repository; import co.pailab.lime.model.Group; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import java.util.List; public interface GroupRepository extends JpaRepository<Group, Long> { Group findByName(String name); Group findById(int id); List<Group> findAllByOrderById(Pageable pageable); @Query(value = "Select count(*) from `group`", nativeQuery = true) Integer countAll(); }
5ea651f0b6d3be8d4f2236b350c18584268a7b15
9bb8f6f67d1f5ed6fca29febe1e9891583ab69b8
/src/main/java/structural/facade/DbSingleton.java
f6ddd631cd0fd91b373c6726f93d7fd81050a4c0
[]
no_license
sunilgc0/Design-Patterns
be85b7bde6f988143e6464647620f9d4e7ac2132
88ff51ed69d85a100f2d95862ffcd269793b6a9b
refs/heads/master
2023-02-27T01:08:24.907818
2021-02-01T21:06:19
2021-02-01T21:06:19
335,080,661
0
0
null
null
null
null
UTF-8
Java
false
false
1,037
java
package structural.facade; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class DbSingleton { private static volatile DbSingleton instance = null; private Connection conn = null; private DbSingleton () { try { DriverManager.registerDriver(new org.apache.derby.jdbc.EmbeddedDriver()); } catch (SQLException e) { e.printStackTrace(); } } public static DbSingleton getInstance() { if(instance == null) { synchronized(DbSingleton.class) { if (instance == null) { instance = new DbSingleton(); } } } return instance; } public Connection getConnection() throws SQLException { if(conn == null || conn.isClosed()) { synchronized (DbSingleton.class) { if(conn == null || conn.isClosed()) { try { String dbUrl = "jdbc:derby:memory:codejava/webdb;create=true"; conn = DriverManager.getConnection(dbUrl); } catch (SQLException e) { e.printStackTrace(); } } } } return conn; } }
b2f49e768e22f4d146249fd67a48993c49b46eab
b27129c4fdc9637326690a0ee8d6fe4fba22de11
/app/src/main/java/edu/temple/tuhub/MarketImageloadThread.java
738ec909b46b33210548229d6593f232a8e489c9
[]
no_license
RobSenpai/TUHub-Android
fd4ceddd6ef1c7e8982a93f3e55f19e97b2d5547
74e7e3f6d1d8b4ede394ca57ee339f9ba79ce25d
refs/heads/master
2021-01-19T15:19:04.282494
2017-04-13T04:47:53
2017-04-13T04:47:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
984
java
package edu.temple.tuhub; import android.graphics.BitmapFactory; import android.os.Handler; import android.os.Message; import java.io.IOException; import java.net.URL; import edu.temple.tuhub.models.ImageItem; import edu.temple.tuhub.models.MarketImageItem; /** * Created by mangaramu on 4/2/2017. */ public class MarketImageloadThread extends Thread { MarketImageItem Imagei; Handler placetosend; MarketImageloadThread(MarketImageItem x, Handler y) { Imagei = x; placetosend = y; } @Override public void run() { /* try { Imagei.getItemref().setNewsimage(BitmapFactory.decodeStream(((URL)new URL(Imagei.getItemref().newsimagelink)).openStream())); //TODO fix this so that item can be obtained! } catch (IOException e) { e.printStackTrace(); }*/ Message m = Message.obtain(); m.obj=Imagei; m.setTarget(placetosend); m.sendToTarget(); } }
fef17b1e203c51eccf2a4263985d28b43c0cee3a
2bd96755d49df6c8add09a5765df123161aaaf04
/epragati-reg-vo/src/main/java/org/epragati/regservice/vo/OtherStateRegVO.java
ddefd497dd67dc2682f3e3b39762ef707295da64
[]
no_license
otkp/28-reg-vo
7093b1f30e49bd8e51028fcc3b6347234ee7e66a
0fabc01db363e20ac40facfa9492d6ef804c36cd
refs/heads/master
2022-12-30T04:07:07.308541
2020-10-16T10:53:59
2020-10-16T10:53:59
304,599,461
0
0
null
null
null
null
UTF-8
Java
false
false
1,980
java
package org.epragati.regservice.vo; import java.io.Serializable; import org.epragati.master.vo.FinanceDetailsVO; import org.epragati.master.vo.RegistrationDetailsVO; public class OtherStateRegVO implements Serializable{ /** * */ private static final long serialVersionUID = -1540885143741077567L; private RegistrationDetailsVO registrationDetails; private NOCDetailsVO nOCDetails; private String prNo; private boolean getOtherStateDataFromVahanService; /** * @return the getOtherStateDataFromVahanService */ public boolean isGetOtherStateDataFromVahanService() { return getOtherStateDataFromVahanService; } /** * @param getOtherStateDataFromVahanService the getOtherStateDataFromVahanService to set */ public void setGetOtherStateDataFromVahanService(boolean getOtherStateDataFromVahanService) { this.getOtherStateDataFromVahanService = getOtherStateDataFromVahanService; } private PUCDetailsVO pucDetails; /** * @return the registrationDetails */ public RegistrationDetailsVO getRegistrationDetails() { return registrationDetails; } /** * @param registrationDetails the registrationDetails to set */ public void setRegistrationDetails(RegistrationDetailsVO registrationDetails) { this.registrationDetails = registrationDetails; } /** * @return the nOCDetails */ public NOCDetailsVO getnOCDetails() { return nOCDetails; } /** * @param nOCDetails the nOCDetails to set */ public void setnOCDetails(NOCDetailsVO nOCDetails) { this.nOCDetails = nOCDetails; } /** * @return the prNo */ public String getPrNo() { return prNo; } /** * @param prNo the prNo to set */ public void setPrNo(String prNo) { this.prNo = prNo; } /** * @return the pucDetails */ public PUCDetailsVO getPucDetails() { return pucDetails; } /** * @param pucDetails the pucDetails to set */ public void setPucDetails(PUCDetailsVO pucDetails) { this.pucDetails = pucDetails; } }
19b3fa314379804829b3a13eaf3ca9a1007ca3fc
52d6aac9a5a707b9599b2b889c3bf608102666f8
/week1-022.Password/src/Password.java
cc489bb40f6f5a3fe38dba756dbaff0e07d6ed98
[]
no_license
dlm2595/part1javamooc2013
9f2966892eef7f753ae5ce0ad9a3bab372927e44
1935292a7cd3da94608e31eb852985bd99d7b648
refs/heads/master
2022-07-28T15:55:34.322561
2020-05-21T12:23:23
2020-05-21T12:23:23
265,837,234
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
import java.util.Scanner; public class Password { public static void main(String[] args) { Scanner reader = new Scanner(System.in); String password = "carrot"; // Use carrot as password when running tests. // Write your code here while (true){ System.out.print("Type the password: "); String input = reader.nextLine(); if (input.equals(password)) { System.out.println("Right!"); break; } else { System.out.println("Wrong!"); } } System.out.println("The secret is: jrry qbar!"); } }
92bad537e5ccb6007253fa47fdfcecd7e43e4790
541298b7b5299c8d3c1186c77e7e5d1391951a4a
/bit/SpringTest/diTest02/src/com/bit/exam06/Executor.java
fc8f9ac85f4ae3127bbccf5f35bd30451069c17a
[]
no_license
ldh85246/Rong
ec055f4522a1023343abaac47e6506348ddeac04
f176327d20324f1ad01a2019305b60aca313e101
refs/heads/master
2022-10-04T11:28:20.854497
2020-09-15T10:56:12
2020-09-15T10:56:12
211,037,350
0
1
null
2022-09-01T23:31:54
2019-09-26T08:19:33
Java
UHC
Java
false
false
313
java
package com.bit.exam06; public class Executor { private Worker worker; public Executor(Worker worker) { super(); this.worker = worker; System.out.println("생성자1 동작함"); this.worker.pro(); } public Executor(String run) { System.out.println("생성자2 동작함"); } }
f11b5a74af0f618772b430fdc69c7a33680e072a
a770e95028afb71f3b161d43648c347642819740
/sources/org/telegram/ui/MessageStatisticActivity$$ExternalSyntheticLambda9.java
8b56dde393e245978c0012a74af75469508e577c
[]
no_license
Edicksonjga/TGDecompiledBeta
d7aa48a2b39bbaefd4752299620ff7b72b515c83
d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b
refs/heads/master
2023-08-25T04:12:15.592281
2021-10-28T20:24:07
2021-10-28T20:24:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
package org.telegram.ui; import android.view.View; import org.telegram.ui.Components.RecyclerListView; public final /* synthetic */ class MessageStatisticActivity$$ExternalSyntheticLambda9 implements RecyclerListView.OnItemClickListener { public final /* synthetic */ MessageStatisticActivity f$0; public /* synthetic */ MessageStatisticActivity$$ExternalSyntheticLambda9(MessageStatisticActivity messageStatisticActivity) { this.f$0 = messageStatisticActivity; } public final void onItemClick(View view, int i) { this.f$0.lambda$createView$0(view, i); } }
2783276ee6ab49be94a6006047365844d8be08aa
e1de174c5fafe2daf5ded7d80dce721c46d0e3c2
/src/ChanelButton.java
98ee086a10b9cb1e808891b0415c1b7b80ec1241
[]
no_license
alfamefiuomega/Exercises-
07175f0794d6e23fdda020e3d612b0e5753bf785
3d1a7f896a9d17b69c30c19250a6dac87d327464
refs/heads/master
2020-09-19T04:08:46.469202
2019-11-28T22:17:43
2019-11-28T22:17:43
224,201,922
1
0
null
null
null
null
UTF-8
Java
false
false
644
java
public class ChanelButton extends Button { private int programNumber; private Integer canal; public void setProgramNumber(int programNumber) { this.programNumber = programNumber; } @Override public <T> T onClick() { switch (programNumber) { case 1: { setProgramNumber(1); break; } case 2: { setProgramNumber(2); break; } case 3: { setProgramNumber(3); break; } } { return (T) canal; } } }
707093285b40497506f5d2137b40791737720180
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/com/mapzen/android/lost/api/Status.java
332febf9e5cb15a53e0192cfb34e75f7216557ed
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
4,150
java
package com.mapzen.android.lost.api; import android.app.Activity; import android.app.PendingIntent; import android.content.IntentSender; import android.os.Parcel; import android.os.Parcelable; import com.dji.scan.zxing.Intents; import com.mapzen.android.lost.internal.DialogDisplayer; public class Status implements Result, Parcelable { public static final int CANCELLED = 16; public static final Parcelable.Creator<Status> CREATOR = new Parcelable.Creator<Status>() { /* class com.mapzen.android.lost.api.Status.AnonymousClass1 */ public Status createFromParcel(Parcel in2) { return new Status(in2); } public Status[] newArray(int size) { return new Status[size]; } }; public static final int INTERNAL_ERROR = 8; public static final int INTERRUPTED = 14; public static final int RESOLUTION_REQUIRED = 6; public static final int SETTINGS_CHANGE_UNAVAILABLE = 8502; public static final int SUCCESS = 0; public static final int TIMEOUT = 15; private final DialogDisplayer dialogDisplayer; private final PendingIntent pendingIntent; private final int statusCode; private final String statusMessage; public Status(int statusCode2) { this(statusCode2, null, null); } public Status(int statusCode2, DialogDisplayer dialogDisplayer2) { this(statusCode2, dialogDisplayer2, null); } public Status(int statusCode2, DialogDisplayer dialogDisplayer2, PendingIntent pendingIntent2) { String statusMessage2; switch (statusCode2) { case 0: statusMessage2 = "SUCCESS"; break; case 6: statusMessage2 = "RESOLUTION_REQUIRED"; break; case 8: statusMessage2 = "INTERNAL_ERROR"; break; case 14: statusMessage2 = "INTERRUPTED"; break; case 15: statusMessage2 = Intents.Scan.TIMEOUT; break; case 16: statusMessage2 = "CANCELLED"; break; case 8502: statusMessage2 = "SETTINGS_CHANGE_UNAVAILABLE"; break; default: statusMessage2 = "UNKNOWN STATUS"; break; } this.statusCode = statusCode2; this.statusMessage = statusMessage2; this.pendingIntent = pendingIntent2; this.dialogDisplayer = dialogDisplayer2; } protected Status(Parcel in2) { this.statusCode = in2.readInt(); this.statusMessage = in2.readString(); this.pendingIntent = (PendingIntent) in2.readParcelable(PendingIntent.class.getClassLoader()); this.dialogDisplayer = (DialogDisplayer) in2.readParcelable(DialogDisplayer.class.getClassLoader()); } public void startResolutionForResult(Activity activity, int requestCode) throws IntentSender.SendIntentException { if (hasResolution()) { this.dialogDisplayer.displayDialog(activity, requestCode, this.pendingIntent); } } public String getStatusMessage() { return this.statusMessage; } public boolean hasResolution() { return (this.pendingIntent == null || this.dialogDisplayer == null) ? false : true; } public boolean isSuccess() { return this.statusCode == 0; } public boolean isCanceled() { return this.statusCode == 16; } public boolean isInterrupted() { return this.statusCode == 14; } public int getStatusCode() { return this.statusCode; } public PendingIntent getResolution() { return this.pendingIntent; } public Status getStatus() { return this; } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int i) { parcel.writeInt(this.statusCode); parcel.writeString(this.statusMessage); parcel.writeParcelable(this.pendingIntent, i); parcel.writeParcelable(this.dialogDisplayer, i); } }
9ab64683768e53cf99d37c8c2ab5e3b067272119
65c79e69d7c97dc7eb1532e77ae1bd2ece83fbe6
/JavaBase/src/main/java/com/zjk/hy/jvm/FullGC_Problem01.java
175d97a1cd541674cebeac5545a5920fd60d13fa
[]
no_license
zhangjukai/Go-Gad
8618bf0a377d34f784ad7c201d08431861f48c52
d463e3faccc580d77b67886a11288c78622ddbae
refs/heads/master
2023-05-31T06:37:30.215749
2023-05-12T03:28:19
2023-05-12T03:28:19
185,611,030
0
0
null
2022-12-15T23:30:09
2019-05-08T13:25:51
Java
UTF-8
Java
false
false
1,545
java
package com.zjk.hy.jvm; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; /** * 从数据库中读取信用数据,套用模型,并把结果进行记录和传输 */ public class FullGC_Problem01 { private static class CardInfo { BigDecimal price = new BigDecimal(0.0); String name = "张三"; int age = 5; Date birthdate = new Date(); public void m() {} } private static ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(50, new ThreadPoolExecutor.DiscardOldestPolicy()); public static void main(String[] args) throws Exception { executor.setMaximumPoolSize(50); for (;;){ modelFit(); Thread.sleep(100); } } private static void modelFit(){ List<CardInfo> taskList = getAllCardInfo(); taskList.forEach(info -> { // do something executor.scheduleWithFixedDelay(() -> { //do sth with info info.m(); }, 2, 3, TimeUnit.SECONDS); }); } private static List<CardInfo> getAllCardInfo(){ List<CardInfo> taskList = new ArrayList<>(); for (int i = 0; i < 100; i++) { CardInfo ci = new CardInfo(); taskList.add(ci); } return taskList; } }
8d1d8b8d115dc82eda4dba91f964f75833c4019a
0acd22e8a5f2e295652815e062015a4d434e2ffc
/src/cn/edu/lsu/dao/impl/OrderDAOImpl.java
fe74fd9d5ebf4d8d3a83aec0dad99509005689d6
[]
no_license
nalixu/bookstore
b6d4593dec86ed5b2024d9631b7e6c4d1cfc4913
b2109fe5eb6697b5e88e807e7c04517e00684aa4
refs/heads/master
2021-09-01T19:20:44.197043
2017-12-28T12:02:23
2017-12-28T12:02:23
115,618,498
0
0
null
null
null
null
UTF-8
Java
false
false
3,995
java
package cn.edu.lsu.dao.impl; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import cn.edu.lsu.bean.Order; import cn.edu.lsu.dao.BaseDao; import cn.edu.lsu.dao.OrderDAO; public class OrderDAOImpl extends BaseDao implements OrderDAO { @Override public void addProduct(Order order) { // TODO Auto-generated method stub } @Override public List<Order> findOrderByUser(int id) { // TODO Auto-generated method stub return null; } @Override public Order findOrderById(String id) { Connection conn = getConnection(); PreparedStatement ps = null; ResultSet rs = null; String sql = "select * from orders inner join user on orders.user_id = user.id where orders.id=?;"; Order o = new Order(); try { ps = conn.prepareStatement(sql); ps.setString(1, id); rs = ps.executeQuery(); while (rs.next()){ o.setId(rs.getString("id")); o.setMoney(rs.getDouble("money")); o.setOrdertime(rs.getDate("ordertime")); o.setPaystate(rs.getInt("paystate")); o.setReceiverAddress(rs.getString("receiverAddress")); o.setReceiverName(rs.getString("receiverName")); o.setReceiverPhone(rs.getString("receiverPhone")); o.setUserid(rs.getInt("user_id")); o.setUsername(rs.getString("username")); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ close(rs,ps,conn); } System.out.println("订单 "+ o.toString()); return o; } @Override public List<Order> findAllOrder() { List<Order> orders = new ArrayList<Order>(); Connection conn = getConnection(); PreparedStatement ps = null; ResultSet rs = null; String sql = "select * from orders inner join user on orders.user_id = user.id;"; try { ps = conn.prepareStatement(sql); rs = ps.executeQuery(); while (rs.next()){ Order o = new Order(); o.setId(rs.getString("id")); o.setMoney(rs.getDouble("money")); o.setOrdertime(rs.getDate("ordertime")); o.setPaystate(rs.getInt("paystate")); o.setReceiverAddress(rs.getString("receiverAddress")); o.setReceiverName(rs.getString("receiverName")); o.setReceiverPhone(rs.getString("receiverPhone")); o.setUserid(rs.getInt("user_id")); o.setUsername(rs.getString("username")); orders.add(o); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ close(rs,ps,conn); } return orders; } @Override public void updateOrderState(String id) { // TODO Auto-generated method stub } @Override public List<Order> findOrderByManyCondition(String id, String receiverName) { List<Order> orders = new ArrayList<Order>(); Connection conn = getConnection(); PreparedStatement ps = null; ResultSet rs = null; String sql = "select * from orders inner join user on orders.user_id=user.id where 1=1"; if(id!=null && id.trim().length()>0){ sql = sql + " and orders.id='"+id+"'"; } if(receiverName!=null && receiverName.trim().length()>0){ sql = sql + " and orders.receiverName='"+receiverName+"'"; } try { ps = conn.prepareStatement(sql); rs = ps.executeQuery(); while (rs.next()){ Order o = new Order(); o.setId(rs.getString("id")); o.setMoney(rs.getDouble("money")); o.setOrdertime(rs.getDate("ordertime")); o.setPaystate(rs.getInt("paystate")); o.setReceiverAddress(rs.getString("receiverAddress")); o.setReceiverName(rs.getString("receiverName")); o.setReceiverPhone(rs.getString("receiverPhone")); o.setUserid(rs.getInt("user_id")); o.setUsername(rs.getString("username")); orders.add(o); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ close(rs,ps,conn); } return orders; } @Override public void delOrderById(String id) { // TODO Auto-generated method stub } }
7911e37eb673f2ab9de4c1a85703a6538e2fb831
253c879662a6800700fc7a0917d0015e034dd6a5
/workspace/08_exception/src/ex07_exception/DepositException.java
4cef33ee553a462bdac5a07dab41caf17f8a7d47
[]
no_license
jeongyuhan/javastudy
259a8004cee83406fbcb8e52f37e4c92cd0a6620
5dd3e49a7149c6b1266f54caa670425ffff08d8f
refs/heads/main
2023-04-01T21:55:09.999121
2021-04-01T08:41:04
2021-04-01T08:41:04
347,885,738
0
0
null
null
null
null
UTF-8
Java
false
false
182
java
package ex07_exception; @SuppressWarnings("serial") public class DepositException extends Exception { public DepositException(String message) { super(message); } }
6a53e19507b1de1b8eded2992285e57fae87bcd2
cfd60dd9cf3c18ea77b95560f8d9aa1f48e8c935
/app/src/main/java/edu/nntu/gerforecast/fragments/MainMenuFragment.java
4557ace97d8778600a48503d2ee9e94d71dac577
[]
no_license
GromHoll/GerForecast-Android
0910e2873b2d22cc859da2fa5ec4e648feec4111
a4baf581e9b6c704aa7d34af9ea1ece60dd59dbd
refs/heads/master
2021-01-23T16:37:46.238127
2015-06-03T22:40:03
2015-06-03T22:40:03
35,975,989
0
0
null
null
null
null
UTF-8
Java
false
false
1,229
java
package edu.nntu.gerforecast.fragments; import android.app.Activity; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import edu.nntu.gerforecast.MainActivity; import edu.nntu.gerforecast.R; public class MainMenuFragment extends MainActivity.PlaceholderFragment { public static MainMenuFragment newInstance(int sectionNumber) { MainMenuFragment fragment = new MainMenuFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } public MainMenuFragment() { /* Required empty public constructor */ } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_main, container, false); } @Override public void onAttach(Activity activity) { super.onAttach(activity); } @Override public void onDetach() { super.onDetach(); } }
2288a58acf27f5bd195ed6c4012a3e0d43cc5798
3e513d542536eccff06ea9cf96f7481c73422e8b
/src/main/java/model/Car.java
f541d7eb71aa3c69d1bacd3f5e5971c38ad362a0
[]
no_license
SergeyKostin/CarShowroom
10ca37e31ccdfa3b7ebeff56c7fe2ccfc86537d7
93be4c4155aee70f2245421e931650e4637f3e68
refs/heads/master
2020-05-19T07:04:15.334790
2019-06-12T10:21:05
2019-06-12T10:21:05
184,889,575
0
0
null
null
null
null
UTF-8
Java
false
false
1,946
java
package model; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; @Document(collection = "car") public class Car { @Id private String id; private String model; private String date; private String color; private String vin; private String coast; private String enginePower; private String volume; private String equipment; public Car(String model, String date, String color, String vin, String coast, String enginePower, String volume, String equipment) { this.model = model; this.date = date; this.color = color; this.vin = vin; this.coast = coast; this.enginePower = enginePower; this.volume = volume; this.equipment = equipment; } public String getEquipment() { return equipment; } public void setEquipment(String equipment) { this.equipment = equipment; } public String getEnginePower() { return enginePower; } public void setEnginePower(String enginePower) { this.enginePower = enginePower; } public String getVolume() { return volume; } public void setVolume(String volume) { this.volume = volume; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getVin() { return vin; } public void setVin(String vin) { this.vin = vin; } public String getCoast() { return coast; } public void setCoast(String coast) { this.coast = coast; } }
26f1079bcf61ed086a19aba634362d4f27d8348f
d463e82f8f9c71213f95e8744d2316d0adfb9755
/scan-mms-computing/twain.src/uk/co/mmscomputing/concurrent/TimeUnit.java
c820a35e16b54caf717ece73b7186daf06ed0ce4
[]
no_license
wahid-nwr/docArchive
b3a7d7ecf5d69a7483786fc9758e3c4d1520134d
058e58bb45d91877719c8f9b560100ed78e6746d
refs/heads/master
2020-03-14T07:06:09.629722
2018-05-01T18:23:55
2018-05-01T18:23:55
131,496,664
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
/* */ package uk.co.mmscomputing.concurrent; /* */ /* */ public class TimeUnit /* */ { /* 4 */ public static final TimeUnit MILLISECONDS = new TimeUnit(); /* */ } /* Location: /home/wahid/Downloads/webscanning/twain.jar * Qualified Name: uk.co.mmscomputing.concurrent.TimeUnit * JD-Core Version: 0.6.2 */
0940d3c9c059b19d572094d5f5fd9be0fc8b9b90
06c9c3e44901ede8f1b810a3f756df0af8cb85e2
/src/main/java/trspo/dto/BookDTO.java
c5dec2f1e9222fddcfca1ad4a4fb38c3c1893519
[]
no_license
MakTsy/AirportMain
8af4817039e2fb45152f9471fd05db8630e8cd9c
cac43dc37a1816ca2766b6de65784445bf1e980f
refs/heads/master
2023-01-09T03:39:02.814602
2020-11-03T18:30:33
2020-11-03T18:30:33
304,372,131
0
0
null
null
null
null
UTF-8
Java
false
false
175
java
package trspo.dto; import java.util.UUID; public class BookDTO { public UUID clientId; public UUID flightId; public String sitClass; public boolean payed; }
391a3274fcbce795bcd3b821b46f8d671b14394a
7c47d8f890aeb8c5f02709d36b3b1ae9c95cde12
/src/main/java/ros/integrate/pkg/xml/VersionRange.java
7ce057eca128dc79f1736870f445d67dca2e2bf1
[ "Apache-2.0" ]
permissive
Noam-Dori/ros-integrate
7b33611905eedec07f76bb87b17636deea2efcc4
035c9b238a339f3aca54c94e5fcdd3c35d92bbf9
refs/heads/master
2023-05-12T09:47:09.595264
2023-05-01T11:34:13
2023-05-01T11:34:13
143,184,603
33
4
Apache-2.0
2023-04-18T06:00:42
2018-08-01T16:59:06
Java
UTF-8
Java
false
false
10,646
java
package ros.integrate.pkg.xml; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.Arrays; import java.util.Objects; /** * describes a range of versions and provides a bunch of methods to build and manipulate version ranges * @author Noam Dori */ public class VersionRange { public static final String VERSION_REGEX = "(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)){2}"; /** * a utility class used to create version ranges. */ public static class Builder { @NotNull private final VersionRange ret; /** * construct a new builder. It starts with the default version range, {@link VersionRange#any()} */ public Builder() { ret = any(); } /** * copy constructor of another builder. It simply copies over the properties of the version range * @param other the builder to copy */ public Builder(@NotNull Builder other) { ret = any(); ret.min = other.ret.min; ret.max = other.ret.max; ret.strictMax = other.ret.strictMax; ret.strictMin = other.ret.strictMin; } /** * set the version range to fit exactly one version. Nothing else * @param version the version string to use * @return the result version range. No point to continue building from here */ public VersionRange exactVersion(String version) { ret.max = ret.min = version; ret.strictMax = ret.strictMin = false; return ret; } /** * sets the maximum version allowed in the range * @param version the version string to use as max * @param strict whether or not this specific version is allowed. * If true, the restriction is strong and the version is NOT allowed. * If false, the restriction is weak and the version specified IS allowed * @return this builder with the modification applied */ @NotNull public Builder max(String version, boolean strict) { ret.max = version; ret.strictMax = strict; return this; } /** * sets the minimum version allowed in the range * @param version the version string to use as min * @param strict whether or not this specific version is allowed. * If true, the restriction is strong and the version is NOT allowed. * If false, the restriction is weak and the version specified IS allowed * @return this builder with the modification applied */ @NotNull public Builder min(String version, boolean strict) { ret.min = version; ret.strictMin = strict; return this; } /** * finishes building and constructs the version range * @return the result version range */ @NotNull public VersionRange build() { return ret; } } @Nullable private String min = null, max = null; private boolean strictMin = false, strictMax = false; /** * disables outside construction. Use either the builder or the static methods to create a range */ private VersionRange() {} /** * constructs a version range that only allows ONE specific version * @param version version the version string to use * @return the result version range */ public static VersionRange exactVersion(String version) { return new Builder().exactVersion(version); } /** * the "default" constructor for version ranges. This range allows ANY version to be used * @return the result version range */ @NotNull @Contract(value = " -> new", pure = true) public static VersionRange any() { return new VersionRange(); } /** * checks the validity of the range. IT is possible that the range provided either uses illegal version strings * or the max is strictly smaller than the min * @return true if one of the following is true: * <ol> * <li>the min describes an invalid version (null is valid)</li> * <li>the max describes an invalid version (null is valid)</li> * <li>max is strictly smaller than min (in version string comparison)</li> * <li>max and min are equal, but one of the two is a strict restriction (like version_lt)</li> * </ol> * otherwise, false. */ public boolean isNotValid() { return (min != null && !min.matches(VERSION_REGEX)) || (max != null && !max.matches(VERSION_REGEX)) || (min != null && max != null && (compareVersions(min, max) > 0 || (min.equals(max) && (strictMax || strictMin)))); } /** * checks if the version specified is within this version range * @param version the version string to check * @return true if version is in this range, false otherwise. */ @SuppressWarnings({"unused", "RedundantSuppression"}) public boolean contains(@NotNull String version) { if (isNotValid() || !version.matches(VERSION_REGEX)) { return false; } if (min != null && !runCheck(min, version, strictMin)) { return false; } return max == null || runCheck(version, max, strictMax); } private boolean runCheck(String shouldMin, String shouldMax, boolean strict) { if (strict && shouldMin.equals(shouldMax)) { return false; } Integer[] minParts = Arrays.stream(shouldMin.split("\\.")).map(Integer::valueOf).toArray(Integer[]::new), maxParts = Arrays.stream(shouldMax.split("\\.")).map(Integer::valueOf).toArray(Integer[]::new); for (int i = 0; i < maxParts.length; i++) { if (maxParts[i] > minParts[i]) { return true; } if (maxParts[i] < minParts[i]) { return false; } } return true; } /** * construct a new version that is the intersection of this range and another one * @param other the version range to intersect with * @return a new version range that is the intersection of the two input ones. This range answers this property: * for any version v, given version ranges R1,R2:<br/> * if <code>R1.intersect(R2).contains(v)</code>, then * <code>R1.contains(v) && R2.contains(v)</code> */ @Nullable public VersionRange intersect(VersionRange other) { if (other == null) { other = any(); } if (isNotValid() || other.isNotValid()) { return null; } String newMax = compareVersions(this.max, other.max, this.strictMax, other.strictMax, true) < 0 ? this.max : other.max; String newMin = compareVersions(this.min, other.min, this.strictMin, other.strictMin, false) > 0 ? this.min : other.min; boolean strictMax = compareVersions(this.max, other.max, this.strictMax, other.strictMax, true) < 0 ? this.strictMax : other.strictMax; boolean strictMin = compareVersions(this.min, other.min, this.strictMin, other.strictMin, false) > 0 ? this.strictMin : other.strictMin; if (newMax != null && newMin != null && (compareVersions(newMin,newMax) > 0 || (newMin.equals(newMax) && (strictMax || strictMin)))) { return null; } VersionRange ret = any(); ret.strictMin = strictMin; ret.strictMax = strictMax; ret.min = newMin; ret.max = newMax; return ret; } private static int compareVersions(@Nullable String s1, @Nullable String s2) { return compareVersions(s1, s2, true, true, true); } private static int compareVersions(@Nullable String s1, @Nullable String s2, boolean s1Strict, boolean s2Strict, boolean nullIsPositive) { if (s1 == null && s2 == null) { return 0; } if (s1 == null) { return nullIsPositive ? 1 : -1; } if (s2 == null) { return nullIsPositive ? -1 : 1; } Integer[] s1Parts = Arrays.stream(s1.split("\\.")).map(Integer::valueOf).toArray(Integer[]::new), s2Parts = Arrays.stream(s2.split("\\.")).map(Integer::valueOf).toArray(Integer[]::new); for (int i = 0; i < s1Parts.length; i++) { if (!s1Parts[i].equals(s2Parts[i])) { return Integer.compare(s1Parts[i], s2Parts[i]); } } return nullIsPositive ? Boolean.compare(s2Strict, s1Strict) : Boolean.compare(s1Strict, s2Strict); } /** * @return the maximum version allowed in this range. * This can be inclusive or not inclusive depending on {@link VersionRange#isStrictMax()} * If this returns null, there is no max version restriction */ @Nullable public String getMax() { return max; } /** * @return the minimum version allowed in this range. * This can be inclusive or not inclusive depending on {@link VersionRange#isStrictMin()} * If this returns null, there is no min version restriction */ @Nullable public String getMin() { return min; } /** * @return true if the max version is not allowed in the version range, false otherwise */ public boolean isStrictMax() { return strictMax; } /** * @return true if the min version is not allowed in the version range, false otherwise */ public boolean isStrictMin() { return strictMin; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof VersionRange range)) return false; return isStrictMin() == range.isStrictMin() && isStrictMax() == range.isStrictMax() && Objects.equals(getMin(), range.getMin()) && Objects.equals(getMax(), range.getMax()); } @Override public int hashCode() { return Objects.hash(getMin(), getMax(), isStrictMin(), isStrictMax()); } @Override public String toString() { return (strictMin ? "(" : "[") + (min == null ? "INF" : min) + "," + (max == null ? "INF" : max) + (strictMax ? ")" : "]"); } }
e2b5c667e7dfa8c642d287db8a9bb593d3d34657
849acf2c2ced03dd68d55bddbfbc3b90c888d69f
/app/src/main/java/com/soch/foundation/eventure/Widgets/AnimatImg.java
2eb2decaf512433876d4852c24cf6d03de9a0f71
[]
no_license
kiran47455/Eventure
ad43256b29b06d4856e9957e31dcfe10f36c35f8
b23970b4d8e52c0d8fc8c698ab7be6db3551f448
refs/heads/master
2020-03-30T00:32:18.736735
2016-07-02T12:24:48
2016-07-02T12:24:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,965
java
package com.soch.foundation.eventure.Widgets; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.content.Context; import android.os.Handler; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.view.ViewPropertyAnimator; import android.widget.FrameLayout; import android.widget.ImageView; import com.soch.foundation.eventure.R; import java.util.Random; /** * Created by RawV on 5/26/2016. */ public class AnimatImg extends FrameLayout { private static final String TAG = "AnimatImg"; private final Handler mHandler; private int[] mResourceIds; private ImageView[] mImageViews; private int mActiveImageIndex = -1; private final Random random = new Random(); private int mSwapMs = 10000; private int mFadeInOutMs = 400; private float maxScaleFactor = 1.5F; private float minScaleFactor = 1.2F; private Runnable mSwapImageRunnable = new Runnable() { @Override public void run() { swapImage(); mHandler.postDelayed(mSwapImageRunnable, mSwapMs - mFadeInOutMs * 2); } }; public AnimatImg(Context context) { this(context, null); } public AnimatImg(Context context, AttributeSet attrs) { this(context, attrs, 0); } public AnimatImg(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); mHandler = new Handler(); } public void setResourceIds(int... resourceIds) { mResourceIds = resourceIds; fillImageViews(); } private void swapImage() { Log.d(TAG, "swapImage active=" + mActiveImageIndex); if (mActiveImageIndex == -1) { mActiveImageIndex = 1; animate(mImageViews[mActiveImageIndex]); return; } int inactiveIndex = mActiveImageIndex; mActiveImageIndex = (1 + mActiveImageIndex) % mImageViews.length; Log.d(TAG, "new active=" + mActiveImageIndex); final ImageView activeImageView = mImageViews[mActiveImageIndex]; activeImageView.setAlpha(0.0f); ImageView inactiveImageView = mImageViews[inactiveIndex]; animate(activeImageView); AnimatorSet animatorSet = new AnimatorSet(); animatorSet.setDuration(mFadeInOutMs); animatorSet.playTogether( ObjectAnimator.ofFloat(inactiveImageView, "alpha", 1.0f, 0.0f), ObjectAnimator.ofFloat(activeImageView, "alpha", 0.0f, 1.0f) ); animatorSet.start(); } private void start(View view, long duration, float fromScale, float toScale, float fromTranslationX, float fromTranslationY, float toTranslationX, float toTranslationY) { view.setScaleX(fromScale); view.setScaleY(fromScale); view.setTranslationX(fromTranslationX); view.setTranslationY(fromTranslationY); ViewPropertyAnimator propertyAnimator = view.animate().translationX(toTranslationX).translationY(toTranslationY).scaleX(toScale).scaleY(toScale).setDuration(duration); propertyAnimator.start(); Log.d(TAG, "starting Ken Burns animation " + propertyAnimator); } private float pickScale() { return this.minScaleFactor + this.random.nextFloat() * (this.maxScaleFactor - this.minScaleFactor); } private float pickTranslation(int value, float ratio) { return value * (ratio - 1.0f) * (this.random.nextFloat() - 0.5f); } public void animate(View view) { float fromScale = pickScale(); float toScale = pickScale(); float fromTranslationX = pickTranslation(view.getWidth(), fromScale); float fromTranslationY = pickTranslation(view.getHeight(), fromScale); float toTranslationX = pickTranslation(view.getWidth(), toScale); float toTranslationY = pickTranslation(view.getHeight(), toScale); start(view, this.mSwapMs, fromScale, toScale, fromTranslationX, fromTranslationY, toTranslationX, toTranslationY); } @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); startKenBurnsAnimation(); } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); mHandler.removeCallbacks(mSwapImageRunnable); } private void startKenBurnsAnimation() { mHandler.post(mSwapImageRunnable); } @Override protected void onFinishInflate() { super.onFinishInflate(); View view = inflate(getContext(), R.layout.view_kenburns, this); mImageViews = new ImageView[2]; mImageViews[0] = (ImageView) view.findViewById(R.id.image0); mImageViews[1] = (ImageView) view.findViewById(R.id.image1); } private void fillImageViews() { for (int i = 0; i < mImageViews.length; i++) { mImageViews[i].setImageResource(mResourceIds[i]); } } }
5fcebba996e53efcd689f7a5f80c97dee43f6335
8e4318bdec9d00038b7b985a1d0eb037695ba7f7
/cctvcc-common/cctvcc-core/src/main/java/cn/cctvcc/core/utils/ServletUtils.java
1ca2c0723488f1cdf7200632e820c1cf929cd496
[]
no_license
904316429/cctvcc
d2fcda49ec4ff894f925cf52957e4984d2f4287e
a81ca24b48605a6cbbb61a58d279bdbfb61beae9
refs/heads/master
2023-08-19T08:00:05.133230
2021-09-26T04:09:16
2021-09-26T04:09:16
407,736,438
1
0
null
null
null
null
UTF-8
Java
false
false
7,921
java
package cn.cctvcc.core.utils; import cn.cctvcc.core.constant.Constants; import cn.cctvcc.core.domain.R; import cn.cctvcc.core.text.Convert; import com.alibaba.fastjson.JSONObject; import org.apache.commons.lang3.StringUtils; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.web.context.request.RequestAttributes; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import reactor.core.publisher.Mono; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; import java.util.Enumeration; import java.util.LinkedHashMap; import java.util.Map; /** * @description: 客户端工具类 * @author: Jiang * @create: 2021-09-24 11:45 */ public class ServletUtils { /** * 获取String参数 */ public static String getParameter(String name) { return getRequest().getParameter(name); } /** * 获取String参数 */ public static String getParameter(String name, String defaultValue) { return Convert.toStr(getRequest().getParameter(name), defaultValue); } /** * 获取Integer参数 */ public static Integer getParameterToInt(String name) { return Convert.toInt(getRequest().getParameter(name)); } /** * 获取Integer参数 */ public static Integer getParameterToInt(String name, Integer defaultValue) { return Convert.toInt(getRequest().getParameter(name), defaultValue); } /** * 获取Boolean参数 */ public static Boolean getParameterToBool(String name) { return Convert.toBool(getRequest().getParameter(name)); } /** * 获取Boolean参数 */ public static Boolean getParameterToBool(String name, Boolean defaultValue) { return Convert.toBool(getRequest().getParameter(name), defaultValue); } /** * 获取request */ public static HttpServletRequest getRequest() { try { return getRequestAttributes().getRequest(); } catch (Exception e) { return null; } } /** * 获取response */ public static HttpServletResponse getResponse() { try { return getRequestAttributes().getResponse(); } catch (Exception e) { return null; } } /** * 获取session */ public static HttpSession getSession() { return getRequest().getSession(); } public static ServletRequestAttributes getRequestAttributes() { try { RequestAttributes attributes = RequestContextHolder.getRequestAttributes(); return (ServletRequestAttributes) attributes; } catch (Exception e) { return null; } } public static Map<String, String> getHeaders(HttpServletRequest request) { Map<String, String> map = new LinkedHashMap<>(); Enumeration<String> enumeration = request.getHeaderNames(); if (enumeration != null) { while (enumeration.hasMoreElements()) { String key = enumeration.nextElement(); String value = request.getHeader(key); map.put(key, value); } } return map; } /** * 将字符串渲染到客户端 * * @param response 渲染对象 * @param string 待渲染的字符串 * @return null */ public static String renderString(HttpServletResponse response, String string) { try { response.setStatus(200); response.setContentType("application/json"); response.setCharacterEncoding("utf-8"); response.getWriter().print(string); } catch (IOException e) { e.printStackTrace(); } return null; } /** * 是否是Ajax异步请求 * * @param request */ public static boolean isAjaxRequest(HttpServletRequest request) { String accept = request.getHeader("accept"); if (accept != null && accept.indexOf("application/json") != -1) { return true; } String xRequestedWith = request.getHeader("X-Requested-With"); if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1) { return true; } String uri = request.getRequestURI(); if (StringUtils.containsAny(uri, ".json", ".xml")) { return true; } String ajax = request.getParameter("__ajax"); if (StringUtils.containsAny(ajax, "json", "xml")) { return true; } return false; } /** * 内容编码 * * @param str 内容 * @return 编码后的内容 */ public static String urlEncode(String str) { try { return URLEncoder.encode(str, Constants.UTF8); } catch (UnsupportedEncodingException e) { return ""; } } /** * 内容解码 * * @param str 内容 * @return 解码后的内容 */ public static String urlDecode(String str) { try { return URLDecoder.decode(str, Constants.UTF8); } catch (UnsupportedEncodingException e) { return ""; } } /** * 设置webflux模型响应 * * @param response ServerHttpResponse * @param value 响应内容 * @return Mono<Void> */ public static Mono<Void> webFluxResponseWriter(ServerHttpResponse response, Object value) { return webFluxResponseWriter(response, HttpStatus.OK, value, R.FAIL); } /** * 设置webflux模型响应 * * @param response ServerHttpResponse * @param code 响应状态码 * @param value 响应内容 * @return Mono<Void> */ public static Mono<Void> webFluxResponseWriter(ServerHttpResponse response, Object value, int code) { return webFluxResponseWriter(response, HttpStatus.OK, value, code); } /** * 设置webflux模型响应 * * @param response ServerHttpResponse * @param status http状态码 * @param code 响应状态码 * @param value 响应内容 * @return Mono<Void> */ public static Mono<Void> webFluxResponseWriter(ServerHttpResponse response, HttpStatus status, Object value, int code) { return webFluxResponseWriter(response, MediaType.APPLICATION_JSON_VALUE, status, value, code); } /** * 设置webflux模型响应 * * @param response ServerHttpResponse * @param contentType content-type * @param status http状态码 * @param code 响应状态码 * @param value 响应内容 * @return Mono<Void> */ public static Mono<Void> webFluxResponseWriter(ServerHttpResponse response, String contentType, HttpStatus status, Object value, int code) { response.setStatusCode(status); response.getHeaders().add(HttpHeaders.CONTENT_TYPE, contentType); R<?> result = R.fail(code, value.toString()); DataBuffer dataBuffer = response.bufferFactory().wrap(JSONObject.toJSONString(result).getBytes()); return response.writeWith(Mono.just(dataBuffer)); } }
f73c7e10b25c59dde832a4fbf07e8da2b823d2a8
673416acc6fa0021f264728219dc8d77e49bc84c
/src/main/java/com/wnn/myservice/AttrServiceInf.java
ba8f7e65d09d84ac276f98946c1221202bac0526
[]
no_license
ygshiliu/B2C_manager
06d4bf8e0aa52e3277ed354ea60a88804be6708b
d54da9c504abfb059ba38b7a8e668586226f0590
refs/heads/master
2021-07-18T06:27:38.317379
2017-10-25T08:42:40
2017-10-25T08:42:40
108,242,627
0
0
null
null
null
null
UTF-8
Java
false
false
304
java
package com.wnn.myservice; import java.util.List; import com.wnn.mybean.Object_T_mall_attr; import com.wnn.mybean.T_mall_product; public interface AttrServiceInf { List<Object_T_mall_attr> get_attr_by_class_2(Integer flbh2_id); void add_attr(List<Object_T_mall_attr> attr_list); }
0c479b286c4d028fffe038a07afbb7866e86ca32
1910d2dde20776155398da1038756dc3f82f7cef
/src/com/rehansqapoint/genericmethods/WebUtilities.java
daef20eddc10f042c994d96ed95a48d5f48e5374
[]
no_license
prathapSEDT/JavaSDET_OCT
c6015739f6c117a6627a3aa5c0177d1679768bd2
11d231532fb392ece773cbd0b0d2da70b62810db
refs/heads/master
2023-01-13T07:10:51.816511
2020-11-11T07:35:50
2020-11-11T07:35:50
308,562,773
0
0
null
null
null
null
UTF-8
Java
false
false
1,091
java
package com.rehansqapoint.genericmethods; import com.rehansqapoint.jsondatautil.ReadJsonData; public class WebUtilities extends ReadJsonData { public void launchBrowser(String browser){ switch (browser){ case "chrome": System.out.println("Launching chrome browser"); break; case "ff": System.out.println("Launching fire fox browser"); break; } } public void enterData(String elementName,String pageName,String data){ System.out.println("Enter data into the field "+elementName+" on the page "+pageName+" with the data "+data); } public void clickElement(String elementName,String pageName){ System.out.println("Click the element "+elementName+" on the page "+pageName); } public void verifyElementExist(String elementName,String pageName){ System.out.println("The element "+elementName+" is exist on the page "+pageName); } public void logOut() { System.out.println("Logging out from the application"); } }
842475f96ddb24089b4eebffa5d0f42ab49bdc44
6721c68a56c0d42ba98dc408bee4aee96896c97c
/src/main/java/pl/tomkuran/BootMeApplication.java
fabda35ead38ab4003dace1b7fb72e80d787fd66
[]
no_license
tomkuran/bootMe
53d2e5069f8a94e468aa2995983ceefc2e6dddda
09a9c710292d9a227c5786b861185381cf2289a1
refs/heads/master
2021-01-21T13:07:51.246415
2016-03-23T09:37:24
2016-03-23T09:37:24
54,121,067
0
0
null
2016-03-17T13:57:03
2016-03-17T13:43:57
null
UTF-8
Java
false
false
303
java
package pl.tomkuran; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class BootMeApplication { public static void main(String[] args) { SpringApplication.run(BootMeApplication.class, args); } }
dff9c1e61f85c6d2e75f4fbc9af0257a3234dce3
1f35fba66d5167a2dc41cba836301e632ade0dc4
/GameDev/GameMaker/GMBuilder/tests/src/com/cristiano/java/jme/tests/persistence/GMPersistenceTests.java
4e3ae1109095e5e43ff5c8144b3c4aa8f4a84bf9
[]
no_license
cristianoferr/projetos
67ccfaa3d8e6701c70a5135f3675d5fd3099ef9f
1d00a2ba9cd5180243afdc61730d95caae188c0f
refs/heads/master
2021-01-17T13:06:38.352334
2017-07-31T19:13:46
2017-07-31T19:13:46
19,613,602
0
0
null
null
null
null
UTF-8
Java
false
false
305
java
package com.cristiano.java.jme.tests.persistence; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) @SuiteClasses({ TestGameState.class,TestImportExportJSON.class,TestAssets.class}) public class GMPersistenceTests { }
bcad4654f3d7e079c30176959f208206f7215a06
558b7cb10d49d194f003e7d8dd01f34b83747de0
/covidAnalyzerTool/src/main/java/eci/arsw/covidanalyzer/ProcessThread.java
e829e2bf3a97d9c4e443f874127d160b0a729b70
[]
no_license
Nikolas2001-13/Parcial1-ARSW
ac5f06c91c9d2002286c20842082385e01ade2cd
d31e3ba13175ecb4b92d5779c2c2aa7d3ebb51c1
refs/heads/master
2023-03-12T12:24:51.014895
2021-02-25T14:57:19
2021-02-25T14:57:19
342,236,130
0
1
null
null
null
null
UTF-8
Java
false
false
1,910
java
package eci.arsw.covidanalyzer; import java.io.File; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; public class ProcessThread extends Thread{ private List<File> resultFiles; private ResultAnalyzer resultAnalyzer; private AtomicInteger amountOfFilesProcessed; private TestReader testReader; private boolean pause; private int x; private int y; public ProcessThread(List<Files> resultFiles, ResultAnalyzer resultAnalyzer, AtomicInteger amountOfFilesProcessed, TestReader testReader, int x, int y){ this.resultFiles = resultFiles; this.resultAnalyzer = resultAnalyzer; this.amountOfFilesProcessed = amountOfFilesProcessed; this.testReader = testReader; this.pause = false; this.x = x; this.y = y; } /** * Metodo run el cual mientras este en pausa, los threads esperaran, y cuando no, se empezaran a añadir los resultados */ public void run(){ for (File file : resultFiles){ synchronized (this) { while (pause){ try{ wait(); } catch (InterruptedException e){ e.printStackTrace(); } } } List<Result> results = testReader.readResultsFromFile(file); for (Result result : results){ resultAnalyzer.addResult(result); } amountOfFilesProcessed.incrementAndGet(); } } /** * Si se pausa el thread, cambiara la variable pause a true */ public void pauseThread(){ pause = true; } /** * Se reanudaran todos los threads, cambiando la variable pause a false */ public void resmueThread(){ pause = false; synchronized (this){ notifyAll(); } } }
b3cbf1071ce279d0066b28088cac51e102d79287
7024816c98b7fec86e6bd0bf82ac599ef285019d
/src/src/Node.java
0dbb24c260483c2e098939c03237c9bd2ade77c0
[]
no_license
t4canty/rngame
b568853adabc48ad558c22f3654e93149ae0ed9d
0533d4aa9c51440bd49e0ed8768b01101fff5d48
refs/heads/master
2021-08-20T06:29:03.660829
2020-04-15T19:22:29
2020-04-15T19:22:29
163,755,593
0
0
null
null
null
null
UTF-8
Java
false
false
1,209
java
package src; import java.awt.Graphics; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import javax.swing.JButton; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.*; public class Node { private int id; // id of the textfile private String data; //send output of file to here. private Node nextNode; private JSONObject j; private int txtId; // gets the id from the textFile to point to the next object. private ArrayList<JButton> buttonArray; public Node(int id) throws FileNotFoundException, IOException, ParseException { j = (JSONObject) new JSONParser().parse(new FileReader(id + ".json")); String data = (String) j.get("text"); nextNode = new Node((int) j.get("nextNodeID")); JSONArray ja = (JSONArray) j.get("buttons"); for(int i = 0; i < ja.size(); i++) { JSONObject j2 = (JSONObject) ja.get(i); buttonArray.add(new JButton((String) j2.get("Choice"))); } this.id = id; } private FileInputStream readFile() { return null; } public void paint(Graphics g, int x, int y) { } }
b56123d4a5f36edd5fb0975d4dca30d9d730fb43
5aaa8c6d0ddc15975f9ec3e8b14f88484dde5e52
/src/main/java/com/wingsglory/foru/server/model/VerificationCodePhoneExample.java
e0310716683e89f36598015f063592e25f792cf4
[]
no_license
hezhujun/FORU-SERVER
f4c761b27b2d674c1f75e86810a6fc292552d39a
df9ff41b1cd20426df233c6123b4c7f4219da428
refs/heads/master
2021-01-01T17:35:19.264585
2017-09-04T11:40:02
2017-09-04T11:40:02
94,957,129
0
0
null
null
null
null
UTF-8
Java
false
false
12,133
java
package com.wingsglory.foru.server.model; import java.util.ArrayList; import java.util.Date; import java.util.List; public class VerificationCodePhoneExample { protected String orderByClause; protected boolean distinct; protected Integer offset; protected Integer rows; public Integer getOffset() { return offset; } public void setOffset(Integer offset) { this.offset = offset; } public Integer getRows() { return rows; } public void setRows(Integer rows) { this.rows = rows; } protected List<Criteria> oredCriteria; public VerificationCodePhoneExample() { oredCriteria = new ArrayList<Criteria>(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List<Criteria> getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andPhoneIsNull() { addCriterion("phone is null"); return (Criteria) this; } public Criteria andPhoneIsNotNull() { addCriterion("phone is not null"); return (Criteria) this; } public Criteria andPhoneEqualTo(String value) { addCriterion("phone =", value, "phone"); return (Criteria) this; } public Criteria andPhoneNotEqualTo(String value) { addCriterion("phone <>", value, "phone"); return (Criteria) this; } public Criteria andPhoneGreaterThan(String value) { addCriterion("phone >", value, "phone"); return (Criteria) this; } public Criteria andPhoneGreaterThanOrEqualTo(String value) { addCriterion("phone >=", value, "phone"); return (Criteria) this; } public Criteria andPhoneLessThan(String value) { addCriterion("phone <", value, "phone"); return (Criteria) this; } public Criteria andPhoneLessThanOrEqualTo(String value) { addCriterion("phone <=", value, "phone"); return (Criteria) this; } public Criteria andPhoneLike(String value) { addCriterion("phone like", value, "phone"); return (Criteria) this; } public Criteria andPhoneNotLike(String value) { addCriterion("phone not like", value, "phone"); return (Criteria) this; } public Criteria andPhoneIn(List<String> values) { addCriterion("phone in", values, "phone"); return (Criteria) this; } public Criteria andPhoneNotIn(List<String> values) { addCriterion("phone not in", values, "phone"); return (Criteria) this; } public Criteria andPhoneBetween(String value1, String value2) { addCriterion("phone between", value1, value2, "phone"); return (Criteria) this; } public Criteria andPhoneNotBetween(String value1, String value2) { addCriterion("phone not between", value1, value2, "phone"); return (Criteria) this; } public Criteria andCodeIsNull() { addCriterion("CODE is null"); return (Criteria) this; } public Criteria andCodeIsNotNull() { addCriterion("CODE is not null"); return (Criteria) this; } public Criteria andCodeEqualTo(String value) { addCriterion("CODE =", value, "code"); return (Criteria) this; } public Criteria andCodeNotEqualTo(String value) { addCriterion("CODE <>", value, "code"); return (Criteria) this; } public Criteria andCodeGreaterThan(String value) { addCriterion("CODE >", value, "code"); return (Criteria) this; } public Criteria andCodeGreaterThanOrEqualTo(String value) { addCriterion("CODE >=", value, "code"); return (Criteria) this; } public Criteria andCodeLessThan(String value) { addCriterion("CODE <", value, "code"); return (Criteria) this; } public Criteria andCodeLessThanOrEqualTo(String value) { addCriterion("CODE <=", value, "code"); return (Criteria) this; } public Criteria andCodeLike(String value) { addCriterion("CODE like", value, "code"); return (Criteria) this; } public Criteria andCodeNotLike(String value) { addCriterion("CODE not like", value, "code"); return (Criteria) this; } public Criteria andCodeIn(List<String> values) { addCriterion("CODE in", values, "code"); return (Criteria) this; } public Criteria andCodeNotIn(List<String> values) { addCriterion("CODE not in", values, "code"); return (Criteria) this; } public Criteria andCodeBetween(String value1, String value2) { addCriterion("CODE between", value1, value2, "code"); return (Criteria) this; } public Criteria andCodeNotBetween(String value1, String value2) { addCriterion("CODE not between", value1, value2, "code"); return (Criteria) this; } public Criteria andGmtModifiedIsNull() { addCriterion("gmt_modified is null"); return (Criteria) this; } public Criteria andGmtModifiedIsNotNull() { addCriterion("gmt_modified is not null"); return (Criteria) this; } public Criteria andGmtModifiedEqualTo(Date value) { addCriterion("gmt_modified =", value, "gmtModified"); return (Criteria) this; } public Criteria andGmtModifiedNotEqualTo(Date value) { addCriterion("gmt_modified <>", value, "gmtModified"); return (Criteria) this; } public Criteria andGmtModifiedGreaterThan(Date value) { addCriterion("gmt_modified >", value, "gmtModified"); return (Criteria) this; } public Criteria andGmtModifiedGreaterThanOrEqualTo(Date value) { addCriterion("gmt_modified >=", value, "gmtModified"); return (Criteria) this; } public Criteria andGmtModifiedLessThan(Date value) { addCriterion("gmt_modified <", value, "gmtModified"); return (Criteria) this; } public Criteria andGmtModifiedLessThanOrEqualTo(Date value) { addCriterion("gmt_modified <=", value, "gmtModified"); return (Criteria) this; } public Criteria andGmtModifiedIn(List<Date> values) { addCriterion("gmt_modified in", values, "gmtModified"); return (Criteria) this; } public Criteria andGmtModifiedNotIn(List<Date> values) { addCriterion("gmt_modified not in", values, "gmtModified"); return (Criteria) this; } public Criteria andGmtModifiedBetween(Date value1, Date value2) { addCriterion("gmt_modified between", value1, value2, "gmtModified"); return (Criteria) this; } public Criteria andGmtModifiedNotBetween(Date value1, Date value2) { addCriterion("gmt_modified not between", value1, value2, "gmtModified"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
2e751d86e24984ef4f9a334895123ba904949607
7b5a744665462c985652bd05685b823a0c6d64f6
/zttx-tradecore/src/main/java/com/zttx/web/module/brand/mapper/BrandAlbumMapper.java
142e8446b528b8c38ecfb1659bbcbe4fb730c9f2
[]
no_license
isoundy000/zttx-trading
d8a7de3d846e1cc2eb0b193c31d45d36b04f7372
1eee959fcf1d460fe06dfcb7c79c218bcb6f5872
refs/heads/master
2021-01-14T01:07:42.580121
2016-01-10T04:12:40
2016-01-10T04:12:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
830
java
/* * @(#)BrandAlbumMapper.java 2015-8-26 下午1:47:29 * Copyright 2015 郭小亮, Inc. All rights reserved. 8637.com * PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package com.zttx.web.module.brand.mapper; import com.zttx.sdk.annotation.MyBatisDao; import com.zttx.sdk.core.GenericMapper; import com.zttx.web.module.brand.entity.BrandAlbum; import org.apache.ibatis.annotations.Param; import java.util.List; /** * <p>File:BrandAlbumMapper.java</p> * <p>Title: </p> * <p>Description:</p> * <p>Copyright: Copyright (c) 2015 2015-8-26 下午1:47:29</p> * <p>Company: 8637.com</p> * @author 郭小亮 * @version 1.0 */ @MyBatisDao public interface BrandAlbumMapper extends GenericMapper<BrandAlbum> { void delBatch(@Param("brandAlbumIdList")List brandAlbumIdList); }
63ef15c571aa355f970dd5d5b649b9a084f052b9
f350f027d3df73756c08bc4e8fa1c76e7a315358
/src/main/java/com/csse/restapi/restapireact/services/impl/UserServiceImpl.java
029cb325278f7ae89617693c4d95a4f33ba7ed9f
[]
no_license
ZakirovAlisher/ITrelloBack-end
c3ca0c33e2e02b843dea5e602a067b87d80ce03e
7f31743f85637751a8f61c56575f535b91599118
refs/heads/main
2023-06-18T14:07:07.701011
2021-07-11T14:49:18
2021-07-11T14:49:18
359,707,376
0
0
null
null
null
null
UTF-8
Java
false
false
1,704
java
package com.csse.restapi.restapireact.services.impl; import com.csse.restapi.restapireact.entities.Roles; import com.csse.restapi.restapireact.entities.Users; import com.csse.restapi.restapireact.repositories.UserRepository; import com.csse.restapi.restapireact.services.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; @Service public class UserServiceImpl implements UserService { @Autowired private UserRepository userRepository; @Override public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException { Users user = userRepository.findByEmail(s); if(user!=null){ return user; }else{ throw new UsernameNotFoundException("USER NOT FOUND"); } } @Autowired private PasswordEncoder passwordEncoder; public boolean saveUser(Users user) { Users userFromDB = userRepository.findByEmail(user.getUsername()); if (userFromDB != null) { return false; } List<Roles> roles = new ArrayList<> (); roles.add(new Roles(2L, "ROLE_USER")); user.setRoles(roles); user.setPassword(passwordEncoder.encode(user.getPassword())); userRepository.save(user); return true; } @Override public Users getUserByE(String id) { return userRepository.findByEmail (id); } }
1b7a2c80f9be3718828542ae9382066fb0a2adbf
35f7bace7153e35fb8d5d232704ed6334e940854
/MobileSafe660/src/com/project/mobilesafe660/activity/BaseSetupActivity.java
6e2a7da956a9e2c6b32519db7c14817fce8343f5
[]
no_license
375376810/RealProject660
418c07dc4776b373d232020f57189ffd6e281d97
0c622413673604d3b95347f9013ec76d3239d85a
refs/heads/master
2021-08-16T02:35:32.889643
2017-11-18T20:35:20
2017-11-18T20:35:20
106,398,914
2
0
null
null
null
null
GB18030
Java
false
false
2,156
java
package com.project.mobilesafe660.activity; import com.project.mobilesafe660.utils.ToastUtils; import android.app.Activity; import android.os.Bundle; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; /** 跳转页面基类 **/ public abstract class BaseSetupActivity extends Activity { private GestureDetector mDetector; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // 手势识别器 mDetector = new GestureDetector(this, new GestureDetector.SimpleOnGestureListener() { // 快速滑动,抛 // e1:起点坐标 e2:终点坐标 // velocityX:水平滑动速度 velocityY:竖直滑动速度 @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { //竖直方向滑动超过一定范围不允许 if (Math.abs(e1.getRawY()-e2.getRawY())>200) { ToastUtils.showToast(getApplicationContext(), "不要竖直方向滑动,呵呵..."); return true; } //滑动速度太慢,也不允许 if (Math.abs(velocityX)<200) { ToastUtils.showToast(getApplicationContext(), "滑动速度太慢了,呵呵..."); return true; } // 判断向左划还是向右滑 if (e2.getRawX() - e1.getRawX() > 100) {// 向右滑,上一页 showPrevious(); return true; } if (e1.getRawX() - e2.getRawX() > 100) {// 向左划,下一页 showNext(); return true; } return super.onFling(e1, e2, velocityX, velocityY); } }); } /** 上一页点击 **/ public void previous(View view) { showPrevious(); } /** 下一页点击 **/ public void next(View view) { showNext(); } public abstract void showPrevious(); public abstract void showNext(); /** 当界面被触摸时,走此方法 **/ @Override public boolean onTouchEvent(MotionEvent event) { //将事件委托给手势识别器处理 mDetector.onTouchEvent(event); return super.onTouchEvent(event); } }
c72926d0b576624ec3b65aa254357f6fa7c88486
ced303c83387e3fdd5de8bcaefec161e37784622
/src/main/java/com/example/bootopen/common/utils/web/config/ValidatorConfiguration.java
d8eaf068cd89e43607dcf43a2dbc8361fee72a44
[]
no_license
jinny-c/bootopen
24166298b09eeda51f7471b40f475cecbe851a75
01cfd53de6ff59538950a56479ae3fcd6fc8e949
refs/heads/master
2023-06-22T22:57:45.970345
2023-06-12T02:12:01
2023-06-12T02:12:01
163,384,796
1
0
null
2023-02-08T09:29:20
2018-12-28T08:12:15
Java
UTF-8
Java
false
false
825
java
package com.example.bootopen.common.utils.web.config; import org.hibernate.validator.HibernateValidator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import javax.validation.Validation; import javax.validation.Validator; import javax.validation.ValidatorFactory; /** * @author chaijd **/ @Configuration public class ValidatorConfiguration { @Bean public Validator validator() { ValidatorFactory validatorFactory = Validation.byProvider(HibernateValidator.class) .configure() .failFast(true) //.addProperty("hibernate.validator.fail_fast", "true") .buildValidatorFactory(); Validator validator = validatorFactory.getValidator(); return validator; } }
[ "chaijindong" ]
chaijindong
80ef79148887c9513f84f0a4ad15abd5ae4d8a6b
7b7c16ef491bf539d6e3097c038b66e2b35bb3f0
/src/main/java/carpet/forge/fakes/IChunk.java
a867f69ecae61d0b5a6c367b14e3a86c86df5b3c
[]
no_license
Mimerme/ForgedCarpet
eef168a365b506d11b9cee6314f051103f95335a
212fe22f92618d3af594cc82c5967c4e9fb333f6
refs/heads/master
2023-01-12T00:48:26.944495
2020-11-13T12:34:33
2020-11-13T12:34:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
package carpet.forge.fakes; import net.minecraft.util.math.BlockPos; import net.minecraft.world.EnumSkyBlock; public interface IChunk { short[] getNeighborLightChecks(); void setNeighborLightChecks(short[] in); short getPendingNeighborLightInits(); void setPendingNeighborLightInits(short in); int getCachedLightFor(EnumSkyBlock type, BlockPos pos); }
2bbd3e3d1ab69d167c2deeab9a58a6ab65c01885
09604a6ff153a973cf56879e7bb15816b192e6ff
/payment-module/src/main/java/com/cg/ovs/service/CustomerService.java
9e8a6f8341789f5582443bf4c0bed98d6ed0bb40
[]
no_license
sohelsutriya/Online-Vegetable-sales-app
2cad93a5836af3b210da4d2184e7f4e47a9dbe73
717f2763b2e153976443ebc5e858aab694b01ca2
refs/heads/main
2023-01-07T20:56:43.417487
2020-11-04T16:55:41
2020-11-04T16:55:41
307,890,004
0
0
null
null
null
null
UTF-8
Java
false
false
250
java
/** * */ package com.cg.ovs.service; import org.springframework.stereotype.Service; /** * @author sohel * */ @Service public interface CustomerService { public boolean authenticateUser(int customerId,String securityAnswer); }
bf60e7fd849b554ca67ce30522c1c38e85e4417d
1e5ac4a5d731089adfa0ba2747bb61164f8e0f45
/app/src/main/java/com/example/ben/myapplication/Main2Activity.java
5781c018eddc35b723b0a6839cacf45276e1c6f1
[]
no_license
kinchad/sharound
19fe87e3a991e6f97880b7fcd293c5a0cad6190c
34058910ca281755f711cc9e66408a6950500c09
refs/heads/master
2020-03-12T21:36:49.183157
2018-04-23T14:34:04
2018-04-23T14:34:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,102
java
package com.example.ben.myapplication; import android.arch.lifecycle.ViewModelProviders; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.example.ben.myapplication.model.Item; import com.example.ben.myapplication.viewmodel.MainActivityViewModel; import com.firebase.ui.auth.AuthUI; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.firestore.DocumentReference; import com.google.firebase.firestore.FirebaseFirestore; import java.util.Collections; import java.util.Locale; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import com.squareup.picasso.Picasso; public class Main2Activity extends AppCompatActivity implements ChangePhotoDialog.OnPhotoReceivedListener{ private static final String TAG = "Main2Activity"; private FirebaseFirestore mFirestore; private DocumentReference mRestaurantRef; private RatingDialogFragment mRatingDialog; private FirebaseAuth mAuth; private static final int RC_SIGN_IN = 9001; private Uri mFileUri; private MainActivityViewModel mViewModel; private boolean mStoragePermissions; public Uri mSelectedImageUri; private Uri mTakeImageUri; private Bitmap mSelectedImageBitmap; private byte[] mBytes; private double progress; private BroadcastReceiver mBroadcastReceiver; private Uri mDownloadUrl; private static final String KEY_FILE_URI = "key_file_uri"; private static final String KEY_DOWNLOAD_URL = "key_download_url"; @Override public void getImagePath(Uri imagePath) { if( !imagePath.toString().equals("")){ mSelectedImageBitmap = null; mSelectedImageUri = imagePath; Log.d(TAG, "getImagePath: got the image uri: " + mSelectedImageUri); // ImageLoader.getInstance().displayImage(imagePath.toString(), profileImage); Picasso.get() .load(mSelectedImageUri) .resize(100, 100) .centerCrop() .into(profileImage); uploadFromUri(mSelectedImageUri); } } @Override public void getImageBitmap(Uri imagePath) { if( !imagePath.toString().equals("")){ mSelectedImageBitmap = null; mTakeImageUri = imagePath; Log.d(TAG, "getImagePath: got the image uri: " + mSelectedImageUri); // ImageLoader.getInstance().displayImage(imagePath.toString(), profileImage); Picasso.get() .load(imagePath) .resize(100, 100) .centerCrop() .into(profileImage); uploadFromUri(mTakeImageUri); } } /* @Override public void getImageBitmap(Bitmap bitmap) { if(bitmap != null){ mSelectedImageUri = null; mSelectedImageBitmap = bitmap; Log.d(TAG, "getImageBitmap: got the image bitmap: " + mSelectedImageBitmap); profileImage.setImageBitmap(bitmap); } }*/ @BindView(R.id.inname) TextView mname; @BindView(R.id.incity) TextView mcity; @BindView(R.id.incat) TextView mcat; @BindView(R.id.inprice) TextView mprice; @BindView(R.id.inrating) TextView mrating; @BindView(R.id.add) Button badd; Item item = new Item(); @BindView(R.id.profile_image) ImageView profileImage; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main2); ButterKnife.bind(this); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); mViewModel = ViewModelProviders.of(this).get(MainActivityViewModel.class); FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); mFirestore = FirebaseFirestore.getInstance(); // Get reference to the item mRestaurantRef = mFirestore.collection("items").document(); final DocumentReference ratingRef = mRestaurantRef.collection("ratings").document(); Bundle extras = getIntent().getExtras(); if(extras == null) { mDownloadUrl= null; } else { mDownloadUrl= (Uri)extras.get("EXTRA_DOWNLOAD_URL"); } if (savedInstanceState!= null) { mFileUri = savedInstanceState.getParcelable(KEY_FILE_URI); mDownloadUrl = savedInstanceState.getParcelable(KEY_DOWNLOAD_URL); } onNewIntent(getIntent()); // Local broadcast receiver mBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.d(TAG, "onReceive:" + intent); switch (intent.getAction()) { case MyUploadService.UPLOAD_COMPLETED: case MyUploadService.UPLOAD_ERROR: onUploadResultIntent(intent); break; } } }; } @Override public void onSaveInstanceState(Bundle out) { super.onSaveInstanceState(out); out.putParcelable(KEY_FILE_URI, mFileUri); out.putParcelable(KEY_DOWNLOAD_URL, mDownloadUrl); } @Override public void onNewIntent(Intent intent) { super.onNewIntent(intent); // Check if this Activity was launched by clicking on an upload notification if (intent.hasExtra(MyUploadService.EXTRA_DOWNLOAD_URL)) { onUploadResultIntent(intent); } } @OnClick(R.id.add) public void clicked(View view) { addItem(); } public void addItem() { Log.d(TAG, "uploadFromUri:onSuccess"+mDownloadUrl); item.setName(mname.getText().toString()); item.setLocation(mcity.getText().toString()); item.setCategory(mcat.getText().toString()); // item.setPhoto(mDownloadUrl.toString()); item.setPrice(1); item.setNumRatings(1); //item.setUsername(); //item.setUserid(); //item.setPrice(Integer.parseInt(mprice.toString())); //item.setNumRatings(Integer.parseInt(mrating.toString())); mRestaurantRef.set(item); setEditingEnabled(false); Toast.makeText(this, "Posting...", Toast.LENGTH_SHORT).show(); setEditingEnabled(true); finish(); } private void setEditingEnabled(boolean enabled) { mname.setEnabled(enabled); if (enabled) { badd.setVisibility(View.VISIBLE); } else { badd.setVisibility(View.GONE); } } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_add_items: // onAddItemsClicked(); break; case R.id.menu_sign_out: AuthUI.getInstance().signOut(this); startSignIn(); break; case R.id.add: Intent intent = new Intent(this, Main2Activity.class); startActivity(intent); break; } return super.onOptionsItemSelected(item); } private void startSignIn() { // Sign in with FirebaseUI Intent intent = AuthUI.getInstance().createSignInIntentBuilder() .setAvailableProviders(Collections.singletonList( new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build())) .setIsSmartLockEnabled(false) .build(); startActivityForResult(intent, RC_SIGN_IN); mViewModel.setIsSigningIn(true); } @OnClick(R.id.profile_image) public void onViewClicked() { ChangePhotoDialog dialog = new ChangePhotoDialog(); dialog.show(getSupportFragmentManager(), getString(R.string.dialog_change_photo)); } private void uploadFromUri(Uri fileUri) { Log.d(TAG, "uploadFromUri:src:" + fileUri.toString()); // Save the File URI //mFileUri = fileUri; // Clear the last download, if any // updateUI(mAuth.getCurrentUser()); // mDownloadUrl = null; // Start MyUploadService to upload the file, so that the file is uploaded // even if this Activity is killed or put in the background startService(new Intent(this, MyUploadService.class) .putExtra(MyUploadService.EXTRA_FILE_URI, fileUri) .setAction(MyUploadService.ACTION_UPLOAD)); // Show loading spinner //showProgressDialog(getString(R.string.progress_uploading)); } private void onUploadResultIntent(Intent intent) { // Got a new intent from MyUploadService with a success or failure mDownloadUrl = intent.getParcelableExtra(MyUploadService.EXTRA_DOWNLOAD_URL); //mFileUri = intent.getParcelableExtra(MyUploadService.EXTRA_FILE_URI); //updateUI(mAuth.getCurrentUser()); } }
001e92c934e6b5615bb1351cb53370fd8feb698b
7007371aa342a7475ccc7f4cd83d415e655a5ae0
/src/oculus/memex/clustering/WordCloudDetails.java
ae361a53e5c0eb597b0d929eb02f6179613391a0
[]
no_license
curtiszimmerman/TellFinder
31a677ac80990108cf92fa0cd7f8a9d29219f0b6
5fa920ca5b24f8ca87e35400eeccf55fda75aa7e
refs/heads/master
2021-01-18T07:02:33.736423
2015-04-08T16:27:58
2015-04-08T16:27:59
34,244,631
3
3
null
2015-04-20T07:20:01
2015-04-20T07:19:59
null
UTF-8
Java
false
false
5,641
java
package oculus.memex.clustering; import java.util.ArrayList; import java.util.HashMap; import java.util.Set; import java.util.regex.Pattern; import oculus.memex.init.PropertyManager; public class WordCloudDetails { private static class ColumnDescriptor { public String key; public boolean sanitize; public String delimiter; public ColumnDescriptor(String _key, boolean _sanitize, String _delimiter) { key = _key; sanitize = _sanitize; delimiter = _delimiter; } public ColumnDescriptor(String _key, boolean _sanitize) { key = _key; sanitize = _sanitize; } } private static Set<String> STOP_WORDS = PropertyManager.getInstance().getPropertySet("wordcloud.stopWords"); private static Pattern[] STRIP_PATTERNS = { Pattern.compile("<(?:.|\n)*?>",Pattern.MULTILINE), // Strip HTML Pattern.compile("&(?:[a-z\\d]+|#\\d+|#x[a-f\\d]+);") // Strip character entities ('&nbsp', etc.) }; private static Pattern[] REPLACE_PATTERNS = { Pattern.compile("ad number: \\d+"), // Replace "ad number: 532032" Pattern.compile("\\n"), // Replace newlines Pattern.compile("[_\\W]"), // Replace all non-alphanumeric chars Pattern.compile("\\s{2,}") // ?? }; private static ColumnDescriptor[] WHOLE_WORD_COLUMNS = new ColumnDescriptor[] { new ColumnDescriptor("region",false), new ColumnDescriptor("name",false), new ColumnDescriptor("age",false), new ColumnDescriptor("bust",false), new ColumnDescriptor("incall",false), new ColumnDescriptor("city",true) // Lots of junk in this column }; private static ColumnDescriptor[] SPLITTABLE_WORD_CLOUD_COLUMNS = new ColumnDescriptor[] { new ColumnDescriptor("title",true," "), new ColumnDescriptor("text_field",true," "), new ColumnDescriptor("outcall",true,";"), new ColumnDescriptor("ethnicity",false,",") }; private static String sanitize(String inStr) { String result = inStr.toLowerCase(); for (Pattern p : STRIP_PATTERNS) { result = p.matcher(result).replaceAll(""); } for (Pattern p : REPLACE_PATTERNS) { result = p.matcher(result).replaceAll(" "); } return result.trim(); } /** * Computes word histograms for a list of ad details * @param adDetails * @return adId -> (word -> count) */ public static HashMap<String,HashMap<String,Integer>> getWordCountsForAdIds(ArrayList<HashMap<String,String>> adDetails) { HashMap<String, HashMap<String,Integer>> result = new HashMap<String, HashMap<String, Integer>>(); for (HashMap<String,String> details : adDetails) { HashMap<String,Integer> wordMap = new HashMap<String,Integer>(); // Handle columns that are treated as whole strings for (ColumnDescriptor col : WHOLE_WORD_COLUMNS) { String colName = col.key; boolean doSanitize = col.sanitize; String columnValue = details.get(colName); if (columnValue != null) { columnValue = columnValue.toLowerCase(); if (doSanitize) { columnValue = sanitize(columnValue); } if (STOP_WORDS.contains(columnValue)) { continue; } Integer count = wordMap.get(columnValue); if (count != null) { wordMap.put(columnValue, count + 1); } else { wordMap.put(columnValue, 1); } } } // Handle columns that need to be split into words for (ColumnDescriptor col : SPLITTABLE_WORD_CLOUD_COLUMNS) { String colName = col.key; Boolean doSanitize = col.sanitize; String delim = col.delimiter; Boolean sanitizePostSplit = (delim != " "); String columnValue = details.get(colName); if (columnValue != null) { if (doSanitize && !sanitizePostSplit) { columnValue = sanitize(columnValue); } String []wordPieces = columnValue.split(delim); for (String w : wordPieces) { if (w.equals(" ") || w.equals("") || w.equals(null)) { continue; } String wordPiece = w.trim().toLowerCase(); if (doSanitize && sanitizePostSplit) { wordPiece = sanitize(wordPiece); } if (STOP_WORDS.contains(wordPiece)) { continue; } Integer count = wordMap.get(wordPiece); if (count != null) { wordMap.put(wordPiece,count+1); } else { wordMap.put(wordPiece,1); } } } } String adId = details.get("id"); result.put(adId,wordMap); } return result; } }
84b296a61088a2b896b557bcb9238fabc3d25fd0
45ec3ceb3bca01874b6c922b9b6ca52b606e1a5e
/Tester.java
dab5fc992a78048c9df93d92d849d7c61fd85fe1
[]
no_license
EricShi1255/LetsGetReal
adc4a1f3f66caba9e4bb963bb127db987033afcf
f6b6d48546fdbfdadf42a0bfa307c58a59d9d3ce
refs/heads/main
2023-01-22T14:59:35.597873
2020-11-25T03:11:43
2020-11-25T03:11:43
314,930,942
0
0
null
null
null
null
UTF-8
Java
false
false
1,913
java
public class Tester { /* private static int gcd(int a, int b){ for (int i = Math.min(a,b); i > 1; i--) { if ((a % i == 0) && (b % i == 0)) { return i; } } return 1; } */ public static void main(String args[]) { RealNumber a = new RealNumber(15); RealNumber b = new RealNumber(15.00000001); RealNumber c = new RealNumber(-30); RealNumber d = new RealNumber(16); System.out.println("15 & 15.00000001 --> true |" + a.equals(b)); System.out.println("15 & -30 --> false |" + a.equals(c)); System.out.println("15 & 16 --> false |" + a.equals(d)); RealNumber sumac = a.add(c); System.out.println("-15 | " + sumac.getValue()); RealNumber atimesc = a.multiply(c); System.out.println("-450 |" + atimesc); RealNumber cdividea = c.divide(a); System.out.println("-2 |" + cdividea); RationalNumber AB = new RationalNumber(3, 4); System.out.println("3 | " + AB.getNumerator()); System.out.println("4 | " + AB.getDenominator()); RationalNumber BA = AB.reciprocal(); System.out.println(BA.toString()); //System.out.println("1 | " +gcd(3,4)); RationalNumber biggy = new RationalNumber(100,10); System.out.println(biggy.toString()); RationalNumber biggest = new RationalNumber(4444444,1111111); System.out.println(biggest.toString()); RationalNumber ABtimesBA = AB.multiply(BA); System.out.println(ABtimesBA.toString()); RationalNumber dog = new RationalNumber(2,3); RationalNumber cat = new RationalNumber(1,4); RationalNumber cocogoat = dog.add(cat); System.out.println(cocogoat.toString()); RationalNumber cocomilk = dog.subtract(cat); System.out.println(cocomilk.toString()); } }
cfa0d0c60e11217c3ec0e0ac77c9f3ca26710477
dc665590ec27a3220627f2ab0412c6dce69a66d6
/P_240_search-a-2d-matrix-ii/Solution.java
3a20dddef23f745b57f016a833183aaeeb0100a5
[]
no_license
suyilearn/LeetCode-2
5f630592ad4fefa196d14231d44e13d76cb3da95
f79661008d400cb2d547f3600e2167adefe3e260
refs/heads/master
2021-05-31T11:18:58.136189
2016-04-15T16:06:54
2016-04-15T16:06:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,505
java
/* * We start search the matrix from top right corner, * initialize the current position to top right corner, * if the target is greater than the value in current position, * then the target can not be in entire row of current position because the row is sorted, * if the target is less than the value in current position, * then the target can not in the entire column because the column is sorted too. * We can rule out one row or one column each time, * so the time complexity is O(m+n). * */ public class Solution { public boolean searchMatrix(int[][] matrix, int target) { int x,y; if((x=matrix.length)==0 || (y=matrix[0].length)==0) return false; int i=0,j=y-1; while(i<x && j>=0){ if(matrix[i][j]==target) return true; else if(matrix[i][j]>target) j--; else i++; } return false; } } /* public class Solution { public boolean searchMatrix(int[][] matrix, int target) { if(matrix.length==0 || matrix[0].length==0) return false; return search(matrix,0,matrix.length-1,0,matrix[0].length-1,target); } public boolean search(int[][] matrix,int xs,int xe,int ys,int ye,int target){ //System.out.println("x range from "+xs+" to "+xe+",y range from "+ys+" to "+ye); if(xs==xe && ys==ye) return matrix[xs][ys]==target; int x1=xs,x2=xs,y1=ys,y2=ys; while(x2<=xe){ if(matrix[x2][ys]<target) x2++; else if(matrix[x2][ys]>target) break; else return true; } x2--; x2=x2>=xs?x2:xs; while(y2<=ye){ if(matrix[xs][y2]<target) y2++; else if(matrix[xs][y2]>target) break; else return true; } y2--; y2=y2>ys?y2:ys; while(x1<=x2){ if(matrix[x1][y2]<target) x1++; else if(matrix[x1][y2]>target) break; else return true; } x1=x1<=x2?x1:x2; while(y1<=y2){ if(matrix[x2][y1]<target) y1++; else if(matrix[x2][y1]>target) break; else return true; } y1=y1<=y2?y1:y2; return search(matrix,x1,x2,y1,y2,target); } } */
07c964e0a1de0d5a95b79c1f85e28af1dc815f04
d3d2a293f13cbb402523d812b62e2bfbf859d207
/Main.java
52e02d7c67c84d512bf8ed961bdb5e3fa8edf9aa
[]
no_license
theniaK/University-System
5bb6b0a9956af49fd7b216551ebf81db54b787e6
1db3e9ac38e9caa497bfe42352695acadab1226c
refs/heads/master
2020-03-12T12:08:56.613394
2018-04-22T22:02:21
2018-04-22T22:02:21
130,611,440
0
0
null
null
null
null
UTF-8
Java
false
false
179
java
public class Main { public static void main (String[] args){ Registry RegistryEFPL = new Registry(); InputScreen inputScreen = new InputScreen (RegistryEFPL); } }
75d22bb8747ddf7bc0e94960aa755a8c879745b6
12e92f870231a2e914d8fce0de36e22d83e6b425
/Nano9Parent/Nano9JPA/src/main/java/br/com/nano9/jpa/bean/ContaPagaEntity.java
b207b7bcf6a1b0922211d65a9bce4fe3dc03578c
[]
no_license
luh16/nano9final
6803c487963daf3b69a53617ffbfbe0240c1ff9a
420611fa2c2f123a764244b643b2fe9cd6bfaabc
refs/heads/master
2021-07-13T08:05:41.205909
2017-10-12T20:58:55
2017-10-12T20:58:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,663
java
package br.com.nano9.jpa.bean; import java.io.Serializable; import java.time.LocalDate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="contaspagar") public class ContaPagaEntity implements Serializable { private static final long serialVersionUID = -8586048614499767817L; @Id @Column(name="codigo", unique=true) private int id; @Column(name="descricao") private String descricao; @Column(name="dataReferencia") private LocalDate dataReferencia; @Column(name="dataPagamento") private LocalDate dataPagamento; @Column(name="valor") private double valor; @Column(name="fornecedor") private String fornecedor; public ContaPagaEntity() {} public int getId() { return id; } public void setId(int id) { this.id = id; } public String getDescricao() { return descricao; } public void setDescricao(String descricao) { this.descricao = descricao; } public LocalDate getDataReferencia() { return dataReferencia; } public void setDataReferencia(LocalDate dataReferencia) { this.dataReferencia = dataReferencia; } public LocalDate getDataPagamento() { return dataPagamento; } public void setDataPagamento(LocalDate dataPagamento) { this.dataPagamento = dataPagamento; } public double getValor() { return valor; } public void setValor(double valor) { this.valor = valor; } public String getFornecedor() { return fornecedor; } public void setFornecedor(String fornecedor) { this.fornecedor = fornecedor; } }
053acb38dc23de1024244472b006e609e947bacb
8df656e8539253a19a80dc4b81103ff0f70b2651
/testManage/src/main/java/cn/pioneeruniverse/dev/dao/mybatis/TblTestSetCaseMapper.java
ba320d165421cdd2226edca9bc4db11fe9fbdb6a
[]
no_license
tanghaijian/itmp
8713960093a66a39723a975b65a20824a2011d83
758bed477ec9550a1fd1cb19435c3b543524a792
refs/heads/master
2023-04-16T00:55:56.140767
2021-04-26T05:42:47
2021-04-26T05:42:47
361,607,388
1
2
null
null
null
null
UTF-8
Java
false
false
5,324
java
package cn.pioneeruniverse.dev.dao.mybatis; import java.util.HashMap; import java.util.List; import java.util.Map; import cn.pioneeruniverse.common.annotion.DataSource; import cn.pioneeruniverse.dev.vo.ExportParameters; import org.apache.ibatis.annotations.Param; import com.baomidou.mybatisplus.mapper.BaseMapper; import cn.pioneeruniverse.dev.entity.TblTestSet; import cn.pioneeruniverse.dev.entity.TblTestSetCase; import cn.pioneeruniverse.dev.entity.TblTestSetCaseVo; public interface TblTestSetCaseMapper extends BaseMapper<TblTestSetCase>{ /** * 获取数据字典中执行结果的code * @param valueName * @return */ @DataSource(name = "itmpDataSource") Integer getValueCode(@Param("valueName")String valueName); List<TblTestSetCaseVo> selectByTestSetId(Map<String, Object> map); Integer insert(TblTestSetCase testSetCase); /** * 批量修改 * @param result * @return */ int updateResult(Map<String, Object> result); /** * 批量执行查询 * @param map * @return */ List<Map<String, Object>> selectBatchPass(Map<String, Object> map); int countSelectBatchPass(Map<String,Object> params); String getStepDescription(String testSetCaseId); /** * 修改案例查询 * @param id * @return */ Map<String, Object> getTestSetCaseId(Long id); /** * 修改案例编辑 * @param map * @return */ int updatetestSetCase(Map<String, Object> map); /** * 根据案例ID查询数据 * @param testSetCase * @return */ List<Map<String, Object>> selectByCon(TblTestSetCase testSetCase); void updateCase(TblTestSetCase testSetCase); void updateManyStatus(Map<String, Object> map); void batchInsert(@Param("list") List<TblTestSetCase> list); Long judgeTestSetCase(@Param("testSetId") Long testSetId,@Param("caseNumber") String caseNumber); void updateExecuteResult(Map<String, Object> map); List<Map<String, Object>> selectCaseTree(@Param("testSetId") Long testSetId,@Param("executeRound") Integer executeRound,@Param("executeResultCode") Long executeResultCode); Long findCaseCount(Long id); Long getCaseExecuteResult(HashMap<String, Object> map); Long getCaseCount(Long devID); /** *@author liushan *@Description 获取测试案例数据 *@Date 2020/3/20 *@Param [testCaseId] *@return cn.pioneeruniverse.dev.entity.TblTestSetCaseVo **/ Map<String,Object> getTestCaseById(@Param("testCaseId") Long testCaseId); /** *@author liushan *@Description 根据测试案例id添加案例 *@Date 2020/3/23 *@Param [testCaseId, currentUserId] *@return void **/ void insertById(TblTestSetCase setCase); /** *@author liushan *@Description 更新测试集案例排序数值 *@Date 2020/3/24 *@Param [testSetCaseId, currentUserId, i] *@return void **/ void updateOrderByTestSetCaseId(@Param("testSetCaseId") Long testSetCaseId,@Param("currentUserId") Long currentUserId,@Param("orderNum") Integer orderNum); /** *@author liushan *@Description 更新测试集下测试案例一定范围排序数据 *@Date 2020/3/24 *@Param [testSetId, currentUserId, movePlaceOrderNum] *@return void **/ void updateOrderByTestSetId(@Param("testSetId") Long testSetId,@Param("currentUserId") Long currentUserId,@Param("movePlaceOrderNum") Integer movePlaceOrderNum,@Param("moveNum") Integer moveNum); /** *@author liushan *@Description 最大的排序值+1 *@Date 2020/3/25 *@Param [testSetId] *@return java.lang.Integer **/ Integer selectMaxOrder(@Param("testSetId") Long testSetId); List<TblTestSetCase> getOtherTestSetCase(HashMap<String, Object> paramMap); /** *@author liushan *@Description 更新测试集案例执行状态 *@Date 2020/3/25 *@Param [param] *@return void **/ void updateExecuteResultById(Map<String,Object> param); /** *@author liushan *@Description 批量修改测试集案例排序 *@Date 2020/3/26 *@Param [map] *@return void **/ void updateBatchOrder(Map<String, Object> map); /** *@author liushan *@Description 列表查询+步骤 *@Date 2020/4/7 *@Param [params] *@return java.util.List<cn.pioneeruniverse.dev.entity.TblTestSetCaseVo> **/ List<TblTestSetCaseVo> selectBatchPassWithStep(Map<String,Object> params); /** * 根据测试集id获取测试集信息 * @return */ ExportParameters getTestSetInfo(Integer id); /** *@author liushan *@Description ORDER_CASE在一定的范围增加+1 *@Date 2020/4/2 *@Param [testSetId, currentUserId, laterIndex, i] *@return void **/ void updateAddOrderByTestSetId(Map<String,Object> params); /** *@author liushan *@Description 排除已存在的ids *@Date 2020/4/3 *@Param [param] *@return java.util.List<cn.pioneeruniverse.dev.entity.TblTestSetCase> **/ List<TblTestSetCase> findNoChooseCaseId(Map<String,Object> param); /** *@author liushan *@Description 更新移除之后的排序号 *@Date 2020/4/7 *@Param [currentUserId] *@return void **/ void updateOrderCase(Map<String,Object> param); }
997a806eb3764ff71da20feeb8880986727500f6
9dae43ead0affd55a55fe81a7c49dd1292d436a9
/src/main/java/com/ty/modules/tunnel/send/container/entity/cmpp/MsgConfig.java
25da53802de5789bcd2a58f8c0501ee308a3f1eb
[]
no_license
zz1433105853/GitTest
b31647f62e960016af633d715685212558378e95
97af7d343ebe7b86cac5021751a18344ec88c022
refs/heads/master
2020-04-12T22:38:50.356375
2019-01-21T06:14:45
2019-01-21T06:14:45
162,794,648
1
0
null
null
null
null
UTF-8
Java
false
false
3,552
java
package com.ty.modules.tunnel.send.container.entity.cmpp; import com.ty.common.persistence.DataEntity; /** * Created by tykjkf01 on 2016/5/20. */ public class MsgConfig extends DataEntity<MsgConfig> { private static final long serialVersionUID = 8534361685323303784L; private String type; private String sequNumber; private String tdName; private String ismgIp; private int ismgPort; private int connectCount; private String spId; private String secret; private String spCode; private String serviceId; private int connectNumber; private String protocolVersion; private String protocolType; private int sendSpeed; public MsgConfig(String ismgIp, int ismgPort, int connectCount, String spId, String secret, String spCode, String serviceId, String protocolType, String protocolVersion, int sendSpeed,String type,String sequNumber) { this.ismgIp = ismgIp; this.ismgPort = ismgPort; this.connectNumber = connectNumber; this.connectCount = connectCount; this.spId = spId; this.secret = secret; this.spCode = spCode; this.serviceId = serviceId; this.protocolType = protocolType; this.protocolVersion = protocolVersion; this.sendSpeed = sendSpeed; this.type = type; this.sequNumber = sequNumber; } public String getIsmgIp() { return ismgIp; } public void setIsmgIp(String ismgIp) { this.ismgIp = ismgIp; } public int getIsmgPort() { return ismgPort; } public void setIsmgPort(int ismgPort) { this.ismgPort = ismgPort; } public int getConnectCount() { return connectCount; } public void setConnectCount(int connectCount) { this.connectCount = connectCount; } public String getSpId() { return spId; } public void setSpId(String spId) { this.spId = spId; } public String getSecret() { return secret; } public void setSecret(String secret) { this.secret = secret; } public String getSpCode() { return spCode; } public void setSpCode(String spCode) { this.spCode = spCode; } public String getServiceId() { return serviceId; } public void setServiceId(String serviceId) { this.serviceId = serviceId; } public int getConnectNumber() { return connectNumber; } public void setConnectNumber(int connectNumber) { this.connectNumber = connectNumber; } public String getTdName() { return tdName; } public void setTdName(String tdName) { this.tdName = tdName; } public String getProtocolVersion() { return protocolVersion; } public void setProtocolVersion(String protocolVersion) { this.protocolVersion = protocolVersion; } public String getProtocolType() { return protocolType; } public void setProtocolType(String protocolType) { this.protocolType = protocolType; } public int getSendSpeed() { return sendSpeed; } public void setSendSpeed(int sendSpeed) { this.sendSpeed = sendSpeed; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getSequNumber() { return sequNumber; } public void setSequNumber(String sequNumber) { this.sequNumber = sequNumber; } }
02cc40fc9ccbb06593f5018917852d4b78d90884
e325b8bf663499d2a7d4c33536df6fd0cfb7339c
/SocketExchange/src/com/ai4n/socketExchange/model/socketExchange/IsLoginExistRequest.java
0c17a0b5b96a9cc2c45d8e481bfc4ea0b924c052
[]
no_license
Ai4n/library_socket_project
86b2dd73afc3b7b688f58d9de06764417a3f0ac0
7f5313ff68d5523fc6a87178854491eff62cac9f
refs/heads/master
2020-09-17T02:31:06.502321
2020-01-16T14:23:34
2020-01-16T14:23:34
223,960,069
0
0
null
2020-01-16T14:23:35
2019-11-25T13:52:26
Java
UTF-8
Java
false
false
489
java
package com.ai4n.socketExchange.model.socketExchange; import com.ai4n.socketExchange.model.ServerMessage; import com.ai4n.socketExchange.model.SocketExchange; public class IsLoginExistRequest extends SocketExchange { private String newLogin; public IsLoginExistRequest() { super(ServerMessage.LOGIN_CHECK); } public IsLoginExistRequest(String newLogin) { super(ServerMessage.LOGIN_CHECK); this.newLogin = newLogin; } public String getNewLogin() { return newLogin; } }
5c4ac7a93de38b9741c2ba5a3337b050c264b6a6
c28c86d0bf2545e6457603b0f56cedf6a611aff1
/demo/src/main/java/grammar/reflection/IntegerTest.java
f2622a7ed241209f76fdc926fd39580e41f484fc
[]
no_license
YangShuailing/test-1
01e4ac09aeb4b00561a6785f26a8531c5871348a
4c6c22ebb1f6e2e49ed3f3d259b4cb0fe2b3eadc
refs/heads/master
2021-05-04T23:01:27.767081
2018-01-16T15:08:26
2018-01-16T15:08:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
915
java
package grammar.reflection; import java.lang.reflect.Field; import java.util.Random; /** * Created by wajian on 2016/10/5. */ public class IntegerTest { //http://www.mincoder.com/article/4432.shtml //Integer由缓存决定,改变缓存来改变Integer public static void main(String[] args) throws Exception { Class<?> clazz = Class.forName("java.lang.Integer$IntegerCache"); Field field = clazz.getDeclaredField("cache"); field.setAccessible(true); Integer[] cache = (Integer[]) field.get(clazz); // 改变Integer的缓存 for (int i = 0; i < cache.length; i++) { cache[i] = new Random().nextInt(cache.length); } System.out.println("Cache size for integer type: "+ cache.length); for (int i = 0; i < 10; i++) { System.out.println((Integer) i); //这个时候1不是1 ,2也不是2 } } }
bb481a44ab5fa80b46e7793a2b1b3bea8f116f8e
6e498099b6858eae14bf3959255be9ea1856f862
/src/com/facebook/buck/support/log/AbstractLogBuckConfig.java
b5a37395b5c1e1bcffeb68ae831d55c55ac286b8
[ "Apache-2.0" ]
permissive
Bonnie1312/buck
2dcfb0791637db675b495b3d27e75998a7a77797
3cf76f426b1d2ab11b9b3d43fd574818e525c3da
refs/heads/master
2020-06-11T13:29:48.660073
2019-06-26T19:59:32
2019-06-26T21:06:24
193,979,660
2
0
Apache-2.0
2019-09-22T07:23:56
2019-06-26T21:24:33
Java
UTF-8
Java
false
false
2,836
java
/* * Copyright 2019-present Facebook, Inc. * * 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.facebook.buck.support.log; import com.facebook.buck.core.config.BuckConfig; import com.facebook.buck.core.config.ConfigView; import com.facebook.buck.core.util.immutables.BuckStyleTuple; import com.google.common.collect.ImmutableSet; import java.util.Optional; import org.immutables.value.Value; @BuckStyleTuple @Value.Immutable(builder = false, copy = false) public abstract class AbstractLogBuckConfig implements ConfigView<BuckConfig> { @Override public abstract BuckConfig getDelegate(); private static final String LOG_SECTION = "log"; @Value.Lazy public boolean isPublicAnnouncementsEnabled() { return getDelegate().getBooleanValue(LOG_SECTION, "public_announcements", true); } @Value.Lazy public boolean isProcessTrackerEnabled() { return getDelegate().getBooleanValue(LOG_SECTION, "process_tracker_enabled", true); } @Value.Lazy public boolean isProcessTrackerDeepEnabled() { return getDelegate().getBooleanValue(LOG_SECTION, "process_tracker_deep_enabled", false); } @Value.Lazy public boolean isRuleKeyLoggerEnabled() { return getDelegate().getBooleanValue(LOG_SECTION, "rule_key_logger_enabled", false); } @Value.Lazy public boolean isMachineReadableLoggerEnabled() { return getDelegate().getBooleanValue(LOG_SECTION, "machine_readable_logger_enabled", true); } @Value.Lazy public boolean isBuckConfigLocalWarningEnabled() { return getDelegate().getBooleanValue(LOG_SECTION, "buckconfig_local_warning_enabled", false); } @Value.Lazy public boolean isJavaUtilsLoggingEnabled() { return getDelegate().getBooleanValue(LOG_SECTION, "jul_build_log", false); } public boolean isLogBuildIdToConsoleEnabled() { return getDelegate().getBooleanValue(LOG_SECTION, "log_build_id_to_console_enabled", false); } public Optional<String> getBuildDetailsTemplate() { return getDelegate().getValue(LOG_SECTION, "build_details_template"); } @Value.Lazy public ImmutableSet<String> getBuildDetailsCommands() { return getDelegate() .getOptionalListWithoutComments(LOG_SECTION, "build_details_commands") .map(ImmutableSet::copyOf) .orElse(ImmutableSet.of("build", "test", "install")); } }
e346ca9b051f6ab1821d58b5ce0200e4a856e31a
9ce4ccdea825037580d62166437437dbb5673e66
/CCC/TandemBicycle.java
e5277bf8c8f9eebd081e796861f217ffd6d99dcd
[]
no_license
makeren/competitive-programming
7e2c0d8daf9441e1ca02b6137618f03ce977b8c9
f5c5e4b96f32c34c0c2bdb0b6a4053b56dff7cef
refs/heads/master
2022-03-15T13:39:56.916956
2019-11-03T03:21:53
2019-11-03T03:21:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,081
java
import java.util.Arrays; import java.util.Scanner; public class TandemBicycle { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner (System.in); int T = sc.nextInt(); int N = sc.nextInt(); String [] D = new String [N]; String [] P = new String [N]; int [] D1 = new int [N]; int [] P1 = new int[N]; int sum = 0; sc.nextLine(); String l1 = sc.nextLine(); for (int i = 0; i<N; i++) { D = l1.split(" "); } for (int j = 0; j<N; j++) { D1[j] = Integer.parseInt(D[j]); } sc.nextLine(); String l2 = sc.nextLine(); for (int i = 0; i<N; i++) { P = l2.split(" "); } for (int j = 0; j<N; j++) { P1[j] = Integer.parseInt(P[j]); } Arrays.sort(D1); Arrays.sort(P1); if (T==1) { for (int i = 0; i<N; i++) { if (D1[i]>P1[i]) { sum = sum+D1[i]; } else { sum = sum+P1[i]; } } } else if (T==2) { for (int i = 0; i<N; i++) { if (D1[i]>P1[P1.length-i-1]) { sum = sum+D1[i]; } else { sum = sum+P1[P1.length-i-1]; } } } } }
724a523cc44d5ba67d2db9f742875a00c5cb67c5
24833adb16114113d5e079915dcd709ea544eeab
/PackScheduler/test/edu/ncsu/csc216/pack_scheduler/course/roll/CourseRollTest.java
96e9905c3546aa559c4ff35b66860a50a88f3a64
[]
no_license
sdwelsh/RegistrationManager
706ae873fc40af72fb8ca1a1c180adddad66f32b
35598fe933f54270180d58c166a3bb637e063671
refs/heads/master
2022-09-08T21:49:52.511709
2020-04-23T17:42:55
2020-04-23T17:42:55
267,676,548
0
0
null
null
null
null
UTF-8
Java
false
false
7,092
java
package edu.ncsu.csc216.pack_scheduler.course.roll; import static org.junit.Assert.*; import org.junit.Test; import edu.ncsu.csc216.pack_scheduler.course.Course; import edu.ncsu.csc216.pack_scheduler.directory.StudentDirectory; import edu.ncsu.csc216.pack_scheduler.user.Student; /** * Test the course roll class and all of its methods. * @author stephenwelsh */ public class CourseRollTest { /** * Test the constructor of the course Roll */ @Test public void testCourseRollConstructor() { Course c = new Course("CSC216", "Programming Concepts - Java", "001", 4, "sesmith5", 10, "A"); //CourseRoll roll = new CourseRoll(10); //Update as below CourseRoll courseRoll = c.getCourseRoll(); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(10, courseRoll.getOpenSeats()); try { @SuppressWarnings("unused") CourseRoll courseRoll2 = new CourseRoll(9, c); fail(); } catch(IllegalArgumentException e) { assertNull(e.getMessage()); } } /** * Test the add method in the course roll */ @Test public void testCourseRollAdd() { Course c = new Course("CSC216", "Programming Concepts - Java", "001", 4, "sesmith5", 10, "A"); //CourseRoll roll = new CourseRoll(10); //Update as below CourseRoll courseRoll = c.getCourseRoll(); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(10, courseRoll.getOpenSeats()); StudentDirectory std = new StudentDirectory(); std.loadStudentsFromFile("test-files/student_records.txt"); courseRoll.enroll(std.getStudentById("daustin")); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(9, courseRoll.getOpenSeats()); courseRoll.enroll(std.getStudentById("lberg")); courseRoll.enroll(std.getStudentById("rbrennan")); courseRoll.enroll(std.getStudentById("efrost")); courseRoll.enroll(std.getStudentById("shansen")); courseRoll.enroll(std.getStudentById("ahicks")); courseRoll.enroll(std.getStudentById("zking")); courseRoll.enroll(std.getStudentById("dnolan")); courseRoll.enroll(std.getStudentById("cschwartz")); courseRoll.enroll(std.getStudentById("gstone")); try { courseRoll.enroll(std.getStudentById("daustin")); fail(); } catch(IllegalArgumentException e) { assertNull(e.getMessage()); } Student s = new Student("stephen", "welsh", "sdwelsh", "[email protected]", " uh"); Student s1 = new Student("stephen", "welsh", "stwelsh", "[email protected]", " uh"); Student s2 = new Student("stephen", "welsh", "sttwelsh", "[email protected]", " uh"); Student s3 = new Student("stephen", "welsh", "stttwelsh", "[email protected]", " uh"); Student s4 = new Student("stephen", "welsh", "stttttwelsh", "[email protected]", " uh"); Student s5 = new Student("stephen", "welsh", "sttttttwelsh", "[email protected]", " uh"); Student s6 = new Student("stephen", "welsh", "swelsh", "[email protected]", " uh"); Student s7 = new Student("stephen", "welsh", "welsh", "[email protected]", " uh"); Student s8 = new Student("stephen", "welsh", "elsh", "[email protected]", " uh"); Student s9 = new Student("stephen", "welsh", "lsh", "[email protected]", " uh"); courseRoll.enroll(s); courseRoll.enroll(s1); courseRoll.enroll(s2); courseRoll.enroll(s3); courseRoll.enroll(s4); courseRoll.enroll(s5); courseRoll.enroll(s6); courseRoll.enroll(s7); courseRoll.enroll(s8); courseRoll.enroll(s9); assertEquals(10, courseRoll.getNumberOnWaitlist()); courseRoll.drop(std.getStudentById("lberg")); assertEquals(0, courseRoll.getOpenSeats()); assertEquals(9, courseRoll.getNumberOnWaitlist()); try { Student student = null; courseRoll.enroll(student); fail(); } catch(IllegalArgumentException e) { assertNull(e.getMessage()); } } /** * Test the drop method in the CourseRoll */ @Test public void testDrop() { Course c = new Course("CSC216", "Programming Concepts - Java", "001", 4, "sesmith5", 10, "A"); //CourseRoll roll = new CourseRoll(10); //Update as below CourseRoll courseRoll = c.getCourseRoll(); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(10, courseRoll.getOpenSeats()); StudentDirectory std = new StudentDirectory(); std.loadStudentsFromFile("test-files/student_records.txt"); courseRoll.enroll(std.getStudentById("daustin")); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(9, courseRoll.getOpenSeats()); courseRoll.enroll(std.getStudentById("lberg")); courseRoll.enroll(std.getStudentById("rbrennan")); courseRoll.enroll(std.getStudentById("efrost")); courseRoll.enroll(std.getStudentById("shansen")); courseRoll.enroll(std.getStudentById("ahicks")); courseRoll.enroll(std.getStudentById("zking")); courseRoll.enroll(std.getStudentById("dnolan")); courseRoll.enroll(std.getStudentById("cschwartz")); courseRoll.enroll(std.getStudentById("gstone")); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(0, courseRoll.getOpenSeats()); courseRoll.drop(std.getStudentById("lberg")); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(1, courseRoll.getOpenSeats()); try { Student student = null; courseRoll.drop(student); fail(); } catch(IllegalArgumentException e) { assertNull(e.getMessage()); } } /** * Test if the canEnroll method in CourseRoll */ @Test public void testCanEnroll() { Course c = new Course("CSC216", "Programming Concepts - Java", "001", 4, "sesmith5", 10, "A"); //CourseRoll roll = new CourseRoll(10); //Update as below CourseRoll courseRoll = c.getCourseRoll(); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(10, courseRoll.getOpenSeats()); StudentDirectory std = new StudentDirectory(); std.loadStudentsFromFile("test-files/student_records.txt"); courseRoll.enroll(std.getStudentById("daustin")); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(9, courseRoll.getOpenSeats()); assertFalse(courseRoll.canEnroll(std.getStudentById("daustin"))); assertTrue(courseRoll.canEnroll(std.getStudentById("lberg"))); courseRoll.enroll(std.getStudentById("lberg")); assertTrue(courseRoll.canEnroll(std.getStudentById("rbrennan"))); courseRoll.enroll(std.getStudentById("rbrennan")); courseRoll.enroll(std.getStudentById("efrost")); courseRoll.enroll(std.getStudentById("shansen")); courseRoll.enroll(std.getStudentById("ahicks")); courseRoll.enroll(std.getStudentById("zking")); courseRoll.enroll(std.getStudentById("dnolan")); courseRoll.enroll(std.getStudentById("cschwartz")); courseRoll.enroll(std.getStudentById("gstone")); assertEquals(10, courseRoll.getEnrollmentCap()); assertEquals(0, courseRoll.getOpenSeats()); Student student = new Student("Stephen", "Welsh", "sdwelsh", "[email protected]", "password"); assertTrue(courseRoll.canEnroll(student)); courseRoll.enroll(student); assertEquals(1, courseRoll.getNumberOnWaitlist()); courseRoll.setEnrollmentCap(20); assertEquals(20, courseRoll.getEnrollmentCap()); assertEquals(10, courseRoll.getOpenSeats()); } }
894dc59a0c2f2dda709c1cb2f28d6974ba4fad68
6ed66ca298b196e022c25392e7fd3ef3f458fbae
/src/main/java/testrepo/demo/dto/UserContext.java
8414c4840850b72cac12838fe172f99a7bcf1262
[]
no_license
KrystianCiamaga/VTecToGowno
f68cd7acf7b5d945f0dca7bf0abb03cd0197798b
97ab2c2c6b91d61c5a7f1ef02a5ec9865b819681
refs/heads/master
2023-03-02T17:09:34.512123
2021-02-09T19:09:52
2021-02-09T19:09:52
337,215,406
0
0
null
null
null
null
UTF-8
Java
false
false
564
java
package testrepo.demo.dto; import org.springframework.stereotype.Component; @Component public class UserContext { private Long userId; private String poswiadczeniaUzytkownika=""; public void setUserId(Long userId) { this.userId = userId; } public void setPoswiadczeniaUzytkownika(String poswiadczeniaUzytkownika) { this.poswiadczeniaUzytkownika = poswiadczeniaUzytkownika; } public Long getUserId() { return userId; } public String getPoswiadczeniaUzytkownika() { return poswiadczeniaUzytkownika; } }
[ "[Your" ]
[Your
381411b861feebcb91de823442d9d928efc30291
c294a6b0bcaf3d4166611d11b5eb072aadbf90e1
/leyou-item/leyou-item-service/src/main/java/com/leyou/item/controller/BrandController.java
8ff939e8332246a66575c919137c3a86c6e5da94
[]
no_license
xu7777777/leyou
c1a39397884841432cca9bd4a43f947f1dd27078
dd335bd09fe25cb08edb667e1a777e0df6613c85
refs/heads/master
2022-06-22T08:06:48.802297
2020-02-16T13:10:56
2020-02-16T13:10:56
240,702,268
1
0
null
2022-06-21T02:48:42
2020-02-15T12:03:07
Java
UTF-8
Java
false
false
2,752
java
package com.leyou.item.controller; import com.leyou.common.pojo.PageResult; import com.leyou.item.pojo.Brand; import com.leyou.item.service.BrandService; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.io.UnsupportedEncodingException; import java.util.List; /** * @Author XuQiaoYang * @Date 2020/2/13 16:40 */ @RestController @RequestMapping("brand") public class BrandController { @Resource private BrandService brandService; /** * 根据查询条件分页并排序查询品牌信息 * * @param key * @param page * @param rows * @param sortBy * @param desc * @return */ @GetMapping("page") public ResponseEntity<PageResult<Brand>> queryBrandsByPage( @RequestParam(value = "key", required = false) String key, @RequestParam(value = "page", defaultValue = "1") Integer page, @RequestParam(value = "rows", defaultValue = "5") Integer rows, @RequestParam(value = "sortBy", required = false) String sortBy, @RequestParam(value = "desc", required = false) Boolean desc ) { PageResult<Brand> result = this.brandService.queryBrandsByPage(key, page, rows, sortBy, desc); if (CollectionUtils.isEmpty(result.getItems())) { return ResponseEntity.notFound().build(); } return ResponseEntity.ok(result); } /** * 保存新建的品牌 * @param brand * @param cids * @return */ @PostMapping("")//fa泛型中的void? public ResponseEntity<Void> saveBrand(Brand brand, @RequestParam("cids") List<Long> cids) { this.brandService.saveBranch(brand, cids); return ResponseEntity.status(HttpStatus.CREATED).build(); } /** * 根据分类的id查询品牌列表 * @param cid * @return */ @GetMapping("cid/{cid}") public ResponseEntity<List<Brand>> queryBrandsByCid(@PathVariable("cid") Long cid){ List<Brand> brands = this.brandService.queryBrandsByCid(cid); if (CollectionUtils.isEmpty(brands)) { return ResponseEntity.notFound().build(); } return ResponseEntity.ok(brands); } /** * 根据id查询商品 * @param id * @return */ @GetMapping("{id}") public ResponseEntity<Brand> queryBrandById(@PathVariable("id") Long id){ Brand brand = this.brandService.queryBrandById(id); if (brand == null) { return ResponseEntity.notFound().build(); } return ResponseEntity.ok(brand); } }
beea77db7afecfe9edf5aec206af6ab958ece353
ceddafe71d5765f7dd25c47ebe4ea30f718a2fbf
/src/main/java/com/xinda/wx/wxmanager/vo/TextMessage.java
4a93c6851bba70d0c8598ee0c0d9baf32b558300
[]
no_license
lijie2008/wxmanager
ec4c4c9dc18ae34222cc63f2516786716a39fe35
dd4e21f70464bf6561226888d9bc713c72f07024
refs/heads/master
2023-01-10T05:36:09.709605
2019-07-15T13:50:36
2019-07-15T13:50:36
196,923,935
0
0
null
2022-12-31T01:52:27
2019-07-15T04:29:11
JavaScript
UTF-8
Java
false
false
1,348
java
package com.xinda.wx.wxmanager.vo; public class TextMessage { // 开发者微信号 private String ToUserName; // 发送方帐号(一个OpenID) private String FromUserName; // 消息创建时间 (整型) private long CreateTime; // 消息类型(text/image/location/link) private String MsgType; // 消息id,64位整型 private long MsgId; // 消息内容 private String Content; public String getToUserName() { return ToUserName; } public void setToUserName(String toUserName) { ToUserName = toUserName; } public String getFromUserName() { return FromUserName; } public void setFromUserName(String fromUserName) { FromUserName = fromUserName; } public long getCreateTime() { return CreateTime; } public void setCreateTime(long createTime) { CreateTime = createTime; } public String getMsgType() { return MsgType; } public void setMsgType(String msgType) { MsgType = msgType; } public long getMsgId() { return MsgId; } public void setMsgId(long msgId) { MsgId = msgId; } public String getContent() { return Content; } public void setContent(String content) { Content = content; } }
7d0630c01c2fa1b7cbe06ff662f842b688320c12
321a2738f5e202b1596bf9601380763f4764007f
/rabbitmq-demo/src/main/java/com/owner/rabbitmq/demo/message/RabbitConfig.java
45bee45055e5d3f624ac30ef8939d1f99c6e2c8d
[]
no_license
zhuangjianfa/demo
aaa785ba343d7466d8f895362071b0dda73ab14c
df8908772fd3bd4e7984db85081f2b86e94b16fe
refs/heads/master
2020-03-17T17:41:07.827756
2018-05-22T07:15:08
2018-05-22T07:15:08
133,798,131
0
0
null
null
null
null
UTF-8
Java
false
false
4,921
java
/** * Copyright © 2014 GZJF Corp. All rights reserved. This software is proprietary * to and embodies the confidential technology of 深圳市大头兄弟文化传播有限公司 Corp. * Possession, use, or copying of this software and media is authorized only * pursuant to a valid written license from 深圳市大头兄弟文化传播有限公司 Corp or an * authorized sublicensor. */ package com.owner.rabbitmq.demo.message; import org.springframework.amqp.core.AcknowledgeMode; import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory; import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; import org.springframework.amqp.rabbit.connection.ConnectionFactory; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainerFactoryConfigurer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * description:rabbitmq配置 * Author Date Changes * zhuangjianfa 2018年3月9日 Created */ @Configuration public class RabbitConfig { @Bean(name = "connectionFactory") public ConnectionFactory connectionFactory(@Value("${spring.rabbitmq.addresses}") String addresses, @Value("${spring.rabbitmq.username}") String username, @Value("${spring.rabbitmq.password}") String password, @Value("${spring.rabbitmq.virtual-host}") String virtualHost) { CachingConnectionFactory connectionFactory = new CachingConnectionFactory(); connectionFactory.setAddresses(addresses); connectionFactory.setUsername(username); connectionFactory.setPassword(password); connectionFactory.setVirtualHost(virtualHost); return connectionFactory; } @Bean(name = "rabbitTempleate") public RabbitTemplate rabbitTemplate(@Qualifier("connectionFactory")ConnectionFactory connectionFactory) { RabbitTemplate pushRabbitTemplate = new RabbitTemplate(connectionFactory); return pushRabbitTemplate; } @Bean(name = "connection") public SimpleRabbitListenerContainerFactory connection(SimpleRabbitListenerContainerFactoryConfigurer configurer, @Qualifier("connectionFactory") ConnectionFactory connectionFactory, @Value("${spring.rabbitmq.amqpcontainer.prefetch}") Integer prefetch) { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); configurer.configure(factory, connectionFactory); factory.setPrefetchCount(prefetch); factory.setConcurrentConsumers(2); return factory; } @Bean(name = "pushConnectionFactory") public ConnectionFactory pushConnectionFactory(@Value("${spring.rabbitmq.push.addresses}") String addresses, @Value("${spring.rabbitmq.push.username}") String username, @Value("${spring.rabbitmq.push.password}") String password, @Value("${spring.rabbitmq.push.virtual-host}") String virtualHost) { CachingConnectionFactory connectionFactory = new CachingConnectionFactory(); connectionFactory.setAddresses(addresses); connectionFactory.setUsername(username); connectionFactory.setPassword(password); connectionFactory.setVirtualHost(virtualHost); return connectionFactory; } @Bean(name = "pushRabbitTempleate") public RabbitTemplate pushRabbitTemplate(@Qualifier("pushConnectionFactory") ConnectionFactory connectionFactory) { RabbitTemplate pushRabbitTemplate = new RabbitTemplate(connectionFactory); return pushRabbitTemplate; } @Bean(name = "pushFactory") public SimpleRabbitListenerContainerFactory pushFactory(SimpleRabbitListenerContainerFactoryConfigurer configurer, @Qualifier("pushConnectionFactory") ConnectionFactory connectionFactory, @Value("${spring.rabbitmq.push.listener.acknowledge-mode}") AcknowledgeMode acknowledgeMode) { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); configurer.configure(factory, connectionFactory); factory.setAcknowledgeMode(acknowledgeMode); return factory; } }
f8bb505a8b37cb1f21c2c578908471082bbc2458
3b6d9ac1e993262ad82de8f6dae57d2732311031
/src/main/java/com/invoice/app/Config.java
18b1d132c96e1b0fb66814436ef8949dbb988d94
[]
no_license
arsh-ansari/InvoiceNumConvApp
8ea79d9eb2771e687cf87e3b44d784054312062c
e1e18a38c213935b50ae94d6ce6ff7c30fa1eb49
refs/heads/master
2020-03-25T20:47:59.633196
2018-08-10T11:12:54
2018-08-10T11:12:54
144,146,506
0
0
null
null
null
null
UTF-8
Java
false
false
1,560
java
package com.invoice.app; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.oxm.jaxb.Jaxb2Marshaller; import com.invoice.soap.gateway.SoapConnector; /** * The spring configuration class contains bean for Soap connector and * JaxB2Marshaller for consuming the public Web service * * @author mohansar0 * */ @Configuration public class Config { private static Logger LOG = LoggerFactory.getLogger(Config.class); @Value("${numberconversion.default.uri}") private String defaultURI; @Value("${invoice.ws.readtimeout}") private String readTimeout; @Value("${invoice.ws.connectiontimeout}") private String connectionTimeout; /** * Sets the Jaxb2Marshaller context path to client POJOs * * @return */ @Bean public Jaxb2Marshaller marshaller() { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setContextPath("com.dataaccess.webservicesserver"); return marshaller; } /** * Setting up the default URL and marshaller for Soap connection to * webservice * * @param marshaller * @return */ @Bean public SoapConnector soapConnector(Jaxb2Marshaller marshaller) { LOG.info("Initializing Soap connector using JaxB"); SoapConnector client = new SoapConnector(); client.setDefaultUri(defaultURI); client.setMarshaller(marshaller); client.setUnmarshaller(marshaller); return client; } }
d8b717abdde1729fc617fe3b48fe9aa040382294
aeb05006092855016133ba26f3b97df1a7ad6229
/JavaBasics/src/Basics/AbstractionHDFC.java
8b2d88df21e81ed959cd3d12ba113a9c0b6d5214
[]
no_license
mpuri1982/TestProject
b6ff5b29a2154ac5dd32eaaa52c190914b11292b
da0e13e0a546c64b9d78316a34a6ef5ccd455650
refs/heads/master
2020-06-26T22:26:52.296564
2019-09-12T00:06:17
2019-09-12T00:06:17
199,773,582
0
0
null
null
null
null
UTF-8
Java
false
false
169
java
package Basics; public class AbstractionHDFC extends Abstraction{ @Override public void loan() { System.out.println("HDFC----- Bank LOAN"); } }
c6c723271f833193b7ecae1d902b3ec19c2ab507
3c72889df7e07773a80e6ace7c0ba7c16874ddd4
/src/com/roboo/qiushibaike/CommentActivity.java
746ca5f2ad999c186fd577bf0e2f49d34917fc36
[]
no_license
haikuowuya/qiushi_baike
5e01c0c2ed2377e5f5609a767a8f46709e14243f
90e2fb1fb8f97f8a931d6fcae2bdfd99580e86b4
refs/heads/master
2020-04-23T04:41:00.101363
2013-12-19T09:42:25
2013-12-19T09:42:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
737
java
package com.roboo.qiushibaike; import android.os.Bundle; import android.view.Menu; import com.roboo.qiushibaike.fragment.CommentFragment; import com.roboo.qiushibaike.model.QiuShiItem; public class CommentActivity extends BaseActivity { private QiuShiItem mItem; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // TODO setContentView TAG mItem = (QiuShiItem) getIntent().getSerializableExtra("item"); getSupportFragmentManager().beginTransaction().add(android.R.id.content, CommentFragment.newInstance(mItem)).commit(); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; } }
381303cae0361b35a16a9f26d2f62a20d396a33c
1e6dd337c8ed9f8c6ad90697a32b9350420bdff8
/DAY 2/messageSource/App.java
6f2ed60a92c91d56c1881be7a2ec2742c0ee1fc0
[]
no_license
jasmira/SpringFramework-For-Beginners
2dc250791f103f1bab857206181081e589c6b3ee
138e2cc096e2f6276e246859d6a65b2992b4b2bc
refs/heads/master
2021-01-11T19:08:23.671235
2017-01-18T09:35:13
2017-01-18T09:35:13
79,324,589
0
0
null
null
null
null
UTF-8
Java
false
false
903
java
package com.ramana.common; import java.util.Locale; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.ramana.services.MessageService; public class App { public static void main( String[] args ) { ApplicationContext context = new ClassPathXmlApplicationContext("locale.xml"); MessageService cust = (MessageService)context.getBean("service"); System.out.print("message in English : "); cust.printMessage(Locale.ENGLISH); System.out.print("message in French : "); cust.printMessage(Locale.FRANCE); System.out.print("message in German : "); cust.printMessage(Locale.GERMAN); // No file available for Chenese. defaults to English System.out.print("message in Chinese : "); cust.printMessage(Locale.CHINA); } }
d6460385094cf3a8db6829a7065a7943cd87b184
828bc04856605869a6605f9a97678a426607ef9f
/app/src/main/java/com/android/contacts/common/list/ViewPagerTabStrip.java
adec8f923f961509800688f2313f03577cfb1b41
[]
no_license
artillerymans/Dialer_Support
14925695e8b6a7d12d33973c665e6e06b082019a
c460b7b9a9a1da0c0d91aaf253098b96a5c5d384
refs/heads/master
2022-11-23T07:55:11.819343
2020-08-02T05:57:26
2020-08-02T05:57:26
284,218,783
1
0
null
null
null
null
UTF-8
Java
false
false
3,811
java
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.contacts.common.list; import android.content.Context; import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.Paint; import android.util.AttributeSet; import android.view.View; import android.widget.LinearLayout; import com.android.dialer.R; import com.android.dialer.theme.base.ThemeComponent; public class ViewPagerTabStrip extends LinearLayout { private final Paint mSelectedUnderlinePaint; private int mSelectedUnderlineThickness; private int mIndexForSelection; private float mSelectionOffset; public ViewPagerTabStrip(Context context) { this(context, null); } public ViewPagerTabStrip(Context context, AttributeSet attrs) { super(context, attrs); final Resources res = context.getResources(); mSelectedUnderlineThickness = res.getDimensionPixelSize(R.dimen.tab_selected_underline_height); int underlineColor = ThemeComponent.get(context).theme().getColorAccent(); int backgroundColor = ThemeComponent.get(context).theme().getColorPrimary(); mSelectedUnderlinePaint = new Paint(); mSelectedUnderlinePaint.setColor(underlineColor); setBackgroundColor(backgroundColor); setWillNotDraw(false); } /** * Notifies this view that view pager has been scrolled. We save the tab index and selection * offset for interpolating the position and width of selection underline. */ void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { mIndexForSelection = position; mSelectionOffset = positionOffset; invalidate(); } @Override protected void onDraw(Canvas canvas) { int childCount = getChildCount(); // Thick colored underline below the current selection if (childCount > 0) { View selectedTitle = getChildAt(mIndexForSelection); if (selectedTitle == null) { // The view pager's tab count changed but we weren't notified yet. Ignore this draw // pass, when we get a new selection we will update and draw the selection strip in // the correct place. return; } int selectedLeft = selectedTitle.getLeft(); int selectedRight = selectedTitle.getRight(); final boolean isRtl = isRtl(); final boolean hasNextTab = isRtl ? mIndexForSelection > 0 : (mIndexForSelection < (getChildCount() - 1)); if ((mSelectionOffset > 0.0f) && hasNextTab) { // Draw the selection partway between the tabs View nextTitle = getChildAt(mIndexForSelection + (isRtl ? -1 : 1)); int nextLeft = nextTitle.getLeft(); int nextRight = nextTitle.getRight(); selectedLeft = (int) (mSelectionOffset * nextLeft + (1.0f - mSelectionOffset) * selectedLeft); selectedRight = (int) (mSelectionOffset * nextRight + (1.0f - mSelectionOffset) * selectedRight); } int height = getHeight(); canvas.drawRect( selectedLeft, height - mSelectedUnderlineThickness, selectedRight, height, mSelectedUnderlinePaint); } } private boolean isRtl() { return getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; } }
02fbcf1d8fbbaf3a2e7537a16360eafb910117d7
658c7f0c3cc9e758a2e9b612e647f7f2f6085245
/distributor-web/src/main/java/com/distributor/controller/BaseController.java
b6450c932cb1c7382184ef29c38959fddbade48c
[]
no_license
veyoung/distributor
7a1765f6e4b70f886444326a0899522474f4bb97
35a9d14abc1df710a4ed1413f3a9adfe5eb4b7a6
refs/heads/master
2016-09-06T12:05:19.567323
2015-08-29T02:19:04
2015-08-29T02:19:04
39,818,879
0
0
null
null
null
null
UTF-8
Java
false
false
733
java
package com.distributor.controller; import java.util.HashMap; import java.util.Map; public class BaseController { public Map<String, Object> success(){ Map<String, Object> result = new HashMap<String, Object>(); result.put("success", true); return result; } public Map<String,Object> success(Object obj){ Map<String, Object> result = success(); if (result != null){ result.put("content", obj); } return result; } public Map<String, Object> fail(){ Map<String, Object> result = new HashMap<String, Object>(); result.put("success", false); return result; } public Map<String, Object> fail(Object obj){ Map<String, Object> result = fail(); result.put("content", obj); return result; } }
edb7694dcac9b83819a966c28bc01a4f83cbb08f
e145ed45caa5a82fba38243e1bbb864b09addbb6
/src/main/java/com/manager/repository/HouseRepository.java
456ece967dc3acabc833a5694f15a4f02bbc8638
[]
no_license
nguynduyanh169/ApartmentManager
944402b055c3d15c42bbd342d102a1e37cfccb89
e12d79c2fa090b82271ed0658eb7d5cd06cd9cfa
refs/heads/master
2020-09-16T06:25:26.356025
2019-12-30T02:41:47
2019-12-30T02:41:47
223,682,241
1
0
null
null
null
null
UTF-8
Java
false
false
921
java
package com.manager.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import com.manager.entity.House; @Repository public interface HouseRepository extends JpaRepository<House, Long>{ @Query("SELECT new House(h.id, h.profileImage, h.description) from House h Where h.description is not null") List<House> getAllHouseLiteABC(); @Query("SELECT h.profileImage from House h Where h.id = ?1") String getHouseImage(long id); @Query("SELECT h from House h where h.block.blockId = :blockId") List<House> getHouseByBlockId(@Param(value = "blockId") long blockId); @Query("SELECT h from House h where h.type.typeId = :typeId") List<House> getHouseByTypeId(@Param(value = "typeId") long typeId); }
9e1f8dfcd735872c8aa48d799428a159e37c0608
60e8289739a499250321368744409c743fe789e2
/tests/src/main/java/org/drips/framework/apt/AptAspectTest.java
d81adb9736d62e448894c23985df0661afd300f5
[ "Apache-2.0" ]
permissive
saurabharora/drips
5c6ad17b60e64f1863397c7d7d39c0668d66626e
f4403c593c5b436ae47ec25e2fd624556a08dc54
refs/heads/master
2016-09-05T19:31:40.618149
2008-09-28T17:26:17
2008-09-28T17:26:17
32,132,371
0
0
null
null
null
null
UTF-8
Java
false
false
15,229
java
/* * Copyright 2008 Drips project Owners http://code.google.com/p/drips/ * Saurabh Arora <[email protected]> And Prasen Mukherjee <[email protected]> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.drips.framework.apt; import java.io.IOException; import javax.management.Attribute; import javax.management.InstanceNotFoundException; import javax.management.IntrospectionException; import javax.management.MBeanInfo; import javax.management.MBeanServerConnection; import javax.management.MBeanServerInvocationHandler; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.management.ReflectionException; import org.drips.framework.aspectwerkx.DripsAspect; import org.drips.framework.aspectwerkx.DripsAspectInfo; import org.drips.framework.main.DripsMain; import org.drips.framework.mbeans.DripsMainMBean; import org.drips.framework.test.AbstractDripsBaseTest; public class AptAspectTest extends AbstractDripsBaseTest { private DripsMain m = new DripsMain(); protected void setUp() throws Exception { System.out.println("DripsMainTest Called"); super.setUp(); super.setUpWordCounter(m); } /* * @see TestCase#tearDown() */ protected void tearDown() throws Exception { super.tearDown(); m.shutdown(); } public void testAptAspect1() throws Exception { Class aptclass = AptAspect1.class; String aptdescription = "AptAspect1"; MBeanInfo info = enableAspectandGetInfo(aptclass); assertNotNull(info); assertEquals(info.getClassName(), aptclass.getName()); assertEquals(info.getDescription(), aptdescription); // Assert the Operations assertNotNull(info.getOperations()); assertEquals(info.getOperations().length, 5); assertEquals(info.getOperations()[0].getName(), "counterValue"); assertEquals(info.getOperations()[0].getDescription(), "Counter"); assertEquals(info.getOperations()[0].getSignature().length, 0); assertEquals(info.getOperations()[0].getReturnType(), "int"); // Assert the attributes. assertNotNull(info.getAttributes()); assertEquals(info.getAttributes().length, 1); assertEquals(info.getAttributes()[0].getName(), "Counter"); assertEquals(info.getAttributes()[0].getDescription(), "Setting Counter"); assertEquals(info.getAttributes()[0].getType(), "int"); MBeanServerConnection mbs = getMBeanServerConnection(); DripsAspectInfo apectInfo = getDripsMainMBean().getAspectInfo( aptclass.getName()); assertEquals(apectInfo.getDescription(), aptdescription); assertEquals(apectInfo.getMBeanInerfaceName(), DripsAspect.class .getName()); assertEquals(apectInfo.getName(), aptclass.getName()); assertEquals(apectInfo.getObjectName(), "com.bea.drips.framework:type=" + aptclass.getName()); ObjectName aspectObjectName = new ObjectName(apectInfo .getObjectName()); String[] signature = new String[0]; // Calls to Operations. Object ob = mbs.invoke(aspectObjectName, info.getOperations()[0] .getName(), new Object[0], signature); assertNotNull(ob); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 1); // Second call ob = mbs.invoke(aspectObjectName, info.getOperations()[0].getName(), new Object[0], signature); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 2); // Calls to the Attributes. ob = mbs.getAttribute(aspectObjectName, info.getAttributes()[0] .getName()); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 3); // Again call Attribute, same value should be returned. ob = mbs.getAttribute(aspectObjectName, info.getAttributes()[0] .getName()); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 3); // Call setter on the Attribute. // Attribute attr = new Attribute("Counter", new Integer(10)); Attribute attr = new Attribute("Counter", 10); mbs.setAttribute(aspectObjectName, attr); // Again call Attribute, we should get 10 as value ob = mbs.getAttribute(aspectObjectName, info.getAttributes()[0] .getName()); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 10); } protected MBeanInfo enableAspectandGetInfo(final Class aspectClass) throws MalformedObjectNameException, IOException, InstanceNotFoundException, ClassNotFoundException, ReflectionException, IntrospectionException { DripsMainMBean dripsMainMBean = getDripsMainMBean(); String aspectClassName = aspectClass.getName(); if (!dripsMainMBean.isAspectEnabled(aspectClassName)) { dripsMainMBean.enableAspect(aspectClassName); } DripsAspectInfo apectInfo = dripsMainMBean.getAspectInfo(aspectClass .getName()); assertNotNull(apectInfo); assertTrue(dripsMainMBean.isAspectEnabled(aspectClassName)); MBeanServerConnection mBeanServerConnection = null; mBeanServerConnection = getMBeanServerConnection(); DripsAspect aspectMBean = null; ObjectName aspectObjectName = new ObjectName(apectInfo .getObjectName()); if (mBeanServerConnection.isRegistered(aspectObjectName)) { return mBeanServerConnection.getMBeanInfo(aspectObjectName); } fail("Cannot Find Mbean " + aspectObjectName + "in the Mbean Server"); return null; } public void testAptAspect2() throws Exception { Class aptclass = AptAspect2.class; String aptdescription = "AptAspect2"; MBeanInfo info = enableAspectandGetInfo(aptclass); assertNotNull(info); assertEquals(info.getClassName(), aptclass.getName()); assertEquals(info.getDescription(), aptdescription); // Assert the Operations assertNotNull(info.getOperations()); assertEquals(info.getOperations().length, 5); assertEquals(info.getOperations()[0].getName(), "counterValue"); assertEquals(info.getOperations()[0].getDescription(), "Counter"); assertEquals(info.getOperations()[0].getSignature().length, 0); assertEquals(info.getOperations()[0].getReturnType(), "int"); MBeanServerConnection mbs = getMBeanServerConnection(); DripsAspectInfo apectInfo = getDripsMainMBean().getAspectInfo( aptclass.getName()); assertEquals(apectInfo.getDescription(), aptdescription); assertEquals(apectInfo.getMBeanInerfaceName(), DripsAspect.class .getName()); assertEquals(apectInfo.getName(), aptclass.getName()); assertEquals(apectInfo.getObjectName(), "com.bea:type=AptAspect2"); ObjectName aspectObjectName = new ObjectName(apectInfo .getObjectName()); String[] signature = new String[0]; Object ob = mbs.invoke(aspectObjectName, info.getOperations()[0] .getName(), new Object[0], signature); assertNotNull(ob); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 1); // Second call ob = mbs.invoke(aspectObjectName, info.getOperations()[0].getName(), new Object[0], signature); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 2); } public void testAptAspect3() throws Exception { Class aptclass = AptAspect3.class; String aptdescription = "AptAspect3"; MBeanInfo info = enableAspectandGetInfo(aptclass); assertNotNull(info); assertEquals(info.getClassName(), aptclass.getName()); assertEquals(info.getDescription(), aptdescription); assertNotNull(info.getOperations()); assertEquals(info.getOperations().length, 5); assertEquals(info.getOperations()[0].getName(), "currentCounter"); assertEquals(info.getOperations()[0].getDescription(), "currentCounter"); assertEquals(info.getOperations()[0].getSignature().length, 0); assertEquals(info.getOperations()[0].getReturnType(), "int"); // Assert the attributes. assertNotNull(info.getAttributes()); // we also have a Even as a Attribute assertEquals(info.getAttributes().length, 2); // Asserts for Counter. assertEquals(info.getAttributes()[0].getName(), "Counter"); assertEquals(info.getAttributes()[0].getDescription(), "Counter"); assertEquals(info.getAttributes()[0].getType(), "int"); // Asserts for Even. assertEquals(info.getAttributes()[1].getName(), "Even"); assertEquals(info.getAttributes()[1].getDescription(), "Even"); assertEquals(info.getAttributes()[1].getType(), "boolean"); MBeanServerConnection mbs = getMBeanServerConnection(); DripsAspectInfo apectInfo = getDripsMainMBean().getAspectInfo( aptclass.getName()); assertEquals(apectInfo.getDescription(), aptdescription); assertEquals(apectInfo.getMBeanInerfaceName(), AptAspect3Inf.class .getName()); assertEquals(apectInfo.getName(), aptclass.getName()); assertEquals(apectInfo.getObjectName(), "com.bea.drips.framework:type=" + aptclass.getName()); ObjectName aspectObjectName = new ObjectName(apectInfo .getObjectName()); String[] signature = new String[0]; Object ob = mbs.invoke(aspectObjectName, info.getOperations()[0] .getName(), new Object[0], signature); assertNotNull(ob); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 1); // Second call ob = mbs.invoke(aspectObjectName, info.getOperations()[0].getName(), new Object[0], signature); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 2); // Use proxy invocation. AptAspect3Inf aptimpl = (AptAspect3Inf) MBeanServerInvocationHandler .newProxyInstance(mbs, aspectObjectName, AptAspect3Inf.class, false); assertEquals(aptimpl.currentCounter(), 3); // Calls to the Attributes. ob = mbs.getAttribute(aspectObjectName, info.getAttributes()[0] .getName()); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 4); // Again call Attribute, same value should be returned, // using proxy invocation. assertEquals(aptimpl.getCounter(), 4); // Call setter on the Attribute. Attribute attr = new Attribute("Counter", 10); mbs.setAttribute(aspectObjectName, attr); // Again call Attribute, we should get 10 as value assertEquals(aptimpl.getCounter(), 10); // Call setter using Proxy aptimpl.setCounter(14); // Check value assertEquals(aptimpl.getCounter(), 14); // Now let us test the isEven method. assertFalse(aptimpl.isEven()); // Set to True aptimpl.setEven(true); // Now test for true assertTrue(aptimpl.isEven()); } public void testAptAspect4() throws Exception { Class aptclass = AptAspect4.class; Class aptmbeanclass = org.drips.framework.apt.AptAspect4Inf.class; String aptdescription = "AptAspect4"; MBeanInfo info = enableAspectandGetInfo(aptclass); assertNotNull(info); assertEquals(info.getClassName(), aptmbeanclass.getName()); // FIXME: Description is not preserved. // assertEquals(info.getDescription(), aptdescription); assertNotNull(info.getOperations()); assertEquals(info.getOperations().length, 1); assertEquals(info.getOperations()[0].getName(), "currentCounter"); // assertEquals(info.getOperations()[0].getDescription(), "Counter"); assertEquals(info.getOperations()[0].getSignature().length, 0); assertEquals(info.getOperations()[0].getReturnType(), "int"); MBeanServerConnection mbs = getMBeanServerConnection(); DripsAspectInfo apectInfo = getDripsMainMBean().getAspectInfo( aptclass.getName()); assertEquals(apectInfo.getDescription(), aptdescription); assertEquals(apectInfo.getMBeanInerfaceName(), AptAspect4InfMBean.class.getName()); assertEquals(apectInfo.getName(), aptmbeanclass.getName()); assertEquals(apectInfo.getObjectName(), "com.bea.drips.framework:type=" + aptmbeanclass.getName()); ObjectName aspectObjectName = new ObjectName(apectInfo .getObjectName()); String[] signature = new String[0]; Object ob = mbs.invoke(aspectObjectName, info.getOperations()[0] .getName(), new Object[0], signature); assertNotNull(ob); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 1); // Second call ob = mbs.invoke(aspectObjectName, info.getOperations()[0].getName(), new Object[0], signature); assertNotNull(ob); assertEquals(((Integer) ob).intValue(), 2); // Use proxy invocation. AptAspect4InfMBean aptimpl = (AptAspect4InfMBean) MBeanServerInvocationHandler .newProxyInstance(mbs, aspectObjectName, AptAspect4InfMBean.class, false); assertEquals(aptimpl.currentCounter(), 3); } public void testAptAspect5() throws Exception { Class aptclass = AptAspect5.class; MBeanInfo info = enableAspectandGetInfo(aptclass); MBeanServerConnection mbs = getMBeanServerConnection(); DripsAspectInfo aspectinfo = getDripsMainMBean().getAspectInfo( aptclass.getName()); AptAspect5Inf aptimpl = (AptAspect5Inf) MBeanServerInvocationHandler .newProxyInstance(mbs, new ObjectName(aspectinfo .getObjectName()), AptAspect5Inf.class, false); aptimpl.deploy(); aptimpl.undeploy(); } }
[ "saurabh.arora@8f699357-4955-0410-b1e6-2be95779e8d5" ]
saurabh.arora@8f699357-4955-0410-b1e6-2be95779e8d5
ad05a399732c6d0843521606757b16a80effdcf9
1bea0490fa596ee04a92eca2080115960ff530c7
/src/test/java/com/shure/queue/TestPs.java
b2cda16f597cb36f4ba5566e372ac3137669b2a6
[]
no_license
dddreams/learn-redis-queue
0c579c37e582271735864765e5ca4dbb1de7d266
08c04cea4d39b7ad3b850509a601d8a9587ebb70
refs/heads/master
2023-01-09T02:01:53.872833
2020-11-07T16:06:48
2020-11-07T16:06:48
309,261,280
0
0
null
null
null
null
UTF-8
Java
false
false
572
java
package com.shure.queue; import com.shure.queue.redisMqPs.publish.Publish; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import java.util.HashMap; import java.util.Map; @SpringBootTest public class TestPs { @Autowired private Publish publish; @Test public void testps() { Map<String, Object> map = new HashMap<>(); map.put("name", "tom"); map.put("age", 20); publish.sendChannelMess("test", map); } }
c0d910fff088f93002c42437bf7842114841dcd3
4d551b13419df5e548c4cfb6dc840ee74122ea17
/src/main/java/com/rabbitmq/rpc/RPCServer.java
f114be6d498fcd407eb8534c8dc9db3a9f8c4115
[]
no_license
zhangxingj/rabbitmq
d54be46409137d16d7c3f86bc3a14fc11b9d7ee0
ea0dd0acfbbac301183927e5ea33fe57fa8f0558
refs/heads/master
2020-04-07T07:39:03.739363
2018-11-26T06:59:28
2018-11-26T06:59:28
158,184,113
0
0
null
null
null
null
GB18030
Java
false
false
3,923
java
package com.rabbitmq.rpc; import com.rabbitmq.client.ConnectionFactory; import com.rabbitmq.client.Connection; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Consumer; import com.rabbitmq.client.DefaultConsumer; import com.rabbitmq.client.AMQP; import com.rabbitmq.client.Envelope; import java.io.IOException; import java.util.concurrent.TimeoutException; public class RPCServer { private static final String RPC_QUEUE_NAME = "rpc_queue"; public static void main(String[] arg){ RPCServer.execute("localhost", "guest", "guest"); } public static void execute(String host, String userName, String password){ // 配置连接工厂 ConnectionFactory factory = new ConnectionFactory(); factory.setHost(host); // 需要在管理后台增加一个hry帐号 //factory.setUsername(userName); //factory.setPassword(password); Connection connection = null; try { // 建立TCP连接 connection = factory.newConnection(); // 在TCP连接的基础上创建通道 final Channel channel = connection.createChannel(); // 声明一个rpc_queue队列 channel.queueDeclare(RPC_QUEUE_NAME, false, false, false, null); // 设置同时最多只能获取一个消息 channel.basicQos(1); System.out.println(" [RpcServer] Awaiting RPC requests"); // 定义消息的回调处理类 Consumer consumer = new DefaultConsumer(channel) { @Override public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException { // 生成返回的结果,关键是设置correlationId值 AMQP.BasicProperties replyProps = new AMQP.BasicProperties .Builder() .correlationId(properties.getCorrelationId()) .build(); // 生成返回 String response = generateResponse(body); // 回复消息,通知已经收到请求 channel.basicPublish( "", properties.getReplyTo(), replyProps, response.getBytes("UTF-8")); // 对消息进行应答 channel.basicAck(envelope.getDeliveryTag(), false); // 唤醒正在消费者所有的线程 synchronized(this) { this.notify(); } } }; // 消费消息 channel.basicConsume(RPC_QUEUE_NAME, false, consumer); // 在收到消息前,本线程进入等待状态 while (true) { synchronized(consumer) { try { consumer.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } } catch (Exception e) { e.printStackTrace(); } finally { try { // 空值判断,为了代码简洁略 connection.close(); } catch (Exception e) { e.printStackTrace(); } } } /** * 暂停10s,并返回结果 * @param body * @return */ private static String generateResponse(byte[] body) { System.out.println(" [RpcServer] receive requests: " + new String(body)); try { Thread.sleep(1000 *1); } catch (InterruptedException e) { e.printStackTrace(); } return "response:" + new String(body) + "-" + System.currentTimeMillis(); } }
e04dd77a75079f5d28456fda604eb714febee646
98128747eb1f8bf766bfe79183fce6a3d90a4277
/a0015_java_design_pattern/aa0015_08_async-method-invocation/src/main/java/org/saxing/asyncmethodinvocation/AsyncCallback.java
d979943ce3e8bd41453c948fd01eb2b68c93aab2
[]
no_license
saxingz/java-example
6887526bed258aecf228b60cf23f5a00bdb6d23b
c914137a429dcd97500f5bd66017f43b7dd480b3
refs/heads/master
2023-06-26T05:22:05.329598
2022-06-29T14:26:46
2022-06-29T14:26:46
57,117,717
5
1
null
2023-06-14T22:33:27
2016-04-26T10:00:09
Java
UTF-8
Java
false
false
410
java
package org.saxing.asyncmethodinvocation; import java.util.Optional; /** * async callback interface * * @param <T> * * @author saxing 2018/10/30 9:20 */ public interface AsyncCallback<T> { /** * Complete handler which is executed when async task is completed or fails execution. * * @param value * @param e */ void onComplete(T value, Optional<Exception> e); }
36164f4b2c07394b3e5a3d8ae1c006d0117fe382
c99d54caa06d32e9bc5814d3a94b9142f18283ff
/exercicios/src/main/java/br/unifor/poo/construtores/B.java
aa50e788c2f19a8c13dfe9738140d643e708a9f7
[]
no_license
adrianopatrick/pooads
b6393fd52c93e11b3451fff71e885d61f84b030d
bc5eb36604687c1a7077328eb85496f785d7a2f2
refs/heads/master
2020-04-18T22:12:31.616186
2016-11-05T01:06:02
2016-11-05T01:06:02
67,263,650
0
5
null
null
null
null
UTF-8
Java
false
false
127
java
package br.unifor.poo.construtores; public class B extends C { public B(){ System.out.println("Estou em B"); } }
7c2c82424200efc2346703772613955f904e49ad
cae73879b8fa184669b9f90f7b8f1d91819669a0
/test/src/main/java/com/langchuan/design/proxy/StaticProxy.java
9c314b13b0b2e6de20df3fb41d28e615c182a899
[]
no_license
XiongShengkai/demo
665174b74087d8a8e8cf31112ebf37336b539138
ff993a47fc99d779e4bfe9f4576045f7739daef2
refs/heads/master
2020-03-30T03:37:29.056604
2018-10-08T01:48:11
2018-10-08T01:48:11
150,698,467
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package com.langchuan.design.proxy; /** * @author: kevin.xiong * @description:静态代理类 * @date:2018/9/28 15:14 */ public class StaticProxy implements Subject{ private RealSubject subject; public StaticProxy(RealSubject subject) { this.subject = subject; } @Override public void visit(int channel) { subject.visit(channel); } }
e75c6117117cfafbc23c05cf25ce15ca69725f9a
ca2c62f1cebafdc4286f63befb283c61fa9ee724
/app/src/main/java/Fragment/PlacePickerFragment.java
ed8340083c58b2e3b1e581fda6a5cc7bc5ae16e1
[]
no_license
BlueQuinn/GmMap
1c71e469d87cb1b48cd5e194f605195f26b72513
50f2a96827eb16c7eb17ec0becb96d1c29fe3628
refs/heads/master
2021-01-21T15:19:16.422451
2016-07-24T18:33:21
2016-07-24T18:33:21
56,786,454
0
0
null
null
null
null
UTF-8
Java
false
false
7,357
java
package Fragment; import android.support.v4.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.TextView; import com.google.android.gms.common.GoogleApiAvailability; import com.google.android.gms.common.GooglePlayServicesNotAvailableException; import com.google.android.gms.common.GooglePlayServicesRepairableException; import com.google.android.gms.common.api.Status; import com.google.android.gms.location.places.AutocompleteFilter; import com.google.android.gms.location.places.Place; import com.google.android.gms.location.places.ui.PlaceAutocomplete; import com.google.android.gms.location.places.ui.PlacePicker; import com.google.android.gms.location.places.ui.PlaceSelectionListener; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.LatLngBounds; import Listener.OnCloseListener; import Listener.OnPlaceSelectedListener; import vmwares.in.lequan.gmmap.MainActivity; import vmwares.in.lequan.gmmap.R; /** * Created by lequan on 4/19/2016. */ public class PlacePickerFragment extends Fragment implements OnClickListener { private ImageButton btnBack, btnNearby; private TextView textView; @Nullable private LatLngBounds bounds; @Nullable private AutocompleteFilter filter; @Nullable private PlaceSelectionListener placeListener; OnCloseListener listener; public void setOnCloseListener(OnCloseListener listener) { this.listener = listener; } public PlacePickerFragment() { } public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View var4 = inflater.inflate(R.layout.fragment_place_picker, container, false); btnBack = (ImageButton) var4.findViewById(R.id.btnBack); btnNearby = (ImageButton) var4.findViewById(R.id.btnNearby); btnBack.setOnClickListener(this); btnNearby.setOnClickListener(this); //zzaRi = var4.findViewById(R.id.imvClose); textView = (TextView) var4.findViewById(R.id.txtSearch); OnClickListener var5 = new OnClickListener() { public void onClick(View view) { zzzG(); } }; textView.setOnClickListener(var5); return var4; } public void onDestroyView() { btnBack = null; //zzaRi = null; textView = null; super.onDestroyView(); } public void setBoundsBias(@Nullable LatLngBounds bounds) { this.bounds = bounds; } public void setFilter(@Nullable AutocompleteFilter filter) { this.filter = filter; } public void findPlace(CharSequence text) { textView.setText(text); if (text.length() < 1) { } zzzG(); } public void setText(String text) { textView.setText(text); } public void setHint(CharSequence hint) { textView.setHint(hint); btnBack.setContentDescription(hint); } public void setOnPlaceSelectedListener(PlaceSelectionListener listener) { placeListener = listener; } void zzzG() { int var1 = -1; try { Intent var2 = (new PlaceAutocomplete.IntentBuilder(2)).setBoundsBias(bounds).setFilter(filter).zzeq(textView.getText().toString()).zzig(1).build(getActivity()); startActivityForResult(var2, 1); } catch (GooglePlayServicesRepairableException var3) { var1 = var3.getConnectionStatusCode(); Log.e("Places", "Could not open autocomplete activity", var3); } catch (GooglePlayServicesNotAvailableException var4) { var1 = var4.errorCode; Log.e("Places", "Could not open autocomplete activity", var4); } if (var1 != -1) { GoogleApiAvailability var5 = GoogleApiAvailability.getInstance(); var5.showErrorDialogFragment(getActivity(), var1, 2); } } public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 1) // find place, address { if (resultCode == -1) { Place var4 = PlaceAutocomplete.getPlace(getActivity(), data); if (placeListener != null) { placeListener.onPlaceSelected(var4); } textView.setText(var4.getName().toString()); } else if (resultCode == 2) { Status var5 = PlaceAutocomplete.getStatus(getActivity(), data); if (placeListener != null) { placeListener.onError(var5); } } } else // find nearby { if (resultCode == -1) { Place place = PlacePicker.getPlace(data, getActivity()); placeListener.onPlaceSelected(place); } } super.onActivityResult(requestCode, resultCode, data); } @Override public void onClick(View v) { if (v.getId() == R.id.btnBack) { listener.onClose(); } else { PlacePicker.IntentBuilder intentBuilder = new PlacePicker.IntentBuilder(); LatLngBounds.Builder builder = new LatLngBounds.Builder(); builder.include(MainActivity.myLocation); //intentBuilder.setLatLngBounds(toBounds(MainActivity.myLocation, 30)); //intentBuilder.setLatLngBounds(builder.build()); try { startActivityForResult(intentBuilder.build(getActivity()), 2); } catch (GooglePlayServicesRepairableException e) { e.printStackTrace(); } catch (GooglePlayServicesNotAvailableException e) { e.printStackTrace(); } } } LatLngBounds toBounds(LatLng center, double radius) { LatLng southwest = computeOffset(center, radius * Math.sqrt(2.0), 225); LatLng northeast = computeOffset(center, radius * Math.sqrt(2.0), 45); return new LatLngBounds(southwest, northeast); } static LatLng computeOffset(LatLng from, double distance, double heading) { distance /= 6371009.0D; // Earth's radius heading = Math.toRadians(heading); double fromLat = Math.toRadians(from.latitude); double fromLng = Math.toRadians(from.longitude); double cosDistance = Math.cos(distance); double sinDistance = Math.sin(distance); double sinFromLat = Math.sin(fromLat); double cosFromLat = Math.cos(fromLat); double sinLat = cosDistance * sinFromLat + sinDistance * cosFromLat * Math.cos(heading); double dLng = Math.atan2(sinDistance * cosFromLat * Math.sin(heading), cosDistance - sinFromLat * sinLat); return new LatLng(Math.toDegrees(Math.asin(sinLat)), Math.toDegrees(fromLng + dLng)); } }
7003492371f0544c96734799775f512a7c37ddb0
8e9759cc9ead2b1d3de8e62c66a3b071d2184ddb
/server/src/main/java/com/fosu/campus/common/enums/CampusHttpStatus.java
ee87227f2dfdc81ec53a66a1022c2c781cc6b65c
[]
no_license
lutherGuo/fosu-transactions
6999bcc59af8daba5549d28bac8684af3a4c8d39
3be137e4b65eee675da1f7cf468b599e042b09f1
refs/heads/master
2022-03-23T12:05:20.576230
2019-12-26T02:38:58
2019-12-26T02:38:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,373
java
package com.fosu.campus.common.enums; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.ToString; /** * @Author: 98050 * @Time: 2018-11-05 16:09 * @Feature: */ @AllArgsConstructor @ToString @Getter public enum CampusHttpStatus { /** * Sign不存在 */ SIGN_NOT_FOUND(10001,"Sign不存在或Sign错误"), /** * 分类信息无法找到 */ CATEGORY_NOT_FOUND(20404,"分类不存在"), CATEGORY_UPDATE_FAILED(20406, "分类保存失败"), CATEGORY_SAVE_FAILED(20405, "分类保存失败"), /** * 成功码 */ SUCCESS(200, "success"), /** * 通用的错误码 */ SERVER_ERROR(50100, "服务端异常"), BIND_ERROR (50101, "参数校验异常:%s"), REQUEST_ILLEGAL (50102, "请求非法"), ACCESS_LIMIT_REACHED(50104, "访问太频繁!"), /** * 商品模块 405XX */ BRAND_NOT_FOUND(40404, "没找到任何商品"), BRAND_CREATED_FAILED(40405, "商品创建失败"), BRAND_UPDATE_FAILED(40406, "商品更新失败"), BRAND_DELETE_FAILED(40407, "商品删除失败"), /** * 用户状态码 */ USER_NOT_FOUND(30404, "用户不存在"), USER_CREATED_FAILED(30405,"用户创建失败"), USER_UPDATE_FAILED(30406,"用户更新失败"); private Integer code; private String message; }
1db89a8ac380a351af8bc013d933cfef33407316
d1a71703bf503879bd767beeb6bb9b5ed0e7f03a
/src/algorithm/CrackingTheCodingInterview/BitManipulation/q3.java
2961e500aee60ce7d80cf62d9a2698dfca49d3a6
[]
no_license
eyrelzy/learnProcess
a2b2b1d4f09a033f7e8c525cf5d4743d011308df
d2574af4873de6a28c5b927d445e102729ac0f9a
refs/heads/master
2021-01-18T09:54:50.241548
2014-07-14T04:24:52
2014-07-14T04:24:52
null
0
0
null
null
null
null
GB18030
Java
false
false
2,855
java
package algorithm.CrackingTheCodingInterview.BitManipulation; /** * Given an integer, print the next smallest and next largest number that have the same * number of 1 bits in their binary representation. * 给定一个整数x,找出另外两个整数,这两个整数的二进制表示中1的个数和x相同, 其中一个是比x大的数中最小的,另一个是比x小的数中最大的。 * * 首先将问题拆解。如何找出一个整数的二进制中1的个数。 * method1:用2去除 * method2:右移,看移除的位是否为1 * method3:位操作的归并算法,这里,只实现这个方法,这个方法有个正式的名字叫做:hamming-weight * 参考链接地址: * http://en.wikipedia.org/wiki/Hamming_weight * *任意一个二进制数t:1101 0011 *找一个和t中1的个数一样多的,但是比1小的数: * 从高位到低位找到最后一个为1的位,并且记录1的个数为c,那么该位的下一位必然是0,记作b,将这个0位置为1,将b+1至b+c-1位置为1,其余高位为0 *找一个和t中1的个数一样多的,但是比1小的数: * 从低位到高位找到第一个1,并记录1的个数为c,从它开始,找到 第一个0,将这个0变为1,比这个位低的位全都置为0,随后在低位上不上c-1个1. * * */ public class q3 { public static int findSmaller(int n){ int left1Count=0; int bit=31; int x=1<<31; //找到高位的第一个1的位置 for(;(n&x)==0&&bit>0;x>>>=1,bit--); //找到高位第一个1后的第一个0的位置 for(;(n&x)!=0&&bit>0;x>>>=1,left1Count++,bit--); n=x|n; bit++; //高位全部置为0 n&=((1<<bit)-1); //从0开始的高位添加left1Count-1个1 while((--left1Count)>0){ n|=1<<bit; bit<<=1; } return n ; } public static int findBigger(int n){ int right1Count=0; int bit = 0 ; int x=1; //找到低位的第一个1的位置 for(;(n&x)==0&&bit<32;x<<=1,bit++); //找到第一个1后的第一个0的位置 for(;(n&x)!=0&&bit<32;x<<=1,right1Count++,bit++); //将该位的0置为1 n=x|n; //低位全部置为0 n&=~(x-1); //低位变为1 int p=1; while((--right1Count)>0){ n|=p; p<<=1; } return n ; } //整数的二进制表示中1的个数 public static int bitNumber(int n){ n=(n&(0x55555555))+((n>>1)&(0x55555555)); n=(n&(0x33333333))+((n>>2)&(0x33333333)); n=(n&(0x0f0f0f0f))+((n>>4)&(0x0f0f0f0f)); n=(n&(0x00ff00ff))+((n>>8)&(0x00ff00ff)); n=(n&(0x0000ffff))+((n>>16)&(0x0000ffff)); return n; } public static void main(String[] args) { int number = 1111; System.out.println(Integer.toBinaryString(number)); int smaller = findSmaller(number); int bigger = findBigger(number); System.out.println(Integer.toBinaryString(smaller)); System.out.println(Integer.toBinaryString(bigger)); } }
ecad320125fb026cb580a6c99e987e22d0249dfe
ba5e8ff04c6ed8f4263751adf2a353d0ad7ca667
/app/src/main/java/ir/hadinemati/steelmarketing/Views/UploadWebView.java
ceef31c74305da584c678ab331353e9347ede243
[]
no_license
HNematiMovil/steel_marketing
7e41960a1f1716afa29b8de70bd941c0ac20969b
72421a650f277317f0bab7f43526f4eff3f61362
refs/heads/master
2023-06-22T20:28:23.790757
2021-07-16T18:30:12
2021-07-16T18:30:12
384,682,528
0
0
null
null
null
null
UTF-8
Java
false
false
680
java
package ir.hadinemati.steelmarketing.Views; import android.os.Bundle; import android.webkit.WebView; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import ir.hadinemati.steelmarketing.R; public class UploadWebView extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.activity_webupload); WebView webView = new WebView(this); webView.getSettings().setBuiltInZoomControls(true); webView.loadUrl("https://marketing.steel-man.ir/upload"); setContentView(webView); } }