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
1fc048fd5d9ac6732c5e1167386c0581d8b8f83b
403c812ea97a9eae9b142017b1c9757d45ce6ea9
/src/main/java/com/practice/seleniumdesign/srp/main/GoogleMainPage.java
bda0d55a10e676f99a0a0cbcb9e911ec0ceade41
[]
no_license
KundurthiSantosh/Selenium-Design-Patterns
7f58c066ba4b0099b6d7237a3ee3a59265ca4608
24943cb835ea6b64868daeb8aac6163a237cc17e
refs/heads/main
2023-04-24T17:27:54.826622
2021-05-16T09:56:01
2021-05-16T09:56:01
367,090,510
0
0
null
null
null
null
UTF-8
Java
false
false
934
java
package com.practice.seleniumdesign.srp.main; import com.practice.seleniumdesign.srp.common.SearchSuggestion; import com.practice.seleniumdesign.srp.common.SearchWidget; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.PageFactory; public class GoogleMainPage { private final WebDriver driver; private final SearchSuggestion searchSuggestion; private final SearchWidget searchWidget; public GoogleMainPage(final WebDriver driver){ this.driver = driver; this.searchSuggestion = PageFactory.initElements(driver, SearchSuggestion.class); this.searchWidget = PageFactory.initElements(driver, SearchWidget.class); } public SearchSuggestion getSearchSuggestion() { return searchSuggestion; } public SearchWidget getSearchWidget() { return searchWidget; } public void goTo(){ driver.get("https://www.google.com"); } }
b671dec6d9a6ebdce9639c942107b57a63454c62
b13aade366b3e9eb64181011a11b35c05c93870e
/FNDS_4/src/TriplesOfLatinLetters.java
43d51e067eb2105021a75eaa592b9d78d5e37398
[]
no_license
cherepanovadr/FNDS_May_2020
7d13e0bab904f0019c659664c0303cae1f9309da
337300169b9d9c4ad05c4bbd28c3fa3e5a93df43
refs/heads/master
2023-01-06T23:58:34.144057
2020-10-30T20:20:11
2020-10-30T20:20:11
308,735,105
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
import java.util.Scanner; public class TriplesOfLatinLetters { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.nextLine()); for (int i = 97; i < 97 + n; i++) { for (int j = 97; j < 97+n; j++) { for (int k = 97; k < 97+n; k++) { System.out.printf("%c%c%c%n", i,j,k); } } } } }
c7bbf61300a7982757c57787fef831c95e519ed4
ded3392e6e4c79583e7978ce13235f038e806a59
/src/main/java/com/leoman/team/service/teamRaceService.java
409d06c7b144a59fe846b4fc1c11ec7a8c753758
[]
no_license
ys305751572/yqtq
1262c02e1d4eb8fc5dd62420dbd8df76c9c33343
45097bf2aea726bdd2aad2176cfb910fc99d4613
refs/heads/master
2021-01-16T23:53:53.569882
2016-09-20T02:46:39
2016-09-20T02:46:39
59,217,345
0
1
null
null
null
null
UTF-8
Java
false
false
474
java
package com.leoman.team.service; import com.leoman.common.service.GenericManager; import com.leoman.team.entity.TeamRace; import org.springframework.data.domain.Page; /** * Created by Administrator on 2016/5/30. */ public interface TeamRaceService extends GenericManager<TeamRace> { public TeamRace findById(Long id) throws Exception ; public Page<TeamRace> findAll(TeamRace teamRace,String teamName, Integer currentPage, Integer pageSize) throws Exception; }
9b97f7c3ca09d45da4379c8c98620d0ab2a2c1f1
6138af219efc3a8f31060e30ebc532ffcbad1768
/astrogrid/desktop/impl/test/java/org/astrogrid/desktop/modules/ag/MonitorMapUnitTest.java
52d2950b0328825f89564c8ca9446d4147be5334
[]
no_license
Javastro/astrogrid-legacy
dd794b7867a4ac650d1a84bdef05dfcd135b8bb6
51bdbec04bacfc3bcc3af6a896e8c7f603059cd5
refs/heads/main
2023-06-26T10:23:01.083788
2021-07-30T11:17:12
2021-07-30T11:17:12
391,028,616
0
0
null
null
null
null
UTF-8
Java
false
false
5,442
java
/** * */ package org.astrogrid.desktop.modules.ag; import java.net.URI; import java.util.Date; import java.util.HashMap; import java.util.Map; import org.apache.commons.vfs.FileSystemManager; import org.astrogrid.acr.InvalidArgumentException; import org.astrogrid.acr.NotFoundException; import org.astrogrid.acr.SecurityException; import org.astrogrid.acr.ServiceException; import org.astrogrid.acr.astrogrid.ExecutionInformation; import org.astrogrid.acr.astrogrid.ExecutionMessage; import org.astrogrid.acr.astrogrid.RemoteProcessListener; import org.astrogrid.desktop.modules.ag.RemoteProcessManagerImpl.MonitorMap; import static org.easymock.EasyMock.*; import junit.framework.TestCase; import static org.astrogrid.Fixture.*; /** Test for the monitor map - datastructure within the remote process manager. * @author [email protected] * @since Jul 12, 20073:08:55 PM */ public class MonitorMapUnitTest extends TestCase { @Override protected void setUp() throws Exception { super.setUp(); this.mm = new RemoteProcessManagerImpl.MonitorMap(); FileSystemManager vfs = createVFS(); this.rpm1 = new TestRemoteProcessMonitor(vfs); this.rpm2 = new TestRemoteProcessMonitor(vfs); rpm1.start(); rpm2.start(); } @Override protected void tearDown() throws Exception { super.tearDown(); mm = null; rpm1 = null; rpm2 = null; } protected MonitorMap mm; protected AbstractProcessMonitor rpm1; protected AbstractProcessMonitor rpm2; public void testListKeysEmpty() throws Exception { java.net.URI[] u = mm.listKeys(); assertNotNull(u); assertEquals(0,u.length); } public void testListKeysSingleton() throws Exception { mm.add(rpm1); URI[] u = mm.listKeys(); assertNotNull(u); assertEquals(1,u.length); assertEquals(rpm1.getId(),u[0]); } public void testListKeysMany() throws Exception { mm.add(rpm1); mm.add(rpm2); URI[] u = mm.listKeys(); assertNotNull(u); assertEquals(2,u.length); assertEquals(rpm1.getId(),u[0]); // order of insertion is preserved. assertEquals(rpm2.getId(),u[1]); } public void testRemove() throws Exception { mm.add(rpm1); mm.remove(rpm1.getId()); assertNull(mm.get(rpm1.getId())); testListKeysEmpty(); } public void testRemove1() throws Exception { mm.add(rpm1); mm.add(rpm2); mm.remove(rpm1.getId()); assertNull(mm.get(rpm1.getId())); } public void testGet() throws Exception { mm.add(rpm1); mm.add(rpm2); assertSame(rpm1,mm.get(rpm1.getId())); assertSame(rpm2,mm.get(rpm2.getId())); } public void testWildcardListening() throws Exception { // first, create a mock ... RemoteProcessListener rpl =createMock(RemoteProcessListener.class); // specify what methods we expect to be called, with what parameters. rpl.statusChanged(rpm1.getId(),"hi"); rpl.resultsReceived(rpm2.getId(),new HashMap()); replay(rpl); // test listening to existing processes. mm.add(rpm1); mm.addWildcardListener(rpl); rpm1.fireStatusChanged("hi"); // test listening to new processes. mm.add(rpm2); rpm2.fireResultsReceived(new HashMap()); // test removing a global listener. mm.removeWildcardListener(rpl); rpm1.fireResultsReceived(null); // not expected rpm2.fireStatusChanged("ello"); verify(rpl); } // while we're here, test RemoteProcessMonitor too. public void testRemoteProcessMonitor() throws Exception { // first, create a mock ... RemoteProcessListener rpl = createMock(RemoteProcessListener.class); // specify what methods we expect to be called, with what parameters. rpl.statusChanged(rpm1.getId(),"hi"); rpl.resultsReceived(rpm1.getId(),new HashMap()); ExecutionMessage execMessage = new ExecutionMessage("foo","bar","stat",new Date(),"wibble"); rpl.messageReceived(rpm1.getId(),execMessage); replay(rpl); // now do the test. rpm1.addRemoteProcessListener(rpl); rpm1.fireStatusChanged("hi"); rpm1.removeRemoteProcessListener(rpl); rpm1.fireStatusChanged("boo"); // not expected. rpm1.addRemoteProcessListener(rpl); rpm1.fireResultsReceived(new HashMap()); rpm1.fireMessageReceived(execMessage); rpm1.cleanUp(); rpm1.fireStatusChanged("ugh"); // not expected. verify(rpl); } public static class TestRemoteProcessMonitor extends AbstractProcessMonitor { /** * @param vfs */ public TestRemoteProcessMonitor(FileSystemManager vfs) { super(vfs); } private static int count = 0; @Override public ExecutionInformation getExecutionInformation() throws NotFoundException, InvalidArgumentException, ServiceException, SecurityException { return new ExecutionInformation(null,null,null,null,null,null); } @Override public ExecutionMessage[] getMessages() throws NotFoundException, ServiceException { return new ExecutionMessage[]{}; } @Override public Map getResults() throws ServiceException, SecurityException, NotFoundException, InvalidArgumentException { return new HashMap(); } public void halt() throws NotFoundException, InvalidArgumentException, ServiceException, SecurityException { } public void start(URI serviceId) { this.start(); } public void start() { setId(URI.create("testmonitor://" + (count++))); } public void refresh() throws ServiceException { } } }
267ed4cd0994961148d10114c5a8b0e06c671014
47382f1391487596351425649efd4e973b7028bb
/src/ro/ubbcluj/lci/uml/behavioralElements/stateMachines/CompositeStateImpl.java
28a459697d63f63cd1092724f14ff26637b83b41
[]
no_license
luoyuxia/ocle
e6963e7de4fc7537f0ff6d12cd31fa28848b16c0
a7d60f098ddfa95764a851e781eaaf22cd3add3c
refs/heads/master
2022-12-11T02:06:00.431361
2020-08-18T04:04:27
2020-08-18T04:04:27
284,402,676
0
0
null
null
null
null
UTF-8
Java
false
false
2,982
java
package ro.ubbcluj.lci.uml.behavioralElements.stateMachines; import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.Set; import ro.ubbcluj.lci.uml.ChangeEventObject; import ro.ubbcluj.lci.uml.RepositoryChangeAgent; public class CompositeStateImpl extends StateImpl implements CompositeState { protected boolean isConcurrent; protected boolean isRegion; protected Set theSubvertexList; public CompositeStateImpl() { } public boolean isConcurrent() { return this.isConcurrent; } public void setConcurrent(boolean isConcurrent) { this.isConcurrent = isConcurrent; RepositoryChangeAgent agent = RepositoryChangeAgent.getAgent(this); if (agent != null && agent.firesEvents()) { agent.fireChangeEvent(new ChangeEventObject(this, "isConcurrent", 0)); } } public boolean isRegion() { return this.isRegion; } public void setRegion(boolean isRegion) { this.isRegion = isRegion; RepositoryChangeAgent agent = RepositoryChangeAgent.getAgent(this); if (agent != null && agent.firesEvents()) { agent.fireChangeEvent(new ChangeEventObject(this, "isRegion", 0)); } } public Set getCollectionSubvertexList() { return this.theSubvertexList == null ? Collections.EMPTY_SET : Collections.unmodifiableSet(this.theSubvertexList); } public Enumeration getSubvertexList() { return Collections.enumeration(this.getCollectionSubvertexList()); } public void addSubvertex(StateVertex arg) { if (arg != null) { if (this.theSubvertexList == null) { this.theSubvertexList = new LinkedHashSet(); } if (this.theSubvertexList.add(arg)) { arg.setContainer(this); RepositoryChangeAgent agent = RepositoryChangeAgent.getAgent(this); if (agent != null && agent.firesEvents()) { agent.fireChangeEvent(new ChangeEventObject(this, "subvertex", 1)); } } } } public void removeSubvertex(StateVertex arg) { if (this.theSubvertexList != null && arg != null && this.theSubvertexList.remove(arg)) { arg.setContainer((CompositeState)null); RepositoryChangeAgent agent = RepositoryChangeAgent.getAgent(this); if (agent != null && agent.firesEvents()) { agent.fireChangeEvent(new ChangeEventObject(this, "subvertex", 2)); } } } protected void internalRemove() { Enumeration tmpSubvertexEnum = this.getSubvertexList(); ArrayList tmpSubvertexList = new ArrayList(); while(tmpSubvertexEnum.hasMoreElements()) { tmpSubvertexList.add(tmpSubvertexEnum.nextElement()); } Iterator it = tmpSubvertexList.iterator(); while(it.hasNext()) { ((StateVertex)it.next()).remove(); } super.internalRemove(); } }
35de5ae3db8186e9f529af35d99758ed939e86d7
abe41c8a74726db88f28dc0e9065523060e58d98
/src/main/java/com/dengjunbo/netty/serialize/impl/JSONSerializer.java
348499776ed7f71cecc580d4222e104b5c1fb64a
[]
no_license
Dengjunbo666/ChatByNetty
44ba3487dab6a6be7b857b6170838932703a6cdd
3b3753513556cde2c622dd94a3df5ce1c4d135f4
refs/heads/master
2023-04-20T04:35:44.983071
2021-05-06T14:24:22
2021-05-06T14:24:22
362,009,849
1
0
null
null
null
null
UTF-8
Java
false
false
580
java
package com.dengjunbo.netty.serialize.impl; import com.alibaba.fastjson.JSON; import com.dengjunbo.netty.serialize.Serializer; import com.dengjunbo.netty.serialize.SerializerAlogrithm; public class JSONSerializer implements Serializer { @Override public byte getSerializerAlgorithm() { return SerializerAlogrithm.JSON; } @Override public byte[] serialize(Object object) { return JSON.toJSONBytes(object); } @Override public <T> T deserialize(Class<T> clazz, byte[] bytes) { return JSON.parseObject(bytes,clazz); } }
3b2f53a6dc012fead8abb9dfad175b556a2b9921
d89b532584d4ded2bfe134f02c51273fdbf26828
/src/br/com/wig/model/rms/CategoryDAO.java
daa389edbf660b0d7e8c213fd79e0bfcefa9a457
[]
no_license
thiagowig/jme-project
d6deb8f9f51bc20d44f8ee3b3cb0ab78d1635a56
3974918da82937d0cc9e1c229f22c649e98fbe9f
refs/heads/master
2021-01-01T15:35:41.727287
2011-04-16T20:23:32
2011-04-16T20:23:32
1,624,224
0
0
null
null
null
null
UTF-8
Java
false
false
381
java
package br.com.wig.model.rms; import br.com.wig.view.form.CategoryVW; /** * * @author thiago * */ public class CategoryDAO extends RecordManagement { private final String STORE_NAME = "category_db"; public String getDataBaseName() { return this.STORE_NAME; } public void saveCategory() { super.saveRecord(CategoryVW.name.getString()); } }
60137ee59fc53a4c31d71cb56fdf5a114fb86603
0d8940be36910af034d19612b72434e2aef8bfd7
/app/src/main/java/com/cool/vicky/wallpic/activity/SplashActivity.java
2f81d98405afa213a5cb2f21ffe9a8fd0efa13fd
[]
no_license
simoelghazi/WallPic-Android-App
878000e2fc43481f3541dc20fcb795179f33be00
f770f8632decc32c0b1343ea5f25a6c3fd03e853
refs/heads/master
2020-03-25T19:03:20.803113
2017-02-01T05:53:47
2017-02-01T05:53:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,203
java
package com.cool.vicky.wallpic.activity; import android.content.Intent; import android.graphics.Typeface; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; import com.cool.vicky.wallpic.R; public class SplashActivity extends AppCompatActivity { private int SPLASH_TIME_OUT = 2000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash); String fontPath = "fonts/Pacifico.ttf"; TextView appName = (TextView) findViewById(R.id.app_name); Typeface tf = Typeface.createFromAsset(getAssets(), fontPath); appName.setTypeface(tf); TextView poweredBy = (TextView) findViewById(R.id.powered_by); new Handler().postDelayed(new Runnable() { @Override public void run() { startActivity(new Intent(SplashActivity.this, MainActivity.class)); finish(); } }, SPLASH_TIME_OUT); } @Override public void onBackPressed() { //super.onBackPressed(); return; } }
33d5d6624a012d7e426cc9577b1ffee8acb77c78
1b2b9187aeaf76452116b0e1d09cf405648cfddc
/src/com/syntax/class18/ConstructorIntro.java
e10b9d7e2ef8e5b80290872d52bcb923f6fc8ecf
[]
no_license
satasoy6/JavaBasics
2e93f7b3bc111dd2258cdd7897a0b1cc93550330
c8ff4ce7709393d32c6c13accf42cc519de42b70
refs/heads/master
2021-04-10T00:06:52.388111
2020-06-16T19:18:38
2020-06-16T19:18:38
248,894,715
0
0
null
null
null
null
UTF-8
Java
false
false
551
java
package com.syntax.class18; public class ConstructorIntro { // ConstructorIntro(){ // // // } //to create a constructor: 1. no return type (not even void) // 2. name must be same as class name ConstructorIntro(){ System.out.println("I am a constructor"); } public static void main(String[] args) { ConstructorIntro obj=new ConstructorIntro(); System.out.println("Code after constructor"); obj.hello(); } void hello() { System.out.println("Hello Class"); } }
9303510e98c18ca2db507aa3a3ab1c01d3f8662a
65befe28d69189681a2c79c77d9fcbdceab3dc27
/Programming/javaworkspace/Chacter6/src/seventeenthMay/EarthExample.java
af0a9bb17c594838e44c1ac15af5d4602250a366
[]
no_license
solwish/TIL
554a67f79c66ed5d5a5075f08b6f0369aa363249
4314767fa763de73238aa141e105a5cf3641a9fc
refs/heads/master
2023-01-08T01:11:34.677452
2021-01-07T13:43:56
2021-01-07T13:43:56
101,876,124
10
0
null
2023-01-03T14:41:06
2017-08-30T12:03:25
CSS
UHC
Java
false
false
290
java
package seventeenthMay; public class EarthExample { public static void main(String[] args) { System.out.println("지구의 반지름: "+ Earth.EARTH_RADIUS+" km"); System.out.println("지구의 표면적: "+ Earth.EARTH_SURFACE_AREA+" km^2"); System.out.println(Math.PI); } }
bd52c359803db8956c3c43daec93658ef3ab7532
9ce2ae484bc10c18330efd9d4289abfa5c750c0e
/Spring402-04/src/com/java1234/test/Test.java
4a418b0de0ad04c5bf1df44d7a64c43c55cbdb92
[]
no_license
remm-aimilia/SpringTest
e1124625c7ca61742d846427ed4740499e6996c2
b62d49012b23051c99358ccdaddb98ccd5d105f6
refs/heads/master
2020-03-31T07:21:56.536930
2018-10-08T04:37:24
2018-10-08T04:37:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
826
java
package com.java1234.test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.java1234.entity.People; public class Test { public static void main(String[] args) { ApplicationContext ac = new ClassPathXmlApplicationContext("beans.xml"); People p = (People) ac.getBean("people"); People p2 = (People) ac.getBean("people2"); People p3 = (People) ac.getBean("people3"); People p4 = (People) ac.getBean("people4"); People p6=(People)ac.getBean("people6"); People p8=(People)ac.getBean("people8"); System.out.println(p.toString()); System.out.println(p2.toString()); System.out.println(p3.toString()); System.out.println(p4.toString()); System.out.println(p6.toString()); System.out.println(p8.toString()); } }
09534e1793b3c168ca3f645df500e816d950954d
d92f8d72aafeb4340d36f4eab6acfce3028825ea
/jcf/src/com/visa/prj/client/ComparableExample.java
00f7b47d359cd204684d7336197626575b5599a2
[]
no_license
purnachandergit/javaoop-jcf
228826b9547c857d35649f557bfbdab0b6a4d928
b766aa0f9b37056135f0c24c6db0c623a41eeaa3
refs/heads/master
2022-12-20T01:09:10.943432
2019-08-23T11:02:29
2019-08-23T11:02:29
199,641,802
0
0
null
2022-12-16T05:05:46
2019-07-30T11:50:59
Java
UTF-8
Java
false
false
431
java
package com.visa.prj.client; import java.util.Arrays; public class ComparableExample { public static void main(String[] args) { // TODO Auto-generated method stub String[] names= {"Lee","Kevin","Angelina","George","Brad"}; //Arrays.sort(names); predefined Arrays.sort(names,(s1,s2)->s1.length()-s2.length()); //customized based on the condition for (String string : names) { System.out.println(string); } } }
a874653d6a9023f7b4abede7d3ef9805e112c414
0de7d7eab48acfea56496ca0cccfa5e4c0714e5d
/src/main/java/org/bsim/intern/ui/model/response/UserResponse.java
4ef7a2acc15996c315df0192b67bea47985b4cd2
[]
no_license
calvinlevran/simasab
47ab37dbbfb15a07cacbc37bf60f64f9ff4936c7
843eea2827f67ad2a87839f85169571f21d4f9bb
refs/heads/main
2023-04-12T20:34:15.015310
2021-05-03T08:20:11
2021-05-03T08:20:11
360,827,437
0
0
null
null
null
null
UTF-8
Java
false
false
919
java
package org.bsim.intern.ui.model.response; public class UserResponse { private String userId; private String userName; private String email; private String noHP; private String jabatan; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getNoHP() { return noHP; } public void setNoHP(String noHP) { this.noHP = noHP; } public String getJabatan() { return jabatan; } public void setJabatan(String jabatan) { this.jabatan = jabatan; } }
57cec7804b192434f32cfddbc12ea65a3b108b33
5f4f6895e2cc8aff1e66bbbfc9f62c178e84b47a
/src/Extra/org/objectweb/proactive/extra/component/fscript/model/GCMNodeFactory.java
de0d2843016788db93af5ee5e6fe78f854f60a80
[]
no_license
moliva/gcmscript
9f0c57a94e3b5c5485519fefb5e468da9c01bf97
0b925fc2a27baf88dff8c613d64c13cb5ebba87b
refs/heads/master
2021-01-04T02:37:31.221342
2015-08-18T10:42:25
2015-08-18T10:42:31
38,818,382
0
0
null
null
null
null
UTF-8
Java
false
false
3,860
java
/* * ################################################################ * * ProActive Parallel Suite(TM): The Java(TM) library for * Parallel, Distributed, Multi-Core Computing for * Enterprise Grids & Clouds * * Copyright (C) 1997-2013 INRIA/University of * Nice-Sophia Antipolis/ActiveEon * Contact: [email protected] or [email protected] * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License * as published by the Free Software Foundation; version 3 of * the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * If needed, contact us to obtain a release under GPL Version 2 or 3 * or a different license than the AGPL. * * Initial developer(s): The ProActive Team * http://proactive.inria.fr/team_members.htm * Contributor(s): * * ################################################################ * $$PROACTIVE_INITIAL_DEV$$ */ package org.objectweb.proactive.extra.component.fscript.model; import org.objectweb.fractal.api.Component; import org.objectweb.fractal.fscript.model.fractal.NodeFactory; import org.objectweb.proactive.core.node.Node; import org.objectweb.proactive.gcmdeployment.GCMApplication; import org.objectweb.proactive.gcmdeployment.GCMVirtualNode; /** * A <em>factory</em> for Fractal/GCM-specific {@link org.objectweb.fractal.fscript.model.Node nodes}. This * interface can be used by clients to wrap objects from the Fractal or GCM APIs in * {@link org.objectweb.fractal.fscript.model.Node nodes} appropriate for FPath to manipulate in a uniform way. * <br> * This is an extension of {@link NodeFactory} to add GCM-specific * {@link org.objectweb.fractal.fscript.model.Node nodes}. * * @author The ProActive Team */ public interface GCMNodeFactory extends NodeFactory { /** * Creates a {@link GCMApplicationNode} to represent a {@link GCMApplication}. * * @param gcma A {@link GCMApplication}. * @return A {@link GCMApplicationNode} representing the {@link GCMApplication}. */ public GCMApplicationNode createGCMApplicationNode(GCMApplication gcma); /** * Creates a {@link GCMVirtualNodeNode} to represent a {@link GCMVirtualNode}. * * @param gcmvn A {@link GCMVirtualNode}. * @return A {@link GCMVirtualNodeNode} representing the {@link GCMVirtualNode}. */ public GCMVirtualNodeNode createGCMVirtualNodeNode(GCMVirtualNode gcmvn); /** * Creates a {@link GCMNodeNode} to represent a GCM {@link Node}. * * @param gcmnode A GCM {@link Node}. * @return A {@link GCMNodeNode} representing the GCM {@link Node}. */ public GCMNodeNode createGCMNodeNode(Node gcmnode); /** * Creates a {@link GCMComponentNode} to represent a GCM component. * * @param comp A GCM component. * @return A {@link GCMComponentNode} representing the GCM component. */ public GCMComponentNode createGCMComponentNode(Component comp); /** * Creates a {@link GCMAttributeNode} to represent an attribute of a GCM component. * * @param comp A GCM component. * @param attr The name of the attribute to represent. * @return A {@link GCMAttributeNode} representing the attribute of the GCM component. */ public GCMAttributeNode createGCMAttributeNode(Component comp, String attr); }
52cf99aa1d4a01a7073cb5f247bc3941d20eee7f
4133759a7c9c5374f4e56dad271b6d7a6830e1b4
/app/src/main/java/com/oeasy9999/zhihudemo/ui/fragment/ZhuanlanFragment.java
592cdfe873045231dfc5ec53d00c491602ba7da9
[]
no_license
oeasy9999/ZhiHuDemo
e89e365ba32199e1028023e9264b88e5030f95d8
c2c4c2b87c619f9bf9df2aef949636631d0f11c7
refs/heads/master
2022-02-23T18:51:46.113406
2022-02-17T04:30:39
2022-02-17T04:30:39
65,992,061
0
0
null
null
null
null
UTF-8
Java
false
false
5,737
java
package com.oeasy9999.zhihudemo.ui.fragment; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ProgressBar; import butterknife.Bind; import butterknife.ButterKnife; import com.oeasy9999.zhihudemo.R; import com.oeasy9999.zhihudemo.model.entity.Zhuanlan; import com.oeasy9999.zhihudemo.mvp.interf.OnItemClickListener; import com.oeasy9999.zhihudemo.mvp.presenter.ZhuanlanPresenterImpl; import com.oeasy9999.zhihudemo.mvp.view.ZhuanlanView; import com.oeasy9999.zhihudemo.ui.activity.ZhuanlanPostsActivity; import com.oeasy9999.zhihudemo.ui.adapter.ZhuanlanAdapter; import java.util.ArrayList; import java.util.List; /** * Created by oeasy9999 on 2016/9/5. */ public class ZhuanlanFragment extends BaseFragment implements ZhuanlanView, SwipeRefreshLayout.OnRefreshListener, OnItemClickListener { public static final int TYPE_HULIANWANG = 0; public static final int TYPE_SHEYING = 1; public static final int TYPE_YINGSHI = 2; public static final int TYPE_ZATAN = 3; public static final int TYPE_XINLI = 4; public static final int TYPE_JINRONG = 5; public static final int TYPE_CHENGXUYUAN = 6; private static final String TAG = "ZhuanlanFragment测试"; private ZhuanlanPresenterImpl zhuanlanPresenter; List<Zhuanlan> zhuanlans = new ArrayList<>(); private int type; private String[] ids; @Bind(R.id.recycler_view) RecyclerView mRecyclerView; @Bind(R.id.swipe_refresh_widget) SwipeRefreshLayout mSwipeRefreshWidget; private LinearLayoutManager layoutManager; private ProgressBar progressBar; private ZhuanlanAdapter adapter; public static ZhuanlanFragment newInstance(int type) { Bundle args = new Bundle(); args.putInt("type", type); ZhuanlanFragment fragment = new ZhuanlanFragment(); fragment.setArguments(args); return fragment; } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); zhuanlanPresenter = new ZhuanlanPresenterImpl(this); } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_recycler, container, false); ButterKnife.bind(this, view); mSwipeRefreshWidget.setOnRefreshListener(this); mRecyclerView.setHasFixedSize(true); layoutManager = new LinearLayoutManager(getActivity()); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); mRecyclerView.setLayoutManager(layoutManager); mRecyclerView.setItemAnimator(new DefaultItemAnimator()); adapter = new ZhuanlanAdapter(getActivity(), zhuanlans, this); mRecyclerView.setAdapter(adapter); type = getArguments().getInt("type"); Log.i(TAG, type + "号-->fragment"); onRefresh(); return view; } @Override public void onRefresh() { //if (zhuanlans.size() > 0) zhuanlans.clear(); ids = switchId(type); zhuanlanPresenter.loadData(ids); } private String[] switchId(int type) { String[] items; switch (type) { case TYPE_HULIANWANG: items = getActivity().getResources().getStringArray(R.array.tech_ids); break; case TYPE_SHEYING: items = getActivity().getResources().getStringArray(R.array.photography_ids); break; case TYPE_YINGSHI: items = getActivity().getResources().getStringArray(R.array.music_film_ids); break; case TYPE_ZATAN: items = getActivity().getResources().getStringArray(R.array.life_talks_ids); break; case TYPE_XINLI: items = getActivity().getResources().getStringArray(R.array.psychology_ids); break; case TYPE_JINRONG: items = getActivity().getResources().getStringArray(R.array.financial_ids); break; default: items = getActivity().getResources().getStringArray(R.array.zhihu_ids); } return items; } @Override public void onDestroyView() { super.onDestroyView(); ButterKnife.unbind(this); } @Override public void showData(List<Zhuanlan> data) { if (data == null || data.size() == 0) return; zhuanlans.addAll(data); adapter.notifyDataSetChanged(); //if (adapter == null) { // adapter = new ZhuanlanAdapter(getActivity(), data, this); // Log.i(TAG, adapter.getItemCount()+""); // mRecyclerView.setAdapter(adapter); //} else { // adapter.notifyDataSetChanged(); //} } @Override public void showProgress() { mSwipeRefreshWidget.setRefreshing(true); } @Override public void hideProgress() { if (mSwipeRefreshWidget != null) {//数据未加载完退出时报setRefreshing()null错误, mSwipeRefreshWidget.setRefreshing(false); } } @Override public void showLoadFailMsg() { } @Override public void onItemClick(RecyclerView.ViewHolder holder) { if (holder instanceof ZhuanlanAdapter.ItemViewHolder) { ZhuanlanAdapter.ItemViewHolder itemViewHolder = (ZhuanlanAdapter.ItemViewHolder) holder; Zhuanlan zhuanlan = itemViewHolder.zhuanlan; Intent intent = new Intent(getActivity(), ZhuanlanPostsActivity.class); intent.putExtra("slug", zhuanlan.getSlug()); intent.putExtra("title", zhuanlan.getName()); intent.putExtra("postscount", zhuanlan.getPostCount()); startActivity(intent); } } }
05562954d89dfae03e18247c77e75199cc7e88b1
6fc8ed8f00a19259d19909439a9c54e6d2bd14d1
/NilaiMahasiswa/Nilaimahasiswa.java
6c975cba416c824fe0301cdef6fcb1dc9ec99774
[]
no_license
huldan/Nilai-Mahasiswa
a052c0b29a3d6ca8e9d26155e38db3b4bf41fbb5
517a8b16f5bc5f96f6c63199f7e4b0907ba4e958
refs/heads/master
2021-07-09T08:48:18.954597
2017-10-03T13:16:28
2017-10-03T13:16:28
105,653,704
0
0
null
null
null
null
UTF-8
Java
false
false
1,972
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 nilaimahasiswa; /** * * Nama : randi putra utama * Kelas : Pbo-11 * NIm : 10116498 */ public class Nilaimahasiswa { private double quis, uts, uas, na; private String nama, nim; void getIndex(double na) { if (na >= 80) { System.out.println("index = A"); System.out.println("keterangan = sangat baik"); } else if (na >= 68) { System.out.println("index = B"); System.out.println("keterangan = baik"); } else if (na >= 56) { System.out.println("index = C"); System.out.println("keterangan = cukup"); } else if (na >= 45) { System.out.println("index = D "); System.out.println("keterangan = kurang"); } else if (na >= 0) { System.out.println("index = E"); System.out.println("keterangan = sangat kurang"); } } double getNa() { return na = (0.2 * quis) + (0.3 * uts) + (0.5 * uas); } public static void main(String[] args) { // TODO code application logic here Nilaimahasiswa oNa = new Nilaimahasiswa(); oNa.nama = "rizki adam kurniawan"; oNa.nim = "7.51.15.036"; for (int i = 1; i <= 4; i++) { System.out.println("nama ke-" + i + "\t" + oNa.nama); } for (int j = 8; j >= 1; j--) { System.out.println("nim ke-" + j + "\t" + oNa.nim + "." + j); } oNa.quis = 75; oNa.uts = 45; oNa.uas = 34; double nilai = oNa.getNa(); System.out.println("hasil \t" + nilai); oNa.getIndex(nilai); } }
92c8102ad0e851c8b9e922c378ea8c73df834300
df277c89d33ef841d2c24e7973b12f7ee562b11c
/src/main/java/be/ceau/podcastfinder/cl/PodcastfinderArguments.java
243362a4c5b6d0e9d32eb856ed6490f11f8601c6
[ "Apache-2.0" ]
permissive
mdewilde/podcastfinder
3f75e27f8cb197042d50edbc0e110b4aadffbd33
b4c81343b7631795f076ad02372daad762a4e57b
refs/heads/master
2023-08-18T01:16:11.912992
2023-08-06T16:08:07
2023-08-06T16:08:07
118,230,371
1
0
null
null
null
null
UTF-8
Java
false
false
2,996
java
/* Copyright 2018 Marceau Dewilde <[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 https://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 be.ceau.podcastfinder.cl; import picocli.CommandLine.Command; import picocli.CommandLine.Option; /** * Arguments to direct behavior of this application when run stand-alone. */ @Command(name = "Podcastfinder") public class PodcastfinderArguments { @Option(names = {"-d", "--digitalpodcast"}, description = {"Search podcasts on digitalpodcast.com"}) private boolean digitalPodcast = false; @Option(names = {"-g", "--gpodder"}, description = {"Search podcasts on gpodder.net"}) private boolean gpodder = false; @Option(names = {"-f"}, description = {"Search podcasts on iTunes using the feed generator API"}) private boolean itunesFeedGenerator = false; @Option(names = {"-i"}, description = {"Search podcasts on iTunes using the search API"}) private boolean itunesSearch = false; @Option(names = {"-e", "--enrich"}, description = {"Retrieve podcast feeds to add additional information and current status"}) private boolean enrich = false; @Option(names = {"-c"}, description = {"Maximum number of concurrent downloads"}) private int concurrency = Integer.MAX_VALUE; @Option(names = {"-s", "--status"}, description = {"Show status information about the data held by this application"}) private boolean status = false; @Option(names = {"--dups"}, description = {"Find and display possible duplicate feeds"}) private boolean duplicates = false; @Option(names = {"--clean"}, description = {"Remove all but the newest error statuses and vacuum the database"}) private boolean clean = false; @Option(names = {"--export"}, description = {"Export a list of all valid feeds with at least one episode"}) private String export = null; public boolean isDigitalPodcast() { return digitalPodcast; } public boolean isGpodder() { return gpodder; } public boolean isItunesFeedGenerator() { return itunesFeedGenerator; } public boolean isItunesSearch() { return itunesSearch; } public boolean isEnrich() { return enrich; } public int getConcurrency() { return concurrency; } public boolean isStatus() { return status; } public boolean isDuplicates() { return duplicates; } public boolean isClean() { return clean; } public String getExport() { return export; } public boolean isActive() { return digitalPodcast || gpodder || itunesFeedGenerator || itunesSearch || enrich || status || duplicates || clean || export != null; } }
d4cfd6ae7b2ff1a8a8ea0fba156fc39e709ea4a6
029686e3ad16925c080119ce81393f00ed6ab27f
/_designs_001/Find the Celebrity/Celebrity.java
9bcc7e8a178eb199cae5487e089acee81d26e42a
[]
no_license
jij3x/SolutionJudger
b4bbc90076c224d8664fc13ad606ffc4784bdcfd
5aa5a87f038105c68b761d81d9fd07367e8b6eb5
refs/heads/master
2020-06-06T02:56:58.827356
2015-09-28T00:55:09
2015-09-28T00:55:09
33,705,082
1
0
null
null
null
null
UTF-8
Java
false
false
871
java
public class Celebrity { private Relationship relationship; Celebrity(Relationship relationship) { this.relationship = relationship; } public int findCelebrity(int n) { Queue<Integer> candidates = new LinkedList<>(); for (int i = 0; i < n; i++) { candidates.add(i); } while (candidates.size() >= 2) { int a = candidates.poll(); int b = candidates.poll(); if (relationship.knows(a, b)) candidates.add(b); else candidates.add(a); } return verifyCelebrity(candidates.poll(), n); } private int verifyCelebrity(int c, int n) { for (int i = 0; i < n; i++) { if (i == c) continue; if (relationship.knows(c, i) || !relationship.knows(i, c)) return -1; } return c; } }
479fba023c81fa2d4b100afe814fbbbbdc3733a4
dac640a0ed9583520071668da10d6645f78965d8
/src/com/uyghuria/MyInterface.java
af84e32749e18f01d5bac3736c5dbc04130c5868
[]
no_license
parhatmamat/HelloWorld2
665b6a6915a949f954194a7c840474bdc4ff2af5
de8639d6b485cb85bf855f77bfca4b7b20ee9c03
refs/heads/master
2021-03-10T13:48:02.515043
2020-03-11T02:59:36
2020-03-11T02:59:36
246,458,938
0
0
null
null
null
null
UTF-8
Java
false
false
163
java
package com.uyghuria; import org.w3c.dom.ls.LSOutput; /** * Created by Parhat Mamat on 2020-03-09 */ public interface MyInterface { public void sort(); }
4b892f513d935681309a197b51db488eba734be5
5b5c9995359d0f15b07a5f09cca3450400d9b903
/src/main/java/com/qf/domain/Cart.java
584e7c9b6f483a188b991eaafe734316826f3193
[]
no_license
zhenchuanli/xiaomi_maven
917b25dfbcea05d89976e9ea4aec4ac2656946d3
70f78603f7ff7b03ad9c3635f0fed3abcc20e74d
refs/heads/master
2022-12-24T00:09:30.333267
2019-10-07T05:38:46
2019-10-07T05:38:49
213,302,528
0
0
null
2022-12-16T09:45:14
2019-10-07T05:30:10
Java
UTF-8
Java
false
false
1,346
java
package com.qf.domain; import java.math.BigDecimal; /** * Oldman 2019/9/10 14:37 * bug? 不存在的 */ public class Cart { private Integer id; private Integer pid; private Integer num; private BigDecimal money; private Goods goods; public Cart() { } public Cart(Integer id, Integer pid, Integer num, BigDecimal money) { this.id = id; this.pid = pid; this.num = num; this.money = money; } public Goods getGoods() { return goods; } public void setGoods(Goods goods) { this.goods = goods; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getPid() { return pid; } public void setPid(Integer pid) { this.pid = pid; } public Integer getNum() { return num; } public void setNum(Integer num) { this.num = num; } public BigDecimal getMoney() { return money; } public void setMoney(BigDecimal money) { this.money = money; } @Override public String toString() { return "Cart{" + "id=" + id + ", pid=" + pid + ", num=" + num + ", money=" + money + '}'; } }
7b07de1494edd78c830be4c8371f79924e117729
d40d870e69d1e8da17c9076b14764829dcfc62e3
/src/test/java/com/tests/BaseTest.java
c040d75be7114a64fb5970d5d7479600c498f74a
[]
no_license
anishst/JavaSeleniumDocker
f27c8e3b07bb9846c9061e552c2558119b7587b1
792b8212b7d961da965361d1f91dcc2c9fd1a5d8
refs/heads/master
2023-04-11T01:19:36.699724
2021-04-27T15:44:51
2021-04-27T15:44:51
360,999,919
0
0
null
null
null
null
UTF-8
Java
false
false
1,324
java
package com.tests; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import java.net.MalformedURLException; import java.net.URL; public class BaseTest { protected WebDriver driver; @BeforeTest public void setupDriver() throws MalformedURLException { // default values // String host = "localhost"; // use this if grid is on same machine as test String host = "192.168.1.25"; // ip of your selenium grid server if running on diff machine DesiredCapabilities dc; // if(System.getProperty("BROWSER") != null && System.getProperty("BROWSER").equalsIgnoreCase("firefox")){ dc = DesiredCapabilities.firefox(); }else{ dc = DesiredCapabilities.chrome(); } if(System.getProperty("HUB_HOST") != null){ host = System.getProperty("HUB_HOST"); } String completeUrl = "http://" + host + ":4444/wd/hub"; this.driver = new RemoteWebDriver(new URL(completeUrl), dc); } @AfterTest public void tearDown() { this.driver.quit(); } }
d68a529b96b21dd0384f02b0cd551b922e8b1db5
3c9ad4aa21ed83f2bdec1b3f46f4c4e8c3c3591c
/ViaLink/src/fr/umlv/dp/exam/AbstractMessageHandler.java
babccf2067ea28de9d21b995b012a3594820d08d
[]
no_license
JonathanCrt/INFO_POO_Design_Pattern
9ec82e7412e060160b2a6f2c540aa17fb01740fe
85e16222037dfb3bffc1d59ce3f2c11f22f6d34c
refs/heads/master
2023-02-10T18:55:37.330653
2021-01-07T10:19:56
2021-01-07T10:19:56
299,560,279
0
0
null
null
null
null
UTF-8
Java
false
false
1,223
java
package fr.umlv.dp.exam; import java.time.LocalDateTime; import java.util.*; import java.util.stream.Stream; class AbstractMessageHandler implements IMessageHandler { MessageManager messageManager = new MessageManager(); final Deque<Message> messageDeque = new ArrayDeque<>(); static class MessageManager { final List<IMessageObserver> observersList = new ArrayList<>(); public void register(IMessageObserver observer) { Objects.requireNonNull(observer); observersList.add(observer); } public void unRegister(IMessageObserver observer) { Objects.requireNonNull(observer); if (!observersList.remove(observer)) { throw new IllegalStateException(); } } } @Override public LocalDateTime getDateMessage() { return Optional.of(messageDeque.getLast().getLocalDateTime()).orElseThrow(); } @Override public Stream<Message> getLastMessages(int nMessages) { if (nMessages < 0) { throw new IllegalArgumentException("Error : need a positive number of last messages"); } return messageDeque.stream().limit(nMessages); } }
39a3542cb1f6223d450351b5a561d5c76ed4914c
63e0cd899972adbb117a17d8d40eef8fefb56d62
/projects/aotd_lib/src/test/java/com/sc/service/SearchServiceTest.java
f7a58ff802adf994dafd5f0b8feee214a16aa5c1
[]
no_license
sherazc/playground
8b90e1f7b624a77a3f3e9cf5f71eecf984aa8180
7fe926d2564b12d96f237b253511dd7c2a302b64
refs/heads/master
2023-08-16T17:22:29.564713
2023-08-16T04:34:52
2023-08-16T04:34:52
87,116,642
2
1
null
2023-05-04T18:25:45
2017-04-03T20:15:15
PHP
UTF-8
Java
false
false
1,886
java
package com.sc.service; import com.sc.domain.AyaDetail; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import java.io.*; import java.util.List; public class SearchServiceTest { public static String INDEX_FILE = "src/test/resources/data_index.txt"; public static String QURAN_FILE = "src/test/resources/quran-uthmani.txt"; public static String TRANSLATION_FILE = "src/test/resources/en.yusufali.txt"; private SearchService searchService; @Before public void init() throws Exception { searchService = new SearchService(new FileInputStream(INDEX_FILE)) { @Override protected InputStream openTranslationStream() { InputStream inputStream = null; try { inputStream = new FileInputStream(TRANSLATION_FILE); } catch (FileNotFoundException e) { e.printStackTrace(); } return inputStream; } @Override protected InputStream openQuranStream() { InputStream inputStream = null; try { inputStream = new FileInputStream(QURAN_FILE); } catch (FileNotFoundException e) { e.printStackTrace(); } return inputStream; } }; } @Test public void testSearchZeroHistory() throws Exception{ List<AyaDetail> ayaDetails = searchService.search(0, "en.yusufali"); Assert.assertNotNull(ayaDetails); Assert.assertEquals(1, ayaDetails.size()); } @Test public void testSearch10History() throws Exception{ List<AyaDetail> ayaDetails = searchService.search(10, "en.yusufali"); Assert.assertNotNull(ayaDetails); Assert.assertEquals(11, ayaDetails.size()); } }
1b13f7f709bb29f4ac901ad5122342d2a4efcc7d
84254b552c9b9e97e2b86a8b2c5d029775f5ddbe
/course-api-data/src/main/java/io/javabrains/springbootstarter/courses/CourseRepository.java
05578ca7434ce2a61cddb43c39be244933c26c6a
[]
no_license
rajatlko/SpringBoot_RestAPI_App
d34cbaa4446e5310fbfed4277016ffcac4d2568d
fcce59d21b94610be402ed3d35d843c834fa161a
refs/heads/master
2022-10-02T15:30:50.842062
2020-06-07T06:51:50
2020-06-07T06:51:50
260,117,006
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
package io.javabrains.springbootstarter.courses; import java.util.List; import org.springframework.data.repository.CrudRepository; public interface CourseRepository extends CrudRepository<Course,String> { public List<Course> findByName(String name); public List<Course> findByDescription(String foo); public List<Course> findByTopicId(String topicId); }
bfa89a57ea3eaee630ae72e325048caf7086a438
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/13842042.java
130aec9b949d34ba76d4c7b607ed936b6ba1ba51
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,250
java
// import java.io.ArithmeticException; import java.io.UncheckedIOException; import java.io.UncheckedIOException; class c13842042 { // @Override protected Properties loadFile(String fileName) { Properties prop = new Properties(); try { URL url =(URL)(Object) (new File(fileName).toURI().toURL()); final InputStream input =(InputStream)(Object) url.openStream(); prop.load(input); } catch (UncheckedIOException e) { e.printStackTrace(); } catch (ArithmeticException e) { e.printStackTrace(); } return prop; } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass toURL(){ return null; }} class Properties { public MyHelperClass load(InputStream o0){ return null; }} class URL { public MyHelperClass openStream(){ return null; }} class File { File(String o0){} File(){} public MyHelperClass toURI(){ return null; }} class InputStream { } class MalformedURLException extends Exception{ public MalformedURLException(String errorMessage) { super(errorMessage); } } class IOException extends Exception{ public IOException(String errorMessage) { super(errorMessage); } }
4f2dcfb0e942df4b6de56483eff0aeb3f9041c66
f4a05b306d0b2fe5c41e3b8770ff7758dbeb8057
/LO9/src/opgave4_b/Stars.java
aa7c01ed0d1cdae2180e50d7a004e2fcd7ae5589
[]
no_license
RedaDK/skole
6bcb3933b42ba92c0edf8492cad272eabac3ce65
ad597c86739778d6d14b0d2af59b2b68c70eec44
refs/heads/master
2022-12-19T23:57:10.807767
2020-10-09T17:30:29
2020-10-09T17:30:29
301,456,620
0
0
null
null
null
null
UTF-8
Java
false
false
565
java
package opgave4_b; public class Stars { public void starExA(int rowCount) { for (int row = 1; row <= rowCount; row++) { System.out.printf("%2d: ", row); int starCount = rowCount - row + 1; int dashCount = rowCount - starCount; for (int i = 1; i <= starCount; i++) { System.out.print("*"); } for (int i = 1; i <= dashCount; i++) { // System.out.print("-"); } System.out.println(); } } }
2be32acf3390523d0a84ec966b8aabdd7af81039
3a48f8bc47c704342099c3b98f0a7644ab32efc1
/microservicecloud/microservicecloud-eureka-7001/src/main/java/com/atguigu/springcloud/EurekaServer7001_App.java
7090eedad85724288faffd4fde5c7c5b3b97a0f7
[]
no_license
wangbotom/microservicecloud-config
639059454d763acc4b213cba486fb3c0b3d6c825
591ca8f200c281a9588f4b8c2852ea2a344caa42
refs/heads/master
2020-05-01T08:47:49.087539
2019-03-26T01:31:40
2019-03-26T01:32:51
177,385,998
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package com.atguigu.springcloud; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; @SpringBootApplication @EnableEurekaServer //EurekaServer服务器端启动类,接受其它微服务注册进来 public class EurekaServer7001_App { public static void main(String[] args) { SpringApplication.run(EurekaServer7001_App.class, args); } }
93e3ea6deb81938547ef77e37e6955d8ecfebd6a
4a6972370c2d392da5d87212ff72517b4f0d9dd4
/src/main/java/cn/fantasticmao/ycy/intellij/plugin/config/PluginSettingForm.java
ed6096f09359e3c408b0ff7b59a38493724e8a3a
[]
no_license
lzm1988/ycy-intellij-plugin
a04a06a49220bd620872ff2208ca208bf51ac00e
dfcbc9fcb1b7b4245662f78fb69247875d05cb45
refs/heads/master
2020-05-17T08:01:18.542319
2019-04-19T04:56:46
2019-04-19T04:56:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,082
java
package cn.fantasticmao.ycy.intellij.plugin.config; import com.intellij.openapi.ui.ComboBox; import com.intellij.openapi.ui.TextFieldWithBrowseButton; import javax.swing.*; import java.awt.event.ActionEvent; /** * 插件设置页面的表单对象 * * <p>表单对象的实例化由插件 {@code UI Designer} 根据 {@code PluginSettingForm.form} 配置文件生成</p> * * @author maomao * @version 1.2 * @see PluginSettingPage#createComponent() * @since 2019-04-13 */ public class PluginSettingForm { private JPanel pluginSettingPanel; private JComboBox<String> remindTypeOptions; private TextFieldWithBrowseButton imageUrl; private JButton useDefaultImage; private JTextField periodMinutes; private JTextField notifyTitle; private JTextField notifyContent; private JTextField notifyAction; public JPanel getPluginSettingPanel() { return this.pluginSettingPanel; } private void createUIComponents() { // place custom component creation code here this.remindTypeOptions = new ComboBox<>(); for (ConfigState.RemindTypeEnum remindType : ConfigState.RemindTypeEnum.values()) { this.remindTypeOptions.addItem(remindType.description); } this.imageUrl = new TextFieldWithBrowseButton(); this.imageUrl.addActionListener(PluginSettingConfig.newBrowseFolderActionListener(this.imageUrl)); this.useDefaultImage = new JButton(); this.useDefaultImage.addActionListener(new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { imageUrl.setText(DefaultConfig.REMIND_IMAGE_URL); } }); } /** * 获取提醒方式 * * @return {@code cn.fantasticmao.ycy.intellij.plugin.config.ConfigState.RemindTypeEnum} */ public int getRemindTypeOption() { return this.remindTypeOptions.getSelectedIndex(); } /** * 设置提醒方式 * * <p>optionIndex 参数值:</p> * <ul> * <li>0. 消息通知 -> 打开图片</li> * <li>1. 打开图片</li> * </ul> * * @param optionIndex 0 或 1 */ public void setRemindTypeOption(int optionIndex) { optionIndex = Math.max(optionIndex, 0); optionIndex = Math.min(optionIndex, 1); this.remindTypeOptions.setSelectedIndex(optionIndex); } /** * 获取提醒图片的绝对路径 */ public String getImageUrl() { return this.imageUrl.getText(); } /** * 设置提醒图片的绝对路径 */ public void setImageUrl(String imageUrl) { this.imageUrl.setText(imageUrl); } /** * 获取提醒间隔时间,单位分钟 */ public int getPeriodMinutes() { try { return Integer.parseInt(this.periodMinutes.getText()); } catch (NumberFormatException e) { return DefaultConfig.PERIOD_MINUTES; } } /** * 设置提醒间隔时间,单位分钟 */ public void setPeriodMinutes(int periodMinutes) { this.periodMinutes.setText(String.valueOf(periodMinutes)); } /** * 获取通知文案的标题 */ public String getNotifyTitle() { return this.notifyTitle.getText(); } /** * 设置通知文案的标题 */ public void setNotifyTitle(String notifyTitle) { this.notifyTitle.setText(notifyTitle); } /** * 获取通知文案的内容 */ public String getNotifyContent() { return this.notifyContent.getText(); } /** * 设置通知文案的内容 */ public void setNotifyContent(String notifyContent) { this.notifyContent.setText(notifyContent); } /** * 获取通知文案的按钮 */ public String getNotifyAction() { return this.notifyAction.getText(); } /** * 设置通知文案的按钮 */ public void setNotifyAction(String notifyAction) { this.notifyAction.setText(notifyAction); } }
add6b69ec02d5db3fef3f44e691f4e124b3291a7
3c5a076e323b58cd8cee661200840ed698897484
/JAVA/spring/springfm-di-xml/src/main/java/com/liteworm/ba04/dao/impl/UserDaoImpl.java
fb575a0eeefd37deb693e3995b2c478a55f334c7
[ "Apache-2.0" ]
permissive
LiteWorm/wormlearning
a221f6dd94004aec635ade991f44555497d5e163
64fd89cc53e65f264a5c134d207403c5a2565e92
refs/heads/master
2023-09-01T18:53:12.268838
2023-08-31T01:27:00
2023-08-31T01:27:00
249,720,611
0
1
Apache-2.0
2023-08-23T05:33:53
2020-03-24T13:50:29
Java
UTF-8
Java
false
false
389
java
package com.liteworm.ba04.dao.impl; import com.liteworm.ba04.beans.User; import com.liteworm.ba04.dao.UserDao; /** * @ClassName UserDaoImpl * @Decription @TOTO * @AUthor LiteWorm * @Date 2020/4/18 12:53 * @Version 1.0 **/ public class UserDaoImpl implements UserDao { @Override public void insertUser(User user) { System.out.println("添加用户:" + user); } }
5faa8519f25c999c00b04dc346639dd0036e229e
3a75c5db657f77212f1f34e3a59493542618e80c
/src/main/java/br/com/diegobufalo/forum/ForumApplication.java
b04f1e7020c28efd807c2ad75ed1b059c884fa01
[]
no_license
DiegoBufalo/ForumApplication
da6fee9f6403f748089310e3e56df8db5f15d1d8
fe34014fc36cff47858d67cf3a42198cd5a7c08c
refs/heads/master
2023-03-07T23:14:25.033332
2021-02-17T18:33:09
2021-02-17T18:33:09
338,067,680
0
0
null
null
null
null
UTF-8
Java
false
false
575
java
package br.com.diegobufalo.forum; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotation.EnableCaching; import org.springframework.data.web.config.EnableSpringDataWebSupport; import springfox.documentation.swagger2.annotations.EnableSwagger2; @SpringBootApplication @EnableSpringDataWebSupport @EnableCaching @EnableSwagger2 public class ForumApplication { public static void main(String[] args) { SpringApplication.run(ForumApplication.class, args); } }
18f4c71090912b327dd8ea5ff7ce0ea78e2453f9
d28ed604dd3e61ab6cb1cfeee9d451d85005d296
/latte-ec/src/main/java/com/flj/latte/ec/main/personal/PersonalClickListener.java
6b9094e7f44e73ac4c97c40d98d1f955291c307f
[]
no_license
mrjoechen/Latte
c845630cf02af72b7c6bb8eb175b2a0ddce69ece
ff9254f70c94dbd0d72164898fdef27ca8c6b6c7
refs/heads/master
2021-08-30T15:36:25.717714
2017-12-18T13:38:02
2017-12-18T13:38:07
114,640,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,423
java
package com.flj.latte.ec.main.personal; import android.view.View; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.listener.SimpleClickListener; import com.flj.latte.delegates.LatteDelegate; import com.flj.latte.ec.main.personal.list.ListBean; /** * Created by chenqiao */ public class PersonalClickListener extends SimpleClickListener { private final LatteDelegate DELEGATE; public PersonalClickListener(LatteDelegate delegate) { this.DELEGATE = delegate; } @Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { final ListBean bean = (ListBean) baseQuickAdapter.getData().get(position); int id = bean.getId(); switch (id) { case 1: DELEGATE.getParentDelegate().getSupportDelegate().start(bean.getDelegate()); break; case 2: DELEGATE.getParentDelegate().getSupportDelegate().start(bean.getDelegate()); break; default: break; } } @Override public void onItemLongClick(BaseQuickAdapter adapter, View view, int position) { } @Override public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) { } @Override public void onItemChildLongClick(BaseQuickAdapter adapter, View view, int position) { } }
6a62fdcc6c73efa4961b35c0842fb1c5cc4cc50a
7bd11d670f5fe13e456f823800e0a0bd9e72751d
/client/spring/src/main/java/com/ke/schedule/client/spring/core/TaskDispatcher.java
da5c5efc6d9268df8ac839de335ebb2dab557390
[ "Apache-2.0" ]
permissive
daysdays/kob
aabcc1280d451f81cae4ebb8a29989c426a5d55f
9c111532a2856a36e202834da75904c9d892014c
refs/heads/master
2023-01-28T02:39:46.464964
2020-12-07T07:37:00
2020-12-07T07:37:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,444
java
package com.ke.schedule.client.spring.core; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.ke.schedule.basic.constant.TaskRecordStateConstant; import com.ke.schedule.basic.constant.ZkPathConstant; import com.ke.schedule.basic.model.TaskContext; import com.ke.schedule.basic.model.TaskResult; import com.ke.schedule.basic.support.KobUtils; import com.ke.schedule.client.spring.constant.ClientLogConstant; import com.ke.schedule.client.spring.logger.OkHttpLogger; import lombok.extern.slf4j.Slf4j; import java.util.List; /** * @author zhaoyuguang */ public @Slf4j enum TaskDispatcher { //INSTANCE INSTANCE; public void dispatcher(ClientContext context, String parent, List<String> childs) { if (KobUtils.isEmpty(childs)) { return; } childs.forEach(child -> { try { System.out.println(child); dispatcher0(context, parent, child); } catch (Exception e) { e.printStackTrace(); } }); } private void dispatcher0(ClientContext client, String parentPath, String child) { TaskContext.Path path = ClientFunction.INSTANCE.convertPath().apply(child); if (path == null) return; String full = parentPath + ZkPathConstant.BACKSLASH + child; if (ClientFunction.INSTANCE.fireExpire().test(new Object[]{path, client, full})) return; if (!client.getRunner().containsKey(path.getTaskKey())) return; if (path.getDesignatedNode() != null) { if (!client.getData().getIdentification().equals(path.getDesignatedNode())) return; } if (path.getRecommendNode() != null) { if (!client.getData().getIdentification().equals(path.getRecommendNode())) ClientFunction.INSTANCE.sleep().accept(5); } if (ClientFunction.INSTANCE.tryToExclusionNodeHasMe().test(new Object[]{path, client})) return; if (ClientFunction.INSTANCE.checkPoolSize().test(client)) return; dispatcher1(client, path, full); } private void dispatcher1(ClientContext client, TaskContext.Path path, String full) { String data = ""; try { data = client.getZkClient().readData(full); } catch (Exception e) { e.printStackTrace(); } if (client.getZkClient().delete(full)) { log.info(ClientLogConstant.info100(JSON.toJSONString(path), client.getData().getIdentification())); OkHttpLogger.INSTANCE.systemLog(client, path, TaskRecordStateConstant.RECEIVE_SUCCESS); TaskContext context = new TaskContext(path, JSONObject.parseObject(data, TaskContext.Data.class)); client.getPool().execute(() -> { try { OkHttpLogger.INSTANCE.systemLog(client, path, TaskRecordStateConstant.RUNNER_START); TaskResult result = client.getRunner().get(path.getTaskKey()).getValue().apply(context); OkHttpLogger.INSTANCE.systemLog(client, path, result.getState(), result.getMsg()); } catch (Exception e) { log.error(ClientLogConstant.error502(JSON.toJSONString(context), client.getData().getIdentification()), e); OkHttpLogger.INSTANCE.systemLog(client, path, TaskRecordStateConstant.EXECUTE_EXCEPTION, e); } }); } } }
d93fbf277218af996be35fe00a72318b1ff0f296
81aeb565fd50580ef6fb952a861369249c40f914
/spring_project/Orl-0915/src/main/java/com/bitcamp/orl/crew/controller/CrewCommentRestController.java
67ec4bfe7cc3b01167ea1e79b97dba8ebdee83c2
[]
no_license
yiwoori/java205
619b7fba330ce318e79d05b27bcf40774e313929
9c5d03ebf3c5f6dbecc70a93258b09058c89f583
refs/heads/main
2023-08-18T12:35:33.141450
2021-10-01T14:30:29
2021-10-01T14:30:29
370,221,939
0
1
null
null
null
null
UTF-8
Java
false
false
1,572
java
package com.bitcamp.orl.crew.controller; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.bitcamp.orl.crew.domain.CrewCommentCriteria; import com.bitcamp.orl.crew.domain.CrewCommentPagingDTO; import com.bitcamp.orl.crew.domain.CrewCommentRequest; import com.bitcamp.orl.crew.service.CrewCommentService; @RestController public class CrewCommentRestController { @Autowired CrewCommentService commentService; @RequestMapping("/crew/getCommentInfo") @CrossOrigin public CrewCommentPagingDTO getCommentList( HttpServletRequest request, @RequestParam("crewIdx")int crewIdx, @RequestParam(value="currentPageNum", defaultValue = "0")int currentPageNum ){ if(currentPageNum == 0) { currentPageNum = 1; } CrewCommentCriteria cir = new CrewCommentCriteria(crewIdx, currentPageNum); CrewCommentPagingDTO dto = commentService.getCrewComment(cir); return dto; } @RequestMapping("/crew/commentInsert") @CrossOrigin public String insertComment( CrewCommentRequest request, HttpSession session ) { return Integer.toString(commentService.insertCrewComment(request.getCrewComment(), session, request.getCrewIdx())); } }
a1a993cee9f1bcd84233d70dbbacc4b1a7f9d6b6
a06df20f27cb9f79a42ed1be9a3e595124294713
/1poo/heren/Persona.java
3f9e7e6fc0e046770d87e0acf7a0e7ee827f4887
[]
no_license
xml34/patrones
ad712a0ed7b14c314e2a5916798c737a489cb0e6
187f2d0038b197be63efcda8524a908ecb4c3bcc
refs/heads/master
2020-03-20T22:04:40.783021
2018-07-16T17:43:52
2018-07-16T17:43:52
137,777,893
0
0
null
null
null
null
UTF-8
Java
false
false
378
java
public class Persona { protected String nombre; protected String apellido; protected int edad; public Persona(String nombre, String apellido, int edad){ this.nombre = nombre; this.apellido = apellido; this.edad = edad; } public String getNombre(){ return nombre; } public String getApellido(){ return apellido; } public int getEdad(){ return edad; } }
406ff66fde086ed965ba4f4b4c5c38be2f00e5ad
6dc0c5eabfcf38698156f8275159c864c5685769
/src/main/java/com/github/mich8bsp/tlhm/operationMessages/KeyValuePair.java
4e67390bf44428c3286b2d875ac3e632bb139ee7
[]
no_license
mich8bsp/time-limited-hash-map
fe7d03b2fb79876a5b7c97f2f826d34ca1a7dad6
480227c037429f93fe514773c288002352b351a3
refs/heads/master
2021-01-09T22:38:26.069767
2017-06-27T21:25:48
2017-06-27T21:25:48
92,734,146
0
0
null
null
null
null
UTF-8
Java
false
false
543
java
package com.github.mich8bsp.tlhm.operationMessages; import java.util.Map; /** * Created by Michael Bespalov on 30-May-17. */ public class KeyValuePair<K, V> implements Map.Entry<K, V>{ private K key; private V value; public KeyValuePair(K key, V value) { this.key = key; this.value = value; } public K getKey() { return key; } public V getValue() { return value; } @Override public V setValue(V value) { this.value = value; return value; } }
b34e4a9aff66561761747a7476cd3628a89ec802
9cfa20f826fc1e0042ebd4f11563f7abf5e3ec4d
/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobStore.java
db4ebeeb3843f4a4f2bb630a883c606841c17827
[]
no_license
rimuhosting/jclouds
e56e9c7dd83c1c2bd41d78f47faede73e3033823
f488c9f8c3072599fe4c6f015ea724d663dc5998
refs/heads/master
2022-07-30T11:47:18.202365
2009-11-25T00:55:02
2009-11-25T00:55:02
376,723
0
0
null
2022-07-06T19:59:46
2009-11-18T02:38:34
Java
UTF-8
Java
false
false
6,443
java
/** * * Copyright (C) 2009 Cloud Conscious, LLC. <[email protected]> * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== */ package org.jclouds.atmosonline.saas.blobstore; import static org.jclouds.blobstore.options.ListContainerOptions.Builder.recursive; import java.util.concurrent.ExecutorService; import javax.inject.Inject; import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; import org.jclouds.atmosonline.saas.AtmosStorageClient; import org.jclouds.atmosonline.saas.blobstore.functions.BlobStoreListOptionsToListOptions; import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; import org.jclouds.atmosonline.saas.blobstore.functions.DirectoryEntryListToResourceMetadataList; import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlob; import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlobMetadata; import org.jclouds.atmosonline.saas.blobstore.internal.BaseAtmosBlobStore; import org.jclouds.atmosonline.saas.options.ListOptions; import org.jclouds.blobstore.BlobStore; import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.ListContainerResponse; import org.jclouds.blobstore.domain.ListResponse; import org.jclouds.blobstore.domain.ResourceMetadata; import org.jclouds.blobstore.domain.Blob.Factory; import org.jclouds.blobstore.functions.BlobToHttpGetOptions; import org.jclouds.blobstore.strategy.ClearListStrategy; import org.jclouds.http.HttpUtils; import org.jclouds.http.options.GetOptions; import org.jclouds.logging.Logger.LoggerFactory; import org.jclouds.util.Utils; import com.google.common.base.Supplier; public class AtmosBlobStore extends BaseAtmosBlobStore implements BlobStore { @Inject public AtmosBlobStore(AtmosStorageAsyncClient async, AtmosStorageClient sync, Factory blobFactory, LoggerFactory logFactory, ClearListStrategy clearContainerStrategy, ObjectToBlobMetadata object2BlobMd, ObjectToBlob object2Blob, BlobToObject blob2Object, BlobStoreListOptionsToListOptions container2ContainerListOptions, BlobToHttpGetOptions blob2ObjectGetOptions, DirectoryEntryListToResourceMetadataList container2ResourceList, ExecutorService service) { super(async, sync, blobFactory, logFactory, clearContainerStrategy, object2BlobMd, object2Blob, blob2Object, container2ContainerListOptions, blob2ObjectGetOptions, container2ResourceList, service); } /** * This implementation uses the AtmosStorage HEAD Object command to return the result */ public BlobMetadata blobMetadata(String container, String key) { return object2BlobMd.apply(sync.headFile(container + "/" + key)); } public void clearContainer(final String container) { clearContainerStrategy.execute(container, recursive()); } public boolean createContainer(String container) { sync.createDirectory(container); return true;// no etag } public void deleteContainer(final String container) { clearContainerStrategy.execute(container, recursive()); deleteAndEnsurePathGone(container); } private void deleteAndEnsurePathGone(final String path) { sync.deletePath(path); try { if (!Utils.enventuallyTrue(new Supplier<Boolean>() { public Boolean get() { return !sync.pathExists(path); } }, 30000)) { throw new IllegalStateException(path + " still exists after deleting!"); } } catch (InterruptedException e) { new IllegalStateException(path + " interrupted during deletion!", e); } } public boolean exists(String container) { return sync.pathExists(container); } public Blob getBlob(String container, String key, org.jclouds.blobstore.options.GetOptions... optionsList) { GetOptions httpOptions = blob2ObjectGetOptions.apply(optionsList); return object2Blob.apply(sync.readFile(container + "/" + key, httpOptions)); } public ListResponse<? extends ResourceMetadata> list() { return container2ResourceList.apply(sync.listDirectories()); } public ListContainerResponse<? extends ResourceMetadata> list(String container, org.jclouds.blobstore.options.ListContainerOptions... optionsList) { if (optionsList.length == 1) { if (optionsList[0].isRecursive()) { throw new UnsupportedOperationException("recursive not currently supported in emcsaas"); } if (optionsList[0].getPath() != null) { container = container + "/" + optionsList[0].getPath(); } } ListOptions nativeOptions = container2ContainerListOptions.apply(optionsList); return container2ResourceList.apply(sync.listDirectory(container, nativeOptions)); } /** * Since there is no etag support in atmos, we just return the path. */ public String putBlob(final String container, final Blob blob) { final String path = container + "/" + blob.getMetadata().getName(); deleteAndEnsurePathGone(path); if (blob.getMetadata().getContentMD5() != null) blob.getMetadata().getUserMetadata().put("content-md5", HttpUtils.toHexString(blob.getMetadata().getContentMD5())); sync.createFile(container, blob2Object.apply(blob)); return path; } public void removeBlob(String container, String key) { sync.deletePath(container + "/" + key); } }
[ "adrian.f.cole@3d8758e0-26b5-11de-8745-db77d3ebf521" ]
adrian.f.cole@3d8758e0-26b5-11de-8745-db77d3ebf521
300b8da8301f3b6b724c771e81607c99daf3a8ae
efde473b19689761216b966bed59c2adabaaedfb
/project/app/org/example/instrumenti_placanja/NalogZaPrenos.java
e55e72a8a29f78e4e0635a0c2bd04619175f5bb3
[]
no_license
DaniloJevtovic/poslovnaInformatika
767b7c487519ae613159615e613c7806acaf84e2
081dc299ada141fa4c90a9250ac81ed0a70c1139
refs/heads/master
2020-12-30T12:10:36.328759
2017-07-08T03:24:43
2017-07-08T03:24:43
91,501,552
0
0
null
null
null
null
UTF-8
Java
false
false
5,641
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5.1 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.07.03 at 10:20:28 PM CEST // package org.example.instrumenti_placanja; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for NalogZaPrenos complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="NalogZaPrenos"> * &lt;complexContent> * &lt;extension base="{http://www.example.org/instrumenti_placanja}SredstvoPlacanja"> * &lt;sequence> * &lt;element name="racun_duznika" type="{http://www.example.org/instrumenti_placanja}BrojRacuna"/> * &lt;element name="model_zaduzenja" type="{http://www.example.org/instrumenti_placanja}Model" minOccurs="0"/> * &lt;element name="poziv_na_broj_zaduzenja" type="{http://www.example.org/instrumenti_placanja}PozivNaBroj" minOccurs="0"/> * &lt;element name="racun_povjerioca" type="{http://www.example.org/instrumenti_placanja}BrojRacuna"/> * &lt;element name="model_odobrenja" type="{http://www.example.org/instrumenti_placanja}Model" minOccurs="0"/> * &lt;element name="poziv_na_broj_odobrenja" type="{http://www.example.org/instrumenti_placanja}PozivNaBroj" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "NalogZaPrenos", propOrder = { "racunDuznika", "modelZaduzenja", "pozivNaBrojZaduzenja", "racunPovjerioca", "modelOdobrenja", "pozivNaBrojOdobrenja" }) public class NalogZaPrenos extends SredstvoPlacanja { @XmlElement(name = "racun_duznika", required = true) protected String racunDuznika; @XmlElement(name = "model_zaduzenja") protected Short modelZaduzenja; @XmlElement(name = "poziv_na_broj_zaduzenja") protected String pozivNaBrojZaduzenja; @XmlElement(name = "racun_povjerioca", required = true) protected String racunPovjerioca; @XmlElement(name = "model_odobrenja") protected Short modelOdobrenja; @XmlElement(name = "poziv_na_broj_odobrenja") protected String pozivNaBrojOdobrenja; /** * Gets the value of the racunDuznika property. * * @return * possible object is * {@link String } * */ public String getRacunDuznika() { return racunDuznika; } /** * Sets the value of the racunDuznika property. * * @param value * allowed object is * {@link String } * */ public void setRacunDuznika(String value) { this.racunDuznika = value; } /** * Gets the value of the modelZaduzenja property. * * @return * possible object is * {@link Short } * */ public Short getModelZaduzenja() { return modelZaduzenja; } /** * Sets the value of the modelZaduzenja property. * * @param value * allowed object is * {@link Short } * */ public void setModelZaduzenja(Short value) { this.modelZaduzenja = value; } /** * Gets the value of the pozivNaBrojZaduzenja property. * * @return * possible object is * {@link String } * */ public String getPozivNaBrojZaduzenja() { return pozivNaBrojZaduzenja; } /** * Sets the value of the pozivNaBrojZaduzenja property. * * @param value * allowed object is * {@link String } * */ public void setPozivNaBrojZaduzenja(String value) { this.pozivNaBrojZaduzenja = value; } /** * Gets the value of the racunPovjerioca property. * * @return * possible object is * {@link String } * */ public String getRacunPovjerioca() { return racunPovjerioca; } /** * Sets the value of the racunPovjerioca property. * * @param value * allowed object is * {@link String } * */ public void setRacunPovjerioca(String value) { this.racunPovjerioca = value; } /** * Gets the value of the modelOdobrenja property. * * @return * possible object is * {@link Short } * */ public Short getModelOdobrenja() { return modelOdobrenja; } /** * Sets the value of the modelOdobrenja property. * * @param value * allowed object is * {@link Short } * */ public void setModelOdobrenja(Short value) { this.modelOdobrenja = value; } /** * Gets the value of the pozivNaBrojOdobrenja property. * * @return * possible object is * {@link String } * */ public String getPozivNaBrojOdobrenja() { return pozivNaBrojOdobrenja; } /** * Sets the value of the pozivNaBrojOdobrenja property. * * @param value * allowed object is * {@link String } * */ public void setPozivNaBrojOdobrenja(String value) { this.pozivNaBrojOdobrenja = value; } }
70448c1a6e8e3faf9f2a544f15492ef4cb0536d4
5b4b79c987fb74cc1fc3a5e71259c002be55ded5
/src/main/java/com/kodluyoruz/models/Email.java
12eb9b85ca99aee8dc59fb2f465b32d94eca15a8
[]
no_license
rnejdetsarikaya/Notifications-Hub
1fe7dc741c3f8c6481570af82a0b318257cbb276
5eb908587b7b90643f696dd9f8fc400d89cbc6c7
refs/heads/master
2022-12-13T15:46:43.915668
2020-09-09T16:59:07
2020-09-09T16:59:07
294,173,171
1
0
null
null
null
null
UTF-8
Java
false
false
970
java
package com.kodluyoruz.models; import com.kodluyoruz.interfaces.Channel; public class Email implements Channel { private String title; private String message; private Company sender; private User receiver; @Override public void send(String message){ System.out.println("Send Email from "+sender.getName()+" to "+receiver.getEmail()+": "+message); } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public Company getSender() { return sender; } public void setSender(Company sender) { this.sender = sender; } public User getReceiver() { return receiver; } public void setReceiver(User receiver) { this.receiver = receiver; } }
215aa3c890a653c3ea06df3ec2900e3775138479
c5154b5f36e63b8fd721d86bf1839cf143373364
/core/src/main/java/nz/mega/core/data/category/CategoryDao.java
85590be657687fa6dca5c45cb8b2374c688ae6c1
[]
no_license
vilemob/MegaBud
4ada7260ba0ba8efadf40798f406aa8605e52f11
92e8f04fdcda35edf1362b4004f07d1d3fd8a65f
refs/heads/master
2022-07-04T16:18:30.888758
2020-05-14T17:38:48
2020-05-14T17:38:48
263,982,813
0
0
null
null
null
null
UTF-8
Java
false
false
866
java
package nz.mega.core.data.category; import androidx.lifecycle.LiveData; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import androidx.room.Update; import java.util.List; import io.reactivex.Completable; @Dao public interface CategoryDao { @Query("SELECT * FROM category") List<Category> getAll(); @Query("SELECT * FROM category") LiveData<List<Category>> getAllLive(); @Query("SELECT * FROM category WHERE id = :categoryId") LiveData<Category> getCategoryByIdLive(int categoryId); @Query("SELECT * FROM category WHERE id IN (:categoryIds)") List<Category> loadAllByIds(int[] categoryIds); @Insert Completable insertAll(Category... categories); @Update Completable update(Category category); @Delete void delete(Category category); }
0ed354909239afa9e6a15e5b90c6bffcc953b1d7
f00bb3027f46a28abda10e68debea45361c89a55
/src/leetcode/stack/stack_simple/MaxStack.java
b618adffc909a4a3bd7d9254089962e77ff4ae89
[]
no_license
thinkerzhangyan/JavaPractice
f3455241223bda0a531baae10b31dce0c82da13b
627b0484cab32add14d4e9259d88993fb880e038
refs/heads/master
2021-06-04T14:37:17.416138
2020-06-09T14:47:02
2020-06-09T14:47:02
147,666,148
0
0
null
null
null
null
UTF-8
Java
false
false
848
java
package leetcode.stack.stack_simple; import java.util.LinkedList; public class MaxStack { private LinkedList<Integer> stack1 = new LinkedList<>(); private LinkedList<Integer> stack2 = new LinkedList<>(); public MaxStack() { } public void push(int val) { stack1.push(val); if (stack2.isEmpty()) { stack2.push(val); } else { if (stack2.peek() > val) { stack2.push(stack2.peek()); } else { stack2.push(val); } } } public int pop() { stack2.pop(); return stack1.pop(); } public int top() { return stack1.peek(); } public int max() { return stack2.peek(); } public boolean isEmpty() { return stack1.isEmpty() && stack2.isEmpty(); } }
58246bd6d71a786ad98f76b2893f8463ac28fa8f
b8702ab1756c8e8947d4db42304aa520b5fefa35
/app/src/main/java/com/narancommunity/app/common/ExpandableHeightGridView.java
e7905d4e66bfec3fe30ab4cc1922d22c329bd981
[]
no_license
naranc/AndroidApp
bf9e9ed6c15fff678f7f016ea91e45a2da0bbd61
88b7ee89d334a9a9797d2e154ffe1652181a5813
refs/heads/master
2020-03-09T16:15:01.024728
2018-06-02T09:17:04
2018-06-02T09:17:05
128,879,715
0
0
null
null
null
null
UTF-8
Java
false
false
1,281
java
package com.narancommunity.app.common; import android.content.Context; import android.util.AttributeSet; import android.view.ViewGroup; import android.widget.GridView; public class ExpandableHeightGridView extends GridView { private boolean expanded = false; public ExpandableHeightGridView(Context context) { super(context); } public ExpandableHeightGridView(Context context, AttributeSet attrs) { super(context, attrs); } public ExpandableHeightGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public void setExpanded(boolean expanded) { this.expanded = expanded; } public boolean isExpanded() { return expanded; } @Override public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { // HACK! TAKE THAT ANDROID! if (isExpanded()) { // Calculate entire height by providing a very large height hint. // View.MEASURED_SIZE_MASK represents the largest height possible. int expandSpec = MeasureSpec.makeMeasureSpec(MEASURED_SIZE_MASK, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec, expandSpec); ViewGroup.LayoutParams params = getLayoutParams(); params.height = getMeasuredHeight(); } else { super.onMeasure(widthMeasureSpec, heightMeasureSpec); } } }
c3110492285ea8a3b0d63705fd11ce463b145b7b
01df62e86365b27d348e215f7b51029368e225ca
/shiro_study_1/src/test/java/com/wang/shiro/study/realm/JDBCRealmTest.java
9ffa2564a82e5395b4206563143888340ed85b13
[]
no_license
hejiawang/shiro_study
e27ea0cd9ba8ddd5931c22c51ef3c1c73d5cac62
a5513e366c47a6f38f4aa76669a0c9ffd0290b29
refs/heads/master
2021-07-13T14:42:57.310494
2017-10-18T02:06:32
2017-10-18T02:06:32
107,216,608
0
0
null
null
null
null
UTF-8
Java
false
false
1,514
java
package com.wang.shiro.study.realm; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.config.IniSecurityManagerFactory; import org.apache.shiro.subject.Subject; import org.apache.shiro.util.Factory; import org.junit.Test; import junit.framework.Assert; public class JDBCRealmTest { @Test public void testHelloworld() { //1、获取SecurityManager工厂,此处使用Ini配置文件初始化SecurityManager Factory<org.apache.shiro.mgt.SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro-jdbc-realm.ini"); //2、得到SecurityManager实例 并绑定给SecurityUtils org.apache.shiro.mgt.SecurityManager securityManager = factory.getInstance(); SecurityUtils.setSecurityManager(securityManager); //3、得到Subject及创建用户名/密码身份验证Token(即用户身份/凭证) Subject subject = SecurityUtils.getSubject(); UsernamePasswordToken token = new UsernamePasswordToken("zhang", "123"); try { //4、登录,即身份验证 subject.login(token); } catch (AuthenticationException e) { //5、身份验证失败 System.out.println("error"); } Assert.assertEquals(true, subject.isAuthenticated()); //断言用户已经登录 //6、退出 subject.logout(); } }
ae867e2fd3155274c06966cbfeb9f3470a68bc6d
096b557af3b68947cb31685221f14d911e84f918
/src/net/effectivejava/examples/chapter11/item77/ElvisStealer.java
e46b9d54874d35442833217b5d85e9d993f7d6ea
[]
no_license
kuchikigit/SrcCodes
34d84eaca5a970143489c969d7063c88453bb19f
feb3198a382d106e37d6d34da9452ddf3482c6d3
refs/heads/master
2021-01-20T19:05:23.083737
2016-08-10T12:13:35
2016-08-10T12:13:35
63,997,411
0
0
null
null
null
null
UTF-8
Java
false
false
494
java
// "Stealer" class - Page 310 package net.effectivejava.examples.chapter11.item77; import java.io.Serializable; public class ElvisStealer implements Serializable { static Elvis impersonator; private Elvis payload; private Object readResolve() { // Save a reference to the "unresolved" Elvis instance impersonator = payload; // Return an object of correct type for favorites field return new String[] { "A Fool Such as I" }; } private static final long serialVersionUID = 0; }
be71b7ed0933f3b961c4473dc07986e5f6ecc607
9aafecc1b16c88662ecb84cd4109959e379ea15d
/SoundCloud/src/server/SoundCloud.java
de5cd1b5628c3a087d72d319661ffc8fb93c04d6
[]
no_license
joaocoutinho1602/SD-SoundCloud
aff041755f9aafc9be88268c15a346d6390e7a08
f06fcc1ecc7c772681fcdfaea09dc18c58a0696e
refs/heads/master
2022-08-05T21:39:57.560426
2020-05-23T19:07:57
2020-05-23T19:07:57
266,402,124
0
0
null
null
null
null
UTF-8
Java
false
false
1,015
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 server; import data.Data; import java.net.ServerSocket; import java.net.Socket; /** * * @author anacesár * @author coutinho */ public class SoundCloud { /** * @param args the command line arguments */ public static void main(String[] args) throws Exception { ServerSocket ss = new ServerSocket(12345); Data data = new Data(); ThreadPool pool = new ThreadPool(10); System.out.println("SoundCloud server is now up and listening for connections"); while (true) { Socket socket = ss.accept(); Socket socketBytes = ss.accept(); System.out.println("New connection established"); Thread thread = new Thread(new Server(socket, socketBytes, data, pool)); thread.start(); } } }
62f1af5e777d5890e04a8834bced118c6fb1869a
acf1b7191d9c712f1be9db9907298ba54cced98f
/ext-wechat/src/main/java/com/liangzhmj/cat/ext/wechat/miniprogram/openability/MsgAbility.java
163c4ab0eae05d8433bd4fb981bc7801c7fbb2b0
[]
no_license
liangzhmj/cat
ccda2422e54b8d6810c3eab941d7a4c5473bf21c
b3c6a9797debdbb921fcdde698e5cdd6655e1edd
refs/heads/master
2023-07-07T02:25:42.242835
2020-08-15T10:32:58
2020-08-15T10:32:58
283,142,501
1
0
null
null
null
null
UTF-8
Java
false
false
4,925
java
package com.liangzhmj.cat.ext.wechat.miniprogram.openability; import com.liangzhmj.cat.ext.wechat.exception.WechatException; import com.liangzhmj.cat.ext.wechat.tools.common.APIUtils; import com.liangzhmj.cat.ext.wechat.tools.common.protocol.MessageProtocol; import com.liangzhmj.cat.ext.wechat.tools.common.vo.MsgTemplate; import lombok.extern.log4j.Log4j2; import net.sf.json.JSONObject; import java.io.File; import java.util.HashMap; import java.util.Map; /** * 小程序开放能力 - 微信文档[小程序->开放能力->客服&模板消息|小程序->服务端->客服&模板消息] * -用户消息能力 * @author liangzhmj * @Date 2019-09-26 16:45:12 */ @Log4j2 public class MsgAbility { private static String MSG_URL = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token="; private static String TEMPLATE_MSG_URL = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token="; /** * 发送文本客服消息 * @param appid * @param openid * @param content * @return */ public static JSONObject sendTextMsg(String appid,String openid,String content){ JSONObject resp = null; try { JSONObject params = MessageProtocol.textMsg(openid,content); resp = APIUtils.callAPI(MSG_URL,appid,params); } catch (Exception e) { log.error(e); } return resp; } /** * 发送图片信息 * @param appid * @param openid * @param mediaId * @return */ public static JSONObject sendPicMsg(String appid, String openid, String mediaId){ JSONObject resp = null; try { JSONObject params = MessageProtocol.picMsg(openid,mediaId); resp = APIUtils.callAPI(MSG_URL,appid,params); } catch (Exception e) { log.error(e); } return resp; } /** * 发送小程序卡片信息 * @param appid * @param openid * @param title * @param mediaId * @param url * @return */ public static JSONObject sendAppCardMsg(String appid,String openid,String title,String mediaId,String url){ JSONObject resp = null; try { JSONObject params = MessageProtocol.appCardMsg(openid,title,null,mediaId,url); resp = APIUtils.callAPI(MSG_URL,appid,params); } catch (Exception e) { log.error(e); } return resp; } /** * 发送图文信息 * @param appid * @param openid * @param title * @param descr * @param thumbUrl * @param url * @return */ public static JSONObject sendPicLinkMsg(String appid,String openid,String title,String descr,String thumbUrl,String url){ JSONObject resp = null; try { JSONObject params = MessageProtocol.picLinkMsgMini(openid,title,descr,thumbUrl,url); resp = APIUtils.callAPI(MSG_URL,appid,params); } catch (Exception e) { log.error(e); } return resp; } /** * 发送消息模板 * @param appid * @param template */ public static JSONObject sendMsgTemplate(String appid, MsgTemplate template){ JSONObject resp = null; try { if(template == null){ throw new WechatException("template为空"); } resp = APIUtils.callAPI(TEMPLATE_MSG_URL,appid,template.toJSON()); } catch (Exception e) { log.error(e); } return resp; } /** * 发送消息模板 * @param appid * @param params */ public static JSONObject sendMsgTemplate(String appid,JSONObject params){ JSONObject resp = null; try { if(params == null){ throw new WechatException("params为空"); } resp = APIUtils.callAPI(TEMPLATE_MSG_URL,appid,params); } catch (Exception e) { log.error(e); } return resp; } /** * 上传临时素材 * @param appid * @param data * @return */ public static String uploadTempMaterial(String appid, File data){ try { Map<String,String> header = new HashMap<String,String>(); header.put("Connection", "keep-alive"); header.put("Accept", "*/*"); header.put("Content-Type", "multipart/form-data"); header.put("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) "); JSONObject res = APIUtils.callAPI("https://api.weixin.qq.com/cgi-bin/media/upload?type=image&access_token=",appid,header,data); log.info("上传临时素材结果:"+res); return res.getString("media_id"); } catch (Exception e) { log.error(e.getMessage()); } return null; } }
3cc5b99c5760c62003e30ee91c42a1902f5e9aaa
ce3decb4c92f6c122103563b3cc7760fe9c2447f
/src/org/pushingpixels/matrixrain/intro/rain/BellRainManager.java
07093f6aee9759bcb39c35aae21dabb8ed9e6836
[]
no_license
kirill-grouchnikov/matrix-rain
d83235c698328c61585c91420a90059fdf62bcb4
a733bcc18efa3868077515477aac96ed383f0865
refs/heads/master
2021-01-19T19:09:00.481177
2017-03-30T01:35:27
2017-03-30T01:35:27
86,645,844
0
1
null
null
null
null
UTF-8
Java
false
false
48,786
java
/* * Copyright (c) 2003-2017 Matrix Rain, Kirill Grouchnikov. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * o Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * o Neither the name of Matrix Rain, Kirill Grouchnikov nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.pushingpixels.matrixrain.intro.rain; import java.awt.*; import org.pushingpixels.matrixrain.auxiliary.graphics.IndexBitmapObject; import org.pushingpixels.matrixrain.auxiliary.graphics.TrueColorBitmapObject; import org.pushingpixels.matrixrain.auxiliary.graphics.colors.manager.ColorManager; import org.pushingpixels.matrixrain.auxiliary.graphics.geom.edgedetection.EdgeDetector; import org.pushingpixels.matrixrain.auxiliary.graphics.spline.SplineInterpolatorObject; import org.pushingpixels.matrixrain.auxiliary.graphics.spline.SplineManager; public final class BellRainManager { private static final int N = 8; private static final int M = 6; private static final double CUTOFF_THRESHOLD = 0.95; private static final int STATE_BELLRAIN_FIRSTPHASE = 0; private static final int STATE_BELLRAIN_SECONDPHASE = 1; private static final int STATE_BELLRAIN_WAIT = 2; private static final int STATE_BELLRAIN_DISINTEGRATION = 3; private static final int STATE_BELLRAIN_FINISHED = 10; private int width, height; private int bellCellSize; private int bellClusterSize; private int widthInCells, heightInCells; private int widthInClusters, heightInClusters; private BellRainDropInfo[] randomDropArray; private BellRainPixelInfo[][] pixelInfoArray; private BellRainCellInfo[][] cellInfoArray; private BellRainClusterInfo[][] clusterInfoArray; private BellRainScreenInfo screenInfo; // rain start and delta - first step private int[] rain_ys1; private int[] rain_ys2; private int[][] rain_delta1; private int[][] rain_delta2; private int[] rain_curr1; private int[] rain_curr2; // for iterations private ColorManager colorManager; private int currIteration; private int maxIterationFirstPhase; private int maxIterationSecondPhase; private int maxIterationWait; private int maxIterationDisintegration; private int state; private TrueColorBitmapObject bitmapAfterFirstStep; private IndexBitmapObject currIndexBitmap; private TrueColorBitmapObject currTrueColorBitmap; // interpolators for first phase private SplineInterpolatorObject edgeFadeInterpolator; private SplineInterpolatorObject edgeFadeInfluenceInterpolator; private SplineInterpolatorObject colorIncreaseInterpolator; // interpolators for second phase private SplineInterpolatorObject monochromeToClusterAverageInterpolator; private SplineInterpolatorObject clusterAverageToFullColorInterpolator; private SplineInterpolatorObject clusterBorderInterpolator; private SplineInterpolatorObject monochromeFadeAroundEdgesInterpolator; private SplineInterpolatorObject monochromeFadeAroundEdgesInfluenceInterpolator; // interpolators for disintegration phase private SplineInterpolatorObject fullColorToClusterMonochromeAverageInterpolator; private SplineInterpolatorObject edgeSurvivalInterpolator; private SplineInterpolatorObject disintegrationInterpolator; // deltas for disintegration private int[] disintegrationDeltaX; private int[] disintegrationDeltaY; // monochrome coefficients private double monochromeCoefR; private double monochromeCoefG; private double monochromeCoefB; private final class BellRainDropInfo { public int col; public int dropRow; public int length; public int speed; public int dropAge; } private final class BellRainPixelInfo { public boolean isOnEdge; public int red; public int green; public int blue; public int trueColor; public double luminosity; public double relativeLuminosity; public boolean isExposedByRain; public double bellCoefficient; } private final class BellRainCellInfo { public boolean hasPixelOnEdge; public boolean inFirstWave; public int iterationsAfterLastEdgeInFirstWave; public int averageLuminosity; public double relativeAverageLuminosity; public boolean inRandomDrop; public int randomDropAge; } private final class BellRainClusterInfo { public int averageR; public int averageG; public int averageB; public int borderR; public int borderG; public int borderB; public int borderTrueColor; public int averageLuminosity; public boolean hasPixelOnEdge; public int distanceToClosestTopEdge; public int regularCenterX; public int regularCenterY; public int disintegrateCenterX; public int disintegrateCenterY; public double disintegrationKx; public double disintegrationKy; } private final class BellRainScreenInfo { public double averagePixelLuminosity; public double maxPixelLuminosity; public double averageCellLuminosity; public double maxCellLuminosity; } public BellRainManager(int width, int height, Image finalImage, int bellCellSize, int bellClusterSize, ColorManager colorManager) { this.width = width; this.height = height; this.bellCellSize = bellCellSize; this.bellClusterSize = bellClusterSize; this.colorManager = colorManager; // compute dimension in bell cells this.widthInCells = (int) (Math.ceil((double) width / (double) bellCellSize)); this.heightInCells = (int) (Math.ceil((double) height / (double) bellCellSize)); // compute dimension in bell clusters this.widthInClusters = (int) (Math.ceil((double) width / (double) bellClusterSize)); this.heightInClusters = (int) (Math.ceil((double) height / (double) bellClusterSize)); // compute edge image EdgeDetector edgeDetector = new EdgeDetector(width, height, finalImage); int[] edgeValues = edgeDetector.getValueMap(EdgeDetector.EDGES_SOFT); // compute bell coefficients Point[] bellPoints = new Point[3]; bellPoints[0] = new Point(0, 80); bellPoints[1] = new Point((bellCellSize - 1) / 2, 60); bellPoints[2] = new Point(bellCellSize - 1, 50); // bellPoints[0] = new Point(0, 100); // bellPoints[1] = new Point((bellCellSize-1)/4, 90); // bellPoints[2] = new Point((bellCellSize-1)/2, 70); // bellPoints[3] = new Point(bellCellSize-1, 30); SplineInterpolatorObject bellInterpolator = SplineManager .getSplineInterpolation(bellPoints); // bellInterpolator.print(); // compute luminosity enhance interpolator Point[] luminosityEnhancePoints = new Point[4]; luminosityEnhancePoints[0] = new Point(0, 0); luminosityEnhancePoints[1] = new Point(20, 50); luminosityEnhancePoints[2] = new Point(120, 180); luminosityEnhancePoints[3] = new Point(255, 255); this.screenInfo = new BellRainScreenInfo(); int[] luminosities = new int[256]; for (int i = 0; i < luminosities.length; i++) luminosities[i] = 0; // get original pixels int[] origPixels = edgeDetector.getOriginalPixels(); // long time1 = System.currentTimeMillis(); // System.out.println("3: " + System.currentTimeMillis()); double bellCellSize2 = (this.bellCellSize - 1) / 2.0; // create info structures on all pixels int pixelCount = 0; double pixelSum = 0.0; double maxPixelLum = 0.0; this.pixelInfoArray = new BellRainPixelInfo[width][height]; for (int col = 0; col < this.width; col++) { int xInBellCell = col % this.bellCellSize; for (int row = 0; row < this.height; row++) { int index = row * this.width + col; BellRainPixelInfo currPixelInfo = new BellRainPixelInfo(); currPixelInfo.isOnEdge = (edgeValues[index] > 0); currPixelInfo.trueColor = origPixels[index]; int red = currPixelInfo.trueColor & 0x00FF0000; red >>= 16; currPixelInfo.red = red; int green = currPixelInfo.trueColor & 0x0000FF00; green >>= 8; currPixelInfo.green = green; int blue = currPixelInfo.trueColor & 0x000000FF; currPixelInfo.blue = blue; currPixelInfo.luminosity = (222 * red + 707 * green + 71 * blue) / 1000; pixelSum += currPixelInfo.luminosity; if (currPixelInfo.luminosity > maxPixelLum) maxPixelLum = currPixelInfo.luminosity; pixelCount++; currPixelInfo.isExposedByRain = false; int yInBellCell = row % this.bellCellSize; double dx = xInBellCell - bellCellSize2; double dy = yInBellCell - bellCellSize2; int distToBellCenter2 = (int) (dx * dx + dy * dy); double bellCoefficient = bellInterpolator .getValue(distToBellCenter2); // tweak randomly bellCoefficient += (int) (Math.random() * 20.0); if (bellCoefficient > 100) bellCoefficient = 100; currPixelInfo.bellCoefficient = bellCoefficient; this.pixelInfoArray[col][row] = currPixelInfo; } } this.screenInfo.averagePixelLuminosity = pixelSum / pixelCount; this.screenInfo.maxPixelLuminosity = maxPixelLum; // System.out.println("4: " + System.currentTimeMillis()); // create info structures on all cells this.cellInfoArray = new BellRainCellInfo[this.widthInCells][this.heightInCells]; for (int cellCol = 0; cellCol < this.widthInCells; cellCol++) { for (int cellRow = 0; cellRow < this.heightInCells; cellRow++) { BellRainCellInfo currCellInfo = new BellRainCellInfo(); // go over all pixels of this cell int startX = cellCol * this.bellCellSize; int endX = (cellCol + 1) * this.bellCellSize; if (endX >= this.width) endX = this.width - 1; int startY = cellRow * this.bellCellSize; int endY = (cellRow + 1) * this.bellCellSize; if (endY >= this.height) endY = this.height - 1; int count = 0; int luminositySum = 0; for (int x = startX; x < endX; x++) { for (int y = startY; y < endY; y++) { if (this.pixelInfoArray[x][y].isOnEdge) currCellInfo.hasPixelOnEdge = true; luminositySum += this.pixelInfoArray[x][y].luminosity; count++; } } int avgLuminosity = (count > 0) ? (luminositySum / count) : 0; currCellInfo.averageLuminosity = avgLuminosity; luminosities[(int) avgLuminosity]++; currCellInfo.iterationsAfterLastEdgeInFirstWave = 100; currCellInfo.inFirstWave = true; this.cellInfoArray[cellCol][cellRow] = currCellInfo; } } int cutoffLuminosity = 255; int cutoffThreshold = (int) (this.widthInCells * this.heightInCells * BellRainManager.CUTOFF_THRESHOLD); int cutoffSum = 0; for (int i = 0; i < luminosities.length; i++) { cutoffSum += luminosities[i]; if (cutoffSum > cutoffThreshold) { cutoffLuminosity = i; break; } } // System.out.println("cut lum: " + cutoffLuminosity); for (int col = 0; col < this.widthInCells; col++) { for (int row = 0; row < this.heightInCells; row++) { double currLum = this.cellInfoArray[col][row].averageLuminosity; if (currLum > cutoffLuminosity) this.cellInfoArray[col][row].relativeAverageLuminosity = 255.0; else this.cellInfoArray[col][row].relativeAverageLuminosity = 255.0 * this.cellInfoArray[col][row].averageLuminosity / cutoffLuminosity; } } int cellCount = 0; double cellSum = 0.0; double maxCellLum = 0.0; for (int currCol = 0; currCol < this.widthInCells; currCol++) { for (int currRow = 0; currRow < this.heightInCells; currRow++) { double currLum = this.cellInfoArray[currCol][currRow].averageLuminosity; cellSum += currLum; if (currLum > maxCellLum) maxCellLum = currLum; cellCount++; } } this.screenInfo.averageCellLuminosity = cellSum / cellCount; this.screenInfo.maxCellLuminosity = maxCellLum; for (int col = 0; col < this.widthInCells; col++) { for (int row = 0; row < this.heightInCells; row++) { double currLum = this.cellInfoArray[col][row].averageLuminosity; if (currLum > cutoffLuminosity) this.cellInfoArray[col][row].relativeAverageLuminosity = 255.0; else this.cellInfoArray[col][row].relativeAverageLuminosity = 255.0 * this.cellInfoArray[col][row].averageLuminosity / cutoffLuminosity; } } // create info structures on all clusters this.maxIterationDisintegration = 10; this.clusterInfoArray = new BellRainClusterInfo[this.widthInCells][this.heightInCells]; for (int clusterCol = 0; clusterCol < this.widthInClusters; clusterCol++) { for (int clusterRow = 0; clusterRow < this.heightInClusters; clusterRow++) { BellRainClusterInfo currClusterInfo = new BellRainClusterInfo(); // go over all pixels of this cluster int startX = clusterCol * this.bellClusterSize; int endX = (clusterCol + 1) * this.bellClusterSize; if (endX >= this.width) endX = this.width - 1; int startY = clusterRow * this.bellClusterSize; int endY = (clusterRow + 1) * this.bellClusterSize; if (endY >= this.height) endY = this.height - 1; int count = 0; int rSum = 0, gSum = 0, bSum = 0; int luminositySum = 0; for (int x = startX; x < endX; x++) { for (int y = startY; y < endY; y++) { if (this.pixelInfoArray[x][y].isOnEdge) { currClusterInfo.hasPixelOnEdge = true; currClusterInfo.distanceToClosestTopEdge = 0; } else { currClusterInfo.distanceToClosestTopEdge = 100; } rSum += this.pixelInfoArray[x][y].red; gSum += this.pixelInfoArray[x][y].green; bSum += this.pixelInfoArray[x][y].blue; luminositySum += this.pixelInfoArray[x][y].luminosity; count++; } } int avgR = (count > 0) ? (rSum / count) : 0; int avgG = (count > 0) ? (gSum / count) : 0; int avgB = (count > 0) ? (bSum / count) : 0; int avgLuminosity = (count > 0) ? (luminositySum / count) : 0; currClusterInfo.averageR = avgR; currClusterInfo.averageG = avgG; currClusterInfo.averageB = avgB; currClusterInfo.averageLuminosity = avgLuminosity; // border - twice darker currClusterInfo.borderR = currClusterInfo.averageR / 2; currClusterInfo.borderG = currClusterInfo.averageG / 2; currClusterInfo.borderB = currClusterInfo.averageB / 2; currClusterInfo.borderTrueColor = (255 << 24) | (currClusterInfo.borderR << 16) | (currClusterInfo.borderG << 8) | currClusterInfo.borderB; // for disintegration currClusterInfo.disintegrationKx = (double) (this.width + 2 * clusterCol * this.bellClusterSize) / (double) (this.maxIterationDisintegration * this.maxIterationDisintegration); // System.out.println("col: " + clusterCol + ", kx: " + // currClusterInfo.disintegrationKx); currClusterInfo.disintegrationKy = (double) (this.height / 2) / (double) (this.maxIterationDisintegration * this.maxIterationDisintegration); // if (Math.random() < 0.5) // currClusterInfo.disintegrationKx *= -1.0; currClusterInfo.disintegrateCenterX = clusterCol * this.bellClusterSize + this.bellClusterSize / 2 - 50 - clusterCol * this.bellClusterSize / 10; currClusterInfo.disintegrateCenterY = clusterRow * this.bellClusterSize + this.bellClusterSize / 2 - 50 - clusterRow * this.bellClusterSize / 10; this.clusterInfoArray[clusterCol][clusterRow] = currClusterInfo; } } // propagate distanceToClosestTopEdge field for (int clusterCol = 0; clusterCol < this.widthInClusters; clusterCol++) { for (int clusterRow = 0; clusterRow < this.heightInClusters; clusterRow++) { BellRainClusterInfo currClusterInfo = this.clusterInfoArray[clusterCol][clusterRow]; if (currClusterInfo.distanceToClosestTopEdge > 0) continue; for (int currClusterCol = 0; currClusterCol < this.widthInClusters; currClusterCol++) { int dx = currClusterCol - clusterCol; if (dx < 0) dx = -dx; for (int currClusterRow = 0; currClusterRow < this.heightInClusters; currClusterRow++) { int dy = currClusterRow - clusterRow; if (dy < 0) dy = -dy; int currDist = dx + dy; if (currDist < this.clusterInfoArray[currClusterCol][currClusterRow].distanceToClosestTopEdge) this.clusterInfoArray[currClusterCol][currClusterRow].distanceToClosestTopEdge = currDist; } } } } // System.out.println("Propagate - " + (time21-time20)); // for (int clusterRow=0; clusterRow < this.heightInClusters; // clusterRow++) { // for (int clusterCol=0; clusterCol < this.widthInClusters; // clusterCol++) { // System.out.print(this.clusterInfoArray[clusterCol][clusterRow].distanceToClosestTopEdge // + ","); // } // System.out.println(); // } int[][] bitmapPixels = new int[this.width][this.height]; for (int i = 0; i < this.width; i++) for (int j = 0; j < this.height; j++) bitmapPixels[i][j] = 0; this.currIndexBitmap = new IndexBitmapObject(bitmapPixels, this.width, this.height); // long time0 = System.currentTimeMillis(); // compute rain start positions this.rain_ys1 = new int[this.widthInCells]; this.rain_curr1 = new int[this.widthInCells]; this.rain_ys2 = new int[this.widthInCells]; this.rain_curr2 = new int[this.widthInCells]; for (int x = 0; x < this.widthInCells; x++) { double currYs2 = 0.0; for (int i = 1; i < N; i++) { double k = 2 * Math.PI / (N * this.widthInCells); currYs2 += ((double) (N + Math.random()) / (double) i) * Math.sin(k * i * x + 2 * Math.PI * Math.random()); } this.rain_ys2[x] = (int) currYs2; } int maxYs2 = this.rain_ys2[0]; for (int i = 1; i < this.widthInCells; i++) if (this.rain_ys2[i] > maxYs2) maxYs2 = this.rain_ys2[i]; for (int i = 0; i < this.widthInCells; i++) { this.rain_ys2[i] -= maxYs2; this.rain_ys1[i] = this.rain_ys2[i] / 2; this.rain_ys2[i]--; this.rain_curr1[i] = this.rain_ys1[i]; this.rain_curr2[i] = this.rain_ys2[i]; // System.out.print(this.rain_ys[i] + ","); } // compute rain deltas this.maxIterationFirstPhase = maxYs2 + this.heightInCells; this.rain_delta1 = new int[this.widthInCells][this.maxIterationFirstPhase]; this.rain_delta2 = new int[this.widthInCells][this.maxIterationFirstPhase]; for (int x = 0; x < this.widthInCells; x++) { for (int t = 0; t < this.maxIterationFirstPhase; t++) { double currDelta2 = 0.0; double phase = 2.0 * Math.PI * Math.random(); for (int i = 1; i < M; i++) currDelta2 += Math.sin(i * x * (t + 1) + phase); if (currDelta2 < 0.0) currDelta2 = -currDelta2; currDelta2 += 5.0; this.rain_delta2[x][t] = (int) currDelta2; this.rain_delta1[x][t] = this.rain_delta2[x][t] + (int) (Math.random() * 3.0); } } // compute the end of the first step int maxTf = 0; for (int i = 0; i < this.widthInCells; i++) { int currSum = this.rain_ys2[i]; int currT = 0; while (currT < this.maxIterationFirstPhase) { currSum += this.rain_delta2[i][currT]; if (currSum >= this.heightInCells) { if (currT > maxTf) maxTf = currT; break; } currT++; } } this.maxIterationFirstPhase = maxTf + 1; /* * for (int x=0; x<this.widthInCells; x++) { for (int t=0; t<maxDeltaCount; * t++) { System.out.print(this.rain_delta[x][t] + ","); } * System.out.println(); } */ // long time2 = System.currentTimeMillis(); // System.out.println("Ys: " + (time1-time0)); // System.out.println("D: " + (time2-time1)); // random drops this.randomDropArray = new BellRainDropInfo[20]; for (int i = 0; i < this.randomDropArray.length; i++) { this.randomDropArray[i] = new BellRainDropInfo(); this.randomizeDrop(this.randomDropArray[i], this.widthInCells, this.heightInCells); } // interpolators Point[] edgeFadePoints = new Point[4]; edgeFadePoints[0] = new Point(0, 100); edgeFadePoints[1] = new Point(4, 50); edgeFadePoints[2] = new Point(7, 20); edgeFadePoints[3] = new Point(10, 0); this.edgeFadeInterpolator = SplineManager .getSplineInterpolation(edgeFadePoints); // this.edgeFadeInterpolator.print(); Point[] edgeFadeInfluencePoints = new Point[3]; edgeFadeInfluencePoints[0] = new Point(0, 100); edgeFadeInfluencePoints[1] = new Point(maxIterationFirstPhase / 2, 60); edgeFadeInfluencePoints[2] = new Point(maxIterationFirstPhase, 0); this.edgeFadeInfluenceInterpolator = SplineManager .getSplineInterpolation(edgeFadeInfluencePoints); Point[] colorIncreasePoints = new Point[3]; colorIncreasePoints[0] = new Point(0, 70); colorIncreasePoints[1] = new Point(maxIterationFirstPhase / 3, 90); colorIncreasePoints[2] = new Point(maxIterationFirstPhase, 100); this.colorIncreaseInterpolator = SplineManager .getSplineInterpolation(colorIncreasePoints); // second step this.maxIterationSecondPhase = 20; Point[] clusterBorderPoints = new Point[7]; clusterBorderPoints[0] = new Point(0, 0); clusterBorderPoints[1] = new Point(this.maxIterationSecondPhase / 6, 50); clusterBorderPoints[2] = new Point(this.maxIterationSecondPhase / 3, 80); clusterBorderPoints[3] = new Point(this.maxIterationSecondPhase / 2, 70); clusterBorderPoints[4] = new Point( 2 * this.maxIterationSecondPhase / 3, 40); clusterBorderPoints[5] = new Point( 3 * this.maxIterationSecondPhase / 4, 0); clusterBorderPoints[6] = new Point(this.maxIterationSecondPhase, 0); this.clusterBorderInterpolator = SplineManager .getSplineInterpolation(clusterBorderPoints); Point[] monochromeToClusterAveragePoints = new Point[4]; monochromeToClusterAveragePoints[0] = new Point(0, 0); monochromeToClusterAveragePoints[1] = new Point( this.maxIterationSecondPhase / 4, 50); monochromeToClusterAveragePoints[2] = new Point( this.maxIterationSecondPhase / 2, 100); monochromeToClusterAveragePoints[3] = new Point( this.maxIterationSecondPhase, 100); this.monochromeToClusterAverageInterpolator = SplineManager .getSplineInterpolation(monochromeToClusterAveragePoints); Point[] clusterAverageToFullColorPoints = new Point[4]; clusterAverageToFullColorPoints[0] = new Point(0, 0); clusterAverageToFullColorPoints[1] = new Point( this.maxIterationSecondPhase / 2, 0); clusterAverageToFullColorPoints[2] = new Point( 3 * this.maxIterationSecondPhase / 4, 50); clusterAverageToFullColorPoints[3] = new Point( this.maxIterationSecondPhase, 100); this.clusterAverageToFullColorInterpolator = SplineManager .getSplineInterpolation(clusterAverageToFullColorPoints); Point[] monochromeFadeAroundEdgesPoints = new Point[5]; monochromeFadeAroundEdgesPoints[0] = new Point(0, 100); monochromeFadeAroundEdgesPoints[1] = new Point( this.maxIterationSecondPhase / 5, 90); monochromeFadeAroundEdgesPoints[2] = new Point( 2 * this.maxIterationSecondPhase / 5, 40); monochromeFadeAroundEdgesPoints[3] = new Point( this.maxIterationSecondPhase / 2, 0); monochromeFadeAroundEdgesPoints[4] = new Point( this.maxIterationSecondPhase, 0); this.monochromeFadeAroundEdgesInterpolator = SplineManager .getSplineInterpolation(monochromeFadeAroundEdgesPoints); Point[] monochromeFadeAroundEdgesInfluencePoints = new Point[6]; monochromeFadeAroundEdgesInfluencePoints[0] = new Point(0, 100); monochromeFadeAroundEdgesInfluencePoints[1] = new Point(1, 90); monochromeFadeAroundEdgesInfluencePoints[2] = new Point(3, 50); monochromeFadeAroundEdgesInfluencePoints[3] = new Point(6, 40); monochromeFadeAroundEdgesInfluencePoints[4] = new Point(8, 20); monochromeFadeAroundEdgesInfluencePoints[5] = new Point(10, 0); this.monochromeFadeAroundEdgesInfluenceInterpolator = SplineManager .getSplineInterpolation(monochromeFadeAroundEdgesInfluencePoints); this.bitmapAfterFirstStep = null; this.maxIterationWait = 10; // disintegration this.disintegrationDeltaX = new int[this.maxIterationDisintegration + 1]; this.disintegrationDeltaY = new int[this.maxIterationDisintegration + 1]; for (int i = 0; i <= this.maxIterationDisintegration; i++) { double angle = 2.0 * Math.PI * (double) i / (double) this.maxIterationDisintegration; double radius = 50 + i * 450 / this.maxIterationDisintegration; this.disintegrationDeltaX[i] = (int) (radius * Math.cos(angle)); this.disintegrationDeltaY[i] = (int) (radius * Math.sin(angle)); } Point[] fullColorToClusterMonochromeAveragePoints = new Point[5]; fullColorToClusterMonochromeAveragePoints[0] = new Point(0, 0); fullColorToClusterMonochromeAveragePoints[1] = new Point(1, 60); fullColorToClusterMonochromeAveragePoints[2] = new Point( this.maxIterationDisintegration / 4, 80); fullColorToClusterMonochromeAveragePoints[3] = new Point( this.maxIterationDisintegration / 2, 100); fullColorToClusterMonochromeAveragePoints[4] = new Point( this.maxIterationDisintegration, 100); this.fullColorToClusterMonochromeAverageInterpolator = SplineManager .getSplineInterpolation(fullColorToClusterMonochromeAveragePoints); Point[] edgeSurvivalPoints = new Point[6]; edgeSurvivalPoints[0] = new Point(0, 100); edgeSurvivalPoints[1] = new Point(this.maxIterationDisintegration / 2, 90); edgeSurvivalPoints[2] = new Point(this.maxIterationDisintegration, 80); edgeSurvivalPoints[3] = new Point(2 * this.maxIterationDisintegration, 50); edgeSurvivalPoints[4] = new Point(3 * this.maxIterationDisintegration, 30); edgeSurvivalPoints[5] = new Point(4 * this.maxIterationDisintegration, 0); this.edgeSurvivalInterpolator = SplineManager .getSplineInterpolation(edgeSurvivalPoints); Point[] disintegrationPoints = new Point[5]; disintegrationPoints[0] = new Point(0, 100); disintegrationPoints[1] = new Point( this.maxIterationDisintegration / 4, 80); disintegrationPoints[2] = new Point( this.maxIterationDisintegration / 2, 50); disintegrationPoints[3] = new Point( 3 * this.maxIterationDisintegration / 4, 20); disintegrationPoints[4] = new Point(this.maxIterationDisintegration, 0); this.disintegrationInterpolator = SplineManager .getSplineInterpolation(disintegrationPoints); // monochrome coefficients Color monochromeMasterColor = this.colorManager.getMasterColor(); this.monochromeCoefR = (double) (monochromeMasterColor.getRed()) / 255.0; this.monochromeCoefG = (double) (monochromeMasterColor.getGreen()) / 255.0; this.monochromeCoefB = (double) (monochromeMasterColor.getBlue()) / 255.0; this.state = BellRainManager.STATE_BELLRAIN_FIRSTPHASE; // System.out.println("Bell rain creation: " + (time3-time0)); } private void randomizeDrop(BellRainDropInfo drop, int maxCols, int maxRows) { drop.col = (int) (Math.random() * maxCols); drop.dropRow = (int) (Math.random() * maxRows); drop.dropAge = 0; drop.length = 2 + (int) (Math.random() * 5.0); drop.speed = 2 + (int) (Math.random() * 4.0); } private void setIterationsAfterLastEdge(int cellCol, int cellRow, int newValue) { if ((cellRow < 0) || (cellRow >= this.heightInCells)) return; this.cellInfoArray[cellCol][cellRow].iterationsAfterLastEdgeInFirstWave = newValue; } private void incrementIterationsAfterLastEdge(int cellCol, int cellRow, int delta) { if ((cellRow < 0) || (cellRow >= this.heightInCells)) return; this.cellInfoArray[cellCol][cellRow].iterationsAfterLastEdgeInFirstWave += delta; } private void iterationStep1() { // go over all cell columns and advance the two waves for this column // - set boolean "isExposedByRain" to true flag of all pixels covered // by these cells and "inFirstWave" to false for the cells covered // by the second wave for (int cellCol = 0; cellCol < this.widthInCells; cellCol++) { int rainDelta1 = this.rain_delta1[cellCol][this.currIteration]; int oldCellRow1 = this.rain_curr1[cellCol]; int newCellRow1 = oldCellRow1 + rainDelta1; int rainDelta2 = this.rain_delta2[cellCol][this.currIteration]; int oldCellRow2 = this.rain_curr2[cellCol]; int newCellRow2 = oldCellRow2 + rainDelta2; // if drop is still outside - skip if (newCellRow1 >= 0) { int startVisible1 = (oldCellRow1 < 0) ? 0 : oldCellRow1; int endVisible1 = newCellRow1; for (int currVisibleCellRow1 = startVisible1; currVisibleCellRow1 <= endVisible1; currVisibleCellRow1++) { // go over all pixels of this cell int startX = cellCol * this.bellCellSize; int endX = (cellCol + 1) * this.bellCellSize; if (endX >= this.width) endX = this.width - 1; int startY = currVisibleCellRow1 * this.bellCellSize; int endY = (currVisibleCellRow1 + 1) * this.bellCellSize; if (endY >= this.height) endY = this.height - 1; for (int x = startX; x < endX; x++) { for (int y = startY; y < endY; y++) { this.pixelInfoArray[x][y].isExposedByRain = true; } } } } if (newCellRow2 >= 0) { int startVisible2 = (oldCellRow2 < 0) ? 0 : oldCellRow2; int endVisible2 = (newCellRow2 >= this.heightInCells) ? (this.heightInCells - 1) : newCellRow2; for (int currVisibleCellRow2 = startVisible2; currVisibleCellRow2 <= endVisible2; currVisibleCellRow2++) { this.cellInfoArray[cellCol][currVisibleCellRow2].inFirstWave = false; } } this.rain_curr1[cellCol] += this.rain_delta1[cellCol][this.currIteration]; this.rain_curr2[cellCol] += this.rain_delta2[cellCol][this.currIteration]; if (newCellRow1 < 0) continue; // if edge detected between oldCellRow1 and newCellRow1 - all the // cells // between firstEdgeRow and newCellRow1 0 int firstEdgeRow = 0; if (oldCellRow1 < this.heightInCells) { // check oldCelRow1-newCellRow1 range for cell that has pixels // on edge boolean hasEdge = false; for (int currCellRow1 = oldCellRow1 + 1; currCellRow1 <= newCellRow1; currCellRow1++) { if (currCellRow1 < 0) continue; if (currCellRow1 >= this.heightInCells) break; if (this.cellInfoArray[cellCol][currCellRow1].hasPixelOnEdge) { if (!hasEdge) firstEdgeRow = currCellRow1; hasEdge = true; break; } } if (hasEdge) { // all in firstEdgeRow..newCellRow1 get 0 for (int currCellRow1 = firstEdgeRow; currCellRow1 <= newCellRow1; currCellRow1++) this.setIterationsAfterLastEdge(cellCol, currCellRow1, 0); // all in 0..firstEdgeRow-1 get +=2 for (int currCellRow1 = 0; currCellRow1 < firstEdgeRow; currCellRow1++) this.incrementIterationsAfterLastEdge(cellCol, currCellRow1, 2); } else { if (oldCellRow1 < 0) { // if rainDelta crossed row 0 - all the rows are as were } else { // all in oldCellRow1+1..newCellRow1 - get // oldCellRow1.value+1 int oldValue = this.cellInfoArray[cellCol][oldCellRow1].iterationsAfterLastEdgeInFirstWave; for (int currCellRow1 = oldCellRow1 + 1; currCellRow1 <= newCellRow1; currCellRow1++) this.setIterationsAfterLastEdge(cellCol, currCellRow1, oldValue + 1); for (int currCellRow1 = 0; currCellRow1 <= oldCellRow1; currCellRow1++) this.incrementIterationsAfterLastEdge(cellCol, currCellRow1, 2); } } } // for (int i=0; i<this.heightInCells; i++) { // System.out.print(this.cellInfoArray[cellCol][i].iterationsAfterLastEdgeInFirstWave // + ","); // } // System.out.println(); } this.currIndexBitmap.reset(0); int[][] bitmap = this.currIndexBitmap.getBitmap(); for (int x = 0; x < this.width; x++) { int cellX = x / this.bellCellSize; for (int y = 0; y < this.height; y++) { int cellY = y / this.bellCellSize; BellRainPixelInfo currPixelInfo = this.pixelInfoArray[x][y]; BellRainCellInfo currCellInfo = this.cellInfoArray[cellX][cellY]; double currPixelValue = 0.0; if (!currPixelInfo.isExposedByRain) continue; currPixelValue = currPixelInfo.bellCoefficient / 100.0; // apply edge fade only for cells in first wave if (currCellInfo.inFirstWave) { double edgeFadeCoef = this.edgeFadeInterpolator .getValue(currCellInfo.iterationsAfterLastEdgeInFirstWave) / 100.0; // System.out.println("applying edge fade to: " + cellX + ", // " + cellY); // System.out.println("itrs: " + // currCellInfo.iterationsAfterLastEdgeInFirstWave); // apply edge fade influence double edgeFadeInfluenceCoef = this.edgeFadeInfluenceInterpolator .getValue(this.currIteration) / 100.0; // 1.0 -> edgeFadeCoef // 0.0 -> 1.0 edgeFadeCoef = 1.0 + edgeFadeInfluenceCoef * (edgeFadeCoef - 1.0); currPixelValue *= edgeFadeCoef; } bitmap[x][y] = (short) (255.0 * currPixelValue); } } for (int cellX = 0; cellX < this.widthInCells; cellX++) { for (int cellY = 0; cellY < this.heightInCells; cellY++) { BellRainCellInfo currCellInfo = this.cellInfoArray[cellX][cellY]; /* * if (currCellInfo.hasPixelOnEdge) { // go over all pixels of * this cell int startX = cellX*this.bellCellSize; int endX = * (cellX+1)*this.bellCellSize; if (endX >= this.width) endX = * this.width-1; int startY = cellY*this.bellCellSize; int endY = * (cellY+1)*this.bellCellSize; if (endY >= this.height) endY = * this.height-1; for (int x=startX; x<endX; x++) { for (int * y=startY; y<endY; y++) { bitmap[x][y] = 255; } } } */ // apply color and luminosity factors only for second wave if (currCellInfo.inFirstWave) continue; // apply color increase double colorIncreaseFactor = this.colorIncreaseInterpolator .getValue(this.currIteration) / 100.0; // 0.0 -> 0 // 1.0 -> luminosity of pixel double colorIntensityFactor = colorIncreaseFactor * currCellInfo.relativeAverageLuminosity / 255.0; // go over all pixels of this cell int startX = cellX * this.bellCellSize; int endX = (cellX + 1) * this.bellCellSize; if (endX >= this.width) endX = this.width - 1; int startY = cellY * this.bellCellSize; int endY = (cellY + 1) * this.bellCellSize; if (endY >= this.height) endY = this.height - 1; for (int x = startX; x < endX; x++) { for (int y = startY; y < endY; y++) { int oldPixelValue = bitmap[x][y]; bitmap[x][y] = (short) (oldPixelValue * colorIntensityFactor); } } } } // overlay random drops for (int cellX = 0; cellX < this.widthInCells; cellX++) for (int cellY = 0; cellY < this.heightInCells; cellY++) this.cellInfoArray[cellX][cellY].inRandomDrop = false; for (int currDropIndex = 0; currDropIndex < this.randomDropArray.length; currDropIndex++) { BellRainDropInfo currDrop = this.randomDropArray[currDropIndex]; int startRow = currDrop.dropRow; int endRow = startRow - currDrop.length; if (startRow >= this.heightInCells) startRow = this.heightInCells - 1; if (endRow < 0) endRow = 0; int currAge = currDrop.dropAge; for (int currRow = startRow; currRow >= endRow; currRow--) { this.cellInfoArray[currDrop.col][currRow].inRandomDrop = true; this.cellInfoArray[currDrop.col][currRow].randomDropAge = currAge; if (Math.random() < 0.5) currAge++; } } for (int cellX = 0; cellX < this.widthInCells; cellX++) { for (int cellY = 0; cellY < this.heightInCells; cellY++) { BellRainCellInfo currCellInfo = this.cellInfoArray[cellX][cellY]; if (!currCellInfo.inRandomDrop) continue; // go over all pixels of this cell int startX = cellX * this.bellCellSize; int endX = (cellX + 1) * this.bellCellSize; if (endX >= this.width) endX = this.width - 1; int startY = cellY * this.bellCellSize; int endY = (cellY + 1) * this.bellCellSize; if (endY >= this.height) endY = this.height - 1; for (int x = startX; x < endX; x++) { for (int y = startY; y < endY; y++) { double bellValue = this.pixelInfoArray[x][y].bellCoefficient / 100.0; double edgeFadeCoef = this.edgeFadeInterpolator .getValue(currCellInfo.randomDropAge) / 100.0; bellValue *= edgeFadeCoef; short newValue = (short) (255.0 * bellValue); if (bitmap[x][y] < newValue) bitmap[x][y] = newValue; } } } } // advance random drops for (int currDropIndex = 0; currDropIndex < this.randomDropArray.length; currDropIndex++) { BellRainDropInfo currDrop = this.randomDropArray[currDropIndex]; if (Math.random() < 0.5) currDrop.dropAge++; currDrop.dropRow += currDrop.speed; // create new drop if this drop is too weak or is outside the screen if ((currDrop.dropAge > 6) || ((currDrop.dropRow - currDrop.length) >= this.heightInCells) || (Math.random() < 0.05)) this.randomizeDrop(currDrop, this.heightInCells, this.widthInCells); } } private void iterationStep2() { this.currTrueColorBitmap.reset(0); int[][] firstStepFinalMonochromeTrueColorBitmap = this.bitmapAfterFirstStep .getBitmap(); int[][] bitmap = this.currTrueColorBitmap.getBitmap(); double monochromeToClusterAverageCoef = this.monochromeToClusterAverageInterpolator .getValue(this.currIteration) / 100.0; double clusterAverageToFullColorCoef = this.clusterAverageToFullColorInterpolator .getValue(this.currIteration) / 100.0; double monochromeFadeAroundEdgesCoef = this.monochromeFadeAroundEdgesInterpolator .getValue(this.currIteration) / 100.0; double clusterBorderCoef = this.clusterBorderInterpolator .getValue(this.currIteration) / 100.0; for (int x = 0; x < this.width; x++) { int clusterX = x / this.bellClusterSize; for (int y = 0; y < this.height; y++) { int clusterY = y / this.bellClusterSize; BellRainPixelInfo currPixelInfo = this.pixelInfoArray[x][y]; BellRainClusterInfo currClusterInfo = this.clusterInfoArray[clusterX][clusterY]; // apply 'monochrome'->'cluster average' and 'cluster // average'->'full color' // and adjust according to 'monochrome fade around edges' double monochromeFadeAroundEdgesInfluenceCoef = this.monochromeFadeAroundEdgesInfluenceInterpolator .getValue(currClusterInfo.distanceToClosestTopEdge) / 100.0; int startR, startG, startB; int finalR, finalG, finalB; double coef; if (clusterAverageToFullColorCoef > 0.0) { startR = currClusterInfo.averageR; startG = currClusterInfo.averageG; startB = currClusterInfo.averageB; finalR = currPixelInfo.red; finalG = currPixelInfo.green; finalB = currPixelInfo.blue; coef = clusterAverageToFullColorCoef; } else { startR = (firstStepFinalMonochromeTrueColorBitmap[x][y] & 0x00FF0000) >> 16; startG = (firstStepFinalMonochromeTrueColorBitmap[x][y] & 0x0000FF00) >> 8; startB = (firstStepFinalMonochromeTrueColorBitmap[x][y] & 0x000000FF); finalR = currClusterInfo.averageR; finalG = currClusterInfo.averageG; finalB = currClusterInfo.averageB; // monochromeFadeAroundEdgesCoef*monochromeFadeAroundEdgesInfluenceCoef // 0.0 -> the color stays the same // 1.0 -> currClusterInfo.averageLuminosity in monochrome // component double monochromeFadeCoef = monochromeFadeAroundEdgesCoef * monochromeFadeAroundEdgesInfluenceCoef; int luminR = (int) (this.monochromeCoefR * currClusterInfo.averageLuminosity); int luminG = (int) (this.monochromeCoefG * currClusterInfo.averageLuminosity); int luminB = (int) (this.monochromeCoefB * currClusterInfo.averageLuminosity); finalR = (int) (finalR + monochromeFadeCoef * (luminR - finalR)); finalG = (int) (finalG + monochromeFadeCoef * (luminG - finalG)); finalB = (int) (finalB + monochromeFadeCoef * (luminB - finalB)); coef = monochromeToClusterAverageCoef; } int newR = (int) (startR + coef * (finalR - startR)); int newG = (int) (startG + coef * (finalG - startG)); int newB = (int) (startB + coef * (finalB - startB)); // apply border (for left and top borders) boolean isOnClusterBorderTL = ((x % this.bellClusterSize) == 0) || ((y % this.bellClusterSize) == 0); boolean isOnClusterBorderBR = (((x - 1) % this.bellClusterSize) == 0) || (((y - 1) % this.bellClusterSize) == 0); if (isOnClusterBorderTL && !isOnClusterBorderBR) { int borderR = currClusterInfo.borderR; int borderG = currClusterInfo.borderG; int borderB = currClusterInfo.borderB; newR = (int) (newR + clusterBorderCoef * (borderR - newR)); newG = (int) (newG + clusterBorderCoef * (borderG - newG)); newB = (int) (newB + clusterBorderCoef * (borderB - newB)); } if (newR > 255) newR = 255; if (newR < 0) newR = 0; if (newG > 255) newG = 255; if (newG < 0) newG = 0; if (newB > 255) newB = 255; if (newB < 0) newB = 0; int newColor = (255 << 24) | (newR << 16) | (newG << 8) | newB; // System.out.println("pix: " + x + "," + y + " -> (" + newR + // "," + newG + "," + newB + ")"); bitmap[x][y] = newColor; } } } /* * private void iterationStepDisintegration() { * this.currTrueColorBitmap.reset(0); int[][] bitmap = * this.currTrueColorBitmap.getBitmap(); * * for (int clusterCol=0; clusterCol<this.widthInClusters; clusterCol++) { * for (int clusterRow=0; clusterRow<this.heightInClusters; clusterRow++) { * BellRainClusterInfo currClusterInfo = * this.clusterInfoArray[clusterCol][clusterRow]; int currCenterX = * currClusterInfo.disintegrateCenterX + * this.disintegrationDeltaX[this.currIteration]; int currCenterY = * currClusterInfo.disintegrateCenterY + * this.disintegrationDeltaY[this.currIteration]; * // go over all pixels of this cluster int startX = * clusterCol*this.bellClusterSize; int endX = * (clusterCol+1)*this.bellClusterSize; if (endX >= this.width) endX = * this.width-1; int startY = clusterRow*this.bellClusterSize; int endY = * (clusterRow+1)*this.bellClusterSize; if (endY >= this.height) endY = * this.height-1; * * int dx = * (int)(currClusterInfo.disintegrationKx*(currIteration+1)*(currIteration+1) + * 3.0*Math.random()*(currIteration+1)); int dy = * (int)(//currClusterInfo.disintegrationKy*(currIteration+1)*(currIteration+1) + * 2.0*Math.random()*(currIteration+1)); for (int x=startX; x<endX; x++) { * for (int y=startY; y<endY; y++) { int compTrueColor = * this.pixelInfoArray[x][y].trueColor; * * boolean isOnClusterBorder = ((x%this.bellClusterSize) == 0) || * ((y%this.bellClusterSize) == 0); if (isOnClusterBorder) { compTrueColor = * currClusterInfo.borderTrueColor; } * // int newX = x - currClusterInfo.regularCenterX + currCenterX; // int * newY = y - currClusterInfo.regularCenterX + currCenterY; int newX = x + * dx; int newY = y + dy; * * if ((newX >= 0) && (newX < this.width) && (newY >= 0) && (newY < * this.height)) bitmap[newX][newY] = compTrueColor; } } } } } */ private void iterationStepDisintegration() { this.currTrueColorBitmap.reset(0); int[][] bitmap = this.currTrueColorBitmap.getBitmap(); double fullColorToClusterMonochromeAverageCoef = this.fullColorToClusterMonochromeAverageInterpolator .getValue(this.currIteration) / 100.0; double disintegrationCoef = this.disintegrationInterpolator .getValue(this.currIteration) / 100.0; for (int x = 0; x < this.width; x++) { int clusterX = x / this.bellClusterSize; for (int y = 0; y < this.height; y++) { int clusterY = y / this.bellClusterSize; BellRainPixelInfo currPixelInfo = this.pixelInfoArray[x][y]; BellRainClusterInfo currClusterInfo = this.clusterInfoArray[clusterX][clusterY]; // apply 'full color'->'monochrome average' int startR = currPixelInfo.red; int startG = currPixelInfo.green; int startB = currPixelInfo.blue; int finalR = (int) (this.monochromeCoefR * currClusterInfo.averageLuminosity); int finalG = (int) (this.monochromeCoefG * currClusterInfo.averageLuminosity); int finalB = (int) (this.monochromeCoefB * currClusterInfo.averageLuminosity); int newR = (int) (startR + fullColorToClusterMonochromeAverageCoef * (finalR - startR)); int newG = (int) (startG + fullColorToClusterMonochromeAverageCoef * (finalG - startG)); int newB = (int) (startB + fullColorToClusterMonochromeAverageCoef * (finalB - startB)); // apply 'edge survival' double edgeSurvivalCoef = this.edgeSurvivalInterpolator .getValue(currClusterInfo.distanceToClosestTopEdge * currIteration) / 100.0; // 1.0 -> color stays // 0.0 -> black newR = (int) (edgeSurvivalCoef * newR); newG = (int) (edgeSurvivalCoef * newG); newB = (int) (edgeSurvivalCoef * newB); // apply bell coefficient based on value of disintegration // coefficient: // 1.0 -> color stays // 0.5 -> bell coefficient // 0.0 -> black double bellCoef = currPixelInfo.bellCoefficient / 100.0; double coef; if (disintegrationCoef >= 0.5) coef = bellCoef + (disintegrationCoef - 0.5) * (1.0 - bellCoef) / 0.5; else coef = disintegrationCoef * bellCoef / 0.5; newR = (int) (coef * newR); newG = (int) (coef * newG); newB = (int) (coef * newB); if (newR > 255) newR = 255; if (newR < 0) newR = 0; if (newG > 255) newG = 255; if (newG < 0) newG = 0; if (newB > 255) newB = 255; if (newB < 0) newB = 0; int newColor = (255 << 24) | (newR << 16) | (newG << 8) | newB; // System.out.println("pix: " + x + "," + y + " -> (" + newR + // "," + newG + "," + newB + ")"); bitmap[x][y] = newColor; } } } public void iteration() { // long time0 = System.currentTimeMillis(); switch (this.state) { case BellRainManager.STATE_BELLRAIN_FIRSTPHASE: this.iterationStep1(); this.currIteration++; if (this.currIteration >= this.maxIterationFirstPhase) { System.out.println("BellRain first step over"); this.bitmapAfterFirstStep = new TrueColorBitmapObject( this.currIndexBitmap, this.colorManager); this.currTrueColorBitmap = new TrueColorBitmapObject( this.currIndexBitmap, this.colorManager); this.currIteration = 0; this.state = BellRainManager.STATE_BELLRAIN_SECONDPHASE; } break; case BellRainManager.STATE_BELLRAIN_SECONDPHASE: this.iterationStep2(); this.currIteration++; if (this.currIteration >= this.maxIterationSecondPhase) { System.out.println("BellRain second step over"); this.currIteration = 0; this.state = BellRainManager.STATE_BELLRAIN_WAIT; } break; case BellRainManager.STATE_BELLRAIN_WAIT: this.currIteration++; if (this.currIteration >= this.maxIterationWait) { System.out.println("BellRain wait over"); this.currIteration = 0; this.state = BellRainManager.STATE_BELLRAIN_DISINTEGRATION; } break; case BellRainManager.STATE_BELLRAIN_DISINTEGRATION: this.iterationStepDisintegration(); this.currIteration++; if (this.currIteration >= this.maxIterationDisintegration) { System.out.println("BellRain disintegration over"); this.currIteration = 0; this.state = BellRainManager.STATE_BELLRAIN_FINISHED; } case BellRainManager.STATE_BELLRAIN_FINISHED: return; } // long time1 = System.currentTimeMillis(); // System.out.println("iteration: " + (time1-time0)); } public IndexBitmapObject getCurrentIndexBitmap() { return this.currIndexBitmap; } public TrueColorBitmapObject getCurrentTrueColorBitmap() { return this.currTrueColorBitmap; } public boolean isFinished() { return (this.state == BellRainManager.STATE_BELLRAIN_FINISHED); } public boolean toGetIndexBitmap() { return (this.state == BellRainManager.STATE_BELLRAIN_FIRSTPHASE); } }
69fdd5085a09d9d10b2edb0507083d80076270c2
4a5611fdb1640a3497e2eb1a9209eedd5d256a1a
/INVOKE_ACTIVITY/exercises_INVOKE_ACTIVITY/gen/com/example/exercises_invoke_activity/R.java
b629e68c2d9159bf1db6acf22e89b9a1a1ad6933
[]
no_license
GeraldGono/Android_Exercises
ba18e985408252cdda325472a5fd6a446bee9cf0
f56fe39025e46f3e96ae4d9a7077591362863b0e
refs/heads/master
2016-09-05T21:47:26.985131
2014-07-03T08:47:48
2014-07-03T08:47:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
166,280
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package com.example.exercises_invoke_activity; public final class R { public static final class anim { public static final int abc_fade_in=0x7f040000; public static final int abc_fade_out=0x7f040001; public static final int abc_slide_in_bottom=0x7f040002; public static final int abc_slide_in_top=0x7f040003; public static final int abc_slide_out_bottom=0x7f040004; public static final int abc_slide_out_top=0x7f040005; } public static final class attr { /** Custom divider drawable to use for elements in the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarDivider=0x7f01000b; /** Custom item state list drawable background for action bar items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarItemBackground=0x7f01000c; /** Size of the Action Bar, including the contextual bar used to present Action Modes. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionBarSize=0x7f01000a; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarSplitStyle=0x7f010008; /** Reference to a style for the Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarStyle=0x7f010007; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabBarStyle=0x7f010004; /** Default style for tabs within an action bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabStyle=0x7f010003; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabTextStyle=0x7f010005; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarWidgetTheme=0x7f010009; /** Default action button style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionButtonStyle=0x7f010012; /** Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionDropDownStyle=0x7f010043; /** An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionLayout=0x7f01004a; /** TextAppearance style that will be applied to text that appears within action menu items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionMenuTextAppearance=0x7f01000d; /** Color for text that appears within action menu items. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int actionMenuTextColor=0x7f01000e; /** Background drawable to use for action mode UI <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeBackground=0x7f010038; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCloseButtonStyle=0x7f010037; /** Drawable to use for the close action mode button <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCloseDrawable=0x7f01003a; /** Drawable to use for the Copy action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCopyDrawable=0x7f01003c; /** Drawable to use for the Cut action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCutDrawable=0x7f01003b; /** Drawable to use for the Find action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeFindDrawable=0x7f010040; /** Drawable to use for the Paste action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModePasteDrawable=0x7f01003d; /** PopupWindow style to use for action modes when showing as a window overlay. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModePopupWindowStyle=0x7f010042; /** Drawable to use for the Select all action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSelectAllDrawable=0x7f01003e; /** Drawable to use for the Share action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeShareDrawable=0x7f01003f; /** Background drawable to use for action mode UI in the lower split bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSplitBackground=0x7f010039; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeStyle=0x7f010036; /** Drawable to use for the Web Search action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeWebSearchDrawable=0x7f010041; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionOverflowButtonStyle=0x7f010006; /** The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionProviderClass=0x7f01004c; /** The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionViewClass=0x7f01004b; /** Default ActivityChooserView style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int activityChooserViewStyle=0x7f010068; /** Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int background=0x7f01002b; /** Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundSplit=0x7f01002d; /** Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundStacked=0x7f01002c; /** A style that may be applied to Buttons placed within a LinearLayout with the style buttonBarStyle to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarButtonStyle=0x7f010014; /** A style that may be applied to horizontal LinearLayouts to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarStyle=0x7f010013; /** Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int customNavigationLayout=0x7f01002e; /** Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int disableChildrenWhenDisabled=0x7f010050; /** Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> */ public static final int displayOptions=0x7f010024; /** Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int divider=0x7f01002a; /** A drawable that may be used as a horizontal divider between visual elements. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dividerHorizontal=0x7f010017; /** Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dividerPadding=0x7f010052; /** A drawable that may be used as a vertical divider between visual elements. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dividerVertical=0x7f010016; /** ListPopupWindow comaptibility <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dropDownListViewStyle=0x7f01001d; /** The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dropdownListPreferredItemHeight=0x7f010044; /** The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int expandActivityOverflowButtonDrawable=0x7f010067; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int height=0x7f010022; /** Specifies a drawable to use for the 'home as up' indicator. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int homeAsUpIndicator=0x7f01000f; /** Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int homeLayout=0x7f01002f; /** Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int icon=0x7f010028; /** The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int iconifiedByDefault=0x7f010056; /** Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int indeterminateProgressStyle=0x7f010031; /** The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int initialActivityCount=0x7f010066; /** Specifies whether the theme is light, otherwise it is dark. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int isLightTheme=0x7f010055; /** Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int itemPadding=0x7f010033; /** Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listChoiceBackgroundIndicator=0x7f010048; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listPopupWindowStyle=0x7f01001e; /** The preferred list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeight=0x7f010018; /** A larger, more robust list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightLarge=0x7f01001a; /** A smaller, sleeker list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightSmall=0x7f010019; /** The preferred padding along the left edge of list items. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemPaddingLeft=0x7f01001b; /** The preferred padding along the right edge of list items. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemPaddingRight=0x7f01001c; /** Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int logo=0x7f010029; /** The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> */ public static final int navigationMode=0x7f010023; /** Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingEnd=0x7f010035; /** Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingStart=0x7f010034; /** Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int panelMenuListTheme=0x7f010047; /** Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int panelMenuListWidth=0x7f010046; /** Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupMenuStyle=0x7f010045; /** Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupPromptView=0x7f01004f; /** Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int progressBarPadding=0x7f010032; /** Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int progressBarStyle=0x7f010030; /** The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int prompt=0x7f01004d; /** An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int queryHint=0x7f010057; /** SearchView dropdown background <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchDropdownBackground=0x7f010058; /** The list item height for search results. @hide <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int searchResultListItemHeight=0x7f010061; /** SearchView AutoCompleteTextView style <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewAutoCompleteTextView=0x7f010065; /** SearchView close button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewCloseIcon=0x7f010059; /** SearchView query refinement icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewEditQuery=0x7f01005d; /** SearchView query refinement icon background <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewEditQueryBackground=0x7f01005e; /** SearchView Go button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewGoIcon=0x7f01005a; /** SearchView Search icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewSearchIcon=0x7f01005b; /** SearchView text field background for the left section <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewTextField=0x7f01005f; /** SearchView text field background for the right section <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewTextFieldRight=0x7f010060; /** SearchView Voice button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewVoiceIcon=0x7f01005c; /** A style that may be applied to buttons or other selectable items that should react to pressed and focus states, but that do not have a clear visual border along the edges. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int selectableItemBackground=0x7f010015; /** How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> */ public static final int showAsAction=0x7f010049; /** Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> */ public static final int showDividers=0x7f010051; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerDropDownItemStyle=0x7f010054; /** Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> */ public static final int spinnerMode=0x7f01004e; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerStyle=0x7f010053; /** Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int subtitle=0x7f010025; /** Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int subtitleTextStyle=0x7f010027; /** Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". */ public static final int textAllCaps=0x7f010069; /** Text color, typeface, size, and style for the text inside of a popup menu. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceLargePopupMenu=0x7f010010; /** The preferred TextAppearance for the primary text of list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItem=0x7f01001f; /** The preferred TextAppearance for the primary text of small list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItemSmall=0x7f010020; /** Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSearchResultSubtitle=0x7f010063; /** Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSearchResultTitle=0x7f010062; /** Text color, typeface, size, and style for small text inside of a popup menu. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSmallPopupMenu=0x7f010011; /** Text color for urls in search suggestions, used by things like global search <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int textColorSearchUrl=0x7f010064; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int title=0x7f010021; /** Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int titleTextStyle=0x7f010026; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowActionBar=0x7f010000; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowActionBarOverlay=0x7f010001; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowSplitActionBar=0x7f010002; } public static final class bool { public static final int abc_action_bar_embed_tabs_pre_jb=0x7f060000; public static final int abc_action_bar_expanded_action_views_exclusive=0x7f060001; /** Whether action menu items should be displayed in ALLCAPS or not. Defaults to true. If this is not appropriate for specific locales it should be disabled in that locale's resources. */ public static final int abc_config_actionMenuItemAllCaps=0x7f060005; /** Whether action menu items should obey the "withText" showAsAction flag. This may be set to false for situations where space is extremely limited. Whether action menu items should obey the "withText" showAsAction. This may be set to false for situations where space is extremely limited. */ public static final int abc_config_allowActionMenuItemTextWithIcon=0x7f060004; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f060003; public static final int abc_split_action_bar_is_narrow=0x7f060002; } public static final class color { public static final int abc_search_url_text_holo=0x7f070003; public static final int abc_search_url_text_normal=0x7f070000; public static final int abc_search_url_text_pressed=0x7f070002; public static final int abc_search_url_text_selected=0x7f070001; } public static final class dimen { /** Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. */ public static final int abc_action_bar_default_height=0x7f080002; /** Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. */ public static final int abc_action_bar_icon_vertical_padding=0x7f080003; /** Size of the indeterminate Progress Bar Size of the indeterminate Progress Bar */ public static final int abc_action_bar_progress_bar_size=0x7f08000a; /** Maximum height for a stacked tab bar as part of an action bar */ public static final int abc_action_bar_stacked_max_height=0x7f080009; /** Maximum width for a stacked action bar tab. This prevents action bar tabs from becoming too wide on a wide screen when only a few are present. */ public static final int abc_action_bar_stacked_tab_max_width=0x7f080001; /** Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles */ public static final int abc_action_bar_subtitle_bottom_margin=0x7f080007; /** Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles */ public static final int abc_action_bar_subtitle_text_size=0x7f080005; /** Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles */ public static final int abc_action_bar_subtitle_top_margin=0x7f080006; /** Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles */ public static final int abc_action_bar_title_text_size=0x7f080004; /** Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar */ public static final int abc_action_button_min_width=0x7f080008; /** The maximum width we would prefer dialogs to be. 0 if there is no maximum (let them grow as large as the screen). Actual values are specified for -large and -xlarge configurations. see comment in values/config.xml see comment in values/config.xml */ public static final int abc_config_prefDialogWidth=0x7f080000; /** Width of the icon in a dropdown list */ public static final int abc_dropdownitem_icon_width=0x7f080010; /** Text padding for dropdown items */ public static final int abc_dropdownitem_text_padding_left=0x7f08000e; public static final int abc_dropdownitem_text_padding_right=0x7f08000f; public static final int abc_panel_menu_list_width=0x7f08000b; /** Preferred width of the search view. */ public static final int abc_search_view_preferred_width=0x7f08000d; /** Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. */ public static final int abc_search_view_text_min_width=0x7f08000c; /** Default screen margins, per the Android Design guidelines. Example customization of dimensions originally defined in res/values/dimens.xml (such as screen margins) for screens with more than 820dp of available width. This would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). */ public static final int activity_horizontal_margin=0x7f080011; public static final int activity_vertical_margin=0x7f080012; } public static final class drawable { public static final int abc_ab_bottom_solid_dark_holo=0x7f020000; public static final int abc_ab_bottom_solid_light_holo=0x7f020001; public static final int abc_ab_bottom_transparent_dark_holo=0x7f020002; public static final int abc_ab_bottom_transparent_light_holo=0x7f020003; public static final int abc_ab_share_pack_holo_dark=0x7f020004; public static final int abc_ab_share_pack_holo_light=0x7f020005; public static final int abc_ab_solid_dark_holo=0x7f020006; public static final int abc_ab_solid_light_holo=0x7f020007; public static final int abc_ab_stacked_solid_dark_holo=0x7f020008; public static final int abc_ab_stacked_solid_light_holo=0x7f020009; public static final int abc_ab_stacked_transparent_dark_holo=0x7f02000a; public static final int abc_ab_stacked_transparent_light_holo=0x7f02000b; public static final int abc_ab_transparent_dark_holo=0x7f02000c; public static final int abc_ab_transparent_light_holo=0x7f02000d; public static final int abc_cab_background_bottom_holo_dark=0x7f02000e; public static final int abc_cab_background_bottom_holo_light=0x7f02000f; public static final int abc_cab_background_top_holo_dark=0x7f020010; public static final int abc_cab_background_top_holo_light=0x7f020011; public static final int abc_ic_ab_back_holo_dark=0x7f020012; public static final int abc_ic_ab_back_holo_light=0x7f020013; public static final int abc_ic_cab_done_holo_dark=0x7f020014; public static final int abc_ic_cab_done_holo_light=0x7f020015; public static final int abc_ic_clear=0x7f020016; public static final int abc_ic_clear_disabled=0x7f020017; public static final int abc_ic_clear_holo_light=0x7f020018; public static final int abc_ic_clear_normal=0x7f020019; public static final int abc_ic_clear_search_api_disabled_holo_light=0x7f02001a; public static final int abc_ic_clear_search_api_holo_light=0x7f02001b; public static final int abc_ic_commit_search_api_holo_dark=0x7f02001c; public static final int abc_ic_commit_search_api_holo_light=0x7f02001d; public static final int abc_ic_go=0x7f02001e; public static final int abc_ic_go_search_api_holo_light=0x7f02001f; public static final int abc_ic_menu_moreoverflow_normal_holo_dark=0x7f020020; public static final int abc_ic_menu_moreoverflow_normal_holo_light=0x7f020021; public static final int abc_ic_menu_share_holo_dark=0x7f020022; public static final int abc_ic_menu_share_holo_light=0x7f020023; public static final int abc_ic_search=0x7f020024; public static final int abc_ic_search_api_holo_light=0x7f020025; public static final int abc_ic_voice_search=0x7f020026; public static final int abc_ic_voice_search_api_holo_light=0x7f020027; public static final int abc_item_background_holo_dark=0x7f020028; public static final int abc_item_background_holo_light=0x7f020029; public static final int abc_list_divider_holo_dark=0x7f02002a; public static final int abc_list_divider_holo_light=0x7f02002b; public static final int abc_list_focused_holo=0x7f02002c; public static final int abc_list_longpressed_holo=0x7f02002d; public static final int abc_list_pressed_holo_dark=0x7f02002e; public static final int abc_list_pressed_holo_light=0x7f02002f; public static final int abc_list_selector_background_transition_holo_dark=0x7f020030; public static final int abc_list_selector_background_transition_holo_light=0x7f020031; public static final int abc_list_selector_disabled_holo_dark=0x7f020032; public static final int abc_list_selector_disabled_holo_light=0x7f020033; public static final int abc_list_selector_holo_dark=0x7f020034; public static final int abc_list_selector_holo_light=0x7f020035; public static final int abc_menu_dropdown_panel_holo_dark=0x7f020036; public static final int abc_menu_dropdown_panel_holo_light=0x7f020037; public static final int abc_menu_hardkey_panel_holo_dark=0x7f020038; public static final int abc_menu_hardkey_panel_holo_light=0x7f020039; public static final int abc_search_dropdown_dark=0x7f02003a; public static final int abc_search_dropdown_light=0x7f02003b; public static final int abc_spinner_ab_default_holo_dark=0x7f02003c; public static final int abc_spinner_ab_default_holo_light=0x7f02003d; public static final int abc_spinner_ab_disabled_holo_dark=0x7f02003e; public static final int abc_spinner_ab_disabled_holo_light=0x7f02003f; public static final int abc_spinner_ab_focused_holo_dark=0x7f020040; public static final int abc_spinner_ab_focused_holo_light=0x7f020041; public static final int abc_spinner_ab_holo_dark=0x7f020042; public static final int abc_spinner_ab_holo_light=0x7f020043; public static final int abc_spinner_ab_pressed_holo_dark=0x7f020044; public static final int abc_spinner_ab_pressed_holo_light=0x7f020045; public static final int abc_tab_indicator_ab_holo=0x7f020046; public static final int abc_tab_selected_focused_holo=0x7f020047; public static final int abc_tab_selected_holo=0x7f020048; public static final int abc_tab_selected_pressed_holo=0x7f020049; public static final int abc_tab_unselected_pressed_holo=0x7f02004a; public static final int abc_textfield_search_default_holo_dark=0x7f02004b; public static final int abc_textfield_search_default_holo_light=0x7f02004c; public static final int abc_textfield_search_right_default_holo_dark=0x7f02004d; public static final int abc_textfield_search_right_default_holo_light=0x7f02004e; public static final int abc_textfield_search_right_selected_holo_dark=0x7f02004f; public static final int abc_textfield_search_right_selected_holo_light=0x7f020050; public static final int abc_textfield_search_selected_holo_dark=0x7f020051; public static final int abc_textfield_search_selected_holo_light=0x7f020052; public static final int abc_textfield_searchview_holo_dark=0x7f020053; public static final int abc_textfield_searchview_holo_light=0x7f020054; public static final int abc_textfield_searchview_right_holo_dark=0x7f020055; public static final int abc_textfield_searchview_right_holo_light=0x7f020056; public static final int ic_launcher=0x7f020057; } public static final class id { public static final int action_bar=0x7f05001c; public static final int action_bar_activity_content=0x7f050015; public static final int action_bar_container=0x7f05001b; public static final int action_bar_overlay_layout=0x7f05001f; public static final int action_bar_root=0x7f05001a; public static final int action_bar_subtitle=0x7f050023; public static final int action_bar_title=0x7f050022; public static final int action_context_bar=0x7f05001d; public static final int action_menu_divider=0x7f050016; public static final int action_menu_presenter=0x7f050017; public static final int action_mode_close_button=0x7f050024; public static final int action_settings=0x7f050041; public static final int activity_chooser_view_content=0x7f050025; public static final int always=0x7f05000b; public static final int beginning=0x7f050011; public static final int button1=0x7f05003d; public static final int checkbox=0x7f05002d; public static final int collapseActionView=0x7f05000d; public static final int default_activity_button=0x7f050028; public static final int dialog=0x7f05000e; public static final int disableHome=0x7f050008; public static final int dropdown=0x7f05000f; public static final int editText1=0x7f05003f; public static final int editText2=0x7f050040; public static final int edit_query=0x7f050030; public static final int end=0x7f050013; public static final int expand_activities_button=0x7f050026; public static final int expanded_menu=0x7f05002c; public static final int home=0x7f050014; public static final int homeAsUp=0x7f050005; public static final int icon=0x7f05002a; public static final int ifRoom=0x7f05000a; public static final int image=0x7f050027; public static final int listMode=0x7f050001; public static final int list_item=0x7f050029; public static final int middle=0x7f050012; public static final int never=0x7f050009; public static final int none=0x7f050010; public static final int normal=0x7f050000; public static final int progress_circular=0x7f050018; public static final int progress_horizontal=0x7f050019; public static final int radio=0x7f05002f; public static final int search_badge=0x7f050032; public static final int search_bar=0x7f050031; public static final int search_button=0x7f050033; public static final int search_close_btn=0x7f050038; public static final int search_edit_frame=0x7f050034; public static final int search_go_btn=0x7f05003a; public static final int search_mag_icon=0x7f050035; public static final int search_plate=0x7f050036; public static final int search_src_text=0x7f050037; public static final int search_voice_btn=0x7f05003b; public static final int shortcut=0x7f05002e; public static final int showCustom=0x7f050007; public static final int showHome=0x7f050004; public static final int showTitle=0x7f050006; public static final int split_action_bar=0x7f05001e; public static final int submit_area=0x7f050039; public static final int tabMode=0x7f050002; public static final int textView1=0x7f05003c; public static final int textView2=0x7f05003e; public static final int title=0x7f05002b; public static final int top_action_bar=0x7f050020; public static final int up=0x7f050021; public static final int useLogo=0x7f050003; public static final int withText=0x7f05000c; } public static final class integer { /** The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. */ public static final int abc_max_action_buttons=0x7f090000; } public static final class layout { public static final int abc_action_bar_decor=0x7f030000; public static final int abc_action_bar_decor_include=0x7f030001; public static final int abc_action_bar_decor_overlay=0x7f030002; public static final int abc_action_bar_home=0x7f030003; public static final int abc_action_bar_tab=0x7f030004; public static final int abc_action_bar_tabbar=0x7f030005; public static final int abc_action_bar_title_item=0x7f030006; public static final int abc_action_bar_view_list_nav_layout=0x7f030007; public static final int abc_action_menu_item_layout=0x7f030008; public static final int abc_action_menu_layout=0x7f030009; public static final int abc_action_mode_bar=0x7f03000a; public static final int abc_action_mode_close_item=0x7f03000b; public static final int abc_activity_chooser_view=0x7f03000c; public static final int abc_activity_chooser_view_include=0x7f03000d; public static final int abc_activity_chooser_view_list_item=0x7f03000e; public static final int abc_expanded_menu_layout=0x7f03000f; public static final int abc_list_menu_item_checkbox=0x7f030010; public static final int abc_list_menu_item_icon=0x7f030011; public static final int abc_list_menu_item_layout=0x7f030012; public static final int abc_list_menu_item_radio=0x7f030013; public static final int abc_popup_menu_item_layout=0x7f030014; public static final int abc_search_dropdown_item_icons_2line=0x7f030015; public static final int abc_search_view=0x7f030016; public static final int activity_main=0x7f030017; public static final int activity_second=0x7f030018; public static final int support_simple_spinner_dropdown_item=0x7f030019; } public static final class menu { public static final int main=0x7f0c0000; } public static final class string { /** Content description for the action bar "home" affordance. [CHAR LIMIT=NONE] */ public static final int abc_action_bar_home_description=0x7f0a0001; /** Content description for the action bar "up" affordance. [CHAR LIMIT=NONE] */ public static final int abc_action_bar_up_description=0x7f0a0002; /** Content description for the action menu overflow button. [CHAR LIMIT=NONE] */ public static final int abc_action_menu_overflow_description=0x7f0a0003; /** Label for the "Done" button on the far left of action mode toolbars. */ public static final int abc_action_mode_done=0x7f0a0000; /** Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25] */ public static final int abc_activity_chooser_view_see_all=0x7f0a000a; /** ActivityChooserView - accessibility support Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE] */ public static final int abc_activitychooserview_choose_application=0x7f0a0009; /** SearchView accessibility description for clear button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_clear=0x7f0a0006; /** SearchView accessibility description for search text field [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_query=0x7f0a0005; /** SearchView accessibility description for search button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_search=0x7f0a0004; /** SearchView accessibility description for submit button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_submit=0x7f0a0007; /** SearchView accessibility description for voice button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_voice=0x7f0a0008; /** Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static final int abc_shareactionprovider_share_with=0x7f0a000c; /** Description of a share target (both in the list of such or the default share button) in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static final int abc_shareactionprovider_share_with_application=0x7f0a000b; public static final int action_settings=0x7f0a000f; public static final int app_name=0x7f0a000d; public static final int hello_world=0x7f0a000e; } public static final class style { /** Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. Base application theme for API 11+. This theme completely replaces AppBaseTheme from res/values/styles.xml on API 11+ devices. API 11 theme customizations can go here. Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. API 14 theme customizations can go here. */ public static final int AppBaseTheme=0x7f0b0083; /** Application theme. All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f0b0084; /** Mimic text appearance in select_dialog_item.xml */ public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog=0x7f0b0063; public static final int TextAppearance_AppCompat_Base_SearchResult=0x7f0b006d; public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle=0x7f0b006f; /** Search View result styles */ public static final int TextAppearance_AppCompat_Base_SearchResult_Title=0x7f0b006e; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large=0x7f0b0069; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small=0x7f0b006a; public static final int TextAppearance_AppCompat_Light_Base_SearchResult=0x7f0b0070; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle=0x7f0b0072; /** TextAppearance.Holo.Light.SearchResult.* are private so we extend from the default versions instead (which are exactly the same). */ public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title=0x7f0b0071; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large=0x7f0b006b; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small=0x7f0b006c; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f0b0035; public static final int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f0b0034; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f0b0030; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f0b0031; public static final int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f0b0033; public static final int TextAppearance_AppCompat_SearchResult_Title=0x7f0b0032; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f0b001a; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f0b0006; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f0b0008; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f0b0005; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f0b0007; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f0b001e; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f0b0020; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f0b001d; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f0b001f; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu=0x7f0b0054; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle=0x7f0b0056; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse=0x7f0b0058; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title=0x7f0b0055; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse=0x7f0b0057; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle=0x7f0b0051; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse=0x7f0b0053; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title=0x7f0b0050; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse=0x7f0b0052; public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem=0x7f0b0061; public static final int TextAppearance_AppCompat_Widget_DropDownItem=0x7f0b0021; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f0b002e; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f0b002f; public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item=0x7f0b0062; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f0b0028; /** Themes in the "Theme.AppCompat" family will contain an action bar by default. If Holo themes are available on the current platform version they will be used. A limited Holo-styled action bar will be provided on platform versions older than 3.0. (API 11) These theme declarations contain any version-independent specification. Items that need to vary based on platform version should be defined in the corresponding "Theme.Base" theme. Platform-independent theme providing an action bar in a dark-themed activity. */ public static final int Theme_AppCompat=0x7f0b0077; /** Menu/item attributes */ public static final int Theme_AppCompat_Base_CompactMenu=0x7f0b0081; public static final int Theme_AppCompat_Base_CompactMenu_Dialog=0x7f0b0082; /** Menu/item attributes */ public static final int Theme_AppCompat_CompactMenu=0x7f0b007a; public static final int Theme_AppCompat_CompactMenu_Dialog=0x7f0b007b; /** Platform-independent theme providing an action bar in a light-themed activity. */ public static final int Theme_AppCompat_Light=0x7f0b0078; /** Platform-independent theme providing an action bar in a dark-themed activity. */ public static final int Theme_AppCompat_Light_DarkActionBar=0x7f0b0079; /** Base platform-dependent theme */ public static final int Theme_Base=0x7f0b007c; /** Base platform-dependent theme providing an action bar in a dark-themed activity. Base platform-dependent theme providing an action bar in a dark-themed activity. */ public static final int Theme_Base_AppCompat=0x7f0b007e; /** Base platform-dependent theme providing an action bar in a light-themed activity. Base platform-dependent theme providing an action bar in a light-themed activity. */ public static final int Theme_Base_AppCompat_Light=0x7f0b007f; /** Base platform-dependent theme providing a dark action bar in a light-themed activity. Base platform-dependent theme providing a dark action bar in a light-themed activity. */ public static final int Theme_Base_AppCompat_Light_DarkActionBar=0x7f0b0080; /** Base platform-dependent theme providing a light-themed activity. */ public static final int Theme_Base_Light=0x7f0b007d; /** Styles in here can be extended for customisation in your application. Each utilises one of the Base styles. If Holo themes are available on the current platform version they will be used instead of the compat styles. */ public static final int Widget_AppCompat_ActionBar=0x7f0b0000; public static final int Widget_AppCompat_ActionBar_Solid=0x7f0b0002; public static final int Widget_AppCompat_ActionBar_TabBar=0x7f0b0011; public static final int Widget_AppCompat_ActionBar_TabText=0x7f0b0017; public static final int Widget_AppCompat_ActionBar_TabView=0x7f0b0014; public static final int Widget_AppCompat_ActionButton=0x7f0b000b; public static final int Widget_AppCompat_ActionButton_CloseMode=0x7f0b000d; public static final int Widget_AppCompat_ActionButton_Overflow=0x7f0b000f; public static final int Widget_AppCompat_ActionMode=0x7f0b001b; public static final int Widget_AppCompat_ActivityChooserView=0x7f0b0038; public static final int Widget_AppCompat_AutoCompleteTextView=0x7f0b0036; public static final int Widget_AppCompat_Base_ActionBar=0x7f0b003a; public static final int Widget_AppCompat_Base_ActionBar_Solid=0x7f0b003c; public static final int Widget_AppCompat_Base_ActionBar_TabBar=0x7f0b0045; public static final int Widget_AppCompat_Base_ActionBar_TabText=0x7f0b004b; public static final int Widget_AppCompat_Base_ActionBar_TabView=0x7f0b0048; /** Action Button Styles */ public static final int Widget_AppCompat_Base_ActionButton=0x7f0b003f; public static final int Widget_AppCompat_Base_ActionButton_CloseMode=0x7f0b0041; public static final int Widget_AppCompat_Base_ActionButton_Overflow=0x7f0b0043; public static final int Widget_AppCompat_Base_ActionMode=0x7f0b004e; public static final int Widget_AppCompat_Base_ActivityChooserView=0x7f0b0075; /** AutoCompleteTextView styles (for SearchView) */ public static final int Widget_AppCompat_Base_AutoCompleteTextView=0x7f0b0073; public static final int Widget_AppCompat_Base_DropDownItem_Spinner=0x7f0b005d; /** Popup Menu */ public static final int Widget_AppCompat_Base_ListPopupWindow=0x7f0b0065; /** Spinner Widgets */ public static final int Widget_AppCompat_Base_ListView_DropDown=0x7f0b005f; public static final int Widget_AppCompat_Base_ListView_Menu=0x7f0b0064; public static final int Widget_AppCompat_Base_PopupMenu=0x7f0b0067; public static final int Widget_AppCompat_Base_ProgressBar=0x7f0b005a; /** Progress Bar */ public static final int Widget_AppCompat_Base_ProgressBar_Horizontal=0x7f0b0059; /** Action Bar Spinner Widgets */ public static final int Widget_AppCompat_Base_Spinner=0x7f0b005b; public static final int Widget_AppCompat_DropDownItem_Spinner=0x7f0b0024; public static final int Widget_AppCompat_Light_ActionBar=0x7f0b0001; public static final int Widget_AppCompat_Light_ActionBar_Solid=0x7f0b0003; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f0b0004; public static final int Widget_AppCompat_Light_ActionBar_TabBar=0x7f0b0012; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f0b0013; public static final int Widget_AppCompat_Light_ActionBar_TabText=0x7f0b0018; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f0b0019; public static final int Widget_AppCompat_Light_ActionBar_TabView=0x7f0b0015; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f0b0016; public static final int Widget_AppCompat_Light_ActionButton=0x7f0b000c; public static final int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f0b000e; public static final int Widget_AppCompat_Light_ActionButton_Overflow=0x7f0b0010; public static final int Widget_AppCompat_Light_ActionMode_Inverse=0x7f0b001c; public static final int Widget_AppCompat_Light_ActivityChooserView=0x7f0b0039; public static final int Widget_AppCompat_Light_AutoCompleteTextView=0x7f0b0037; public static final int Widget_AppCompat_Light_Base_ActionBar=0x7f0b003b; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid=0x7f0b003d; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse=0x7f0b003e; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar=0x7f0b0046; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse=0x7f0b0047; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText=0x7f0b004c; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse=0x7f0b004d; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView=0x7f0b0049; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse=0x7f0b004a; public static final int Widget_AppCompat_Light_Base_ActionButton=0x7f0b0040; public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode=0x7f0b0042; public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow=0x7f0b0044; public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse=0x7f0b004f; public static final int Widget_AppCompat_Light_Base_ActivityChooserView=0x7f0b0076; public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView=0x7f0b0074; public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner=0x7f0b005e; public static final int Widget_AppCompat_Light_Base_ListPopupWindow=0x7f0b0066; public static final int Widget_AppCompat_Light_Base_ListView_DropDown=0x7f0b0060; public static final int Widget_AppCompat_Light_Base_PopupMenu=0x7f0b0068; public static final int Widget_AppCompat_Light_Base_Spinner=0x7f0b005c; public static final int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f0b0025; public static final int Widget_AppCompat_Light_ListPopupWindow=0x7f0b002a; public static final int Widget_AppCompat_Light_ListView_DropDown=0x7f0b0027; public static final int Widget_AppCompat_Light_PopupMenu=0x7f0b002c; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f0b0023; public static final int Widget_AppCompat_ListPopupWindow=0x7f0b0029; public static final int Widget_AppCompat_ListView_DropDown=0x7f0b0026; public static final int Widget_AppCompat_ListView_Menu=0x7f0b002d; public static final int Widget_AppCompat_PopupMenu=0x7f0b002b; public static final int Widget_AppCompat_ProgressBar=0x7f0b000a; public static final int Widget_AppCompat_ProgressBar_Horizontal=0x7f0b0009; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f0b0022; } public static final class styleable { /** ============================================ Attributes used to style the Action Bar. These should be set on your theme; the default actionBarStyle will propagate them to the correct elements as needed. Please Note: when overriding attributes for an ActionBar style you must specify each attribute twice: once with the "android:" namespace prefix and once without. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBar_background com.example.exercises_invoke_activity:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundSplit com.example.exercises_invoke_activity:backgroundSplit}</code></td><td> Specifies a background drawable for the bottom component of a split action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundStacked com.example.exercises_invoke_activity:backgroundStacked}</code></td><td> Specifies a background drawable for a second stacked row of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_customNavigationLayout com.example.exercises_invoke_activity:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr> <tr><td><code>{@link #ActionBar_displayOptions com.example.exercises_invoke_activity:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr> <tr><td><code>{@link #ActionBar_divider com.example.exercises_invoke_activity:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr> <tr><td><code>{@link #ActionBar_height com.example.exercises_invoke_activity:height}</code></td><td> Specifies a fixed height.</td></tr> <tr><td><code>{@link #ActionBar_homeLayout com.example.exercises_invoke_activity:homeLayout}</code></td><td> Specifies a layout to use for the "home" section of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_icon com.example.exercises_invoke_activity:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr> <tr><td><code>{@link #ActionBar_indeterminateProgressStyle com.example.exercises_invoke_activity:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr> <tr><td><code>{@link #ActionBar_itemPadding com.example.exercises_invoke_activity:itemPadding}</code></td><td> Specifies padding that should be applied to the left and right sides of system-provided items in the bar.</td></tr> <tr><td><code>{@link #ActionBar_logo com.example.exercises_invoke_activity:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr> <tr><td><code>{@link #ActionBar_navigationMode com.example.exercises_invoke_activity:navigationMode}</code></td><td> The type of navigation to use.</td></tr> <tr><td><code>{@link #ActionBar_progressBarPadding com.example.exercises_invoke_activity:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_progressBarStyle com.example.exercises_invoke_activity:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_subtitle com.example.exercises_invoke_activity:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_subtitleTextStyle com.example.exercises_invoke_activity:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionBar_title com.example.exercises_invoke_activity:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_titleTextStyle com.example.exercises_invoke_activity:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionBar_background @see #ActionBar_backgroundSplit @see #ActionBar_backgroundStacked @see #ActionBar_customNavigationLayout @see #ActionBar_displayOptions @see #ActionBar_divider @see #ActionBar_height @see #ActionBar_homeLayout @see #ActionBar_icon @see #ActionBar_indeterminateProgressStyle @see #ActionBar_itemPadding @see #ActionBar_logo @see #ActionBar_navigationMode @see #ActionBar_progressBarPadding @see #ActionBar_progressBarStyle @see #ActionBar_subtitle @see #ActionBar_subtitleTextStyle @see #ActionBar_title @see #ActionBar_titleTextStyle */ public static final int[] ActionBar = { 0x7f010021, 0x7f010022, 0x7f010023, 0x7f010024, 0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033 }; /** <p> @attr description Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:background */ public static final int ActionBar_background = 10; /** <p> @attr description Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:backgroundSplit */ public static final int ActionBar_backgroundSplit = 12; /** <p> @attr description Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:backgroundStacked */ public static final int ActionBar_backgroundStacked = 11; /** <p> @attr description Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:customNavigationLayout */ public static final int ActionBar_customNavigationLayout = 13; /** <p> @attr description Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:displayOptions */ public static final int ActionBar_displayOptions = 3; /** <p> @attr description Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:divider */ public static final int ActionBar_divider = 9; /** <p> @attr description Specifies a fixed height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:height */ public static final int ActionBar_height = 1; /** <p> @attr description Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:homeLayout */ public static final int ActionBar_homeLayout = 14; /** <p> @attr description Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:icon */ public static final int ActionBar_icon = 7; /** <p> @attr description Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:indeterminateProgressStyle */ public static final int ActionBar_indeterminateProgressStyle = 16; /** <p> @attr description Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:itemPadding */ public static final int ActionBar_itemPadding = 18; /** <p> @attr description Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:logo */ public static final int ActionBar_logo = 8; /** <p> @attr description The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:navigationMode */ public static final int ActionBar_navigationMode = 2; /** <p> @attr description Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:progressBarPadding */ public static final int ActionBar_progressBarPadding = 17; /** <p> @attr description Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:progressBarStyle */ public static final int ActionBar_progressBarStyle = 15; /** <p> @attr description Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:subtitle */ public static final int ActionBar_subtitle = 4; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:subtitleTextStyle */ public static final int ActionBar_subtitleTextStyle = 6; /** <p> @attr description Specifies title text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:title */ public static final int ActionBar_title = 0; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:titleTextStyle */ public static final int ActionBar_titleTextStyle = 5; /** Valid LayoutParams for views placed in the action bar as custom views. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarLayout_android_layout_gravity android:layout_gravity}</code></td><td></td></tr> </table> @see #ActionBarLayout_android_layout_gravity */ public static final int[] ActionBarLayout = { 0x010100b3 }; /** <p>This symbol is the offset where the {@link android.R.attr#layout_gravity} attribute's value can be found in the {@link #ActionBarLayout} array. @attr name android:layout_gravity */ public static final int ActionBarLayout_android_layout_gravity = 0; /** These attributes are meant to be specified and customized by the app. The system will read and apply them as needed. These attributes control properties of the activity window, such as whether an action bar should be present and whether it should overlay content. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBar com.example.exercises_invoke_activity:windowActionBar}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay com.example.exercises_invoke_activity:windowActionBarOverlay}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowSplitActionBar com.example.exercises_invoke_activity:windowSplitActionBar}</code></td><td></td></tr> </table> @see #ActionBarWindow_windowActionBar @see #ActionBarWindow_windowActionBarOverlay @see #ActionBarWindow_windowSplitActionBar */ public static final int[] ActionBarWindow = { 0x7f010000, 0x7f010001, 0x7f010002 }; /** <p>This symbol is the offset where the {@link com.example.exercises_invoke_activity.R.attr#windowActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.exercises_invoke_activity:windowActionBar */ public static final int ActionBarWindow_windowActionBar = 0; /** <p>This symbol is the offset where the {@link com.example.exercises_invoke_activity.R.attr#windowActionBarOverlay} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.exercises_invoke_activity:windowActionBarOverlay */ public static final int ActionBarWindow_windowActionBarOverlay = 1; /** <p>This symbol is the offset where the {@link com.example.exercises_invoke_activity.R.attr#windowSplitActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.exercises_invoke_activity:windowSplitActionBar */ public static final int ActionBarWindow_windowSplitActionBar = 2; /** Attributes that can be used with a ActionMenuItemView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMenuItemView_android_minWidth android:minWidth}</code></td><td></td></tr> </table> @see #ActionMenuItemView_android_minWidth */ public static final int[] ActionMenuItemView = { 0x0101013f }; /** <p>This symbol is the offset where the {@link android.R.attr#minWidth} attribute's value can be found in the {@link #ActionMenuItemView} array. @attr name android:minWidth */ public static final int ActionMenuItemView_android_minWidth = 0; /** Size of padding on either end of a divider. */ public static final int[] ActionMenuView = { }; /** Attributes that can be used with a ActionMode. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMode_background com.example.exercises_invoke_activity:background}</code></td><td> Specifies a background for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_backgroundSplit com.example.exercises_invoke_activity:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_height com.example.exercises_invoke_activity:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_subtitleTextStyle com.example.exercises_invoke_activity:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionMode_titleTextStyle com.example.exercises_invoke_activity:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionMode_background @see #ActionMode_backgroundSplit @see #ActionMode_height @see #ActionMode_subtitleTextStyle @see #ActionMode_titleTextStyle */ public static final int[] ActionMode = { 0x7f010022, 0x7f010026, 0x7f010027, 0x7f01002b, 0x7f01002d }; /** <p> @attr description Specifies a background for the action mode bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:background */ public static final int ActionMode_background = 3; /** <p> @attr description Specifies a background for the split action mode bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:backgroundSplit */ public static final int ActionMode_backgroundSplit = 4; /** <p> @attr description Specifies a fixed height for the action mode bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:height */ public static final int ActionMode_height = 0; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:subtitleTextStyle */ public static final int ActionMode_subtitleTextStyle = 2; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:titleTextStyle */ public static final int ActionMode_titleTextStyle = 1; /** Attrbitutes for a ActivityChooserView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable com.example.exercises_invoke_activity:expandActivityOverflowButtonDrawable}</code></td><td> The drawable to show in the button for expanding the activities overflow popup.</td></tr> <tr><td><code>{@link #ActivityChooserView_initialActivityCount com.example.exercises_invoke_activity:initialActivityCount}</code></td><td> The maximal number of items initially shown in the activity list.</td></tr> </table> @see #ActivityChooserView_expandActivityOverflowButtonDrawable @see #ActivityChooserView_initialActivityCount */ public static final int[] ActivityChooserView = { 0x7f010066, 0x7f010067 }; /** <p> @attr description The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:expandActivityOverflowButtonDrawable */ public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; /** <p> @attr description The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:initialActivityCount */ public static final int ActivityChooserView_initialActivityCount = 0; /** Attributes that can be used with a CompatTextView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #CompatTextView_textAllCaps com.example.exercises_invoke_activity:textAllCaps}</code></td><td> Present the text in ALL CAPS.</td></tr> </table> @see #CompatTextView_textAllCaps */ public static final int[] CompatTextView = { 0x7f010069 }; /** <p> @attr description Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:textAllCaps */ public static final int CompatTextView_textAllCaps = 0; /** Attributes that can be used with a LinearLayoutICS. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #LinearLayoutICS_divider com.example.exercises_invoke_activity:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr> <tr><td><code>{@link #LinearLayoutICS_dividerPadding com.example.exercises_invoke_activity:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr> <tr><td><code>{@link #LinearLayoutICS_showDividers com.example.exercises_invoke_activity:showDividers}</code></td><td> Setting for which dividers to show.</td></tr> </table> @see #LinearLayoutICS_divider @see #LinearLayoutICS_dividerPadding @see #LinearLayoutICS_showDividers */ public static final int[] LinearLayoutICS = { 0x7f01002a, 0x7f010051, 0x7f010052 }; /** <p> @attr description Drawable to use as a vertical divider between buttons. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:divider */ public static final int LinearLayoutICS_divider = 0; /** <p> @attr description Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:dividerPadding */ public static final int LinearLayoutICS_dividerPadding = 2; /** <p> @attr description Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:showDividers */ public static final int LinearLayoutICS_showDividers = 1; /** Base attributes that are available to all groups. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuGroup_android_checkableBehavior android:checkableBehavior}</code></td><td> Whether the items are capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td> Whether the items are enabled.</td></tr> <tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td> The ID of the group.</td></tr> <tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td> The category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td> Whether the items are shown/visible.</td></tr> </table> @see #MenuGroup_android_checkableBehavior @see #MenuGroup_android_enabled @see #MenuGroup_android_id @see #MenuGroup_android_menuCategory @see #MenuGroup_android_orderInCategory @see #MenuGroup_android_visible */ public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; /** <p> @attr description Whether the items are capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkableBehavior}. @attr name android:checkableBehavior */ public static final int MenuGroup_android_checkableBehavior = 5; /** <p> @attr description Whether the items are enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuGroup_android_enabled = 0; /** <p> @attr description The ID of the group. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuGroup_android_id = 1; /** <p> @attr description The category applied to all items within this group. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuGroup_android_menuCategory = 3; /** <p> @attr description The order within the category applied to all items within this group. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuGroup_android_orderInCategory = 4; /** <p> @attr description Whether the items are shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuGroup_android_visible = 2; /** Base attributes that are available to all Item objects. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuItem_actionLayout com.example.exercises_invoke_activity:actionLayout}</code></td><td> An optional layout to be used as an action view.</td></tr> <tr><td><code>{@link #MenuItem_actionProviderClass com.example.exercises_invoke_activity:actionProviderClass}</code></td><td> The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item.</td></tr> <tr><td><code>{@link #MenuItem_actionViewClass com.example.exercises_invoke_activity:actionViewClass}</code></td><td> The name of an optional View class to instantiate and use as an action view.</td></tr> <tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td> The alphabetic shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td> Whether the item is capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td> Whether the item is checked.</td></tr> <tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td> Whether the item is enabled.</td></tr> <tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td> The icon associated with this item.</td></tr> <tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td> The ID of the item.</td></tr> <tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td> The category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td> The numeric shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td> Name of a method on the Context used to inflate the menu that will be called when the item is clicked.</td></tr> <tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td> The title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td> The condensed title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td> Whether the item is shown/visible.</td></tr> <tr><td><code>{@link #MenuItem_showAsAction com.example.exercises_invoke_activity:showAsAction}</code></td><td> How this item should display in the Action Bar, if present.</td></tr> </table> @see #MenuItem_actionLayout @see #MenuItem_actionProviderClass @see #MenuItem_actionViewClass @see #MenuItem_android_alphabeticShortcut @see #MenuItem_android_checkable @see #MenuItem_android_checked @see #MenuItem_android_enabled @see #MenuItem_android_icon @see #MenuItem_android_id @see #MenuItem_android_menuCategory @see #MenuItem_android_numericShortcut @see #MenuItem_android_onClick @see #MenuItem_android_orderInCategory @see #MenuItem_android_title @see #MenuItem_android_titleCondensed @see #MenuItem_android_visible @see #MenuItem_showAsAction */ public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c }; /** <p> @attr description An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:actionLayout */ public static final int MenuItem_actionLayout = 14; /** <p> @attr description The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:actionProviderClass */ public static final int MenuItem_actionProviderClass = 16; /** <p> @attr description The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:actionViewClass */ public static final int MenuItem_actionViewClass = 15; /** <p> @attr description The alphabetic shortcut key. This is the shortcut when using a keyboard with alphabetic keys. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#alphabeticShortcut}. @attr name android:alphabeticShortcut */ public static final int MenuItem_android_alphabeticShortcut = 9; /** <p> @attr description Whether the item is capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkable}. @attr name android:checkable */ public static final int MenuItem_android_checkable = 11; /** <p> @attr description Whether the item is checked. Note that you must first have enabled checking with the checkable attribute or else the check mark will not appear. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checked}. @attr name android:checked */ public static final int MenuItem_android_checked = 3; /** <p> @attr description Whether the item is enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuItem_android_enabled = 1; /** <p> @attr description The icon associated with this item. This icon will not always be shown, so the title should be sufficient in describing this item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#icon}. @attr name android:icon */ public static final int MenuItem_android_icon = 0; /** <p> @attr description The ID of the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuItem_android_id = 2; /** <p> @attr description The category applied to the item. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuItem_android_menuCategory = 5; /** <p> @attr description The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key) keyboard. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#numericShortcut}. @attr name android:numericShortcut */ public static final int MenuItem_android_numericShortcut = 10; /** <p> @attr description Name of a method on the Context used to inflate the menu that will be called when the item is clicked. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#onClick}. @attr name android:onClick */ public static final int MenuItem_android_onClick = 12; /** <p> @attr description The order within the category applied to the item. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuItem_android_orderInCategory = 6; /** <p> @attr description The title associated with the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#title}. @attr name android:title */ public static final int MenuItem_android_title = 7; /** <p> @attr description The condensed title associated with the item. This is used in situations where the normal title may be too long to be displayed. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#titleCondensed}. @attr name android:titleCondensed */ public static final int MenuItem_android_titleCondensed = 8; /** <p> @attr description Whether the item is shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuItem_android_visible = 4; /** <p> @attr description How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:showAsAction */ public static final int MenuItem_showAsAction = 13; /** Attributes that can be used with a MenuView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuView_android_headerBackground android:headerBackground}</code></td><td> Default background for the menu header.</td></tr> <tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td> Default horizontal divider between rows of menu items.</td></tr> <tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td> Default background for each menu item.</td></tr> <tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td> Default disabled icon alpha for each menu item that shows an icon.</td></tr> <tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td> Default appearance of menu item text.</td></tr> <tr><td><code>{@link #MenuView_android_preserveIconSpacing android:preserveIconSpacing}</code></td><td> Whether space should be reserved in layout when an icon is missing.</td></tr> <tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td> Default vertical divider between menu items.</td></tr> <tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td> Default animations for the menu.</td></tr> </table> @see #MenuView_android_headerBackground @see #MenuView_android_horizontalDivider @see #MenuView_android_itemBackground @see #MenuView_android_itemIconDisabledAlpha @see #MenuView_android_itemTextAppearance @see #MenuView_android_preserveIconSpacing @see #MenuView_android_verticalDivider @see #MenuView_android_windowAnimationStyle */ public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x01010435 }; /** <p> @attr description Default background for the menu header. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#headerBackground}. @attr name android:headerBackground */ public static final int MenuView_android_headerBackground = 4; /** <p> @attr description Default horizontal divider between rows of menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#horizontalDivider}. @attr name android:horizontalDivider */ public static final int MenuView_android_horizontalDivider = 2; /** <p> @attr description Default background for each menu item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemBackground}. @attr name android:itemBackground */ public static final int MenuView_android_itemBackground = 5; /** <p> @attr description Default disabled icon alpha for each menu item that shows an icon. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemIconDisabledAlpha}. @attr name android:itemIconDisabledAlpha */ public static final int MenuView_android_itemIconDisabledAlpha = 6; /** <p> @attr description Default appearance of menu item text. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemTextAppearance}. @attr name android:itemTextAppearance */ public static final int MenuView_android_itemTextAppearance = 1; /** <p> @attr description Whether space should be reserved in layout when an icon is missing. <p>This is a private symbol. @attr name android:preserveIconSpacing */ public static final int MenuView_android_preserveIconSpacing = 7; /** <p> @attr description Default vertical divider between menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#verticalDivider}. @attr name android:verticalDivider */ public static final int MenuView_android_verticalDivider = 3; /** <p> @attr description Default animations for the menu. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#windowAnimationStyle}. @attr name android:windowAnimationStyle */ public static final int MenuView_android_windowAnimationStyle = 0; /** Attributes that can be used with a SearchView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td> The IME options to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td> The input type to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td> An optional maximum width of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_iconifiedByDefault com.example.exercises_invoke_activity:iconifiedByDefault}</code></td><td> The default state of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_queryHint com.example.exercises_invoke_activity:queryHint}</code></td><td> An optional query hint string to be displayed in the empty query field.</td></tr> </table> @see #SearchView_android_imeOptions @see #SearchView_android_inputType @see #SearchView_android_maxWidth @see #SearchView_iconifiedByDefault @see #SearchView_queryHint */ public static final int[] SearchView = { 0x0101011f, 0x01010220, 0x01010264, 0x7f010056, 0x7f010057 }; /** <p> @attr description The IME options to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#imeOptions}. @attr name android:imeOptions */ public static final int SearchView_android_imeOptions = 2; /** <p> @attr description The input type to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#inputType}. @attr name android:inputType */ public static final int SearchView_android_inputType = 1; /** <p> @attr description An optional maximum width of the SearchView. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#maxWidth}. @attr name android:maxWidth */ public static final int SearchView_android_maxWidth = 0; /** <p> @attr description The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:iconifiedByDefault */ public static final int SearchView_iconifiedByDefault = 3; /** <p> @attr description An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:queryHint */ public static final int SearchView_queryHint = 4; /** Attributes that can be used with a Spinner. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Spinner_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td> Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td> List selector to use for spinnerMode="dropdown" display.</td></tr> <tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td> Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td> Width of the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td> Gravity setting for positioning the currently selected item.</td></tr> <tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td> Background drawable to use for the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_disableChildrenWhenDisabled com.example.exercises_invoke_activity:disableChildrenWhenDisabled}</code></td><td> Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled.</td></tr> <tr><td><code>{@link #Spinner_popupPromptView com.example.exercises_invoke_activity:popupPromptView}</code></td><td> Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_prompt com.example.exercises_invoke_activity:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr> <tr><td><code>{@link #Spinner_spinnerMode com.example.exercises_invoke_activity:spinnerMode}</code></td><td> Display mode for spinner options.</td></tr> </table> @see #Spinner_android_dropDownHorizontalOffset @see #Spinner_android_dropDownSelector @see #Spinner_android_dropDownVerticalOffset @see #Spinner_android_dropDownWidth @see #Spinner_android_gravity @see #Spinner_android_popupBackground @see #Spinner_disableChildrenWhenDisabled @see #Spinner_popupPromptView @see #Spinner_prompt @see #Spinner_spinnerMode */ public static final int[] Spinner = { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050 }; /** <p> @attr description Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownHorizontalOffset}. @attr name android:dropDownHorizontalOffset */ public static final int Spinner_android_dropDownHorizontalOffset = 4; /** <p> @attr description List selector to use for spinnerMode="dropdown" display. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownSelector}. @attr name android:dropDownSelector */ public static final int Spinner_android_dropDownSelector = 1; /** <p> @attr description Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownVerticalOffset}. @attr name android:dropDownVerticalOffset */ public static final int Spinner_android_dropDownVerticalOffset = 5; /** <p> @attr description Width of the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownWidth}. @attr name android:dropDownWidth */ public static final int Spinner_android_dropDownWidth = 3; /** <p> @attr description Gravity setting for positioning the currently selected item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#gravity}. @attr name android:gravity */ public static final int Spinner_android_gravity = 0; /** <p> @attr description Background drawable to use for the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#popupBackground}. @attr name android:popupBackground */ public static final int Spinner_android_popupBackground = 2; /** <p> @attr description Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:disableChildrenWhenDisabled */ public static final int Spinner_disableChildrenWhenDisabled = 9; /** <p> @attr description Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:popupPromptView */ public static final int Spinner_popupPromptView = 8; /** <p> @attr description The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:prompt */ public static final int Spinner_prompt = 6; /** <p> @attr description Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:spinnerMode */ public static final int Spinner_spinnerMode = 7; /** These are the standard attributes that make up a complete theme. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Theme_actionDropDownStyle com.example.exercises_invoke_activity:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr> <tr><td><code>{@link #Theme_dropdownListPreferredItemHeight com.example.exercises_invoke_activity:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr> <tr><td><code>{@link #Theme_listChoiceBackgroundIndicator com.example.exercises_invoke_activity:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr> <tr><td><code>{@link #Theme_panelMenuListTheme com.example.exercises_invoke_activity:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr> <tr><td><code>{@link #Theme_panelMenuListWidth com.example.exercises_invoke_activity:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr> <tr><td><code>{@link #Theme_popupMenuStyle com.example.exercises_invoke_activity:popupMenuStyle}</code></td><td> Default PopupMenu style.</td></tr> </table> @see #Theme_actionDropDownStyle @see #Theme_dropdownListPreferredItemHeight @see #Theme_listChoiceBackgroundIndicator @see #Theme_panelMenuListTheme @see #Theme_panelMenuListWidth @see #Theme_popupMenuStyle */ public static final int[] Theme = { 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048 }; /** <p> @attr description Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:actionDropDownStyle */ public static final int Theme_actionDropDownStyle = 0; /** <p> @attr description The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:dropdownListPreferredItemHeight */ public static final int Theme_dropdownListPreferredItemHeight = 1; /** <p> @attr description Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:listChoiceBackgroundIndicator */ public static final int Theme_listChoiceBackgroundIndicator = 5; /** <p> @attr description Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:panelMenuListTheme */ public static final int Theme_panelMenuListTheme = 4; /** <p> @attr description Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:panelMenuListWidth */ public static final int Theme_panelMenuListWidth = 3; /** <p> @attr description Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:popupMenuStyle */ public static final int Theme_popupMenuStyle = 2; /** Attributes that can be used with a View. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td> Boolean that controls whether a view can take focus.</td></tr> <tr><td><code>{@link #View_paddingEnd com.example.exercises_invoke_activity:paddingEnd}</code></td><td> Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.</td></tr> <tr><td><code>{@link #View_paddingStart com.example.exercises_invoke_activity:paddingStart}</code></td><td> Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.</td></tr> </table> @see #View_android_focusable @see #View_paddingEnd @see #View_paddingStart */ public static final int[] View = { 0x010100da, 0x7f010034, 0x7f010035 }; /** <p> @attr description Boolean that controls whether a view can take focus. By default the user can not move focus to a view; by setting this attribute to true the view is allowed to take focus. This value does not impact the behavior of directly calling {@link android.view.View#requestFocus}, which will always request focus regardless of this view. It only impacts where focus navigation will try to move focus. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#focusable}. @attr name android:focusable */ public static final int View_android_focusable = 0; /** <p> @attr description Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:paddingEnd */ public static final int View_paddingEnd = 2; /** <p> @attr description Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.exercises_invoke_activity:paddingStart */ public static final int View_paddingStart = 1; }; }
5513ac9cfd06ce376a6a0dac18c507ccb73871a5
41ccf6613996afd27bed1129ad7124d450efdc71
/sc-facade/sc-facade-service/src/main/java/com/yatang/sc/facade/domain/ProdSellPriceUpdateParamPo.java
b1de26bfff71cd347f908811570253f6997e51c4
[]
no_license
sengeiou/demo-1
ea02da49043080694f5d6d1554e5a7766bae3ca6
a15185df951c12ac863ce530f824d0280b8e7e8a
refs/heads/master
2021-09-09T10:18:06.081572
2018-03-15T04:19:37
2018-03-15T04:19:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
620
java
package com.yatang.sc.facade.domain; import lombok.Data; import java.util.Date; @Data public class ProdSellPriceUpdateParamPo { /**上传ID*/ private Long importsId; /**子公司ID*/ private String branchCompanyId; /**商品ID*/ private String productId; /**处理结果*/ private Integer handleResult; /**上传开始日期*/ private Date uploadStartDate; /**上传结束日期*/ private Date uploadEndDate; /**用户ID*/ private String userId; /**每页显示条数*/ private Integer pageSize; /**页码*/ private Integer pageNum; }
58c5e2389420c1f912421728186699c84de38694
e36346868cf71b56076de5b5c1452cea2beb4ca4
/src/main/java/top/fuyuaaa/shadowpuppets/model/vo/CourseVO.java
8f5a0afd8c8b8d06bf8134f161275cded35bcb10
[]
no_license
fuyuaaa/shadow-puppets
4f4a328202b3836d5bbe24188ca0786143cc01f1
b4b0b9c140ec6e5601602d96491e1bb44b435a0b
refs/heads/master
2022-06-25T08:23:02.519126
2020-06-01T02:14:17
2020-06-01T02:14:17
179,556,142
1
0
null
2022-06-17T02:07:23
2019-04-04T18:43:01
Java
UTF-8
Java
false
false
764
java
package top.fuyuaaa.shadowpuppets.model.vo; import lombok.Data; import top.fuyuaaa.shadowpuppets.model.BaseModel; import java.io.Serializable; import java.math.BigDecimal; /** * @author: fuyuaaa * @creat: 2019-05-01 15:44 */ @Data public class CourseVO implements Serializable { private static final long serialVersionUID = 853893204589797102L; private Integer id; private String courseName; private String courseIntroduction; private String mainImageUrl; private BigDecimal courseOriginPrice; private BigDecimal courseDiscountPrice; private String teacherName; private String teacherTel; private Integer courseHours; private Integer paidNumber; private String coursePlace; private String courseContent; }
eb8f384701525d71fdea7c2547fd59f9ab552bf3
47bb1ac556f6b0ee8aae1846cf98ed6f32312fce
/app/src/main/java/com/freud/mrzz/utils/WidgetController.java
3461043b014e875392c592bf7844e6429f442588
[]
no_license
rivalnhwc/Mrzz
06cfdd4bbf1ea3f168faa0995c5d76dc37f32b46
d1521e3daef3a21aa5e39e866d163685938b1c63
refs/heads/master
2020-05-19T12:59:04.358280
2015-04-21T05:31:07
2015-04-21T05:31:07
32,459,518
1
1
null
2015-04-21T05:31:07
2015-03-18T13:13:40
Java
UTF-8
Java
false
false
2,546
java
package com.freud.mrzz.utils; import android.view.View; import android.view.ViewGroup.MarginLayoutParams; import android.widget.RelativeLayout; /* * 获取、设置控件信息 */ public class WidgetController { /* * 获取控件宽 */ public static int getWidth(View view) { int w = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED); int h = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED); view.measure(w, h); return (view.getMeasuredWidth()); } /* * 获取控件高 */ public static int getHeight(View view) { int w = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED); int h = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED); view.measure(w, h); return (view.getMeasuredHeight()); } /* * 设置控件所在的位置X,并且不改变宽高, * X为绝对位置,此时Y可能归0 */ public static void setLayoutX(View view,int x) { MarginLayoutParams margin=new MarginLayoutParams(view.getLayoutParams()); margin.setMargins(x,margin.topMargin, x+margin.width, margin.bottomMargin); RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(margin); view.setLayoutParams(layoutParams); } /* * 设置控件所在的位置Y,并且不改变宽高, * Y为绝对位置,此时X可能归0 */ public static void setLayoutY(View view,int y) { MarginLayoutParams margin=new MarginLayoutParams(view.getLayoutParams()); margin.setMargins(margin.leftMargin,y, margin.rightMargin, y+margin.height); RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(margin); view.setLayoutParams(layoutParams); } /* * 设置控件所在的位置YY,并且不改变宽高, * XY为绝对位置 */ public static void setLayout(View view,int x,int y) { MarginLayoutParams margin=new MarginLayoutParams(view.getLayoutParams()); margin.setMargins(x,y, 0,0); RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(margin); view.setLayoutParams(layoutParams); } public static void setLayout(View view,int x,int y,int width,int height) { // MarginLayoutParams margin=new MarginLayoutParams(view.getLayoutParams()); // margin.setMargins(x,y, x+margin.width, y+margin.height); RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(width,height); layoutParams.setMargins(x,y, 0, 0); view.setLayoutParams(layoutParams); } }
539a17f5acc181d0b8be3e8cc5b1c5819610c2d9
938b5d0802b633a6f40242c24a28ddccbfa057d2
/src/main/java/com/fpms/dto/RolePrivilegeDto.java
f16bccde5d1ee6b57c63e3d1bbbed8e5bb25e180
[]
no_license
financial-product-management-system/FPMS
b3c134fa130931f4a50d6516c6ac164a099043e7
0f40e412a8ef091a5ce87eca038c18d791fac3fd
refs/heads/master
2022-06-23T05:39:35.046832
2019-10-10T08:40:30
2019-10-10T08:40:30
190,691,857
0
0
null
2022-06-17T02:33:55
2019-06-07T05:17:57
Java
UTF-8
Java
false
false
1,063
java
package com.fpms.dto; import com.fpms.entity.Privilege; import java.util.Date; import java.util.List; /** * @author : TianHong Liao * @date : 2019/6/18 23:17 * @description:角色与权限的关联信息封装类 * @modified : */ public class RolePrivilegeDto { private Integer roleId; private String roleName; private List<Privilege> privilegeList; private Date createTime; public String getRoleName() { return roleName; } public void setRoleName(String roleName) { this.roleName = roleName; } public List<Privilege> getPrivilegeList() { return privilegeList; } public void setPrivilegeList(List<Privilege> privilegeList) { this.privilegeList = privilegeList; } public Integer getRoleId() { return roleId; } public void setRoleId(Integer roleId) { this.roleId = roleId; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } }
d9d8048f80aaf297ea3a249c371e71100b93575e
17f541fcde1a485b9b80065b3a66be0bd3cfce45
/src/main/java/org/jensoft/core/plugin/PluginException.java
9572e88b53b9754b54d8dae3c30214176bb4f3c1
[]
no_license
wyrover/jensoft-core
6a3285346fd7aaa69e7ef4e99266eee581e02db6
87eba8fd035694cebcaeeb8ae2257010c4706296
refs/heads/master
2020-04-11T06:11:22.006038
2017-05-28T22:17:06
2017-05-28T22:17:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,034
java
/* * Copyright (c) JenSoft API * This source file is part of JenSoft API, All rights reserved. * JENSOFT PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org.jensoft.core.plugin; /** * <code>PluginException</code> is the superclass of those * plugin exceptions that can be thrown during the normal operation of the * Java Virtual Machine. * <p> * A method is not required to declare in its <code>throws</code> clause any subclasses of <code>PluginException</code> * that might be thrown during the execution of the method but not caught. * * @since 1.0 * @author sebastien janaud */ public class PluginException extends RuntimeException { private static final long serialVersionUID = -8761479158358303093L; /** * Constructs a new runtime exception with <code>null</code> as its * detail message. The cause is not initialized, and may subsequently be * initialized by a call to {@link #initCause}. */ public PluginException() { super(); } /** * Constructs a new runtime exception with the specified detail message. * The cause is not initialized, and may subsequently be initialized by a * call to {@link #initCause}. * * @param message * the detail message. The detail message is saved for * later retrieval by the {@link #getMessage()} method. */ public PluginException(String message) { super(message); } /** * Constructs a new runtime exception with the specified cause and a * detail message of <tt>(cause==null ? null : cause.toString())</tt> (which typically contains the class and detail * message of <tt>cause</tt>). This constructor is useful for runtime exceptions * that are little more than wrappers for other throwables. * * @param cause * the cause (which is saved for later retrieval by the {@link #getCause()} method). (A <tt>null</tt> * value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.0 */ public PluginException(Throwable cause) { super(cause); } /** * Constructs a new runtime exception with the specified detail message and * cause. * <p> * Note that the detail message associated with <code>cause</code> is <i>not</i> automatically incorporated in this * runtime exception's detail message. * * @param message * the detail message (which is saved for later retrieval * by the {@link #getMessage()} method). * @param cause * the cause (which is saved for later retrieval by the {@link #getCause()} method). (A <tt>null</tt> * value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.0 */ public PluginException(String message, Throwable cause) { super(message, cause); } }
75861da23730be0f587513166ae22e3666222204
ca3fa596d50944a37ce45ff9217b6bad209d7853
/RxTools-library/src/main/java/com/vondear/rxtools/RxConstants.java
469256241271f0d43cfba4511b1113cb12e04dfe
[]
no_license
w1984908499/RxTools
f06c6b1656926df47a54b9222cf450f0db5b9ce0
177627ede0e69eebc2cb656388f8dbaff7274700
refs/heads/master
2021-01-23T07:44:28.064463
2017-03-27T09:02:20
2017-03-27T09:02:20
86,439,408
1
0
null
2017-03-28T09:14:30
2017-03-28T09:14:29
null
UTF-8
Java
false
false
2,611
java
package com.vondear.rxtools; /** * Created by vondear on 2017/1/13. */ public class RxConstants { //----------------------------------------------------常用链接- start ------------------------------------------------------------ /** * RxTools的Github地址 */ public static final String URL_VONTOOLS = "https://github.com/vondear/RxTools"; /** * 百度文字搜索 */ public static final String URL_BAIDU_SEARCH = "http://www.baidu.com/s?wd="; /** * ACFUN */ public static final String URL_ACFUN = "http://www.acfun.tv/"; public static final String URL_JPG_TO_FONT = "http://ku.cndesign.com/pic/"; //===================================================常用链接== end ============================================================== //------------------------------------------煎蛋 API start-------------------------------------- public static String URL_JOKE = "http://ic.snssdk.com/neihan/stream/mix/v1/?" + "mpic=1&essence=1" + "&content_type=-102" + "&message_cursor=-1" + "&bd_Stringitude=113.369569" + "&bd_latitude=23.149678" + "&bd_city=%E5%B9%BF%E5%B7%9E%E5%B8%82" + "&am_Stringitude=113.367846" + "&am_latitude=23.149878" + "&am_city=%E5%B9%BF%E5%B7%9E%E5%B8%82" + "&am_loc_time=1465213692154&count=30" + "&min_time=1465213700&screen_width=720&iid=4512422578" + "&device_id=17215021497" + "&ac=wifi" + "&channel=NHSQH5AN" + "&aid=7" + "&app_name=joke_essay" + "&version_code=431" + "&device_platform=android" + "&ssmix=a" + "&device_type=6s+Plus" + "&os_api=19" + "&os_version=4.4.2" + "&uuid=864394108025091" + "&openudid=80FA5B208E050000" + "&manifest_version_code=431"; public static final String URL_BORING_PICTURE = "http://jandan.net/?oxwlxojflwblxbsapi=jandan.get_pic_comments&page="; public static final String URL_PERI_PICTURE = "http://jandan.net/?oxwlxojflwblxbsapi=jandan.get_ooxx_comments&page="; public static final String URL_JOKE_MUSIC = "http://route.showapi.com/255-1?type=31&showapi_appid=20569&showapi_sign=0707a6bfb3e842fb8c8aa450012d9756&page="; //==========================================煎蛋 API end========================================= public static final String SP_MADE_CODE = "MADE_CODE"; public static final String SP_SCAN_CODE = "SCAN_CODE"; }
d7d56367dc6f8143b1bae90f72a23de2dacccbba
30d4ce201e7c075a1c520f066a7d022d068f57bf
/app/src/main/java/com/yanhao/main/yanhaoandroid/bottomBar/library/DefaultModeBuilder.java
acfab11d821d642c78c8fb2665ced478378b55b4
[]
no_license
kiyybery/YanHaoAndroid
0bc4408fa47b11150db0521d3bc09c2b78880eef
3fc2f2a157729f78a338fe37c25a28ec1d9956af
refs/heads/master
2021-01-10T08:28:39.341972
2016-03-16T01:28:14
2016-03-16T01:28:14
45,671,148
0
0
null
null
null
null
UTF-8
Java
false
false
2,966
java
package com.yanhao.main.yanhaoandroid.bottomBar.library; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.widget.LinearLayout.LayoutParams; import java.util.List; public class DefaultModeBuilder implements IBuilderDefault{ private PagerBottomTabStrip mPagerBottomTabStrip; private List<Tabstrip> mTabstrips; private int mCount; private Context mContext; public DefaultModeBuilder(PagerBottomTabStrip pagerBottomTabStrip,List<Tabstrip> tabstrips,Context context) { mPagerBottomTabStrip = pagerBottomTabStrip; mCount = tabstrips.size(); mTabstrips = tabstrips; mContext = context; } @Override public void build() { for (int i = 0; i < mCount; i++) { Tabstrip tabstrip = mTabstrips.get(i); tabstrip.configure(mContext,tabstrip.MODE_DEFAULT); mPagerBottomTabStrip.addView(tabstrip); LayoutParams lp = (LayoutParams) tabstrip.getLayoutParams(); lp.width = 0; lp.weight = 1; lp.height = LayoutParams.MATCH_PARENT; tabstrip.setLayoutParams(lp); } mTabstrips.get(0).setBitmapAlpha(1.0f); } @Override public IBuilderDefault TabTextSize(int textsize) { for (int i = 0; i < mCount; i++) { mTabstrips.get(i).setTabTextSize(Utils.dp2px(mContext, textsize)); } return this; } @Override public IBuilderDefault TabPadding(int padding) { for (int i = 0; i < mCount; i++) { mTabstrips.get(i).setTabPadding( (int) Utils.dp2px(mContext, padding)); } return this; } @Override public IBuilderDefault TabTextColor(int textcolor) { for (int i = 0; i < mCount; i++) { mTabstrips.get(i).setTabTextColor(textcolor); } return this; } @Override public IBuilderDefault TabClickTextColor(int clicktextcolor) { for (int i = 0; i < mCount; i++) { mTabstrips.get(i).setTabClickTextColor(clicktextcolor); } return this; } @Override public IBuilderDefault TabMessageBackgroundColor(int backgroundcolor) { for (int i = 0; i < mCount; i++) { mTabstrips.get(i).setTabMessageBackgroundColor(backgroundcolor); } return this; } @Override public IBuilderDefault TabMessageTextColor(int textcolor) { for (int i = 0; i < mCount; i++) { mTabstrips.get(i).setTabMessageTextColor(textcolor); } return this; } @Override public IBuilderDefault TabIcon(int[] resids) { for (int i = 0; i < resids.length; i++) { Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), resids[i]); mTabstrips.get(i).setTabIcon(bitmap); } return this; } @Override public IBuilderDefault TabClickIcon(int[] resids) { for (int i = 0; i < resids.length; i++) { Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), resids[i]); mTabstrips.get(i).setTabClickIcon(bitmap); } return this; } @Override public IBuilderDefault TabBackground(int resid) { for (int i = 0; i < mCount; i++) { mTabstrips.get(i).setTabBackground(resid); } return this; } }
70778deef481cc0b35b0b66a6d8a2aed6626cab7
7d32b145daf44ada2c030af30efb2310cddde788
/app/src/main/java/com/mukeshproject/zomatoguide/restaurantpage/HasMenuStatus.java
64b637747665cc297443e7c986ec862aef18e82d
[]
no_license
MukeshKumar1699/Zomato-Guide
3ccd95676953bcf1d11befb32a6e52ac88e49d16
ca7f62aa903ddbb8d4f49297f117c89f7d9382ae
refs/heads/master
2023-05-06T03:27:10.431448
2021-06-02T11:49:14
2021-06-02T11:49:14
329,072,159
0
0
null
null
null
null
UTF-8
Java
false
false
381
java
package com.mukeshproject.zomatoguide.restaurantpage; import com.google.gson.annotations.SerializedName; public class HasMenuStatus { @SerializedName("delivery") private int delivery; @SerializedName("takeaway") private int takeaway; public int getDelivery() { return delivery; } public int getTakeaway() { return takeaway; } }
e77a2ade9be94257d3f11d0e0df0f8aa10ca0b69
16fd4dd436256f7d2da56ab05c549721cd237eda
/src/test/java/br/ce/wcaquino/functional/TaskTest.java
a75bb744ec8fa59f3ff5573b5ca4189b41d0f173
[]
no_license
tenoriio7/functional-tests
1713b78128e49dc234ab8d0b6def08ded401048d
37c2f01006b79727641723be53e36e4130d0cd17
refs/heads/master
2023-04-07T23:36:34.700975
2021-04-03T03:12:54
2021-04-03T03:12:54
354,184,372
0
0
null
null
null
null
UTF-8
Java
false
false
1,707
java
package br.ce.wcaquino.functional; import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import net.bytebuddy.utility.RandomString; public class TaskTest { @Test public void testAmbiente() { WebDriver driver = new ChromeDriver (); driver.navigate().to("http://localhost:8001/tasks/"); driver.findElement(By.id("addTodo")).click(); driver.findElement(By.id("task")).sendKeys("vinicin"); driver.findElement(By.id("dueDate")).sendKeys("10/10/2030"); driver.findElement(By.id("saveButton")).click(); Assert.assertEquals("Sucess!", driver.findElement(By.id("message")).getText()); driver.close(); driver.quit(); } public void testAmbiente2() { WebDriver driver = new ChromeDriver (); driver.navigate().to("http://localhost:8001/tasks/"); driver.findElement(By.id("addTodo")).click(); driver.findElement(By.id("task")).sendKeys("vinicin"); driver.findElement(By.id("dueDate")).sendKeys("10/10/2030"); driver.findElement(By.id("saveButton")).click(); Assert.assertEquals("Sucess!", driver.findElement(By.id("message")).getText()); driver.close(); driver.quit(); } public void testAmbiente3() { WebDriver driver = new ChromeDriver (); driver.navigate().to("http://localhost:8001/tasks/"); driver.findElement(By.id("addTodo")).click(); driver.findElement(By.id("task")).sendKeys("vinicin"); driver.findElement(By.id("dueDate")).sendKeys("10/10/2030"); driver.findElement(By.id("saveButton")).click(); Assert.assertEquals("Sucess!", driver.findElement(By.id("message")).getText()); driver.close(); driver.quit(); } }
6b3ed8e3adc9168c8e6b047c5a84ce29b2cf6585
c55dc547f02573faa67148ad271de4b8bd486a8a
/part08-Part08_02.AverageOfPositiveNumbers/src/main/java/AverageOfPositiveNumbers.java
e4dcc967d4ffed9b6f84c005eb5cf2c6e237558e
[]
no_license
Miguel-Barca/Java_programming_II_mooc_fi
8daab642b52ef58c62d803d7790baac43bbfb919
cc531f2a5b714fe5e519a1f1fa3a0bb74bf0863b
refs/heads/main
2023-03-26T05:36:08.202769
2021-03-16T11:06:57
2021-03-16T11:06:57
342,852,936
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
import java.util.ArrayList; import java.util.Scanner; public class AverageOfPositiveNumbers { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); ArrayList<Integer> numbers = new ArrayList<>(); while(true) { int userInput = Integer.valueOf(scanner.nextLine()); if(userInput == 0) { if(numbers.size() == 0){ System.out.println("Cannot calculate the average"); break; } System.out.println(avgPositiveNumbers(numbers)); break; } else { numbers.add(userInput); } } } public static double avgPositiveNumbers(ArrayList<Integer> numbers) { int sum = 0; int positiveNumbers = 0; for(int i = 0; i < numbers.size(); i++) { if(numbers.get(i) > 0) { sum += numbers.get(i); positiveNumbers++; } } return 1.0 * sum / positiveNumbers; } }
e8b2c641f53cff8a245bb804c69d890a649c77dd
473fc28d466ddbe9758ca49c7d4fb42e7d82586e
/app/src/main/java/com/syd/source/aosp/external/r8/src/main/java/com/android/tools/r8/code/Format21s.java
79d15ab84928bee0372c117472f798547ab1c9ec
[]
no_license
lz-purple/Source
a7788070623f2965a8caa3264778f48d17372bab
e2745b756317aac3c7a27a4c10bdfe0921a82a1c
refs/heads/master
2020-12-23T17:03:12.412572
2020-01-31T01:54:37
2020-01-31T01:54:37
237,205,127
4
2
null
null
null
null
UTF-8
Java
false
false
1,815
java
// Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. package com.android.tools.r8.code; import com.android.tools.r8.dex.Constants; import com.android.tools.r8.dex.IndexedItemCollection; import com.android.tools.r8.graph.ObjectToOffsetMapping; import com.android.tools.r8.naming.ClassNameMapper; import com.android.tools.r8.utils.StringUtils; import java.nio.ShortBuffer; abstract class Format21s extends Base2Format { public final int AA; public final int BBBB; // AA | op | #+BBBB /*package*/ Format21s(int high, BytecodeStream stream) { super(stream); AA = high; BBBB = readSigned16BitValue(stream); } /*package*/ Format21s(int AA, int BBBB) { assert Short.MIN_VALUE <= BBBB && BBBB <= Short.MAX_VALUE; assert 0 <= AA && AA <= Constants.U8BIT_MAX; this.AA = AA; this.BBBB = BBBB; } public void write(ShortBuffer dest, ObjectToOffsetMapping mapping) { writeFirst(AA, dest); write16BitValue(BBBB, dest); } public final int hashCode() { return ((BBBB << 8) | AA) ^ getClass().hashCode(); } public final boolean equals(Object other) { if (other == null || this.getClass() != other.getClass()) { return false; } Format21s o = (Format21s) other; return o.AA == AA && o.BBBB == BBBB; } public String toString(ClassNameMapper naming) { return formatString("v" + AA + ", #" + BBBB); } public String toSmaliString(ClassNameMapper naming) { return formatSmaliString("v" + AA + ", 0x" + StringUtils.hexString(BBBB, 4) + " # " + BBBB); } @Override public void collectIndexedItems(IndexedItemCollection indexedItems) { // No references. } }
89605349b5f5953d1f695cb544672ffc13a9cfac
3fc67eca40fe9749bcc59c1e31c4449b93b34db8
/src/main/java/org/ng/undp/vdms/customannotations/constants/AuditingActionType.java
43a59df3c7da18599c7dc0209f4334604e530dc6
[]
no_license
KingsleyEze/Vendo-Management-System
b3b1ca8a8687276b73c76dc961904a52e1b51963
de65c02b8ff583d88671683dc24cd093a073651c
refs/heads/master
2021-01-01T06:24:12.185068
2017-07-17T01:13:46
2017-07-17T01:13:46
97,421,615
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
package org.ng.undp.vdms.customannotations.constants; /** * Created by abdulhakim on 11/19/16. */ public enum AuditingActionType { INTERNAL_USER_REGISTRATION, INTERNAL_USER_UPDATE, INTERNAL_USER_DELETE, INTERNAL_USER_SAVE, USER_LOGIN, SUPPLIER_USER_ADD, SUPPLIER_USER_EDIT, SUPPLIER_USER_DELETE, SUPPLIER_USER_READ, CONSULTANT_USER_ADD, CONSULTANT_USER_EDIT, CONSULTANT_USER_DELETE, CONSULTANT_USER_READ, }
8915dc1e34ee3527803be3ea4456ad1d46caa72d
f4756089f1352decd56d70e21b92a09436c13bd6
/RetoAutoSophos31/RetoSOLID/src/main/java/com/sophossolutions/utilities/WebDriverFactory.java
09a0f27f2d9232dc0fcf733d4218708e6709b507
[]
no_license
cristian-agu14/PracticasJava
6d6a0d0af307860cf9d8979faf9168efa16c0d0a
1114b0e0f8df3a19cf6bee41880069e7bad94991
refs/heads/main
2022-12-30T13:08:32.617111
2020-10-19T15:45:01
2020-10-19T15:45:01
305,432,497
0
0
null
null
null
null
UTF-8
Java
false
false
4,583
java
package com.sophossolutions.utilities; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.edge.EdgeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxOptions; import org.openqa.selenium.ie.InternetExplorerDriver; import org.openqa.selenium.ie.InternetExplorerOptions; import org.openqa.selenium.phantomjs.PhantomJSDriver; import org.openqa.selenium.phantomjs.PhantomJSDriverService; import org.openqa.selenium.remote.CapabilityType; import org.openqa.selenium.remote.DesiredCapabilities; public class WebDriverFactory { // @Managed private static WebDriver driver; public static WebDriverFactory web() { driver = getDriver(); driver.manage().timeouts().pageLoadTimeout(90, TimeUnit.SECONDS); driver.manage().timeouts().implicitlyWait(6, TimeUnit.SECONDS); driver.manage().window().maximize(); return new WebDriverFactory(); } public static WebDriver getDriver() { String webdriverstr = System.getProperty("serenity.driver.name"); if (webdriverstr == null) { webdriverstr = "chrome"; } switch (webdriverstr) { case "firefox": System.setProperty("webdriver.gecko.driver", "src/test/resources/drivers/geckodriver.exe"); FirefoxOptions fireopts = new FirefoxOptions(); fireopts.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); return new FirefoxDriver(); case "chrome": System.setProperty("webdriver.chrome.driver", "src/test/resources/drivers/chromedriver.exe"); ChromeOptions chropts = new ChromeOptions(); chropts.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); chropts.setAcceptInsecureCerts(true); chropts.addArguments("--ignore-certificate-errors"); return new ChromeDriver(chropts); case "edge": System.setProperty("webdriver.edge.driver", "src/test/resources/drivers/MicrosoftWebDriver.exe"); DesiredCapabilities capabilities = DesiredCapabilities.edge(); capabilities.setJavascriptEnabled(true); capabilities.setAcceptInsecureCerts(true); return new EdgeDriver(); case "ie": System.setProperty("webdriver.ie.driver", "src/test/resources/drivers/IEDriverServer.exe"); InternetExplorerOptions opts = new InternetExplorerOptions(); opts.ignoreZoomSettings(); opts.enablePersistentHovering(); opts.ignoreZoomSettings(); opts.introduceFlakinessByIgnoringSecurityDomains(); opts.requireWindowFocus(); opts.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); opts.setCapability("ignoreProctectedModeSettings", true); opts.setCapability("enabledNativeEvents", true); opts.setCapability("ignoreZoomSetting", true); opts.setCapability("ignoreProtectedModeSettings", true); opts.setCapability("requireWindowFocus", true); opts.setCapability("enableNativeEvents", true); opts.setCapability("enablePersistentHover", true); return new InternetExplorerDriver(opts); case "phantomjs": DesiredCapabilities caps = new DesiredCapabilities(); caps.setJavascriptEnabled(true); caps.setCapability("takesScreenshot", true); caps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "phantomjs.exe"); caps.setCapability(PhantomJSDriverService.PHANTOMJS_CLI_ARGS, new String[] { "--web-security=false", "--ssl-protocol=any", "--ignore-ssl-errors=true", "--webdriver-loglevel=INFO", "--web-security=no", "--proxy=10.169.104.166:8080" }); return new PhantomJSDriver(caps); default: throw new RuntimeException("Unsupported webdriver: " + webdriverstr); } } public WebDriver onPage(String url) throws FileNotFoundException, IOException { Properties properties = new Properties(); properties.load(new FileReader("src/test/resources/urls/urls.properties")); url = properties.getProperty(url); driver.manage().window().maximize(); driver.get(url); return driver; } public String consultarPropertie(String parametro) { Properties prop = new Properties(); InputStream is = null; try { is = new FileInputStream("src/test/resources/urls/urls.properties"); prop.load(is); return prop.getProperty(parametro); } catch(IOException e) { System.out.println(e.toString()); } return null; } }
81fe77685b01d3cebc6b17cbcf8474422e0e4087
9773d28a221799ba8c49123ce22f3d6bef83b03e
/genlab.core/src/genlab/core/model/meta/basics/flowtypes/StringFlowType.java
f3a2c13c63a4b933ed2313ec329d5f7f8e57bf47
[]
no_license
holm-xie/genlab
134547879d76b2f1e9c14df3c1000bcfa54748b9
89e378cf79ca8dc0f5a821fd1739a93f5b6071ef
refs/heads/master
2020-12-31T03:03:11.601535
2016-07-27T08:28:20
2016-07-27T08:28:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
442
java
package genlab.core.model.meta.basics.flowtypes; public class StringFlowType extends AbstractFlowType<String> { public static StringFlowType SINGLETON = new StringFlowType(); public StringFlowType() { super( "core.types.string", "string", "a string value" ); } @Override public String decodeFrom(Object value) { if (value instanceof String) return (String)value; else return value.toString(); } }
a9462c16478c8111635769f1cfc5e436cb72c172
ef0c1514e9af6de3ba4a20e0d01de7cc3a915188
/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAgentDetails.java
8fde058529785ef6e40fe612a69a6ed543d935a1
[ "LicenseRef-scancode-generic-cla", "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-or-later", "CC0-1.0", "BSD-3-Clause", "UPL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
Azure/azure-sdk-for-java
0902d584b42d3654b4ce65b1dad8409f18ddf4bc
789bdc6c065dc44ce9b8b630e2f2e5896b2a7616
refs/heads/main
2023-09-04T09:36:35.821969
2023-09-02T01:53:56
2023-09-02T01:53:56
2,928,948
2,027
2,084
MIT
2023-09-14T21:37:15
2011-12-06T23:33:56
Java
UTF-8
Java
false
false
3,836
java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.recoveryservicessiterecovery.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The details of the InMage agent. */ @Fluent public final class InMageAgentDetails { /* * The agent version. */ @JsonProperty(value = "agentVersion") private String agentVersion; /* * A value indicating whether installed agent needs to be updated. */ @JsonProperty(value = "agentUpdateStatus") private String agentUpdateStatus; /* * A value indicating whether reboot is required after update is applied. */ @JsonProperty(value = "postUpdateRebootStatus") private String postUpdateRebootStatus; /* * Agent expiry date. */ @JsonProperty(value = "agentExpiryDate") private OffsetDateTime agentExpiryDate; /** Creates an instance of InMageAgentDetails class. */ public InMageAgentDetails() { } /** * Get the agentVersion property: The agent version. * * @return the agentVersion value. */ public String agentVersion() { return this.agentVersion; } /** * Set the agentVersion property: The agent version. * * @param agentVersion the agentVersion value to set. * @return the InMageAgentDetails object itself. */ public InMageAgentDetails withAgentVersion(String agentVersion) { this.agentVersion = agentVersion; return this; } /** * Get the agentUpdateStatus property: A value indicating whether installed agent needs to be updated. * * @return the agentUpdateStatus value. */ public String agentUpdateStatus() { return this.agentUpdateStatus; } /** * Set the agentUpdateStatus property: A value indicating whether installed agent needs to be updated. * * @param agentUpdateStatus the agentUpdateStatus value to set. * @return the InMageAgentDetails object itself. */ public InMageAgentDetails withAgentUpdateStatus(String agentUpdateStatus) { this.agentUpdateStatus = agentUpdateStatus; return this; } /** * Get the postUpdateRebootStatus property: A value indicating whether reboot is required after update is applied. * * @return the postUpdateRebootStatus value. */ public String postUpdateRebootStatus() { return this.postUpdateRebootStatus; } /** * Set the postUpdateRebootStatus property: A value indicating whether reboot is required after update is applied. * * @param postUpdateRebootStatus the postUpdateRebootStatus value to set. * @return the InMageAgentDetails object itself. */ public InMageAgentDetails withPostUpdateRebootStatus(String postUpdateRebootStatus) { this.postUpdateRebootStatus = postUpdateRebootStatus; return this; } /** * Get the agentExpiryDate property: Agent expiry date. * * @return the agentExpiryDate value. */ public OffsetDateTime agentExpiryDate() { return this.agentExpiryDate; } /** * Set the agentExpiryDate property: Agent expiry date. * * @param agentExpiryDate the agentExpiryDate value to set. * @return the InMageAgentDetails object itself. */ public InMageAgentDetails withAgentExpiryDate(OffsetDateTime agentExpiryDate) { this.agentExpiryDate = agentExpiryDate; return this; } /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } }
9f2ac1d6e98a1022e9cc37b2fa05a12712ded724
8f97cd9dd6ed4119d921edb11a7cf7872de43326
/src/main/java/com/napptilus/ecommerce/service/PriceServiceImpl.java
0615e8e9fca381919f2753edf83872e451c4b31f
[]
no_license
jonasanchezala/ecommerce
16c8e973edf461cf4848c0022c0e33658343f198
ed7f6565a63a57f24be4fc93a0bd9893f4d10709
refs/heads/main
2023-07-18T05:38:19.242670
2021-08-30T21:29:09
2021-08-30T21:29:09
401,470,461
0
0
null
null
null
null
UTF-8
Java
false
false
1,026
java
package com.napptilus.ecommerce.service; import com.napptilus.ecommerce.repository.PriceRepository; import com.napptilus.ecommerce.repository.model.Price; import com.napptilus.ecommerce.service.dto.FindPriceRequest; import com.napptilus.ecommerce.service.exception.PriceNotFoundException; import java.util.Comparator; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; @Service @AllArgsConstructor public class PriceServiceImpl implements PriceService{ private final PriceRepository priceRepository; @Override public Price findPrice(FindPriceRequest findPriceRequest) { return priceRepository.findByDateAppliedAndProductAndBrand( findPriceRequest.getDateApplied(), findPriceRequest.getProductId(), findPriceRequest.getBrandId() ).stream() .max(Comparator.comparing(price -> price.getPriceId().getPriority())). orElseThrow(() -> new PriceNotFoundException("Price not found")); } }
12ee980011b273a23bd3a844d8a72e65bc53ac86
bc55d4362d0aad85264b7b96f13eec4af874dd9b
/springcore/src/main/java/com/spring/stereotype/Student.java
b36e97b1f2f82e24ad9e21b13308a0c9f4a371d9
[]
no_license
sachin1830/Spring_Essestial
668bf588532833beb2ec49019ba4e838e4d01ebf
c7b6a9c83ab3b7f4f359bbc1178f2d1514fd4589
refs/heads/master
2023-02-16T11:06:40.873639
2021-01-10T06:10:06
2021-01-10T06:10:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
638
java
package com.spring.stereotype; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component public class Student { @Value("Sachin") private String studName; @Value("122") private String studRoll; public String getStudName() { return studName; } public void setStudName(String studName) { this.studName = studName; } public String getStudRoll() { return studRoll; } @Override public String toString() { return "Student [studName=" + studName + ", studRoll=" + studRoll + "]"; } public void setStudRoll(String studRoll) { this.studRoll = studRoll; } }
e110c631ed3154816ea0e6028d29e316a5ed7d48
b648a0ff402d23a6432643879b0b81ebe0bc9685
/vendor/thrift/lib/java/src/org/apache/thrift/transport/sasl/NegotiationStatus.java
ad704a0a1bea382a6b0001c986ca81930c08bf22
[ "Apache-2.0", "MIT", "FSFAP", "LicenseRef-scancode-public-domain-disclaimer", "BSD-3-Clause" ]
permissive
jviotti/binary-json-size-benchmark
4712faca2724d47d23efef241983ce875dc71cee
165b577884ef366348bf48042fddf54aacfe647a
refs/heads/main
2023-04-18T01:40:26.141995
2022-12-19T13:25:35
2022-12-19T13:25:35
337,583,132
21
1
Apache-2.0
2022-12-17T21:53:56
2021-02-10T01:18:05
C++
UTF-8
Java
false
false
1,802
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.thrift.transport.sasl; import java.util.HashMap; import java.util.Map; import static org.apache.thrift.transport.sasl.TSaslNegotiationException.ErrorType.PROTOCOL_ERROR; /** * Status bytes used during the initial Thrift SASL handshake. */ public enum NegotiationStatus { START((byte)0x01), OK((byte)0x02), BAD((byte)0x03), ERROR((byte)0x04), COMPLETE((byte)0x05); private static final Map<Byte, NegotiationStatus> reverseMap = new HashMap<>(); static { for (NegotiationStatus s : NegotiationStatus.values()) { reverseMap.put(s.getValue(), s); } } private final byte value; NegotiationStatus(byte val) { this.value = val; } public byte getValue() { return value; } public static NegotiationStatus byValue(byte val) throws TSaslNegotiationException { if (!reverseMap.containsKey(val)) { throw new TSaslNegotiationException(PROTOCOL_ERROR, "Invalid status " + val); } return reverseMap.get(val); } }
2e58861bef0009309a957529101c1e9bc8c9e160
9f048a774c93a1780994f225dec8b94e77b9edbd
/app/src/main/java/com/mosajon/usbdiskmount/Main2Activity.java
d26bbdde891f7f8f397d3393103e6e8f07d46d26
[]
no_license
mosajon/USBDiskMount
65fadaa03605b312e553b7fabaa32ed133f03642
142d8c7e90e0a685bce3b290733a296ce102f309
refs/heads/master
2021-07-18T04:44:43.612833
2017-10-25T09:27:51
2017-10-25T09:27:51
103,952,404
0
0
null
null
null
null
UTF-8
Java
false
false
339
java
package com.mosajon.usbdiskmount; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class Main2Activity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main2); } }
0403b689737c72cd2ff453cf648078cbdaa288a1
1ce8faa7232442e528df092a7065259d13e42d7a
/Tarea5/app/src/main/java/com/example/tarea5/ActInicio.java
815abdac83d4cd99e1d17b85bf19eaae64660b81
[]
no_license
AlfonsoVA/App-Coffe-livery
2092ddda0fd011f0ec8ba91fe52e55fef0588cc8
22810ed962db8f3810c2d59fac33cfd618fc97ef
refs/heads/master
2022-11-05T04:55:08.513109
2020-06-26T00:01:32
2020-06-26T00:01:32
275,034,936
0
0
null
null
null
null
UTF-8
Java
false
false
997
java
package com.example.tarea5; import android.app.Activity; import android.os.Bundle; import android.content.Intent; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class ActInicio extends Activity { private Button inicioPedido; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layout_inicio); inicioPedido = (Button) findViewById(R.id.btn_inicio_pedido); inicioPedido.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { muestraMenu(); } }); } public void muestraMenu() { //Pasa a la siguiente actividad que es la seleccion de platillos o bebidas. Intent intent = new Intent(ActInicio.this, ActMenu.class); startActivity(intent); finish(); overridePendingTransition(0, 0); } }
af7f3bd656fceff293db1106e5aff27bb38357a7
a39951576e782e8aabbd17b459086d9d1cb62962
/src/com/care/mybatis/dao/UIAdverMapper.java
139d40e860b4ae63468b4874c763735826971943
[]
no_license
vionk/AutoWeb
24c6ea8785d87647eb48a50fff6daeef6f27dda9
ec747e99979e591fe5a4bc6a2342b70b7bdb5b75
refs/heads/master
2020-12-11T09:22:40.950674
2014-05-13T14:00:16
2014-05-13T14:00:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,634
java
package com.care.mybatis.dao; import com.care.mybatis.bean.UIAdver; import com.care.mybatis.bean.UIAdverExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface UIAdverMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ int countByExample(UIAdverExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ int deleteByExample(UIAdverExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ int deleteByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ int insert(UIAdver record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ int insertSelective(UIAdver record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ List<UIAdver> selectByExample(UIAdverExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ UIAdver selectByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ int updateByExampleSelective(@Param("record") UIAdver record, @Param("example") UIAdverExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ int updateByExample(@Param("record") UIAdver record, @Param("example") UIAdverExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ int updateByPrimaryKeySelective(UIAdver record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table ui_adver * @mbggenerated Mon May 12 22:38:15 CST 2014 */ int updateByPrimaryKey(UIAdver record); }
81b6448d24d092c4d37fe5df1c5e50e843545032
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2018/12/ReadableTransactionState.java
f86a2b9b27582fb926073c13528e7fb08574edb9
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
6,610
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.storageengine.api.txstate; import org.eclipse.collections.api.set.primitive.MutableLongSet; import org.eclipse.collections.impl.UnmodifiableMap; import java.util.NavigableMap; import javax.annotation.Nullable; import org.neo4j.internal.kernel.api.exceptions.schema.ConstraintValidationException; import org.neo4j.internal.kernel.api.exceptions.schema.CreateConstraintFailureException; import org.neo4j.storageengine.api.RelationshipVisitor; import org.neo4j.storageengine.api.schema.ConstraintDescriptor; import org.neo4j.storageengine.api.schema.IndexDescriptor; import org.neo4j.storageengine.api.schema.SchemaDescriptor; import org.neo4j.values.storable.ValueTuple; /** * This interface contains the methods for reading transaction state from the transaction state. * The implementation of these methods should be free of any side effects (such as initialising lazy state). */ public interface ReadableTransactionState { void accept( TxStateVisitor visitor ) throws ConstraintValidationException, CreateConstraintFailureException; boolean hasChanges(); // ENTITY RELATED /** * Returns all nodes that, in this tx, have had the labels changed. * * @param label The label that has changed. */ LongDiffSets nodesWithLabelChanged( long label ); /** * Returns nodes that have been added and removed in this tx. */ LongDiffSets addedAndRemovedNodes(); /** * Returns rels that have been added and removed in this tx. */ LongDiffSets addedAndRemovedRelationships(); /** * Nodes that have had labels, relationships, or properties modified in this tx. */ Iterable<NodeState> modifiedNodes(); /** * Rels that have properties modified in this tx. */ Iterable<RelationshipState> modifiedRelationships(); boolean relationshipIsAddedInThisTx( long relationshipId ); boolean relationshipIsDeletedInThisTx( long relationshipId ); LongDiffSets nodeStateLabelDiffSets( long nodeId ); boolean nodeIsAddedInThisTx( long nodeId ); boolean nodeIsDeletedInThisTx( long nodeId ); /** * @return {@code true} if the relationship was visited in this state, i.e. if it was created * by this current transaction, otherwise {@code false} where the relationship might need to be * visited from the store. */ <EX extends Exception> boolean relationshipVisit( long relId, RelationshipVisitor<EX> visitor ) throws EX; // SCHEMA RELATED DiffSets<IndexDescriptor> indexDiffSetsByLabel( int labelId ); DiffSets<IndexDescriptor> indexDiffSetsBySchema( SchemaDescriptor schema ); DiffSets<IndexDescriptor> indexChanges(); Iterable<IndexDescriptor> constraintIndexesCreatedInTx(); DiffSets<ConstraintDescriptor> constraintsChanges(); DiffSets<ConstraintDescriptor> constraintsChangesForLabel( int labelId ); DiffSets<ConstraintDescriptor> constraintsChangesForSchema( SchemaDescriptor descriptor ); DiffSets<ConstraintDescriptor> constraintsChangesForRelationshipType( int relTypeId ); Long indexCreatedForConstraint( ConstraintDescriptor constraint ); // INDEX UPDATES /** * A readonly view of all index updates for the provided schema. Returns {@code null}, if the index * updates for this schema have not been initialized. */ @Nullable UnmodifiableMap<ValueTuple,? extends LongDiffSets> getIndexUpdates( SchemaDescriptor schema ); /** * A readonly view of all index updates for the provided schema, in sorted order. The returned * Map is unmodifiable. Returns {@code null}, if the index updates for this schema have not been initialized. * <p> * Ensure sorted index updates for a given index. This is needed for range query support and * ay involve converting the existing hash map first. */ @Nullable NavigableMap<ValueTuple,? extends LongDiffSets> getSortedIndexUpdates( SchemaDescriptor descriptor ); // OTHER NodeState getNodeState( long id ); RelationshipState getRelationshipState( long id ); GraphState getGraphState(); MutableLongSet augmentLabels( MutableLongSet labels, NodeState nodeState ); /** * The revision of the data changes in this transaction. This number is opaque, except that it is zero if there have been no data changes in this * transaction. And making and then undoing a change does not count as "no data changes." This number will always change when there is a data change in a * transaction, however, such that one can reliably tell whether or not there has been any data changes in a transaction since last time the transaction * data revision was obtained for the given transaction. * <p> * This has a number of uses. For instance, the way tokens are created is that the first time a token is needed it gets created in its own little * token mini-transaction, separate from the surrounding transaction that creates or modifies data that need it. * From the kernel POV it's interesting to know whether or not any tokens have been created in this tx state, because then we know it's a mini-transaction * like this and won't have to let transaction event handlers know about it, for example. * <p> * The same applies to schema changes, such as creating and dropping indexes and constraints. * <p> * The fulltext schema indexes also use the data revision to determine at query-time, if their internal transaction state needs to be updated. * * @return The opaque data revision for this transaction, or zero if there has been no data changes in this transaction. */ long getDataRevision(); /** * @return {@code true} if there are any <em>data</em> changes in the transaction. */ boolean hasDataChanges(); }
28d795807779a4fc4c157e2e7f432056c3a6e29b
46afcc41205886b9fb30a09da590636d08970377
/app/src/main/java/appewtc/masterung/enssystem/SignUpActivity.java
ed7d8a901ef5617508d41f97f78bb01a4de0d205
[]
no_license
rangsansith/ENS-System
840687fb2f668636200a020eef8eb4f1bc6359a3
be37e819c85ab0fa5d1c22ecc2ff359ec4af67d6
refs/heads/master
2020-03-22T04:02:13.039497
2016-09-30T09:49:36
2016-09-30T09:49:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,307
java
package appewtc.masterung.enssystem; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.os.StrictMode; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.EditText; import android.widget.RadioGroup; import android.widget.Toast; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import java.util.ArrayList; public class SignUpActivity extends AppCompatActivity { //Explicit private EditText userEditText, passwordEditText, nameEditText, surnameEditText, phoneEditText, emailEditText, confirmPassEditText; private RadioGroup sexRadioGroup; private String userString, passwordString, nameString, surnameString, phoneString, emailString, sexString, confirmPassString; private boolean statusABoolean = true; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sign_up); //Bind Widget bindWidget(); //RadioGroup Controller ragController(); } // Main Method private void ragController() { sexRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup radioGroup, int checkID) { statusABoolean = false; switch (checkID) { case R.id.radioButton: sexString = getResources().getString(R.string.male); break; case R.id.radioButton2: sexString = getResources().getString(R.string.female); break; } // switch } // event }); } // ragController private void bindWidget() { userEditText = (EditText) findViewById(R.id.editText3); passwordEditText = (EditText) findViewById(R.id.editText4); nameEditText = (EditText) findViewById(R.id.editText5); surnameEditText = (EditText) findViewById(R.id.editText6); phoneEditText = (EditText) findViewById(R.id.editText8); emailEditText = (EditText) findViewById(R.id.editText9); sexRadioGroup = (RadioGroup) findViewById(R.id.ragSex); confirmPassEditText = (EditText) findViewById(R.id.editText10); } // bindWidget public void clickSignUpSave(View view) { userString = userEditText.getText().toString().trim(); passwordString = passwordEditText.getText().toString().trim(); nameString = nameEditText.getText().toString().trim(); surnameString = surnameEditText.getText().toString().trim(); phoneString = phoneEditText.getText().toString().trim(); emailString = emailEditText.getText().toString().trim(); confirmPassString = confirmPassEditText.getText().toString().trim(); if (checkSpace() || statusABoolean) { //Have Space MyAlertDialog objMyAlertDialog = new MyAlertDialog(); objMyAlertDialog.MyDialog(SignUpActivity.this, R.drawable.icon_question, "กรอกข้อมูลไม่ครบ", "กรุณากรอกข้อมูล และ เลือกข้อมูล ให้ครบ คะ"); } else { //No Space if (checkConfirmPass()) { //Password OK checkUser(); } else { //Password False MyAlertDialog myAlertDialog = new MyAlertDialog(); myAlertDialog.MyDialog(SignUpActivity.this, R.drawable.icon_question, "Password พิมพ์ผิด", "กรุณาพิมพ์ Password ให้เหมือนกัน"); } } // if } // clickSignUpSave private boolean checkConfirmPass() { boolean bolPassword = true; if (passwordString.equals(confirmPassString)) { bolPassword = true; } else { bolPassword = false; } return bolPassword; } private void checkUser() { ManageTABLE objManageTABLE = new ManageTABLE(this); try { String[] resultStrings = objManageTABLE.searchUser(userString); MyAlertDialog objMyAlertDialog = new MyAlertDialog(); objMyAlertDialog.MyDialog(SignUpActivity.this, R.drawable.icon_question, "User ซ้ำ", "User " + resultStrings[1] + " ซ้ำ โปรดเปลี่ยน User ใหม่ ?"); } catch (Exception e) { confirmSignUp(); } } // checkUser private void confirmSignUp() { AlertDialog.Builder objBuilder = new AlertDialog.Builder(this); objBuilder.setIcon(R.drawable.logo48); objBuilder.setTitle("โปรดตรวจข้อมูล"); objBuilder.setMessage("User = " + userString + "\n" + "ชื่อ = " + nameString + "\n" + "นามสกุล = " + surnameString + "\n" + "เพศ = " + sexString + "\n" + "เบอร์โทร = " + phoneString + "\n" + "Email = " + emailString); objBuilder.setCancelable(false); objBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); updateValueToMySQL(); } }); objBuilder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); } }); objBuilder.show(); } // confirmSignUp private void updateValueToMySQL() { //Set Policy StrictMode.ThreadPolicy myPolicy = new StrictMode.ThreadPolicy .Builder().permitAll().build(); StrictMode.setThreadPolicy(myPolicy); //Update to MySQL try { ArrayList<NameValuePair> objNameValuePairs = new ArrayList<NameValuePair>(); objNameValuePairs.add(new BasicNameValuePair("isAdd", "true")); objNameValuePairs.add(new BasicNameValuePair("User", userString)); objNameValuePairs.add(new BasicNameValuePair("Password", passwordString)); objNameValuePairs.add(new BasicNameValuePair("Name", nameString)); objNameValuePairs.add(new BasicNameValuePair("Surname", surnameString)); objNameValuePairs.add(new BasicNameValuePair("Sex", sexString)); objNameValuePairs.add(new BasicNameValuePair("Phone", phoneString)); objNameValuePairs.add(new BasicNameValuePair("Email", emailString)); HttpClient objHttpClient = new DefaultHttpClient(); HttpPost objHttpPost = new HttpPost("http://swiftcodingthai.com/ens/php_add_data_master.php"); objHttpPost.setEntity(new UrlEncodedFormEntity(objNameValuePairs, "UTF-8")); objHttpClient.execute(objHttpPost); Toast.makeText(SignUpActivity.this, "Update New Value Success", Toast.LENGTH_SHORT).show(); finish(); } catch (Exception e) { Toast.makeText(SignUpActivity.this, "Cannot Connected Internet", Toast.LENGTH_SHORT).show(); } } // updateValueToMySQL private boolean checkSpace() { return userString.equals("") || passwordString.equals("") || nameString.equals("") || surnameString.equals("") || phoneString.equals("") || emailString.equals("") || confirmPassString.equals(""); } } // Main Class
64738cad01642f197c4b258feca0518f0d49f847
f14a6a1fda5c8ece5d690ff976a5aff243284b42
/src/main/java/org/snaker/engine/parser/AbstractNodeParser.java
50c5358d0f7cdc4292dc8c87a9436bf31c9c5365
[]
no_license
jekunauto/snaker-core
c3c03a4e2c770230402abab0eb24acbecb5f5ab6
5bf65f2160c07d12c47547088a0843157d924419
refs/heads/master
2021-08-22T11:08:43.009736
2017-11-30T02:37:19
2017-11-30T02:37:19
112,554,672
0
1
null
null
null
null
UTF-8
Java
false
false
2,923
java
/* Copyright 2013-2015 www.snakerflow.com. * * 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.snaker.engine.parser; import java.util.List; import org.snaker.engine.helper.XmlHelper; import org.snaker.engine.model.NodeModel; import org.snaker.engine.model.TransitionModel; import org.w3c.dom.Element; /** * 抽象dom节点解析类 * 完成通用的属性、变迁解析 * @author yuqs * @since 1.0 */ public abstract class AbstractNodeParser implements NodeParser { /** * 模型对象 */ protected NodeModel model; /** * 实现NodeParser接口的parse函数 * 由子类产生各自的模型对象,设置常用的名称属性,并且解析子节点transition,构造TransitionModel模型对象 */ public void parse(Element element) { model = newModel(); model.setName(element.getAttribute(ATTR_NAME)); model.setDisplayName(element.getAttribute(ATTR_DISPLAYNAME)); model.setLayout(element.getAttribute(ATTR_LAYOUT)); model.setPreInterceptors(element.getAttribute(ATTR_PREINTERCEPTORS)); model.setPostInterceptors(element.getAttribute(ATTR_POSTINTERCEPTORS)); List<Element> transitions = XmlHelper.elements(element, NODE_TRANSITION); for(Element te : transitions) { TransitionModel transition = new TransitionModel(); transition.setName(te.getAttribute(ATTR_NAME)); transition.setDisplayName(te.getAttribute(ATTR_DISPLAYNAME)); transition.setTo(te.getAttribute(ATTR_TO)); transition.setExpr(te.getAttribute(ATTR_EXPR)); transition.setG(te.getAttribute(ATTR_G)); transition.setOffset(te.getAttribute(ATTR_OFFSET)); transition.setType(te.getAttribute(ATTR_TYPE)); int num = 0; int isCheckForm = 1; try { num = Integer.parseInt(te.getAttribute(ATTR_SORT_NUM)); isCheckForm = Integer.parseInt(te.getAttribute(ATTR_IS_CHECK_FORM)); } catch(Exception e) {} transition.setSortNum(num); transition.setIsCheckForm(isCheckForm); transition.setSource(model); model.getOutputs().add(transition); } parseNode(model, element); } /** * 子类可覆盖此方法,完成特定的解析 * @param model * @param element */ protected void parseNode(NodeModel model, Element element) { } /** * 抽象方法,由子类产生各自的模型对象 * @return */ protected abstract NodeModel newModel(); /** * 返回模型对象 */ public NodeModel getModel() { return model; } }
25853fa0101922ebffed2da3574e36db74f933d0
786529f65b7db1fd12bb38ab7d62d68751c38a4b
/base/src/com/example/wearablesensorbase/data/LogViewActivity.java
1ade44429ab43e1180003422407934e7617a0117
[ "MIT" ]
permissive
balazspete/wearable-fall-sensor
7d954012354655f725a10505cebab91b1265258e
76f89d0324f0d07fc2b416c906e5340d55ba86c2
refs/heads/master
2016-09-06T00:17:51.309930
2014-04-25T13:36:42
2014-04-25T13:36:42
16,345,037
1
0
null
null
null
null
UTF-8
Java
false
false
2,912
java
package com.example.wearablesensorbase.data; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import com.example.wearablesensorbase.R; import android.net.Uri; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.support.v4.app.NavUtils; import android.view.Menu; import android.view.MenuItem; import android.widget.EditText; import android.widget.ShareActionProvider; import android.widget.Toast; public class LogViewActivity extends Activity { public static String DEVICE_NAME = "com.example.wearablesensorbase.ble_device_name", FILE_NAME = "com.example.wearablesensorbase.file_name"; private String fileName; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_log_view); String fileName = getIntent().getStringExtra(FILE_NAME); if (fileName != null) { this.fileName = fileName; } else { String deviceName = getIntent().getStringExtra(DEVICE_NAME); this.fileName = BufferedMeasurementSaver.getFileName(deviceName); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.log_view, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: NavUtils.navigateUpFromSameTask(this); return true; case R.id.action_refresh: load(); return true; case R.id.action_share: share(); return true; case R.id.action_delete: delete(); return true; } return super.onOptionsItemSelected(item); } private void load() { EditText text = (EditText) findViewById(R.id.log_text); text.setText(getTextInFile(fileName)); } private void delete() { } private void share() { Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(getRealFile(fileName))); shareIntent.setType("text/plain"); startActivity(Intent.createChooser(shareIntent, fileName)); } private File getRealFile(String fileName) { return new File(getExternalFilesDir(null), fileName); } private String getTextInFile(String fileName) { StringBuilder builder = new StringBuilder(); try { BufferedReader in = new BufferedReader(new FileReader(getRealFile(fileName))); String line = null; while ((line = in.readLine()) != null) { builder.append(line); builder.append('\n'); } } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return builder.toString(); } }
5047d403350c72dba3d734ab824983a10dd1823a
b3644b4bf546d1b7113f648022a875ce27dbb72c
/src/main/Actions/setEnvio_Action.java
e929b50b31a37494d005dec10307ac180c8436f7
[]
no_license
Juanito0101/PackLink
9db3b08516045411701df2bb5e4e501ad39b817f
bb86da1df0b57fa6bbad784d2819173111c2d927
refs/heads/master
2020-04-11T20:10:04.802013
2018-12-17T02:48:39
2018-12-17T02:48:39
162,062,067
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package main.Actions; import main.PageObject.envioPO; public class setEnvio_Action { public setEnvio_Action(){ } public void setFrom(String From) { envioPO.from.clear(); envioPO.from.sendKeys(From); } public void setTo(String To) { envioPO.to.clear(); envioPO.to.sendKeys(To); } public void setPeso(String Peso){ envioPO.peso.sendKeys(Peso); } public void setLargo(String Largo) { envioPO.largo.sendKeys(Largo); } public void setAlto(String Alto) { envioPO.alto.sendKeys(Alto); } public void setAncho(String Ancho) { envioPO.ancho.sendKeys(Ancho); } public void submit() { envioPO.submit.click();} }
6c31ae4f986b50ed1b3d427f98945bf26e2e75f3
f85c5de7aa94cb0c4ef8dba0e26c420a95f47dfd
/Battleship/src/Coordinate.java
d2ff5a59d874c0125b93460f6aa577e6d5c72d4b
[]
no_license
ArchonWing/Battleship
2acf1235d89e3e14eea244186362d4fb291aa6bd
a63f19e389d953320cea63ebbd46e1398e714229
refs/heads/master
2021-01-10T21:21:10.093892
2015-03-12T15:39:41
2015-03-12T15:39:41
31,608,519
0
0
null
null
null
null
UTF-8
Java
false
false
567
java
public class Coordinate { int row; int column; public Coordinate(int x, int y) { row = x; column = y; } public int getX() { return row; } public void setX(int x) { this.row = x; } public int getY() { return column; } public void setY(int y) { this.column = y; } public static Coordinate convertCoordinates(String input) { int j = (int)(Character.toUpperCase(input.charAt(0)) - 65); int k = Character.getNumericValue(input.charAt(1)) - 1; return new Coordinate(k,j); } }
025147a32564eb9c672b3bb7f5748fd978e0a0b3
44047cac9a1e9eabe8bfa716396fce24b065b27b
/src/test/java/com/journaldev/mockito/MockitoSpyTest.java
3dc4e513257c14811426d8b9e33289302b157a1f
[]
no_license
JFSoftwareServices/Mockito-Example
6f67b5ad826d20600941fc510bd9ad868163603c
0e441748c0940423dd3eeb28fab04459be327acf
refs/heads/master
2022-12-19T02:07:55.522982
2020-09-13T18:53:13
2020-09-13T18:53:13
295,166,437
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
package com.journaldev.mockito; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.Test; class MockitoSpyTest { @Test void testMethod() { List<String> list = new ArrayList<String>(); List<String> listSpy = spy(list); listSpy.add("first-element"); System.out.println(listSpy.get(0)); assertEquals("first-element", listSpy.get(0)); when(listSpy.get(0)).thenReturn("second-element"); System.out.println(listSpy.get(0)); assertEquals("second-element", listSpy.get(0)); } }
712526d5d60ec3b3cd173b267c9bb83b3750269a
67efa3144810f70611372c955d283bea4a843d54
/esup-opi-web-beans/src/main/java/org/esupportail/opi/web/beans/utils/comparator/ComparatorPays.java
06d456bc7cb68d76018930bfe9c0ad31e2881888
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
EsupPortail/esup-opi
35c977a380a2cf5038e83035e7c516bacb2ca369
ea318aaa5fbedde63cf3b13ad1a1f14c19480d3f
refs/heads/develop
2016-09-06T19:12:13.281269
2014-07-24T08:21:45
2014-07-24T08:21:45
6,087,301
1
4
null
2013-11-04T14:57:14
2012-10-05T07:50:51
Java
UTF-8
Java
false
false
1,295
java
/** * */ package org.esupportail.opi.web.beans.utils.comparator; import org.esupportail.wssi.services.remote.Pays; import java.io.Serializable; import java.util.Comparator; /** * Compare le libelle d'un objet. * @author cleprous * */ public class ComparatorPays implements Comparator<Pays>, Serializable { /** * The country. */ public static final String PAYS = "PAYS"; /** * The nationality. */ public static final String NATIONALITE = "NAT"; /** * The serialization id. */ private static final long serialVersionUID = -3428314437084490971L; /** * Sort with the good property according to the type. */ private String type; /** * Constructor. */ public ComparatorPays() { super(); } /** * * Constructors. * @param type */ public ComparatorPays(final String type) { this.type = type; } /** * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) */ @Override public int compare(final Pays o1, final Pays o2) { String lib1 = o1.getLibPay(); String lib2 = o2.getLibPay(); if (type.equals(NATIONALITE)) { lib1 = o1.getLibNat(); lib2 = o2.getLibNat(); } if (!(lib1.equals(lib2))) { return lib1.compareTo(lib2); } return 0; } }
3a858f786d1794d484c4d0f0f8ae755c0f46479c
b7b39e7656f4082d4a4df17cbc51021b2a5a511a
/src/main/java/org/minutebots/lib/kinematics/ChassisSpeeds.java
5590ac659c032108c3293f6786625455f6fa578a
[]
no_license
Team-4536/RamseteLib
db85eb22e8ac0b4ffabac9b51f82d7c2713bd3c1
281c72bfe7c6f8a2c209eab9d9219ec39cc5a5f2
refs/heads/master
2021-07-03T18:47:22.901337
2021-02-24T04:34:38
2021-02-24T04:34:38
227,726,201
0
0
null
null
null
null
UTF-8
Java
false
false
3,515
java
package org.minutebots.lib.kinematics; import org.minutebots.lib.geometry.Rotation2d; /** * Represents the speed of a robot chassis. Although this struct contains * similar members compared to a Twist2d, they do NOT represent the same thing. * Whereas a Twist2d represents a change in pose w.r.t to the robot frame of reference, * this ChassisSpeeds struct represents a velocity w.r.t to the robot frame of * reference. * * <p>A strictly non-holonomic drivetrain, such as a differential drive, should * never have a dy component because it can never move sideways. Holonomic * drivetrains such as swerve and mecanum will often have all three components. */ @SuppressWarnings("MemberName") public class ChassisSpeeds { /** * Represents forward velocity w.r.t the robot frame of reference. (Fwd is +) */ public double vxMetersPerSecond; /** * Represents sideways velocity w.r.t the robot frame of reference. (Left is +) */ public double vyMetersPerSecond; /** * Represents the angular velocity of the robot frame. (CCW is +) */ public double omegaRadiansPerSecond; /** * Constructs a ChassisSpeeds with zeros for dx, dy, and theta. */ public ChassisSpeeds() { } /** * Constructs a ChassisSpeeds object. * * @param vxMetersPerSecond Forward velocity. * @param vyMetersPerSecond Sideways velocity. * @param omegaRadiansPerSecond Angular velocity. */ public ChassisSpeeds(double vxMetersPerSecond, double vyMetersPerSecond, double omegaRadiansPerSecond) { this.vxMetersPerSecond = vxMetersPerSecond; this.vyMetersPerSecond = vyMetersPerSecond; this.omegaRadiansPerSecond = omegaRadiansPerSecond; } /** * Converts a user provided field-relative set of speeds into a robot-relative * ChassisSpeeds object. * * @param vxMetersPerSecond The component of speed in the x direction relative to the field. * Positive x is away from your alliance wall. * @param vyMetersPerSecond The component of speed in the y direction relative to the field. * Positive y is to your left when standing behind the alliance wall. * @param omegaRadiansPerSecond The angular rate of the robot. * @param robotAngle The angle of the robot as measured by a gyroscope. The robot's * angle is considered to be zero when it is facing directly away * from your alliance station wall. Remember that this should * be CCW positive. * @return ChassisSpeeds object representing the speeds in the robot's frame of reference. */ public static ChassisSpeeds fromFieldRelativeSpeeds( double vxMetersPerSecond, double vyMetersPerSecond, double omegaRadiansPerSecond, Rotation2d robotAngle) { return new ChassisSpeeds( vxMetersPerSecond * robotAngle.getCos() + vyMetersPerSecond * robotAngle.getSin(), -vxMetersPerSecond * robotAngle.getSin() + vyMetersPerSecond * robotAngle.getCos(), omegaRadiansPerSecond ); } @Override public String toString() { return String.format("ChassisSpeeds(Vx: %.2f m/s, Vy: %.2f m/s, Omega: %.2f rad/s)", vxMetersPerSecond, vyMetersPerSecond, omegaRadiansPerSecond); } }
beca3e2fa39b54a2c50efdbbec459052674ede32
ff5d70b8400a80c47f73abf4f8571f1963ac5018
/src/com/Utility/ReadXml.java
ac8717ab82c6da77dca760fcd61bde152e1d3fec
[]
no_license
maheshrsawant/SampleProject
1733d4a5dd70c3bbbe5af8f6b20db2eeb5375665
faa7f592b630998e4033018347fa25547517cea0
refs/heads/master
2020-04-22T05:02:15.859025
2019-02-11T19:07:21
2019-02-11T19:07:21
170,145,333
0
0
null
null
null
null
UTF-8
Java
false
false
4,783
java
package com.Utility; import java.io.File; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilder; import org.testng.annotations.Test; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import org.w3c.dom.Node; import org.w3c.dom.Element; import com.Utility.DBConnectionNew; @Test public class ReadXml { public static DBConnectionNew connection; public static String value; static Connection con; public static int j=0; public static String readXML(String nodeList,String tag) { try { //FileName File inputFile = new File(System.getProperty("user.dir")+"/input.xml/"); //Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.THis is an abstract class DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse(inputFile); doc.getDocumentElement().normalize(); NodeList nList = doc.getElementsByTagName(nodeList); NodeList nodes = doc.getElementsByTagName(tag); System.out.println("----------------------------"); for (int temp = 0; temp < nList.getLength(); temp++) { NodeList subList = nList.item(0).getChildNodes(); Node nNode = nList.item(temp); Element eElement = (Element) nNode; //Length/child nodes of xml connection.length=eElement.getElementsByTagName(tag).getLength(); if(tag.equals("Query")) { for(j=0;j<connection.length;j++) { if (nNode.getNodeType() == Node.ELEMENT_NODE) { Element eElement1 = (Element) nNode; connection.arr[j]=(eElement1.getElementsByTagName(tag).item(j).getTextContent()).toString(); System.out.println("xml value : " + eElement1.getElementsByTagName(tag).item(j).getTextContent()); } } } else { if (nNode.getNodeType() == Node.ELEMENT_NODE) { Element eElement1 = (Element) nNode; value=eElement1.getElementsByTagName(tag).item(0).getTextContent(); System.out.println("xml value : " + eElement1.getElementsByTagName(tag).item(0).getTextContent()); } } } } catch (Exception e) { e.printStackTrace(); } return value; } public static String readTestNG(String nodeList,String tag) { try { //FileName File inputFile = new File(System.getProperty("user.dir")+"/testng.xml/"); //Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.THis is an abstract class DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse(inputFile); doc.getDocumentElement().normalize(); NodeList nList = doc.getElementsByTagName(nodeList); NodeList nodes = doc.getElementsByTagName(tag); for (int temp = 0; temp < nList.getLength(); temp++) { NodeList subList = nList.item(0).getChildNodes(); Node nNode = nList.item(temp); Element eElement = (Element) nNode; //Length/child nodes of xml connection.length=eElement.getElementsByTagName(tag).getLength(); if(tag.equals("Value")) { for(j=0;j<connection.length;j++) { if (nNode.getNodeType() == Node.ELEMENT_NODE) { Element eElement1 = (Element) nNode; value=eElement1.getElementsByTagName(tag).item(j).getTextContent(); System.out.println("xml value : " + value); } } } } } catch (Exception e) { e.printStackTrace(); } return value; } }
41eb9ce2b40c44f96c7fb1a9063496d2a392d4a8
d943a51f0b0e11229f66cb4285635657ff7ac0f1
/RoyalProg/src/sda/homework/sol61797/FrontBookkeeper61797.java
2bb4c0804f76f40a285e24e9c5cb7a4e4013f719
[ "Unlicense" ]
permissive
jorenca/SDA_2015
11c59ebdb095b459c7b4ee917d7b377bd3ed723a
3db339056817f82d42b61a1f6b1f0d81d43c01fa
refs/heads/master
2021-01-10T09:59:51.653969
2016-02-05T15:53:20
2016-02-05T15:53:20
47,449,419
0
12
null
2016-02-05T13:46:31
2015-12-05T09:04:27
Java
UTF-8
Java
false
false
2,697
java
package sda.homework.sol61797; import java.util.ArrayList; import java.util.Arrays; import sda.grading.IFrontBookkeeper; public class FrontBookkeeper61797 implements IFrontBookkeeper { private String result = ""; @Override public String updateFront(String[] news) { for (int i = 0; i < news.length; i++) { processCommand(news[i].split(" ")); } return result; } private void processCommand(String[] command) { if (command[1].equals("=")) { // command 1 createUnit(command); } else if (command[1].equals("attached")) { // command 2 & 3 attachUnits(command); // } else if () { // //command 3 // TODO } else if (command[0].equals("soldiers")) { // command 4 soldiersDied(command); } else if (command[0].equals("show") && command.length == 2) { // command 5 printUnit(command[1]); } else if (command[0].equals("show") && command.length == 3) { // command 6 printSoldier(Integer.parseInt(command[2])); } } private void printUnit(String unitName) { String output = Unit.getUnitByName(unitName).toString(); if (output.length() > 1) { // remove the last comma and space output = output.substring(0, output.length() - 2); } result += "[" + output + "]\n"; } private void printSoldier(int id) { result += Soldier.getSoldierByName(id).toString() + "\n"; } private void soldiersDied(String[] command) { String[] soldiers = Unit.getUnitByName(command[3]).toString() .split(", "); String[] range = command[1].split("\\.."); String firstSoldierId = range[0]; String lastSoldierId = range[1]; int start = Arrays.asList(soldiers).indexOf(firstSoldierId); int end = Arrays.asList(soldiers).indexOf(lastSoldierId); for (int i = start; i <= end; i++) { Soldier.getSoldierByName(Integer.parseInt(soldiers[i])).die(); } } private void attachUnits(String[] command) { Unit unit1 = Unit.getUnitByName(command[0]); Unit unit2 = Unit.getUnitByName(command[3]); if (command.length >= 5 && command[4].equals("after")) { unit2.attach(unit1, Integer.parseInt(command[6])); } else { unit2.attach(unit1); } } private void createUnit(String[] command) { if (command[2].equals("[]")) { // empty unit new Unit(command[0]); } else { ArrayList<Soldier> soldiers = new ArrayList<Soldier>(); String unitsString = ""; for (int i = 2; i < command.length; i++) { unitsString += command[i]; } unitsString = unitsString.substring(1, unitsString.length() - 1); String[] units = unitsString.split(","); for (int i = 0; i < units.length; i++) { soldiers.add(new Soldier(Integer.parseInt(units[i]))); } new Unit(command[0], soldiers); } } }
32098ab610c0b431ced4f3f24b02c78295702458
6478811d5a789b6a63108782a0c81601e935ced4
/app/src/main/java/com/petrov/simplerecorder/OnTickListener.java
3405cf649a87d137b3fb4f096c69b37c0dd9b228
[]
no_license
EvgeniiPetrov187/SimpleRecorder
020aa08a42ec8881915caa240fca48235fe7af84
0d258198530bed0ea4fd94248f88cce236b295b9
refs/heads/master
2023-07-07T04:03:07.567998
2021-08-15T02:19:18
2021-08-15T02:19:18
393,804,705
0
0
null
null
null
null
UTF-8
Java
false
false
112
java
package com.petrov.simplerecorder; public interface OnTickListener { void OnTimerEvent(String duration); }
504c1b36618fd2589aa2eb9e3afe9cdfef35bf82
b99f1a8ce9b7c3ba287dab5506fdcf72e0c6953e
/MinorAssignment/src/Question6.java
f07673610f4a1895e384e7bf0d90fd948f699993
[]
no_license
ManojeetDey/Java-Programming
c98d37f1a7161c2a5b2f614a87a9b89c720321ff
387c6d3c0dd6b0bdbe53512822c547dca668c9bb
refs/heads/master
2023-04-26T05:26:23.405885
2021-05-27T15:52:18
2021-05-27T15:52:18
342,332,788
0
0
null
null
null
null
UTF-8
Java
false
false
497
java
import java.util.*; public class Question6 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); System.out.println("enter the amount of water in kilograms "); int wt=sc.nextInt(); System.out.println("enter the initial and final temperatures of the water"); int inttemp=sc.nextInt(); int fintemp=sc.nextInt(); int q=wt*(inttemp - fintemp)*4184; System.out.println("The energy in joules is "+q); sc.close(); } }
a011029625f68c93977032922266ffc4aadbe299
0947641e8c41a99335ee326178cb6aeee38e0e5c
/app/src/main/java/com/example/dress/activity/AppCompatPreferenceActivity.java
21046126d6e45014da98af97effd823531c1f68e
[]
no_license
Donjoker/dressing
77aaf5610b520d622ca8d931562ca53756277ee4
0ce988f5b417331f6034117b7d01ac1023378ca0
refs/heads/master
2020-04-26T08:35:31.668546
2019-02-23T12:10:31
2019-02-23T12:10:31
173,427,506
2
0
null
2019-03-02T09:17:38
2019-03-02T09:17:38
null
UTF-8
Java
false
false
3,000
java
package com.example.dress.activity; import android.content.res.Configuration; import android.os.Bundle; import android.preference.PreferenceActivity; import android.support.annotation.LayoutRes; import android.support.annotation.Nullable; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatDelegate; import android.support.v7.widget.Toolbar; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; /** * A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls * to be used with AppCompat. */ public abstract class AppCompatPreferenceActivity extends PreferenceActivity { private AppCompatDelegate mDelegate; @Override protected void onCreate(Bundle savedInstanceState) { getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); super.onCreate(savedInstanceState); } @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); getDelegate().onPostCreate(savedInstanceState); } public ActionBar getSupportActionBar() { return getDelegate().getSupportActionBar(); } public void setSupportActionBar(@Nullable Toolbar toolbar) { getDelegate().setSupportActionBar(toolbar); } @Override public MenuInflater getMenuInflater() { return getDelegate().getMenuInflater(); } @Override public void setContentView(@LayoutRes int layoutResID) { getDelegate().setContentView(layoutResID); } @Override public void setContentView(View view) { getDelegate().setContentView(view); } @Override public void setContentView(View view, ViewGroup.LayoutParams params) { getDelegate().setContentView(view, params); } @Override public void addContentView(View view, ViewGroup.LayoutParams params) { getDelegate().addContentView(view, params); } @Override protected void onPostResume() { super.onPostResume(); getDelegate().onPostResume(); } @Override protected void onTitleChanged(CharSequence title, int color) { super.onTitleChanged(title, color); getDelegate().setTitle(title); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); getDelegate().onConfigurationChanged(newConfig); } @Override protected void onStop() { super.onStop(); getDelegate().onStop(); } @Override protected void onDestroy() { super.onDestroy(); getDelegate().onDestroy(); } public void invalidateOptionsMenu() { getDelegate().invalidateOptionsMenu(); } private AppCompatDelegate getDelegate() { if (mDelegate == null) { mDelegate = AppCompatDelegate.create(this, null); } return mDelegate; } }
fbda29dd7769558ce64109ede9a0e383ac439c26
c3a171ad7e70bcc7df48b46b5c7dd8a6a1fafd32
/src/main/java/com/hivemq/util/ReasonStrings.java
94b691ee6b6958e6fdecc839a51934a390768e8b
[ "Apache-2.0" ]
permissive
yongjhih/hivemq-community-edition
b4c3f248ea0614ec43fe8ca5afdd700e5b1a5232
04a6e9ee20538c44c94c74efdaea2deea9e78bce
refs/heads/master
2020-05-15T03:25:13.537813
2019-04-18T10:31:53
2019-04-18T10:31:53
182,067,680
0
0
Apache-2.0
2019-04-18T10:31:14
2019-04-18T10:31:14
null
UTF-8
Java
false
false
12,650
java
/* * Copyright 2019 dc-square GmbH * * 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.hivemq.util; /** * @author Florian Raschbichler */ public class ReasonStrings { public static final String CONNACK_MALFORMED_PACKET_FIXED_HEADER = "Sent CONNECT with invalid fixed header."; public static final String CONNACK_MALFORMED_PACKET_USER_PROPERTY = "Sent CONNECT with malformed user property."; public static final String CONNACK_MALFORMED_PACKET_USERNAME = "Sent CONNECT with malformed username."; public static final String CONNACK_MALFORMED_PACKET_PASSWORD = "Sent CONNECT with malformed password."; public static final String CONNACK_MALFORMED_BOOLEAN = "Sent CONNECT with a malformed boolean value."; public static final String CONNACK_MALFORMED_AUTH_METHOD = "Sent CONNECT with a malformed auth method."; public static final String CONNACK_MALFORMED_AUTH_DATA = "Sent CONNECT with malformed auth data."; public static final String CONNACK_MALFORMED_WILL_PAYLOAD = "Sent CONNECT with a malformed Will payload."; public static final String CONNACK_MALFORMED_WILL_FLAG = "Sent CONNECT with an invalid will-topic/flag combination."; public static final String CONNACK_MALFORMED_RESPONSE_TOPIC = "Sent CONNECT with a malformed response topic."; public static final String CONNACK_MALFORMED_CONNECT_FLAGS = "Sent CONNECT with invalid connect flags."; public static final String CONNACK_MALFORMED_CORRELATION_DATA = "Sent CONNECT with malformed correlation data."; public static final String CONNACK_MALFORMED_CONTENT_TYPE = "Sent CONNECT with malformed content type."; public static final String CONNACK_MALFORMED_PFI = "Sent CONNECT with an invalid payload format indicator."; public static final String CONNACK_MALFORMED_REMAINING = "Sent CONNECT with not enough remaining read buffer length was sent. Property could not be read."; public static final String CONNACK_MALFORMED_PROPERTIES_LENGTH = "Sent CONNECT with malformed properties length."; public static final String CONNACK_MALFORMED_PROPERTIES_INVALID = "Sent CONNECT with an invalid property identifier."; public static final String CONNACK_PROTOCOL_ERROR_NO_AUTH = "Sent CONNECT with auth data and no auth method. This is a protocol violation."; public static final String CONNACK_PROTOCOL_RECEIVE_MAXIMUM = "Sent CONNECT with receive maximum set to '0'. This is a protocol violation."; public static final String CONNACK_PROTOCOL_PACKET_SIZE = "Sent CONNECT with packet size set to '0'. This is a protocol violation."; public static final String CONNACK_PROTOCOL_VARIABLE_HEADER = "Sent CONNECT with invalid variable header. This is a protocol violation."; public static final String CONNACK_PROTOCOL_MULTIPLE_KEY = "Sent CONNECT with %s included more than once. This is a protocol violation."; public static final String CONNACK_UNSUPPORTED_PROTOCOL_VERSION = "Sent CONNECT with invalid protocol name."; public static final String CONNACK_CLIENT_IDENTIFIER_NOT_VALID = "Sent CONNECT with invalid client identifier."; public static final String CONNACK_CLIENT_IDENTIFIER_EMPTY = "Sent CONNECT with empty client identifier."; public static final String CONNACK_CLIENT_IDENTIFIER_TOO_LONG = "Sent CONNECT with a client identifier that is too long."; public static final String CONNACK_NOT_AUTHORIZED_WILL_WILDCARD = "Not authorized to connect. Will topic contained wildcard characters (#/+). The broker does not allow this."; public static final String CONNACK_NOT_AUTHORIZED_NO_AUTHENTICATOR = "Not authorized to connect. No authenticator registered."; public static final String CONNACK_NOT_AUTHORIZED_FAILED = "Not authorized to connect. Authentication failed."; public static final String CONNACK_TOPIC_NAME_INVALID_WILL_LENGTH = "Sent CONNECT with incorrect will topic length."; public static final String CONNACK_TOPIC_NAME_INVALID_WILL_MALFORMED = "Sent CONNECT with malformed will topic."; public static final String CONNACK_TOPIC_NAME_INVALID_WILL_EMPTY = "Sent CONNECT with empty will topic."; public static final String CONNACK_TOPIC_NAME_INVALID_WILL_WILDCARD = "Not authorized to connect. Will topic contained wildcard characters (#/+) in the %s. The broker does not allow this."; public static final String CONNACK_RETAIN_NOT_SUPPORTED = "Retain flag of Will message was set to true. The broker does not allow this."; public static final String CONNACK_QOS_NOT_SUPPORTED_WILL = "Quality of service level of Will message in CONNECT exceeds maximum allowed QoS. QoS used: %s. Maximum allowed QoS: %s."; public static final String CONNACK_QOS_NOT_SUPPORTED_PUBLISH = "Quality of service level of PUBLISH exceeds maximum allowed QoS. QoS used: %s. Maximum allowed QoS: %s."; public static final String DISCONNECT_MALFORMED_USER_PROPERTY = "%s containing a malformed user property was sent."; public static final String DISCONNECT_MALFORMED_UTF8_LENGTH = "%s with incorrect UTF-8 String length for %s was sent."; public static final String DISCONNECT_MALFORMED_AUTH_METHOD = "%s with malformed authentication method was sent."; public static final String DISCONNECT_MALFORMED_WILDCARD = "%s with wildcard character (#/+) was sent."; public static final String DISCONNECT_MALFORMED_CORRELATION_DATA = "%s with malformed correlation data was sent."; public static final String DISCONNECT_MALFORMED_RESPONSE_TOPIC = "%s with malformed response topic was sent."; public static final String DISCONNECT_MALFORMED_SERVER_REFERENCE = "%s with a malformed UTF-8 String in server reference was sent."; public static final String DISCONNECT_MALFORMED_PFI = "%s with invalid payload format indicator was sent."; public static final String DISCONNECT_MALFORMED_PAYLOAD = "%s containing a payload was sent."; public static final String DISCONNECT_MALFORMED_CONTENT_TYPE = "%s with malformed UTF-8 String for content type was sent."; public static final String DISCONNECT_MALFORMED_REASON_STRING = "%s with malformed UTF-8 String for reason string was sent."; public static final String DISCONNECT_MALFORMED_REMAINING_LENGTH = "%s with not enough remaining read buffer length was sent."; public static final String DISCONNECT_MALFORMED_PROPERTIES_LENGTH = "%s with malformed properties length was sent."; public static final String DISCONNECT_MALFORMED_PROPERTY_IDENTIFIER = "%s with invalid property identifier was sent."; public static final String DISCONNECT_MALFORMED_PUBLISH_QOS_3 = "PUBLISH with quality of service set to '3' was sent."; public static final String DISCONNECT_MALFORMED_AUTH_HEADER = "AUTH with incorrect fixed header was sent."; public static final String DISCONNECT_MALFORMED_SUBSCRIBE_HEADER = "SUBSCRIBE with incorrect fixed header was sent."; public static final String DISCONNECT_MALFORMED_UNSUBSCRIBE_HEADER = "UNSUBSCRIBE with incorrect fixed header was sent."; public static final String DISCONNECT_MALFORMED_AUTH_DATA = "AUTH with malformed authentication data was sent."; public static final String DISCONNECT_MALFORMED_SUBSCRIPTION_OPTIONS = "SUBSCRIBE with malformed subscription options was sent."; public static final String DISCONNECT_MALFORMED_UTF8_STRING = "%s with malformed UTF-8 String for %s was sent."; public static final String DISCONNECT_PROTOCOL_ERROR_AUTH_METHOD = "%s with invalid authentication method was sent."; public static final String DISCONNECT_PROTOCOL_ERROR_FIXED_HEADER = "Sent DISCONNECT with invalid fixed header."; public static final String DISCONNECT_PROTOCOL_ERROR_SESSION_EXPIRY = "Sent DISCONNECT with invalid session expiry interval. Session expiry was set to zero on CONNECT and DISCONNECT contained a different value. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_REASON_CODE = "%s with invalid reason code was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_ID_ZERO = "%s with a packet identifier of '0' was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_SUBSCRIBE_ID_ZERO = "SUBSCRIBE with a packet identifier of '0' was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_PUBLISH_ID_ZERO = "PUBLISH with quality of service level greater than zero and packet identifier of '0' was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_MULTI_KEY = "%s with %s included more than once was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_PUBLISH_QOS_0_DP = "PUBLISH with quality of service set to '0' and DUP flag set to true was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_PUBLISH_SUBSCRIPTION_IDENTIFIER = "PUBLISH containing subscription identifiers was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_PUBACK_HEADER = "PUBACK with incorrect fixed header was sent."; public static final String DISCONNECT_PROTOCOL_ERROR_PUBCOMP_HEADER = "PUBCOMP with incorrect fixed header was sent."; public static final String DISCONNECT_PROTOCOL_ERROR_PUBREL_HEADER = "PUBREL with incorrect fixed header was sent."; public static final String DISCONNECT_PROTOCOL_ERROR_NO_SUBSCRIPTIONS = "SUBSCRIBE with zero subscriptions was sent."; public static final String DISCONNECT_PROTOCOL_ERROR_NO_SUBSCRIPTION_OPTIONS = "SUBSCRIBE with no subscription options was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_SHARED_SUBSCRIPTION_NO_LOCAL = "SUBSCRIBE with a shared subscription and the no local flag set to true was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_SUBSCRIPTION_IDENTIFIER_ZERO = "SUBSCRIBE with a subscription identifier of '0' was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_SUBSCRIBE_QOS_3 = "SUBSCRIBE with a quality of service level set to '3' was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_SUBSCRIBE_RETAIN_HANDLING_3 = "SUBSCRIBE with retain handling set to '3' was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_UNSUBSCRIBE_NO_TOPIC_FILTERS = "UNSUBSCRIBE containing no topic filters was sent. This is a protocol violation."; public static final String DISCONNECT_PROTOCOL_ERROR_UNSUBSCRIBE_PACKET_ID_0 = "UNSUBSCRIBE with a packet identifier of '0' was sent. This is a protocol violation."; public static final String DISCONNECT_RECEIVE_MAXIMUM_EXCEEDED = "Too many concurrent PUBLISH messages sent."; public static final String DISCONNECT_TOPIC_ALIAS_INVALID_ZERO = "PUBLISH containing topic alias of '0' was sent."; public static final String DISCONNECT_TOPIC_ALIAS_INVALID_TOO_LARGE = "Topic alias in PUBLISH sent was too large."; public static final String DISCONNECT_TOPIC_ALIAS_INVALID_UNMAPPED = "Topic alias in PUBLISH could not be mapped."; public static final String DISCONNECT_TOPIC_ALIAS_INVALID_HARD_LIMIT = "Topic alias in PUBLISH exceeds the global memory hard limit."; public static final String DISCONNECT_TOPIC_ALIAS_INVALID_ABSENT = "PUBLISH missing both topic name and topic alias was sent."; public static final String DISCONNECT_PACKET_TOO_LARGE_USER_PROPERTIES = "User properties size of %s sent was too large."; public static final String DISCONNECT_PAYLOAD_FORMAT_INVALID_PUBLISH = "PUBLISH with no valid UTF-8 payload was sent."; public static final String DISCONNECT_RETAIN_NOT_SUPPORTED = "PUBLISH with retain flag set to true was sent. The broker does not allow this."; public static final String DISCONNECT_SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED = "Disconnecting client. SUBSCRIBE containing subscription identifiers was sent. The broker does not allow this."; private ReasonStrings() { //Don't instantiate } }
9f32b315a8fc55479131a736eb7a59211751649f
2467f74b6343c0c4c85910a9a5d007af899a0473
/src/com/company/AtleticoMdrid.java
e79a7165f209d97d3e2f8972ac876ad63b9db0c7
[]
no_license
isakov33/15
f4a0b7d038c5b1bc8b938a498655d3bc933ca639
8e037dc46f68e4a6c38fa17dddf3d2576e989a58
refs/heads/master
2023-08-05T01:44:18.058999
2021-10-08T11:44:57
2021-10-08T11:44:57
414,963,011
0
0
null
null
null
null
UTF-8
Java
false
false
590
java
package com.company; public class AtleticoMdrid extends FootballTeam implements Printable { String bestPlayer; String name; public AtleticoMdrid(int worldCup, String bestPlayer, String name) { super(worldCup); this.bestPlayer = bestPlayer; this.name = name; } public String getName() { return name; } public String getBestPlayer() { return bestPlayer; } @Override public void print() { System.out.println("best player" + getBestPlayer() +" "+ "\nname" + getName() + " " + "woc" + getWorldCup()); } }
55171a20503e1d622d610ae582ede6e5e0c31bcf
95ac59bee499712afacd2153d4ede3b7d61a880e
/MyBox/src/main/java/mara/mybox/fxml/FxmlImageManufacture.java
0f607732211e42a58ad6067c685c1984f5ad65f8
[ "Apache-2.0" ]
permissive
jingjiaguo/MyBox
521bd22323ce8e6f74741693262d3454b90ad6ba
e0cd44ad0ff1c2b007f7144af47e5ddd4c95d1d0
refs/heads/master
2022-12-05T20:39:37.334164
2020-08-30T08:23:49
2020-08-30T08:23:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
61,690
java
package mara.mybox.fxml; import java.awt.image.BufferedImage; import java.util.List; import java.util.Random; import javafx.embed.swing.SwingFXUtils; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.SnapshotParameters; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext; import javafx.scene.effect.Blend; import javafx.scene.effect.BlendMode; import javafx.scene.effect.ColorInput; import javafx.scene.effect.DropShadow; import javafx.scene.effect.ImageInput; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.image.PixelReader; import javafx.scene.image.PixelWriter; import javafx.scene.image.WritableImage; import javafx.scene.paint.Color; import javafx.scene.shape.Line; import javafx.scene.shape.Rectangle; import javafx.scene.text.Font; import javafx.scene.text.Text; import mara.mybox.data.DoubleCircle; import mara.mybox.data.DoubleEllipse; import mara.mybox.data.DoubleLines; import mara.mybox.data.DoubleOutline; import mara.mybox.data.DoublePolygon; import mara.mybox.data.DoublePolyline; import mara.mybox.data.DoubleRectangle; import mara.mybox.data.DoubleShape; import mara.mybox.image.ImageBlend; import mara.mybox.image.ImageBlend.ImagesRelativeLocation; import mara.mybox.image.ImageColor; import mara.mybox.image.ImageCombine; import mara.mybox.image.ImageInformation; import mara.mybox.image.ImageManufacture; import mara.mybox.image.ImageMosaic; import mara.mybox.image.ImageScope; import mara.mybox.image.ImageScope.ScopeType; import mara.mybox.image.PixelBlend.ImagesBlendMode; import mara.mybox.image.PixelsOperation; import static mara.mybox.value.AppVariables.logger; /** * @Author Mara * @CreateDate 2018-6-11 11:19:42 * @Description * @License Apache License Version 2.0 */ public class FxmlImageManufacture { public class ImageManufactureType { public static final int Brighter = 0; public static final int Darker = 1; public static final int Gray = 2; public static final int Invert = 3; public static final int Saturate = 4; public static final int Desaturate = 5; } public static java.awt.Color toAwtColor(Color color) { java.awt.Color newColor = new java.awt.Color((int) (color.getRed() * 255), (int) (color.getGreen() * 255), (int) (color.getBlue() * 255), (int) (color.getOpacity() * 255)); return newColor; } public static Image createImage(int width, int height, Color color) { WritableImage newImage = new WritableImage(width, height); PixelWriter pixelWriter = newImage.getPixelWriter(); for (int y = 0; y < newImage.getHeight(); y++) { for (int x = 0; x < newImage.getWidth(); x++) { pixelWriter.setColor(x, y, color); } } return newImage; } public static Image manufactureImage(Image image, int manuType) { PixelReader pixelReader = image.getPixelReader(); WritableImage newImage = new WritableImage((int) image.getWidth(), (int) image.getHeight()); PixelWriter pixelWriter = newImage.getPixelWriter(); for (int y = 0; y < image.getHeight(); y++) { for (int x = 0; x < image.getWidth(); x++) { Color color = pixelReader.getColor(x, y); switch (manuType) { case ImageManufactureType.Brighter: color = color.brighter(); break; case ImageManufactureType.Darker: color = color.darker(); break; case ImageManufactureType.Gray: color = color.grayscale(); break; case ImageManufactureType.Invert: color = color.invert(); break; case ImageManufactureType.Saturate: color = color.saturate(); break; case ImageManufactureType.Desaturate: color = color.desaturate(); break; default: break; } pixelWriter.setColor(x, y, color); } } return newImage; } // https://stackoverflow.com/questions/19548363/image-saved-in-javafx-as-jpg-is-pink-toned public static BufferedImage getBufferedImage(Image image) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); return source; } public static BufferedImage checkAlpha(Image image, String format) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.checkAlpha(source, format); return target; } public static Image clearAlpha(Image image) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.removeAlpha(source); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image scaleImage(Image image, float scale) { int targetW = (int) Math.round(image.getWidth() * scale); int targetH = (int) Math.round(image.getHeight() * scale); return scaleImage(image, targetW, targetH); } public static Image scaleImage(Image image, int width, int height) { if (width == image.getWidth() && height == image.getHeight()) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.scaleImage(source, width, height); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image scaleImage(Image image, int width) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.scaleImageWidthKeep(source, width); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image scaleImage(Image image, int width, int height, boolean keepRatio, int keepType) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.scaleImage(source, width, height, keepRatio, keepType); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image addText(Image image, String textString, java.awt.Font font, Color color, int x, int y, float transparent, int shadow, int angle, boolean isOutline, boolean isVertical) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.addText(source, textString, font, FxmlImageManufacture.toAwtColor(color), x, y, transparent, shadow, angle, isOutline, isVertical); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } // This way may fail for big image public static Image addTextFx(Image image, String textString, Font font, Color color, int x, int y, float transparent, int shadow) { try { Group group = new Group(); Text text = new Text(x, y, textString); text.setFill(color); text.setFont(font); if (shadow > 0) { DropShadow dropShadow = new DropShadow(); dropShadow.setOffsetX(shadow); dropShadow.setOffsetY(shadow); text.setEffect(dropShadow); } group.getChildren().add(text); Blend blend = new Blend(BlendMode.SRC_OVER); blend.setBottomInput(new ImageInput(image)); blend.setOpacity(1.0 - transparent); group.setEffect(blend); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = group.snapshot(parameters, null); return newImage; } catch (Exception e) { logger.error(e.toString()); return null; } } public static Image addArc(Image image, int arc, Color bgColor) { if (image == null || arc <= 0) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.addArc(source, arc, FxmlImageManufacture.toAwtColor(bgColor)); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } // This way may fail for big image public static Image addArcFx(Image image, int arc, Color bgColor) { try { if (image == null || arc <= 0) { return null; } Group group = new Group(); double imageWidth = image.getWidth(), imageHeight = image.getHeight(); Scene scene = new Scene(group); ImageView view = new ImageView(image); view.setPreserveRatio(true); view.setFitWidth(imageWidth); view.setFitHeight(imageHeight); Rectangle clip = new Rectangle(imageWidth, imageHeight); clip.setArcWidth(arc); clip.setArcHeight(arc); view.setClip(clip); group.getChildren().add(view); Blend blend = new Blend(BlendMode.SRC_OVER); blend.setBottomInput(new ColorInput(0, 0, imageWidth, imageHeight, bgColor)); group.setEffect(blend); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = group.snapshot(parameters, null); return newImage; } catch (Exception e) { // logger.error(e.toString()); return null; } } // This way may fail for big image public static Image addArcFx2(Image image, int arc, Color bgColor) { try { if (image == null || arc <= 0) { return null; } double imageWidth = image.getWidth(), imageHeight = image.getHeight(); final Canvas canvas = new Canvas(imageWidth, imageHeight); final GraphicsContext g = canvas.getGraphicsContext2D(); g.setGlobalBlendMode(BlendMode.ADD); g.setFill(bgColor); g.fillRect(0, 0, canvas.getWidth(), canvas.getHeight()); g.drawImage(image, 0, 0); Rectangle clip = new Rectangle(imageWidth, imageHeight); clip.setArcWidth(arc); clip.setArcHeight(arc); canvas.setClip(clip); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = canvas.snapshot(parameters, null); return newImage; } catch (Exception e) { // logger.error(e.toString()); return null; } } public static Image addShadowAlpha(Image image, int shadow, Color color) { if (image == null || shadow <= 0) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.addShadowAlpha(source, shadow, FxmlImageManufacture.toAwtColor(color)); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image addShadowNoAlpha(Image image, int shadow, Color color) { if (image == null || shadow <= 0) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.addShadowNoAlpha(source, shadow, FxmlImageManufacture.toAwtColor(color)); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } // This way may fail for big image public static Image addShadowFx(Image image, int shadow, Color color) { try { if (image == null || shadow <= 0) { return null; } double imageWidth = image.getWidth(), imageHeight = image.getHeight(); Group group = new Group(); Scene s = new Scene(group); ImageView view = new ImageView(image); view.setPreserveRatio(true); view.setFitWidth(imageWidth); view.setFitHeight(imageHeight); DropShadow dropShadow = new DropShadow(); dropShadow.setOffsetX(shadow); dropShadow.setOffsetY(shadow); dropShadow.setColor(color); view.setEffect(dropShadow); group.getChildren().add(view); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = group.snapshot(parameters, null); return newImage; } catch (Exception e) { // logger.error(e.toString()); return null; } } public static Image blurMarginsAlpha(Image image, int blurWidth, boolean blurTop, boolean blurBottom, boolean blurLeft, boolean blurRight) { if (image == null || blurWidth <= 0) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.blurMarginsAlpha(source, blurWidth, blurTop, blurBottom, blurLeft, blurRight); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image blurMarginsNoAlpha(Image image, int blurWidth, boolean blurTop, boolean blurBottom, boolean blurLeft, boolean blurRight) { if (image == null || blurWidth <= 0) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.blurMarginsNoAlpha(source, blurWidth, blurTop, blurBottom, blurLeft, blurRight); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image cropOutsideFx(Image image, DoubleShape shape, Color bgColor) { try { if (image == null || shape == null || !shape.isValid() || bgColor == null) { return image; } int width = (int) image.getWidth(); int height = (int) image.getHeight(); DoubleRectangle bound = shape.getBound(); int x1 = (int) Math.round(Math.max(0, bound.getSmallX())); int y1 = (int) Math.round(Math.max(0, bound.getSmallY())); if (x1 >= width || y1 >= height) { return image; } int x2 = (int) Math.round(Math.min(width - 1, bound.getBigX())); int y2 = (int) Math.round(Math.min(height - 1, bound.getBigY())); int w = x2 - x1 + 1; int h = y2 - y1 + 1; PixelReader pixelReader = image.getPixelReader(); WritableImage newImage = new WritableImage(w, h); PixelWriter pixelWriter = newImage.getPixelWriter(); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { if (shape.include(x1 + x, y1 + y)) { pixelWriter.setColor(x, y, pixelReader.getColor(x1 + x, y1 + y)); } else { pixelWriter.setColor(x, y, bgColor); } } } return newImage; } catch (Exception e) { logger.debug(e.toString()); return image; } } public static Image cropOutsideFx(Image image, DoubleRectangle rect) { return cropOutsideFx(image, rect, Color.WHITE); } public static Image cropOutsideFx(Image image, double x1, double y1, double x2, double y2) { return cropOutsideFx(image, new DoubleRectangle(x1, y1, x2, y2), Color.WHITE); } public static Image cropInsideFx(Image image, DoubleShape shape, Color bgColor) { if (image == null || shape == null || !shape.isValid() || bgColor == null) { return image; } int width = (int) image.getWidth(); int height = (int) image.getHeight(); PixelReader pixelReader = image.getPixelReader(); WritableImage newImage = new WritableImage(width, height); PixelWriter pixelWriter = newImage.getPixelWriter(); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { if (shape.include(x, y)) { pixelWriter.setColor(x, y, bgColor); } else { pixelWriter.setColor(x, y, pixelReader.getColor(x, y)); } } } return newImage; } public static Image crop(Image srcImage, ImageScope scope, Color bgColor, boolean cropOutside) { try { Image newImage; PixelsOperation pixelsOperation; switch (scope.getScopeType()) { case Matting: case Color: case RectangleColor: case CircleColor: case EllipseColor: case PolygonColor: pixelsOperation = PixelsOperation.create(srcImage, scope, PixelsOperation.OperationType.Color, PixelsOperation.ColorActionType.Set); pixelsOperation.setColorPara1(ImageColor.converColor(bgColor)); newImage = pixelsOperation.operateFxImage(); break; case Rectangle: if (cropOutside) { newImage = cropOutsideFx(srcImage, scope.getRectangle(), bgColor); } else { newImage = cropInsideFx(srcImage, scope.getRectangle(), bgColor); } break; case Circle: if (cropOutside) { newImage = cropOutsideFx(srcImage, scope.getCircle(), bgColor); } else { newImage = cropInsideFx(srcImage, scope.getCircle(), bgColor); } break; case Ellipse: if (cropOutside) { newImage = cropOutsideFx(srcImage, scope.getEllipse(), bgColor); } else { newImage = cropInsideFx(srcImage, scope.getEllipse(), bgColor); } break; case Polygon: if (cropOutside) { newImage = cropOutsideFx(srcImage, scope.getPolygon(), bgColor); } else { newImage = cropInsideFx(srcImage, scope.getPolygon(), bgColor); } break; case Outline: DoubleOutline outline = new DoubleOutline(scope); if (cropOutside) { newImage = cropOutsideFx(srcImage, outline, bgColor); } else { newImage = cropInsideFx(srcImage, outline, bgColor); } break; default: newImage = null; break; } return newImage; } catch (Exception e) { logger.debug(e.toString()); return null; } } public static Image indicateSplit(Image image, List<Integer> rows, List<Integer> cols, Color lineColor, int lineWidth, boolean showSize, double scale) { if (rows == null || cols == null || rows.size() < 2 || cols.size() < 2) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = ImageScope.indicateSplit(source, rows, cols, FxmlImageManufacture.toAwtColor(lineColor), lineWidth, showSize, scale); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image drawRectangle(Image image, DoubleRectangle rect, Color strokeColor, int strokeWidth, int arcWidth, boolean dotted, boolean isFill, Color fillColor, float opacity) { if (rect == null || strokeColor == null) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.drawRectangle(source, rect, FxmlImageManufacture.toAwtColor(strokeColor), strokeWidth, arcWidth, dotted, isFill, FxmlImageManufacture.toAwtColor(fillColor), opacity); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image drawCircle(Image image, DoubleCircle circle, Color strokeColor, int strokeWidth, boolean dotted, boolean isFill, Color fillColor, float opacity) { if (circle == null || strokeColor == null) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.drawCircle(source, circle, FxmlImageManufacture.toAwtColor(strokeColor), strokeWidth, dotted, isFill, FxmlImageManufacture.toAwtColor(fillColor), opacity); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image drawEllipse(Image image, DoubleEllipse ellipse, Color strokeColor, int strokeWidth, boolean dotted, boolean isFill, Color fillColor, float opacity) { if (ellipse == null || strokeColor == null) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.drawEllipse(source, ellipse, FxmlImageManufacture.toAwtColor(strokeColor), strokeWidth, dotted, isFill, FxmlImageManufacture.toAwtColor(fillColor), opacity); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image drawPolygon(Image image, DoublePolygon polygon, Color strokeColor, int strokeWidth, boolean dotted, boolean isFill, Color fillColor, float opacity) { if (polygon == null || strokeColor == null) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.drawPolygon(source, polygon, FxmlImageManufacture.toAwtColor(strokeColor), strokeWidth, dotted, isFill, FxmlImageManufacture.toAwtColor(fillColor), opacity); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image drawPolyline(Image image, DoublePolyline polyline, Color strokeColor, int strokeWidth, boolean dotted, float opacity) { if (polyline == null || strokeColor == null) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.drawPolyline(source, polyline, FxmlImageManufacture.toAwtColor(strokeColor), strokeWidth, dotted, opacity); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image drawLines(Image image, DoublePolyline polyline, Color strokeColor, int strokeWidth, boolean dotted, float opacity) { if (polyline == null || strokeColor == null) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.drawLines(source, polyline, FxmlImageManufacture.toAwtColor(strokeColor), strokeWidth, dotted, opacity); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image drawLines(Image image, DoubleLines penData, Color strokeColor, int strokeWidth, boolean dotted, float opacity) { if (penData == null || strokeColor == null) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.drawLines(source, penData, FxmlImageManufacture.toAwtColor(strokeColor), strokeWidth, dotted, opacity); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image drawMosaic(Image image, DoubleLines penData, ImageMosaic.MosaicType mosaicType, int strokeWidth) { if (penData == null || mosaicType == null || strokeWidth < 1) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.drawMosaic(source, penData, mosaicType, strokeWidth); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } // This way may fail for big image public static Image indicateSplitFx(Image image, List<Integer> rows, List<Integer> cols, Color lineColor, int lineWidth, boolean showSize) { try { if (rows == null || cols == null) { return image; } Group group = new Group(); int width = (int) image.getWidth(); int height = (int) image.getHeight(); int row; for (int i = 0; i < rows.size(); ++i) { row = rows.get(i); if (row <= 0 || row >= height - 1) { continue; } Line rowLine = new Line(0, row, width, row); rowLine.setStroke(lineColor); rowLine.setStrokeWidth(lineWidth); group.getChildren().add(rowLine); } int col; for (int i = 0; i < cols.size(); ++i) { col = cols.get(i); if (col <= 0 || col >= width - 1) { continue; } Line colLine = new Line(col, 0, col, height); colLine.setStroke(lineColor); colLine.setStrokeWidth(lineWidth); group.getChildren().add(colLine); } if (showSize) { for (int i = 0; i < rows.size() - 1; ++i) { int h = rows.get(i + 1) - rows.get(i) + 1; for (int j = 0; j < cols.size() - 1; ++j) { int w = cols.get(j + 1) - cols.get(j) + 1; Text text = new Text(); text.setX(cols.get(j) + w / 3); text.setY(rows.get(i) + h / 3); text.setFill(lineColor); text.setText(w + "x" + h); text.setFont(new javafx.scene.text.Font(lineWidth * 3.0)); group.getChildren().add(text); } } } Blend blend = new Blend(BlendMode.SRC_OVER); blend.setBottomInput(new ImageInput(image)); group.setEffect(blend); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = group.snapshot(parameters, null); return newImage; } catch (Exception e) { // logger.error(e.toString()); return null; } } // This way may fail for big image public static Image combineImagesColumnFx(List<Image> images, Color bgColor, int interval, int Margin) { try { if (images == null || images.isEmpty()) { return null; } Group group = new Group(); int x = Margin, y = Margin, width = 0, height = 0; for (int i = 0; i < images.size(); ++i) { Image image = images.get(i); ImageView view = new ImageView(image); view.setPreserveRatio(true); view.setFitWidth(image.getWidth()); view.setFitHeight(image.getHeight()); view.setX(x); view.setY(y); group.getChildren().add(view); x = Margin; y += image.getHeight() + interval; if (image.getWidth() > width) { width = (int) image.getWidth(); } } width += 2 * Margin; height = y + Margin - interval; Blend blend = new Blend(BlendMode.SRC_OVER); blend.setBottomInput(new ColorInput(0, 0, width, height, bgColor)); group.setEffect(blend); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = group.snapshot(parameters, null); return newImage; } catch (Exception e) { logger.error(e.toString()); return null; } } public static Image combineSingleColumn(List<Image> images) { if (images == null || images.isEmpty()) { return null; } BufferedImage target = mara.mybox.image.ImageManufacture.combineSingleColumn(images); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } // This way may fail for big image public static Image combineSingleColumnFx(ImageCombine imageCombine, List<ImageInformation> images) { if (imageCombine == null || images == null) { return null; } try { Group group = new Group(); double x = imageCombine.getMarginsValue(), y = imageCombine.getMarginsValue(), imageWidth, imageHeight; double totalWidth = 0, totalHeight = 0, maxWidth = 0, minWidth = Integer.MAX_VALUE; int sizeType = imageCombine.getSizeType(); if (sizeType == ImageCombine.CombineSizeType.AlignAsBigger) { for (ImageInformation image : images) { imageWidth = image.getWidth(); if (imageWidth > maxWidth) { maxWidth = imageWidth; } } } if (sizeType == ImageCombine.CombineSizeType.AlignAsSmaller) { for (ImageInformation image : images) { imageWidth = image.getWidth(); if (imageWidth < minWidth) { minWidth = imageWidth; } } } for (int i = 0; i < images.size(); ++i) { ImageInformation imageInfo = images.get(i); Image image = imageInfo.getImage(); ImageView view = new ImageView(image); view.setPreserveRatio(true); view.setX(x); view.setY(y); if (sizeType == ImageCombine.CombineSizeType.KeepSize || sizeType == ImageCombine.CombineSizeType.TotalWidth || sizeType == ImageCombine.CombineSizeType.TotalHeight) { view.setFitWidth(image.getWidth()); } else if (sizeType == ImageCombine.CombineSizeType.EachWidth) { view.setFitWidth(imageCombine.getEachWidthValue()); } else if (sizeType == ImageCombine.CombineSizeType.EachHeight) { view.setFitHeight(imageCombine.getEachHeightValue()); } else if (sizeType == ImageCombine.CombineSizeType.AlignAsBigger) { view.setFitWidth(maxWidth); } else if (sizeType == ImageCombine.CombineSizeType.AlignAsSmaller) { view.setFitWidth(minWidth); } imageWidth = view.getBoundsInParent().getWidth(); imageHeight = view.getBoundsInParent().getHeight(); // logger.debug(imageWidth + " " + imageHeight); group.getChildren().add(view); x = imageCombine.getMarginsValue(); y += imageHeight + imageCombine.getIntervalValue(); if (imageWidth > totalWidth) { totalWidth = imageWidth; } } totalWidth += 2 * imageCombine.getMarginsValue(); totalHeight = y + imageCombine.getMarginsValue() - imageCombine.getIntervalValue(); Blend blend = new Blend(BlendMode.SRC_OVER); blend.setBottomInput(new ColorInput(0, 0, totalWidth, totalHeight, imageCombine.getBgColor())); group.setEffect(blend); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = group.snapshot(parameters, null); return newImage; } catch (Exception e) { logger.error(e.toString()); return null; } } // This way may fail for big image public static Image combineSingleRowFx(ImageCombine imageCombine, List<ImageInformation> images, boolean isPart) { if (images == null || images.isEmpty()) { return null; } try { Group group = new Group(); int x = imageCombine.getMarginsValue(), y = imageCombine.getMarginsValue(), imageWidth, imageHeight; int totalWidth = 0, totalHeight = 0, maxHeight = 0, minHeight = Integer.MAX_VALUE; if (isPart) { y = 0; } int sizeType = imageCombine.getSizeType(); if (sizeType == ImageCombine.CombineSizeType.AlignAsBigger) { for (ImageInformation image : images) { imageHeight = (int) image.getHeight(); if (imageHeight > maxHeight) { maxHeight = imageHeight; } } } if (sizeType == ImageCombine.CombineSizeType.AlignAsSmaller) { for (ImageInformation image : images) { imageHeight = (int) image.getHeight(); if (imageHeight < minHeight) { minHeight = imageHeight; } } } for (int i = 0; i < images.size(); ++i) { ImageInformation imageInfo = images.get(i); Image image = imageInfo.getImage(); ImageView view = new ImageView(image); view.setPreserveRatio(true); view.setX(x); view.setY(y); if (sizeType == ImageCombine.CombineSizeType.KeepSize || sizeType == ImageCombine.CombineSizeType.TotalWidth || sizeType == ImageCombine.CombineSizeType.TotalHeight) { view.setFitWidth(image.getWidth()); } else if (sizeType == ImageCombine.CombineSizeType.EachWidth) { view.setFitWidth(imageCombine.getEachWidthValue()); } else if (sizeType == ImageCombine.CombineSizeType.EachHeight) { view.setFitHeight(imageCombine.getEachHeightValue()); logger.debug("EachHeight"); } else if (sizeType == ImageCombine.CombineSizeType.AlignAsBigger) { view.setFitHeight(maxHeight); } else if (sizeType == ImageCombine.CombineSizeType.AlignAsSmaller) { view.setFitHeight(minHeight); } imageWidth = (int) view.getBoundsInParent().getWidth(); imageHeight = (int) view.getBoundsInParent().getHeight(); // logger.debug(imageWidth + " " + imageHeight); group.getChildren().add(view); x += imageWidth + imageCombine.getIntervalValue(); if (imageHeight > totalHeight) { totalHeight = imageHeight; } } totalWidth = x + imageCombine.getMarginsValue() - imageCombine.getIntervalValue(); if (!isPart) { totalHeight += 2 * imageCombine.getMarginsValue(); } Blend blend = new Blend(BlendMode.SRC_OVER); blend.setBottomInput(new ColorInput(0, 0, totalWidth, totalHeight, imageCombine.getBgColor())); group.setEffect(blend); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = group.snapshot(parameters, null); return newImage; } catch (Exception e) { logger.error(e.toString()); return null; } } // This way may fail for big image public static Image combineSingleColumnFx(List<Image> images) { if (images == null || images.isEmpty()) { return null; } try { Group group = new Group(); double x = 0, y = 0, imageWidth, imageHeight; double totalWidth = 0, totalHeight = 0; for (Image theImage : images) { ImageView view = new ImageView(theImage); imageWidth = theImage.getWidth(); imageHeight = theImage.getHeight(); view.setPreserveRatio(true); view.setX(x); view.setY(y); view.setFitWidth(imageWidth); view.setFitHeight(imageHeight); group.getChildren().add(view); y += imageHeight; if (imageWidth > totalWidth) { totalWidth = imageWidth; } } totalHeight = y; Blend blend = new Blend(BlendMode.SRC_OVER); blend.setBottomInput(new ColorInput(0, 0, totalWidth, totalHeight, Color.TRANSPARENT)); group.setEffect(blend); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = group.snapshot(parameters, null); return newImage; } catch (Exception e) { logger.error(e.toString()); return null; } } public static Image blendImages(Image foreImage, Image backImage, ImagesRelativeLocation location, int x, int y, boolean intersectOnly, ImagesBlendMode blendMode, float opacity) { if (foreImage == null || backImage == null || blendMode == null) { return null; } BufferedImage source1 = SwingFXUtils.fromFXImage(foreImage, null); BufferedImage source2 = SwingFXUtils.fromFXImage(backImage, null); BufferedImage target = ImageBlend.blendImages(source1, source2, location, x, y, intersectOnly, blendMode, opacity); if (target == null) { target = source1; } Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image blendImages(Image foreImage, Image backImage, int x, int y, ImagesBlendMode blendMode, float opacity) { if (foreImage == null || backImage == null || blendMode == null) { return null; } BufferedImage source1 = SwingFXUtils.fromFXImage(foreImage, null); BufferedImage source2 = SwingFXUtils.fromFXImage(backImage, null); BufferedImage target = ImageBlend.blendImages(source1, source2, x, y, blendMode, opacity); if (target == null) { target = source1; } Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static byte[] bytes(Image image) { return ImageManufacture.bytes(SwingFXUtils.fromFXImage(image, null)); } public static boolean same(Image imageA, Image imageB) { if (imageA == null || imageB == null || imageA.getWidth() != imageB.getWidth() || imageA.getHeight() != imageB.getHeight()) { return false; } return ImageManufacture.same( SwingFXUtils.fromFXImage(imageA, null), SwingFXUtils.fromFXImage(imageB, null)); } // This way may be more quicker than comparing digests public static boolean sameImage(Image imageA, Image imageB) { if (imageA == null || imageB == null || imageA.getWidth() != imageB.getWidth() || imageA.getHeight() != imageB.getHeight()) { return false; } PixelReader readA = imageA.getPixelReader(); PixelReader readB = imageB.getPixelReader(); for (int y = 0; y < imageA.getHeight(); y++) { for (int x = 0; x < imageA.getWidth(); x++) { if (!readA.getColor(x, y).equals(readB.getColor(x, y))) { return false; } } } return true; } public static int calculateColorDistance2(Color color1, Color color2) { double redDiff = (color1.getRed() - color2.getRed()) * 255; double greenDiff = (color1.getGreen() - color2.getGreen()) * 255; double blueDiff = (color1.getBlue() - color2.getBlue()) * 255; int v = (int) Math.round(2 * redDiff * redDiff + 4 * greenDiff * greenDiff + 3 * blueDiff * blueDiff); return v; } // distance2 = Math.pow(distance, 2) // distance: 0-255 public static boolean isColorMatch2(Color color1, Color color2, int distance2) { if (color1.equals(color2)) { return true; } else if (distance2 == 0) { return false; } return calculateColorDistance2(color1, color2) <= distance2; } public static Image indicateRectangle(Image image, Color color, int lineWidth, DoubleRectangle rect) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageScope.indicateRectangle(source, FxmlImageManufacture.toAwtColor(color), lineWidth, rect); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image indicateCircle(Image image, Color color, int lineWidth, DoubleCircle circle) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageScope.indicateCircle(source, FxmlImageManufacture.toAwtColor(color), lineWidth, circle); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image indicateEllipse(Image image, Color color, int lineWidth, DoubleEllipse ellipse) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageScope.indicateEllipse(source, FxmlImageManufacture.toAwtColor(color), lineWidth, ellipse); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image cutMarginsByWidth(Image image, int MarginWidth, boolean cutTop, boolean cutBottom, boolean cutLeft, boolean cutRight) { try { int imageWidth = (int) image.getWidth(); int imageHeight = (int) image.getHeight(); int top = 0, bottom = imageHeight - 1, left = 0, right = imageWidth - 1; if (cutTop) { top = MarginWidth; } if (cutBottom) { bottom -= MarginWidth; } if (cutLeft) { left = MarginWidth; } if (cutRight) { right -= MarginWidth; } return cropOutsideFx(image, left, top, right, bottom); } catch (Exception e) { logger.error(e.toString()); return null; } } public static Image cutMarginsByColor(Image image, Color mColor, int colorDistance, boolean cutTop, boolean cutBottom, boolean cutLeft, boolean cutRight) { try { int width = (int) image.getWidth(); int height = (int) image.getHeight(); PixelReader pixelReader = image.getPixelReader(); // logger.debug(width + " " + height); int top = 0, bottom = height - 1, left = 0, right = width - 1; int distance2 = colorDistance * colorDistance; if (cutTop) { for (int j = 0; j < height; ++j) { boolean notMatch = false; for (int i = 0; i < width; ++i) { if (!FxmlImageManufacture.isColorMatch2(pixelReader.getColor(i, j), mColor, distance2)) { notMatch = true; break; } } if (notMatch) { top = j; break; } } } // logger.debug("top: " + top); if (top < 0) { return null; } if (cutBottom) { for (int j = height - 1; j >= 0; --j) { boolean notMatch = false; for (int i = 0; i < width; ++i) { if (!FxmlImageManufacture.isColorMatch2(pixelReader.getColor(i, j), mColor, distance2)) { notMatch = true; break; } } if (notMatch) { bottom = j; break; } } } // logger.debug("bottom: " + bottom); if (bottom < 0) { return null; } if (cutLeft) { for (int i = 0; i < width; ++i) { boolean notMatch = false; for (int j = 0; j < height; ++j) { if (!FxmlImageManufacture.isColorMatch2(pixelReader.getColor(i, j), mColor, distance2)) { notMatch = true; break; } } if (notMatch) { left = i; break; } } } // logger.debug("left: " + left); if (left < 0) { return null; } if (cutRight) { for (int i = width - 1; i >= 0; --i) { boolean notMatch = false; for (int j = 0; j < height; ++j) { if (!FxmlImageManufacture.isColorMatch2(pixelReader.getColor(i, j), mColor, distance2)) { notMatch = true; break; } } if (notMatch) { right = i; break; } } } // logger.debug("right: " + right); if (right < 0) { return null; } // logger.debug(left + " " + top + " " + right + " " + bottom); return cropOutsideFx(image, left, top, right, bottom); } catch (Exception e) { logger.error(e.toString()); return null; } } public static Image addMarginsFx(Image image, Color color, int MarginWidth, boolean addTop, boolean addBottom, boolean addLeft, boolean addRight) { try { if (image == null || MarginWidth <= 0) { return image; } int width = (int) image.getWidth(); int height = (int) image.getHeight(); int totalWidth = width, totalHegiht = height; int x1 = 0, y1 = 0, x2 = width, y2 = height; if (addLeft) { totalWidth += MarginWidth; x1 = MarginWidth; x2 = width + MarginWidth; } if (addRight) { totalWidth += MarginWidth; } if (addTop) { totalHegiht += MarginWidth; y1 = MarginWidth; y2 = height + MarginWidth; } if (addBottom) { totalHegiht += MarginWidth; } // logger.debug(width + " " + totalWidth); PixelReader pixelReader = image.getPixelReader(); WritableImage newImage = new WritableImage(totalWidth, totalHegiht); PixelWriter pixelWriter = newImage.getPixelWriter(); pixelWriter.setPixels(x1, y1, width, height, pixelReader, 0, 0); // logger.debug(x1 + " " + y1); // logger.debug(totalWidth + " " + totalHegiht); if (addLeft) { for (int x = 0; x < MarginWidth; x++) { for (int y = 0; y < totalHegiht; y++) { pixelWriter.setColor(x, y, color); } } } if (addRight) { for (int x = totalWidth - 1; x > totalWidth - MarginWidth - 1; x--) { for (int y = 0; y < totalHegiht; y++) { pixelWriter.setColor(x, y, color); } } } if (addTop) { for (int y = 0; y < MarginWidth; y++) { for (int x = 0; x < totalWidth; x++) { pixelWriter.setColor(x, y, color); } } } if (addBottom) { for (int y = totalHegiht - 1; y > totalHegiht - MarginWidth - 1; y--) { for (int x = 0; x < totalWidth; x++) { pixelWriter.setColor(x, y, color); } } } return newImage; } catch (Exception e) { logger.error(e.toString()); return image; } } public static Image dragMarginsFx(Image image, Color color, DoubleRectangle rect) { try { if (image == null || rect == null) { return image; } int iwidth = (int) image.getWidth(); int iheight = (int) image.getHeight(); int rwidth = (int) rect.getWidth(); int rheight = (int) rect.getHeight(); int rx = (int) rect.getSmallX(); int ry = (int) rect.getSmallY(); PixelReader pixelReader = image.getPixelReader(); WritableImage newImage = new WritableImage(rwidth, rheight); PixelWriter pixelWriter = newImage.getPixelWriter(); int ix, iy; for (int j = 0; j < rheight; ++j) { for (int i = 0; i < rwidth; ++i) { ix = i + rx; iy = j + ry; if (ix >= 0 && ix < iwidth && iy >= 0 && iy < iheight) { pixelWriter.setColor(i, j, pixelReader.getColor(ix, iy)); } else { pixelWriter.setColor(i, j, color); } } } return newImage; } catch (Exception e) { logger.error(e.toString()); return image; } } // This way may fail for big image public static Image addMarginsFx2(Image image, Color color, int MarginWidth, boolean addTop, boolean addBottom, boolean addLeft, boolean addRight) { try { if (image == null || MarginWidth <= 0) { return image; } Group group = new Group(); double imageWidth = image.getWidth(), imageHeight = image.getHeight(); double totalWidth = image.getWidth(), totalHeight = image.getHeight(); ImageView view = new ImageView(image); view.setPreserveRatio(true); view.setFitWidth(imageWidth); view.setFitHeight(imageHeight); if (addLeft) { view.setX(MarginWidth); totalWidth += MarginWidth; } else { view.setX(0); } if (addTop) { view.setY(MarginWidth); totalHeight += MarginWidth; } else { view.setY(0); } if (addBottom) { totalHeight += MarginWidth; } if (addRight) { totalWidth += MarginWidth; } group.getChildren().add(view); Blend blend = new Blend(BlendMode.SRC_OVER); blend.setBottomInput(new ColorInput(0, 0, totalWidth, totalHeight, color)); group.setEffect(blend); SnapshotParameters parameters = new SnapshotParameters(); parameters.setFill(Color.TRANSPARENT); WritableImage newImage = group.snapshot(parameters, null); return newImage; } catch (Exception e) { logger.error(e.toString()); return image; } } public static Image rotateImage(Image image, int angle) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.rotateImage(source, angle); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image horizontalImage(Image image) { int width = (int) image.getWidth(); int height = (int) image.getHeight(); PixelReader pixelReader = image.getPixelReader(); WritableImage newImage = new WritableImage(width, height); PixelWriter pixelWriter = newImage.getPixelWriter(); for (int j = 0; j < height; ++j) { int l = 0, r = width - 1; while (l <= r) { Color cl = pixelReader.getColor(l, j); Color cr = pixelReader.getColor(r, j); pixelWriter.setColor(l, j, cr); pixelWriter.setColor(r, j, cl); l++; r--; } } return newImage; } public static Image verticalImage(Image image) { int width = (int) image.getWidth(); int height = (int) image.getHeight(); PixelReader pixelReader = image.getPixelReader(); WritableImage newImage = new WritableImage(width, height); PixelWriter pixelWriter = newImage.getPixelWriter(); for (int i = 0; i < width; ++i) { int t = 0, b = height - 1; while (t <= b) { Color ct = pixelReader.getColor(i, t); Color cb = pixelReader.getColor(i, b); pixelWriter.setColor(i, t, cb); pixelWriter.setColor(i, b, ct); t++; b--; } } return newImage; } public static Image shearImage(Image image, float shearX, float shearY) { BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage target = mara.mybox.image.ImageManufacture.shearImage(source, shearX, shearY); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image makeMosaic(Image image, DoubleShape shape, int size, boolean isMosaic, boolean isExcluded) { if (!shape.isValid()) { return image; } int w = (int) image.getWidth(); int h = (int) image.getHeight(); PixelReader pixelReader = image.getPixelReader(); WritableImage newImage = new WritableImage(w, h); PixelWriter pixelWriter = newImage.getPixelWriter(); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { if (isExcluded) { if (shape.include(x, y)) { pixelWriter.setColor(x, y, pixelReader.getColor(x, y)); } else { if (isMosaic) { int mx = Math.max(0, Math.min(w - 1, x - x % size)); int my = Math.max(0, Math.min(h - 1, y - y % size)); pixelWriter.setColor(x, y, pixelReader.getColor(mx, my)); } else { int fx = Math.max(0, Math.min(w - 1, x - new Random().nextInt(size))); int fy = Math.max(0, Math.min(h - 1, y - new Random().nextInt(size))); pixelWriter.setColor(x, y, pixelReader.getColor(fx, fy)); } } } else { if (shape.include(x, y)) { if (isMosaic) { int mx = Math.max(0, Math.min(w - 1, x - x % size)); int my = Math.max(0, Math.min(h - 1, y - y % size)); pixelWriter.setColor(x, y, pixelReader.getColor(mx, my)); } else { int fx = Math.max(0, Math.min(w - 1, x - new Random().nextInt(size))); int fy = Math.max(0, Math.min(h - 1, y - new Random().nextInt(size))); pixelWriter.setColor(x, y, pixelReader.getColor(fx, fy)); } } else { pixelWriter.setColor(x, y, pixelReader.getColor(x, y)); } } } } return newImage; } public static Image addPicture(Image image, Image picture, int x, int y, int w, int h, boolean keepRatio, float transparent) { if (image == null) { return null; } if (picture == null) { return image; } BufferedImage source = SwingFXUtils.fromFXImage(image, null); BufferedImage pic = SwingFXUtils.fromFXImage(picture, null); BufferedImage target = mara.mybox.image.ImageManufacture.addPicture(source, pic, x, y, w, h, keepRatio, transparent); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image replaceColor(Image image, Color oldColor, Color newColor, int distance) { if (image == null || oldColor == null || newColor == null || distance < 0) { return image; } try { ImageScope scope = new ImageScope(image); scope.setScopeType(ScopeType.Color); scope.setColorScopeType(ImageScope.ColorScopeType.Color); scope.getColors().add(ImageColor.converColor(oldColor)); scope.setColorDistance(distance); PixelsOperation pixelsOperation = PixelsOperation.create(image, scope, PixelsOperation.OperationType.Color, PixelsOperation.ColorActionType.Set); pixelsOperation.setColorPara1(ImageColor.converColor(newColor)); Image newImage = pixelsOperation.operateFxImage(); return newImage; } catch (Exception e) { return null; } } public static Image drawHTML(Image backImage, Image html, DoubleRectangle bkRect, Color bkColor, float bkOpacity, int bkarc, int rotate, int margin) { if (html == null || backImage == null || bkRect == null) { return backImage; } BufferedImage backBfImage = SwingFXUtils.fromFXImage(backImage, null); BufferedImage htmlBfImage = SwingFXUtils.fromFXImage(html, null); BufferedImage target = ImageManufacture.drawHTML(backBfImage, htmlBfImage, bkRect, ImageColor.converColor(bkColor), bkOpacity, bkarc, rotate, margin); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } public static Image drawHTML(Image backImage, BufferedImage html, int htmlX, int htmlY, int htmlWdith, int htmlHeight) { if (html == null || backImage == null) { return backImage; } BufferedImage backBfImage = SwingFXUtils.fromFXImage(backImage, null); // BufferedImage htmlBfImage = SwingFXUtils.fromFXImage(html, null); BufferedImage target = ImageManufacture.drawHTML(backBfImage, html, htmlX, htmlY, htmlWdith, htmlHeight); Image newImage = SwingFXUtils.toFXImage(target, null); return newImage; } }
596aeea4f3d03bb79820f62a235553fe3b85746b
195087ed5dc8f24950b853c94e391c2b9e9a5ad1
/app/src/main/java/com/padcmyanmar/news/adapters/ImagesInNewsDetailsAdapter.java
dd8de928ed7223fd6df47a4cc9daa447301d524b
[ "Apache-2.0" ]
permissive
Kaung-Htet-Myint/Tab-Layout-Fragment
4302055e501dad5afc6c2bebecfb34e60f7ea82c
11a9d1cca08be8cd8bc52b824f9ab66a517236c1
refs/heads/master
2021-05-14T01:37:49.528445
2018-01-11T18:15:30
2018-01-11T18:15:30
116,572,315
0
0
null
null
null
null
UTF-8
Java
false
false
1,339
java
package com.padcmyanmar.news.adapters; import android.content.Context; import android.support.v4.view.PagerAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.padcmyanmar.news.R; import com.padcmyanmar.news.viewitems.ImageInNewsDetailsViewItems; /** * Created by User on 12/10/2017. */ public class ImagesInNewsDetailsAdapter extends PagerAdapter { @Override public int getCount() { return 6; } @Override public boolean isViewFromObject(View view, Object object) { /* if (object instanceof View) return true; else return false;*/ //return (object instanceof View); return (view == (View) object); } @Override public Object instantiateItem(ViewGroup container, int position) { Context context = container.getContext(); LayoutInflater layoutInflater = LayoutInflater.from(context); ImageInNewsDetailsViewItems view = (ImageInNewsDetailsViewItems) layoutInflater.inflate(R.layout.item_new_details_images, container, false); container.addView(view); //to show return view; } @Override public void destroyItem(ViewGroup container, int position, Object object) { container.removeView((View)object); } }
481df694d6bdc6066b0bd69468dda3d13c00471a
fdb21b6e3caca2ae7aaf28a80945ea16fa6c8390
/src/java/com/easytasks/negocio/logica/ABMRealizablesSBLocal.java
692a592e389c6f1b43b60adcb3276df6789f1813
[]
no_license
aletocar/EasyTasksNegocio
054c0110b8ee20420c2f2e0d86a6f1c35a403a0b
11d61d7f63f514a0bc16e13b095c408eb706b391
refs/heads/master
2021-01-23T08:38:29.150175
2014-11-27T19:01:32
2014-11-27T19:01:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,041
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.easytasks.negocio.logica; import com.easytasks.dataTransferObjects.DtoProyecto; import com.easytasks.dataTransferObjects.DtoTarea; import com.easytasks.negocio.excepciones.EntidadEliminadaIncorrectamenteException; import com.easytasks.negocio.excepciones.EntidadModificadaIncorrectamenteException; import com.easytasks.negocio.excepciones.EntidadNoCreadaCorrectamenteException; import com.easytasks.negocio.excepciones.ExisteEntidadException; import com.easytasks.negocio.excepciones.NoExisteEntidadException; import com.easytasks.dataTransferObjects.DtoUsuario; import javax.ejb.Local; /** * * @author alejandrotocar */ @Local public interface ABMRealizablesSBLocal { void agregarProyecto(DtoProyecto dtoP) throws ExisteEntidadException, EntidadNoCreadaCorrectamenteException; void borrarProyecto(String nombreProyecto, String nombreResponsable) throws NoExisteEntidadException; DtoProyecto buscarProyecto(String nombreProyecto, DtoUsuario responsable) throws NoExisteEntidadException; void modificarProyecto(DtoProyecto dtoP) throws NoExisteEntidadException, EntidadModificadaIncorrectamenteException; void agregarTarea(DtoTarea dtoU) throws ExisteEntidadException, EntidadNoCreadaCorrectamenteException; void borrarTarea(String nombreTarea, String nombreProyecto, String nombreResponsable, String nombreEliminador) throws NoExisteEntidadException, EntidadEliminadaIncorrectamenteException; DtoTarea buscarTarea(String nombreTarea, String nombreProyecto, DtoUsuario responsable) throws NoExisteEntidadException; void modificarTarea(DtoTarea dtoT, String nombreUsuarioModificador) throws NoExisteEntidadException, EntidadModificadaIncorrectamenteException; void asignarUsuarioAProyecto(String nombreProyecto, String nombreResponsable, String nombreUsuario) throws NoExisteEntidadException; }
e265b1e674bbca3274c999fbb211b77193f15de7
62399f31b9b235f3bed712ca1474a22cc7918c5a
/GitHubDemo/src/demo/java/exception/AgeAnimalException.java
e0ad852dfb0a4f2cf3bdc1bd1ca6b31f2f92000f
[]
no_license
EvanHuiYang/JavaPro
711e9c9bd98ba9c8bd74e9e79d979eb1c8df4b05
95707a12810f4ea8188d1d34fae465b638918c21
refs/heads/master
2018-10-16T02:28:26.299097
2018-07-18T16:20:12
2018-07-18T16:20:12
117,080,489
0
0
null
null
null
null
UTF-8
Java
false
false
157
java
package demo.java.exception; public class AgeAnimalException extends Exception { public AgeAnimalException(String message) { super(message); } }
[ "Ivan Yang@EvanYang" ]
Ivan Yang@EvanYang
b35365583cecb53ded38a686c09ee48d81a747f8
6f3583e808541c781489cbb4b8bcc118fad53ff9
/client/src/main/java/com/swust/client/TcpClient.java
12ddf0a867e39d38797b3d851aa260ac2127e15f
[ "Apache-2.0" ]
permissive
Sevenyounger/Netty_Proxy
da756519621f0702ca1d72fa4482f5910a40f384
8fa3fe981545ed20fca3a5f95effa72e62aad6af
refs/heads/master
2021-03-31T16:59:01.536889
2020-01-11T07:03:12
2020-01-11T07:03:12
248,121,498
1
0
null
2020-03-18T02:37:51
2020-03-18T02:37:51
null
UTF-8
Java
false
false
1,335
java
package com.swust.client; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; /** * @author : LiuMing * @date : 2019/11/4 20:00 * @description : tcp连接 */ public class TcpClient { public void connect(String host, int port, ChannelInitializer<?> channelInitializer) throws InterruptedException { NioEventLoopGroup workerGroup = new NioEventLoopGroup(); try { Bootstrap b = new Bootstrap(); b.group(workerGroup) .channel(NioSocketChannel.class) .handler(new LoggingHandler(LogLevel.INFO)) .option(ChannelOption.SO_KEEPALIVE, true) .handler(channelInitializer); Channel channel = b.connect(host, port).sync().channel(); channel.closeFuture().addListener((ChannelFutureListener) future -> workerGroup.shutdownGracefully()); } catch (Exception e) { workerGroup.shutdownGracefully(); throw e; } } }
08115d6efa88cb5866a79e5d4fa9ae3708dde8ac
4d4ba20b25e04d5df6b97a21f66003d1c43f6e0d
/Buyer/app/src/main/java/com/hg/www/buyer/service/BasicService.java
897d6d844489a4a22fbc9e65b1190d24332f3014
[]
no_license
zhouxianggen/homebuy
246d1766f02fdc73b1fcdd5274ae76c27ce63754
6945a8d2c4f70cff126d5e1ac92b0d99f1be6639
refs/heads/master
2021-01-21T04:55:11.467335
2016-06-06T14:51:17
2016-06-06T14:51:17
49,621,778
0
0
null
null
null
null
UTF-8
Java
false
false
3,763
java
package com.hg.www.buyer.service; import android.app.AlarmManager; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.util.Log; import com.hg.www.buyer.GlobalContext; import com.hg.www.buyer.R; import java.io.IOException; import java.util.Calendar; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public class BasicService extends Service implements ServiceInterface { public static final String TAG = BasicService.class.getSimpleName(); public static final String ACTION_UPDATE = "com.hg.www.ACTION_UPDATE"; public static final String ACTION_PULL = "com.hg.www.ACTION_PULL"; public static final String ACTION_PUSH = "com.hg.www.ACTION_PUSH"; public static final String RESP_STATUS_OK = "ok"; protected final OkHttpClient client = new OkHttpClient(); protected static void clearAlarm() { AlarmManager am = (AlarmManager) GlobalContext.getInstance().getSystemService(ALARM_SERVICE); am.cancel(getOperation()); } @Override public void onCreate() { super.onCreate(); } @Override public void onDestroy() { super.onDestroy(); } @Override public IBinder onBind(Intent intent) { return null; } @Override public int onStartCommand(Intent intent, int flags, int startId) { String action = intent != null ? intent.getAction() : ""; Log.d(TAG, String.format("on start command [%s]", action)); if (ACTION_UPDATE.equals(action)) { String args = intent.getStringExtra(GlobalContext.getInstance().getString(R.string.extra_pull_args)); new ServiceAsyncTask(null, this).pull(args); resetTheTime(); } else if (ACTION_PULL.equals(action)) { String args = intent.getStringExtra(GlobalContext.getInstance().getString(R.string.extra_pull_args)); new ServiceAsyncTask(null, this).pull(args); } else if (ACTION_PUSH.equals(action) && intent != null) { String data = intent.getStringExtra(GlobalContext.getInstance().getString(R.string.extra_post_data)); new ServiceAsyncTask(null, this).push(data); } return super.onStartCommand(intent, flags, startId); } public String pull(String args) { return ""; } public String push(String data) { return ""; } public void onFinished(String errors) {} protected String get(String url) { try { Request request = new Request.Builder().url(url).build(); Response response = client.newCall(request).execute(); if (!response.isSuccessful()) { return ""; } return response.body().string(); } catch (IOException e) { return ""; } } private void resetTheTime() { Log.d(TAG, "reset the time"); AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE); Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add(Calendar.SECOND, getUpdateInterval()); am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), getOperation()); } protected int getUpdateInterval() { return 10; } protected static PendingIntent getOperation() { Intent intent = new Intent(); intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); intent.setAction(ACTION_UPDATE); PendingIntent sender = PendingIntent.getService(GlobalContext.getInstance().getBaseContext() , 1000, intent, PendingIntent.FLAG_CANCEL_CURRENT); return sender; } }
e11e7ba28bb89738795d7dec2dcb8201c75b94ca
4eecb3e8232f01e913c12e5d0b451f8e96c0c54c
/src/main/java/vot/wq/devtool/restf/GrabBlog.java
254673fe1c1cf55542b97053e2b3afc447264913
[]
no_license
votzone/DevTools
aab315dc028ca43cfdb561064f8938543df14da2
4d0b702ad263748eae0025eae6c68e81f9a82307
refs/heads/master
2020-03-27T00:53:10.817766
2019-11-08T12:34:27
2019-11-08T12:34:27
145,664,543
0
0
null
null
null
null
UTF-8
Java
false
false
3,126
java
package vot.wq.devtool.restf; import com.overzealous.remark.Options; import com.overzealous.remark.Remark; import org.apache.http.util.TextUtils; import vot.wq.devtool.util.FileUtil; import vot.wq.devtool.util.RestfulUtil; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPathExpressionException; import java.io.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class GrabBlog { String url,outPath; String title,content; public GrabBlog(String url, String outPath){ this.url = url; this.outPath = outPath; } public XpathMap getxpath(){ for (String key :XpathMap.xpathMaps.keySet()){ if(url.startsWith(key)){ return XpathMap.xpathMaps.get(key); } } return XpathMap.xpathMaps.get("default"); } public void grab(){ String html = RestfulUtil.requestHtml(RestfulUtil.getDefaultHttpGet(url)); XpathMap xpathMap = getxpath(); assert xpathMap !=null; try { title = RestfulUtil.findTextByXpath(xpathMap.titleXpath, html).trim(); content = RestfulUtil.findHtmlByXpath(xpathMap.contentXpath, html); Options options = Options.github(); options.autoLinks = true; options.inlineLinks = true; Remark remark = new Remark(options); content = remark.convert(content); } catch (XPathExpressionException e) { e.printStackTrace(); } catch (ParserConfigurationException e) { e.printStackTrace(); } } public void save(){ File save2 = new File(outPath,FileUtil.filenameFilter(title)+".md"); FileUtil.save2File(save2,"#"+title+"\n\n"+content); } static class XpathMap{ String host; String titleXpath; String contentXpath; public XpathMap(String host, String titleXpath, String contentXpath){ this.host = host; this.contentXpath = contentXpath; this.titleXpath = titleXpath; } public static Map<String,XpathMap> xpathMaps = new HashMap<>(); // 静态代码块 static { if(xpathMaps.size()<=0){ XpathMap def = new XpathMap("default","/html/head/title","/html/body"); xpathMaps.put("default",def); InputStream is = GrabBlog.class.getResourceAsStream("/blogxpath"); try { String line; BufferedReader br = new BufferedReader(new InputStreamReader(is)); while ((line = br.readLine()) != null) { String results[]=line.split("==="); XpathMap xpathMap = new XpathMap(results[0].trim(),results[2].trim(),results[1].trim()); xpathMaps.put(results[0],xpathMap); } }catch (IOException e){ throw new RuntimeException("no accounts"); } } } } }
4ddaea1175eb431b67bb4350dbea025a6c18fd5d
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/JFreeChart/rev91-1012/left-branch-1012/tests/org/jfree/chart/renderer/category/junit/BarRendererTests.java
e9047349128dc03c07677eca6ae3f7ef5ea38a3b
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
6,582
java
package org.jfree.chart.renderer.category.junit; import java.awt.Color; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.jfree.chart.JFreeChart; import org.jfree.chart.LegendItem; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.labels.ItemLabelAnchor; import org.jfree.chart.labels.ItemLabelPosition; import org.jfree.chart.labels.StandardCategoryItemLabelGenerator; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.renderer.category.BarRenderer; import org.jfree.chart.renderer.junit.RendererChangeDetector; import org.jfree.data.category.DefaultCategoryDataset; import org.jfree.ui.GradientPaintTransformType; import org.jfree.ui.StandardGradientPaintTransformer; import org.jfree.ui.TextAnchor; import org.jfree.util.PublicCloneable; public class BarRendererTests extends TestCase { public static Test suite() { return new TestSuite(BarRendererTests.class); } public BarRendererTests(String name) { super(name); } public void testEquals() { BarRenderer r1 = new BarRenderer(); BarRenderer r2 = new BarRenderer(); assertTrue(r1.equals(r2)); assertTrue(r2.equals(r1)); r1.setBase(0.123); assertFalse(r1.equals(r2)); r2.setBase(0.123); assertTrue(r1.equals(r2)); r1.setItemMargin(0.22); assertFalse(r1.equals(r2)); r2.setItemMargin(0.22); assertTrue(r1.equals(r2)); r1.setDrawBarOutline(!r1.isDrawBarOutline()); assertFalse(r1.equals(r2)); r2.setDrawBarOutline(!r2.isDrawBarOutline()); assertTrue(r1.equals(r2)); r1.setMaximumBarWidth(0.11); assertFalse(r1.equals(r2)); r2.setMaximumBarWidth(0.11); assertTrue(r1.equals(r2)); r1.setMinimumBarLength(0.04); assertFalse(r1.equals(r2)); r2.setMinimumBarLength(0.04); assertTrue(r1.equals(r2)); r1.setGradientPaintTransformer(new StandardGradientPaintTransformer( GradientPaintTransformType.CENTER_VERTICAL)); assertFalse(r1.equals(r2)); r2.setGradientPaintTransformer(new StandardGradientPaintTransformer( GradientPaintTransformType.CENTER_VERTICAL)); assertTrue(r1.equals(r2)); r1.setPositiveItemLabelPositionFallback(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.CENTER)); assertFalse(r1.equals(r2)); r2.setPositiveItemLabelPositionFallback(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.CENTER)); assertTrue(r1.equals(r2)); r1.setNegativeItemLabelPositionFallback(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.CENTER)); assertFalse(r1.equals(r2)); r2.setNegativeItemLabelPositionFallback(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.CENTER)); assertTrue(r1.equals(r2)); } public void testHashcode() { BarRenderer r1 = new BarRenderer(); BarRenderer r2 = new BarRenderer(); assertTrue(r1.equals(r2)); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2); } public void testCloning() { BarRenderer r1 = new BarRenderer(); r1.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator()); BarRenderer r2 = null; try { r2 = (BarRenderer) r1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); } public void testPublicCloneable() { BarRenderer r1 = new BarRenderer(); assertTrue(r1 instanceof PublicCloneable); } public void testSerialization() { BarRenderer r1 = new BarRenderer(); BarRenderer r2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(r1); out.close(); ObjectInput in = new ObjectInputStream(new ByteArrayInputStream( buffer.toByteArray())); r2 = (BarRenderer) in.readObject(); in.close(); } catch (Exception e) { e.printStackTrace(); } assertEquals(r1, r2); } public void testEventNotification() { RendererChangeDetector detector = new RendererChangeDetector(); BarRenderer r1 = new BarRenderer(); r1.addChangeListener(detector); detector.setNotified(false); r1.setBasePaint(Color.red); assertTrue(detector.getNotified()); } public void testGetLegendItem() { DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(21.0, "R1", "C1"); BarRenderer r = new BarRenderer(); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("x"), new NumberAxis("y"), r); new JFreeChart(plot); LegendItem li = r.getLegendItem(0, 0); assertNotNull(li); r.setSeriesVisibleInLegend(0, Boolean.FALSE); li = r.getLegendItem(0, 0); assertNull(li); } public void testGetLegendItemSeriesIndex() { DefaultCategoryDataset dataset0 = new DefaultCategoryDataset(); dataset0.addValue(21.0, "R1", "C1"); dataset0.addValue(22.0, "R2", "C1"); DefaultCategoryDataset dataset1 = new DefaultCategoryDataset(); dataset1.addValue(23.0, "R3", "C1"); dataset1.addValue(24.0, "R4", "C1"); dataset1.addValue(25.0, "R5", "C1"); BarRenderer r = new BarRenderer(); CategoryPlot plot = new CategoryPlot(dataset0, new CategoryAxis("x"), new NumberAxis("y"), r); plot.setDataset(1, dataset1); new JFreeChart(plot); LegendItem li = r.getLegendItem(1, 2); assertEquals("R5", li.getLabel()); assertEquals(1, li.getDatasetIndex()); assertEquals(2, li.getSeriesIndex()); } }
17f0219c496841266259a4c142ba5adad94559fd
b4f8701e3b393038aa31582d6618c38a294e8a6d
/src/com/pgiletich/graphics/scene/object/curve/Ermit.java
361cc8c8e342515361dac1349102da89414d6da4
[]
no_license
PaulGiletich/GraphicsEditor
77c21008c4c388e24c692c15d0a2c75e095af27a
05b7427048df174a8b47b0021c7675ed2f8cbda1
refs/heads/master
2021-01-15T13:48:25.271908
2013-12-29T20:41:45
2013-12-29T20:41:45
14,177,734
2
0
null
2013-12-16T03:51:20
2013-11-06T16:12:03
Java
UTF-8
Java
false
false
2,361
java
package com.pgiletich.graphics.scene.object.curve; import com.pgiletich.graphics.model.Point; import com.pgiletich.graphics.model.PointList; import com.pgiletich.graphics.scene.GraphicsScene; import com.pgiletich.graphics.util.Matrix; import java.util.List; public class Ermit extends AbstractCurve { private static final Matrix basicMatrix = new Matrix( new double[][]{ {2, -2, 1, 1}, {-3, 3, -2, -1}, {0, 0, 1, 0}, {1, 0, 0, 0} }); public Ermit(PointList shape) { super(shape); } @Override public void paint(GraphicsScene scene) { List<Point> points = getShape().points(); double tStep = calculateTStep(points); Point r1 = calculateRVector(points.get(0), points.get(1)); Point r4 = calculateRVector(points.get(2), points.get(3)); Matrix xMatrix = new Matrix( new double[][]{ {points.get(0).x()}, {points.get(3).x()}, {r1.x()}, {r4.x()} }); Matrix yMatrix = new Matrix( new double[][]{ {points.get(0).y()}, {points.get(3).y()}, {r1.y()}, {r4.y()} }); for (double t = 0; t <= 1; t += tStep) { scene.fillPixel( (int)Math.round(this.calculatePoint(t, xMatrix)), (int)Math.round(this.calculatePoint(t, yMatrix))); } } private Point calculateRVector(Point p1, Point p2) { return new Point((int) (p2.x() - p1.x()), (int) (p2.y() - p1.y())); } private double calculatePoint(double t, Matrix pointsMatrix) { Matrix firstPart = getTMatrix(t).multiply(basicMatrix); Matrix result = firstPart.multiply(pointsMatrix); return result.get(0,0); } private Matrix getTMatrix(double t) { return new Matrix( new double[][]{{ Math.pow(t, 3), Math.pow(t, 2), t, 1 }} ); } private double calculateTStep(List<Point> points){ return 0.001; } }
a6a84caf5c36b8661a02d652458ed8e87266fa4d
0ea70b12df56fab730fa89535d1316dd19ea8da9
/app/src/main/java/com/example/pollutionlevels/http/apimodel/No2.java
9d0892957c6aa56a01a21b5016e5b5039bee34ea
[ "Apache-2.0" ]
permissive
lvs-coding/LVS.Training.Android.PollutionLevels
e1de3a5f02c59256f34e2a0d4852dde4ad61427c
c4661faa5ea2190ad9d52d891d4b36b0e1a6bbed
refs/heads/master
2021-01-13T05:14:25.725912
2017-03-28T02:56:55
2017-03-28T02:56:55
81,285,560
0
0
null
null
null
null
UTF-8
Java
false
false
342
java
package com.example.pollutionlevels.http.apimodel; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class No2 { @SerializedName("v") @Expose private Double v; public Double getV() { return v; } public void setV(Double v) { this.v = v; } }
4f3946506ec8a75ccd0cf3b739f53f8cda7b2de6
10d77fabcbb945fe37e15ae438e360a89a24ea05
/graalvm/transactions/fork/narayana/qa/tests/src/org/jboss/jbossts/qa/RawResources02Clients2/Client098.java
4e1802aa40851ae9aa87523a88ca245a060a5535
[ "Apache-2.0", "LGPL-2.1-only", "LGPL-2.1-or-later", "LicenseRef-scancode-other-copyleft" ]
permissive
nmcl/scratch
1a881605971e22aa300487d2e57660209f8450d3
325513ea42f4769789f126adceb091a6002209bd
refs/heads/master
2023-03-12T19:56:31.764819
2023-02-05T17:14:12
2023-02-05T17:14:12
48,547,106
2
1
Apache-2.0
2023-03-01T12:44:18
2015-12-24T15:02:58
Java
UTF-8
Java
false
false
4,994
java
/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. * See the copyright.txt in the distribution for a * full listing of individual contributors. * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU Lesser General Public License, v. 2.1. * This program is distributed in the hope that it will be useful, but WITHOUT A * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License, * v.2.1 along with this distribution; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * (C) 2005-2006, * @author JBoss Inc. */ // // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 // // Arjuna Technologies Ltd., // Newcastle upon Tyne, // Tyne and Wear, // UK. // package org.jboss.jbossts.qa.RawResources02Clients2; /* * Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved. * * HP Arjuna Labs, * Newcastle upon Tyne, * Tyne and Wear, * UK. * * $Id: Client098.java,v 1.3 2003/07/07 13:43:33 jcoleman Exp $ */ /* * Try to get around the differences between Ansi CPP and * K&R cpp with concatenation. */ /* * Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved. * * HP Arjuna Labs, * Newcastle upon Tyne, * Tyne and Wear, * UK. * * $Id: Client098.java,v 1.3 2003/07/07 13:43:33 jcoleman Exp $ */ import org.jboss.jbossts.qa.RawResources02.*; import org.jboss.jbossts.qa.Utils.OAInterface; import org.jboss.jbossts.qa.Utils.ORBInterface; import org.jboss.jbossts.qa.Utils.OTS; import org.jboss.jbossts.qa.Utils.ServerIORStore; import org.omg.CosTransactions.HeuristicHazard; import org.omg.CosTransactions.HeuristicMixed; public class Client098 { public static void main(String[] args) { try { ORBInterface.initORB(args, null); OAInterface.initOA(); String serviceIOR1 = ServerIORStore.loadIOR(args[args.length - 2]); Service service1 = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR1)); String serviceIOR2 = ServerIORStore.loadIOR(args[args.length - 1]); Service service2 = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR2)); ResourceBehavior[] resourceBehaviors1 = new ResourceBehavior[1]; resourceBehaviors1[0] = new ResourceBehavior(); resourceBehaviors1[0].prepare_behavior = PrepareBehavior.PrepareBehaviorReturnVoteCommit; resourceBehaviors1[0].rollback_behavior = RollbackBehavior.RollbackBehaviorRaiseHeuristicCommit; resourceBehaviors1[0].commit_behavior = CommitBehavior.CommitBehaviorReturn; resourceBehaviors1[0].commitonephase_behavior = CommitOnePhaseBehavior.CommitOnePhaseBehaviorReturn; ResourceBehavior[] resourceBehaviors2 = new ResourceBehavior[1]; resourceBehaviors2[0] = new ResourceBehavior(); resourceBehaviors2[0].prepare_behavior = PrepareBehavior.PrepareBehaviorRaiseHeuristicMixed; resourceBehaviors2[0].rollback_behavior = RollbackBehavior.RollbackBehaviorReturn; resourceBehaviors2[0].commit_behavior = CommitBehavior.CommitBehaviorReturn; resourceBehaviors2[0].commitonephase_behavior = CommitOnePhaseBehavior.CommitOnePhaseBehaviorReturn; boolean correct = true; OTS.current().begin(); service1.oper(resourceBehaviors1, OTS.current().get_control()); service2.oper(resourceBehaviors2, OTS.current().get_control()); try { OTS.current().commit(true); System.err.println("Commit succeeded when it shouldn't"); correct = false; } catch (HeuristicMixed heuristicMixed) { } catch (HeuristicHazard heuristicHazard) { } correct = correct && service1.is_correct() && service2.is_correct(); if (!correct) { System.err.println("service1.is_correct() or service2.is_correct() returned false"); } ResourceTrace resourceTrace1 = service1.get_resource_trace(0); ResourceTrace resourceTrace2 = service2.get_resource_trace(0); correct = correct && ((resourceTrace1 == ResourceTrace.ResourceTracePrepareRollbackForget) || (resourceTrace1 == ResourceTrace.ResourceTraceRollback)); correct = correct && (resourceTrace2 == ResourceTrace.ResourceTracePrepareForget); if (correct) { System.out.println("Passed"); } else { System.out.println("Failed"); } } catch (Exception exception) { System.err.println("Client098.main: " + exception); exception.printStackTrace(System.err); System.out.println("Failed"); } try { OAInterface.shutdownOA(); ORBInterface.shutdownORB(); } catch (Exception exception) { System.err.println("Client098.main: " + exception); exception.printStackTrace(System.err); } } }
fb583a6c1e4c3dd3282b336f1d3aef9164f3f25e
34e9260134408b30e39587ac8394d32c738411a8
/app/src/main/java/com/example/countries/adapters/listeners/OnRatingBarChangeListener.java
462b9d8211bb8ae3b17b2edd151999c7d7b367fa
[]
no_license
alikleitcr7/CountriesSimpleApp
48e83383246f732cb9d200b0de10e0609e11c482
5a0627822fb43342d0d3c17b67687e993958fb9d
refs/heads/master
2022-11-19T19:08:17.191377
2020-07-27T09:25:49
2020-07-27T09:25:49
282,683,207
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
package com.example.countries.adapters.listeners; import android.widget.RatingBar; import com.example.countries.models.Country; // //public class OnRatingBarChangeListener implements RatingBar.OnRatingBarChangeListener { // // public String code; // public OnRatingBarChangeListener(Country country){ // code = country.Code; // } // // @Override // public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) { // // } //}
a3be4457d66b9ea9eab5dd00c663a4bc37d83b4b
cad45324c9977911fd410c6bd6b8871f3524caab
/crm_product/src/main/java/com/geminy/productshow/Fragment/GEMINY_StarProductFragment.java
21105d7bf249c96cb1f25d8460d704015bafe2ca
[]
no_license
lymons/android-trial
cdc7e4ce906f259cf51fae7a68cec5bed2f91ce0
06cc4297e6bc94d45f51be6ba3ed5960901f42c9
refs/heads/master
2020-12-31T01:23:36.998675
2016-03-01T07:30:35
2016-03-01T07:30:35
64,306,832
2
0
null
2016-07-27T12:32:22
2016-07-27T12:32:21
null
UTF-8
Java
false
false
4,066
java
package com.geminy.productshow.Fragment; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import com.geminy.productshow.Activity.GEMINY_MainActivity; import com.geminy.productshow.Activity.GEMINY_ProductDetailInfosActivity; import com.geminy.productshow.DAO.GEMINY_ProductDAO; import com.geminy.productshow.Model.GEMINY_Tb_product; import com.geminy.productshow.R; import com.geminy.productshow.GEMINY_mAdapter; import java.util.ArrayList; import java.util.List; /** * Created by Hatsune Miku on 2015/8/10. */ public class GEMINY_StarProductFragment extends Fragment{ private static final String ARG_SECTION_NUMBER = "section_number"; private static final String ARG_SECTION_STAR="section_star"; public static final String PRO_NAME="pro_name"; public static final String UID="UID"; private ListView mListView; private GEMINY_mAdapter mAdapter; public GEMINY_StarProductFragment(){} public GEMINY_StarProductFragment newInstance(int sectionNumber,int sectionstar,String uid) { GEMINY_StarProductFragment fragment = new GEMINY_StarProductFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); args.putInt(ARG_SECTION_STAR, sectionstar); args.putString(UID, uid); fragment.setArguments(args); return fragment; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View starProductFragmentView = (View)inflater.inflate(R.layout.geminy_fragment_main, container, false); mListView=(ListView)starProductFragmentView.findViewById(R.id.default_fragment_listview); initView(); mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { TextView tv = (TextView) view.findViewById(R.id.list_item_name); String pro_name = tv.getText().toString(); Bundle bundle = new Bundle(); String uid = getArguments().getString(UID); Intent intent = new Intent(getActivity(), GEMINY_ProductDetailInfosActivity.class); bundle.putString(PRO_NAME, pro_name); bundle.putString(UID, uid); intent.putExtras(bundle); getActivity().startActivity(intent); } }); return starProductFragmentView; } private void initView(){ GEMINY_ProductDAO productInfo=new GEMINY_ProductDAO(getActivity()); int star=getArguments().getInt(ARG_SECTION_STAR); List<GEMINY_Tb_product> listInfo=productInfo.getByStar(star); List<String> names=new ArrayList<String>(); List<String> types=new ArrayList<String>(); List<String> imgIds=new ArrayList<String>(); List<String> nums=new ArrayList<String>(); for(GEMINY_Tb_product tb_product:listInfo){ names.add(tb_product.getName()); types.add(tb_product.getType()); imgIds.add(tb_product.getPicture()); nums.add("库存"+tb_product.getNum()+"个"); } mListView.setAdapter(new GEMINY_mAdapter(getActivity(), names, types, imgIds, nums)); } @Override public void onAttach(Activity activity) { super.onAttach(activity); ((GEMINY_MainActivity) activity).onSectionAttached(getArguments().getInt(ARG_SECTION_NUMBER)); } @Override public void onResume() { super.onResume(); initView(); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); } }
812877b62a2aca73c0cc9aaf1a10ada599b0b374
1a34952646a1d38fccc9801619f5f6e40577d395
/zhihuribao/src/main/java/com/example/zhihuribao/main/activity/CommentActivity.java
68a87c92affd12a2517cb6bb67f0a0ef9ceeaefe
[]
no_license
lingdian99/MyApplication
82310bdb840391edd411913d7d5d23265c373e52
f15a69b00f79f7ccf126bd63112b4a94799b2766
refs/heads/master
2021-01-24T17:47:19.504311
2018-01-26T09:11:18
2018-01-26T09:11:18
64,453,116
0
0
null
null
null
null
UTF-8
Java
false
false
5,605
java
package com.example.zhihuribao.main.activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.util.SparseArray; import android.view.View; import android.widget.Button; import android.widget.Toast; import com.example.zhihuribao.R; import com.example.zhihuribao.main.adapter.CommentAdapter; import com.example.zhihuribao.main.adapter.RvListener; import com.example.zhihuribao.main.bean.Comment; import com.example.zhihuribao.main.constant.ZhihuRibaoUrl; import com.example.zhihuribao.main.http.AppClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; /** * Created by banker_test on 2017/8/17. */ public class CommentActivity extends AppCompatActivity { private RecyclerView rvComment; private CommentAdapter commentAdapter; private Context context; private List<Comment.CommentsBean> longDataList; private List<Comment.CommentsBean> shortDataList; private String id; private List<Integer> headPositions; private Map<Integer, String> sections; private SparseArray<String> sectionArray; //返回按钮 private Button btnBack; //菜单按钮 private Button btnSetting; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_comment); longDataList = new ArrayList<>(); shortDataList = new ArrayList<>(); headPositions = new ArrayList<>(); sections = new HashMap<>(); sectionArray = new SparseArray<>(); Intent intent = getIntent(); Bundle bundle = intent.getExtras(); id = bundle.getString("listId"); context = CommentActivity.this; initUi(); getLongComment(); } private void initUi(){ btnBack= (Button) findViewById(R.id.btn_back); btnSetting= (Button) findViewById(R.id.btn_setting); btnBack.setOnClickListener(new MyOnClickListener()); btnSetting.setOnClickListener(new MyOnClickListener()); } private void initView() { rvComment = (RecyclerView) findViewById(R.id.rv_comment); commentAdapter = new CommentAdapter(context, longDataList, headPositions, new RvListener() { @Override public void onClick(int position) { Toast.makeText(CommentActivity.this, ":" + position, Toast.LENGTH_SHORT).show(); } }); rvComment.setAdapter(commentAdapter); rvComment.setLayoutManager(new LinearLayoutManager(context)); } //加载网络数据 private void getLongComment() { AppClient.ApiLongComment apiLongComment = AppClient.retrofit(ZhihuRibaoUrl.SHORT_COMMENT_HEAD).create(AppClient.ApiLongComment.class); Call<Comment> call = apiLongComment.getLongComment(id); call.enqueue(new Callback<Comment>() { @Override public void onResponse(Call<Comment> call, Response<Comment> response) { headPositions.add(0); sectionArray.put(0, "长评论"); sections.put(0, "长评论"); // longDataList.add(0,null); for (int i=0;i<response.body().getComments().size();i++){ longDataList.add(response.body().getComments().get(i)); } headPositions.add(longDataList.size() + 1); // longDataList.addAll(response.body().getComments()); sectionArray.put(longDataList.size() + 1, "短评论"); sections.put(longDataList.size() + 1, "短评论"); // longDataList.add(longDataList.size()-1,null); initView(); getShortComment(); Log.e("dataSize", "onResponse: " + longDataList.size()); } @Override public void onFailure(Call<Comment> call, Throwable t) { } }); } //加载短评 private void getShortComment() { final AppClient.ApiShortComment shortComment = AppClient.retrofit(ZhihuRibaoUrl.SHORT_COMMENT_HEAD).create(AppClient.ApiShortComment.class); Call<Comment> call = shortComment.getShortComment(id); call.enqueue(new Callback<Comment>() { @Override public void onResponse(Call<Comment> call, Response<Comment> response) { shortDataList = response.body().getComments(); longDataList.addAll(shortDataList); commentAdapter.notifyDataSetChanged(); Log.e("shortSize", "onResponse: " + shortDataList.size()); } @Override public void onFailure(Call<Comment> call, Throwable t) { } }); } //点击事件 private class MyOnClickListener implements View.OnClickListener{ @Override public void onClick(View v) { switch (v.getId()){ case R.id.btn_back: finish(); break; case R.id.btn_setting: Intent intent=new Intent(CommentActivity.this,SelectImgActivity.class); startActivity(intent); break; } } } }
77af77b61c1165d6f156c49f8396fcb8d91d2e4a
263470dd3880fe872394c2f53374efe87227971d
/src/main/java/com/theironyard/controllers/AnonRestController.java
9b2bc236668e9e00fa47d756cadc926693e65656
[]
no_license
mikeplott/AnonUpload
a25c9acf67a61cbef1034c96b03ad1ff40f2d8d3
3edf11bce45ae09697b74cadbd5f1cb43e839dce
refs/heads/master
2021-01-18T20:12:23.276949
2016-10-27T15:53:23
2016-10-27T15:53:23
72,121,107
0
0
null
null
null
null
UTF-8
Java
false
false
664
java
package com.theironyard.controllers; import com.theironyard.entities.AnonFile; import com.theironyard.services.AnonFileRepo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; /** * Created by michaelplott on 10/27/16. */ @RestController public class AnonRestController { @Autowired AnonFileRepo files; @RequestMapping(path = "/files", method = RequestMethod.GET) public Iterable<AnonFile> getFiles() { return files.findAll(); } }
60427f6a0623c54934e9d1403b72c2e554959163
35703a24f76599fa91c9e758d603ca5a6d02c5e6
/ios-moe/src/com/mygdx/binding/googlemobileads/GADNativeContentAd.java
50dc64407c472e0ce18ac933eda920ce7ce26e01
[]
no_license
davidwernhart/rewardedvideotest
8c55ffe781959d355a7cc4bd7c99e6d0fb4b1033
c7a1fd1505a9a9fb09797fb141a0ad132ce8131a
refs/heads/master
2020-03-15T12:43:37.874855
2018-05-10T16:35:54
2018-05-10T16:35:54
132,150,262
0
0
null
null
null
null
UTF-8
Java
false
false
5,487
java
package com.mygdx.binding.googlemobileads; import apple.NSObject; import apple.foundation.NSArray; import apple.foundation.NSDictionary; import apple.foundation.NSMethodSignature; import apple.foundation.NSSet; import apple.uikit.UIView; import org.moe.natj.c.ann.FunctionPtr; import org.moe.natj.general.NatJ; import org.moe.natj.general.Pointer; import org.moe.natj.general.ann.Generated; import org.moe.natj.general.ann.Library; import org.moe.natj.general.ann.Mapped; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.general.ann.NInt; import org.moe.natj.general.ann.NUInt; import org.moe.natj.general.ann.Owned; import org.moe.natj.general.ann.Runtime; import org.moe.natj.general.ptr.VoidPtr; import org.moe.natj.objc.Class; import org.moe.natj.objc.ObjCRuntime; import org.moe.natj.objc.SEL; import org.moe.natj.objc.ann.ObjCClassBinding; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper; @Generated @Library("GoogleMobileAds") @Runtime(ObjCRuntime.class) @ObjCClassBinding public class GADNativeContentAd extends GADNativeAd { static { NatJ.register(); } @Generated protected GADNativeContentAd(Pointer peer) { super(peer); } @Generated @Selector("accessInstanceVariablesDirectly") public static native boolean accessInstanceVariablesDirectly(); @Generated @Selector("advertiser") public native String advertiser(); @Generated @Owned @Selector("alloc") public static native GADNativeContentAd alloc(); @Generated @Selector("allocWithZone:") @MappedReturn(ObjCObjectMapper.class) public static native Object allocWithZone(VoidPtr zone); @Generated @Selector("automaticallyNotifiesObserversForKey:") public static native boolean automaticallyNotifiesObserversForKey(String key); @Generated @Selector("body") public native String body(); @Generated @Selector("callToAction") public native String callToAction(); @Generated @Selector("cancelPreviousPerformRequestsWithTarget:") public static native void cancelPreviousPerformRequestsWithTarget( @Mapped(ObjCObjectMapper.class) Object aTarget); @Generated @Selector("cancelPreviousPerformRequestsWithTarget:selector:object:") public static native void cancelPreviousPerformRequestsWithTargetSelectorObject( @Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector, @Mapped(ObjCObjectMapper.class) Object anArgument); @Generated @Selector("class") public static native Class class_objc_static(); @Generated @Selector("classFallbacksForKeyedArchiver") public static native NSArray<String> classFallbacksForKeyedArchiver(); @Generated @Selector("classForKeyedUnarchiver") public static native Class classForKeyedUnarchiver(); @Generated @Selector("debugDescription") public static native String debugDescription_static(); @Generated @Selector("description") public static native String description_static(); @Generated @Selector("hash") @NUInt public static native long hash_static(); @Generated @Selector("headline") public native String headline(); @Generated @Selector("images") public native NSArray<?> images(); @Generated @Selector("init") public native GADNativeContentAd init(); @Generated @Selector("initialize") public static native void initialize(); @Generated @Selector("instanceMethodForSelector:") @FunctionPtr(name = "call_instanceMethodForSelector_ret") public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector( SEL aSelector); @Generated @Selector("instanceMethodSignatureForSelector:") public static native NSMethodSignature instanceMethodSignatureForSelector( SEL aSelector); @Generated @Selector("instancesRespondToSelector:") public static native boolean instancesRespondToSelector(SEL aSelector); @Generated @Selector("isSubclassOfClass:") public static native boolean isSubclassOfClass(Class aClass); @Generated @Selector("keyPathsForValuesAffectingValueForKey:") public static native NSSet<String> keyPathsForValuesAffectingValueForKey( String key); @Generated @Selector("load") public static native void load_objc_static(); @Generated @Selector("logo") public native GADNativeAdImage logo(); @Generated @Owned @Selector("new") @MappedReturn(ObjCObjectMapper.class) public static native Object new_objc(); @Generated @Deprecated @Selector("registerAdView:assetViews:") public native void registerAdViewAssetViews(UIView adView, NSDictionary<String, ? extends UIView> assetViews); @Generated @Selector("registerAdView:clickableAssetViews:nonclickableAssetViews:") public native void registerAdViewClickableAssetViewsNonclickableAssetViews( UIView adView, NSDictionary<String, ? extends UIView> clickableAssetViews, NSDictionary<String, ? extends UIView> nonclickableAssetViews); @Generated @Selector("resolveClassMethod:") public static native boolean resolveClassMethod(SEL sel); @Generated @Selector("resolveInstanceMethod:") public static native boolean resolveInstanceMethod(SEL sel); @Generated @Selector("setVersion:") public static native void setVersion(@NInt long aVersion); @Generated @Selector("superclass") public static native Class superclass_static(); @Generated @Selector("unregisterAdView") public native void unregisterAdView(); @Generated @Selector("version") @NInt public static native long version_static(); @Generated @Selector("videoController") public native GADVideoController videoController(); }