blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
26265a7a6f10122cd1dfbb031899563ef7f16c8a
1d14e9e7be58954fb2439b670cd474d9e0f85c64
/src/com/youtube/java9s/L5/Color.java
5d71f857d7a5280875d55a51b3fca82284952738
[]
no_license
myan7/DemoGenericJava8
8b530d4ecfba6478dd8a6edd30a5e33e259feb32
4fbb04eccc075aa7a17710c10027330c0d62e04b
refs/heads/master
2020-03-11T09:40:21.737244
2018-04-17T14:49:52
2018-04-17T14:49:52
129,918,875
0
0
null
null
null
null
UTF-8
Java
false
false
63
java
package com.youtube.java9s.L5; public class Color<R,G,B> { }
[ "alexyan1024@gmail.com" ]
alexyan1024@gmail.com
954623c9c80562c4576c22a9dc7387ab91a05399
d0d61932b8740c62490e4e4860a668bc52a1ea77
/src/main/java/com/octopus/decorators/MouseMovementDecorator.java
2efcd758fb3a2c8d567001b67fb67755d5bddca7
[]
no_license
zakna/WebDriverTraining
6c2d6de572439c53cb55b58da0a08dacb3832091
f105f8d3eb719f4e07ddeb57f1e44a4d739cd20e
refs/heads/master
2023-08-28T12:03:28.392150
2021-11-09T00:06:39
2021-11-09T00:06:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
36,922
java
package com.octopus.decorators; import com.octopus.AutomatedBrowser; import com.octopus.Constants; import com.octopus.decoratorbase.AutomatedBrowserBase; import com.octopus.exceptions.WebElementException; import com.octopus.utils.ExpectedConditionCallback; import com.octopus.utils.MouseMovementUtils; import com.octopus.utils.RetryService; import com.octopus.utils.SimpleBy; import com.octopus.utils.SystemPropertyUtils; import com.octopus.utils.impl.MouseMovementUtilsImpl; import com.octopus.utils.impl.RetryServiceImpl; import com.octopus.utils.impl.SimpleByImpl; import com.octopus.utils.impl.SystemPropertyUtilsImpl; import org.apache.commons.lang3.StringUtils; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.springframework.retry.RetryCallback; /** * This decorator wraps up commands that emulate end user interactions, and move the mouse to the element * location. The broser must be maximized or in full screen mode for mouse movement to work correctly, as * WebDriver can not find the absolute position of an element on the screen, but that position can be worked out * from the element position in the browser window plus a fixed value for the browsers user interface. */ public class MouseMovementDecorator extends AutomatedBrowserBase { /** * The shared MouseMovementUtilsImpl instance. */ private static final MouseMovementUtils MOUSE_MOVEMENT_UTILS = new MouseMovementUtilsImpl(); /** * The shared SystemPropertyUtilsImpl instance. */ private static final SystemPropertyUtils SYSTEM_PROPERTY_UTILS = new SystemPropertyUtilsImpl(); /** * The shared SimpleByImpl instance. */ private static final SimpleBy SIMPLE_BY = new SimpleByImpl(); /** * The shared RetryServiceImpl instance. */ private static final RetryService RETRY_SERVICE = new RetryServiceImpl(); /** * A count of how many user interactions we simulated. */ private int interactionCount = 0; private void glideMouse( final String locator, final int waitTime, final ExpectedConditionCallback expectedConditionCallback) { MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> SIMPLE_BY.getElement( getWebDriver(), locator, waitTime, expectedConditionCallback), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); } private WebElement getElementById(final String id, final int waitTime) { if (waitTime <= 0) { return getWebDriver().findElement(By.id(id)); } else { final WebDriverWait wait = new WebDriverWait(getWebDriver(), waitTime); return wait.until(ExpectedConditions.elementToBeClickable((By.id(id)))); } } private WebElement getElementByXPath(final String xpath, final int waitTime) { if (waitTime <= 0) { return getWebDriver().findElement(By.xpath(xpath)); } else { final WebDriverWait wait = new WebDriverWait(getWebDriver(), waitTime); return wait.until(ExpectedConditions.elementToBeClickable((By.xpath(xpath)))); } } private WebElement getElementByCSSSelector(final String css, final int waitTime) { if (waitTime <= 0) { return getWebDriver().findElement(By.cssSelector(css)); } else { final WebDriverWait wait = new WebDriverWait(getWebDriver(), waitTime); return wait.until(ExpectedConditions.elementToBeClickable((By.cssSelector(css)))); } } private WebElement getElementByName(final String name, final int waitTime) { if (waitTime <= 0) { return getWebDriver().findElement(By.name(name)); } else { final WebDriverWait wait = new WebDriverWait(getWebDriver(), waitTime); return wait.until(ExpectedConditions.elementToBeClickable((By.name(name)))); } } /** * Default constructor. */ public MouseMovementDecorator() { super(null); } /** * Decorator constructor. * * @param automatedBrowser The AutomatedBrowser to wrap up. */ public MouseMovementDecorator(final AutomatedBrowser automatedBrowser) { super(automatedBrowser); } @Override public void clickElementWithId(final String id) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementById(id, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementWithId( id, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void clickElementWithId(final String id, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementById(id, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementWithId( id, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void selectOptionByTextFromSelectWithId(final String optionText, final String id) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementById(id, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectWithId( optionText, id, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void selectOptionByTextFromSelectWithId(final String optionText, final String id, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementById(id, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectWithId( optionText, id, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void populateElementWithId(final String id, final String text) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementById(id, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElementWithId( id, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void populateElementWithId(final String id, final String text, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementById(id, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElementWithId( id, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void clickElementWithXPath(final String xpath) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByXPath(xpath, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementWithXPath( xpath, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void clickElementWithXPath(final String xpath, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByXPath(xpath, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementWithXPath( xpath, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void selectOptionByTextFromSelectWithXPath(final String optionText, final String xpath) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByXPath(xpath, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectWithXPath( optionText, xpath, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void selectOptionByTextFromSelectWithXPath(final String optionText, final String xpath, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByXPath(xpath, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectWithXPath( optionText, xpath, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void populateElementWithXPath(final String xpath, final String text) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByXPath(xpath, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElementWithXPath( xpath, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void populateElementWithXPath(final String xpath, final String text, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByXPath(xpath, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElementWithXPath( xpath, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void clickElementWithCSSSelector(final String cssSelector) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByCSSSelector(cssSelector, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementWithCSSSelector( cssSelector, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void clickElementWithCSSSelector(final String cssSelector, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByCSSSelector(cssSelector, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementWithCSSSelector( cssSelector, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void selectOptionByTextFromSelectWithCSSSelector(final String optionText, final String cssSelector) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByCSSSelector(cssSelector, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectWithCSSSelector( optionText, cssSelector, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void selectOptionByTextFromSelectWithCSSSelector(final String optionText, final String cssSelector, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByCSSSelector(cssSelector, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectWithCSSSelector( optionText, cssSelector, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void populateElementWithCSSSelector(final String cssSelector, final String text) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByCSSSelector(cssSelector, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElementWithCSSSelector( cssSelector, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void populateElementWithCSSSelector(final String cssSelector, final String text, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByCSSSelector(cssSelector, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElementWithCSSSelector( cssSelector, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void clickElementWithName(final String name) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByName(name, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementWithName( name, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void clickElementWithName(final String name, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByName(name, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementWithName( name, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void selectOptionByTextFromSelectWithName(final String optionText, final String name) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByName(name, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectWithName( optionText, name, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void selectOptionByTextFromSelectWithName(final String optionText, final String name, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByName(name, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectWithName( optionText, name, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void populateElementWithName(final String name, final String text) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByName(name, getDefaultExplicitWaitTime()), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElementWithName( name, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime()); } } @Override public void populateElementWithName(final String name, final String text, final int waitTime) { ++interactionCount; MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> getElementByName(name, waitTime), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElementWithName( name, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime); } } @Override public void clickElementIfExists(final String force, final String locator, final String ifExistsOption) { ++interactionCount; try { MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> SIMPLE_BY.getElement( getWebDriver(), locator, getDefaultExplicitWaitTime(), by -> force == null ? ExpectedConditions.elementToBeClickable(by) : ExpectedConditions.presenceOfElementLocated(by)), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS, force != null); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementIfExists( force, locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime(), ifExistsOption); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void clickElementIfExists(final String force, final String locator, final Integer waitTime, final String ifExistsOption) { ++interactionCount; try { MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> SIMPLE_BY.getElement( getWebDriver(), locator, waitTime, by -> force == null ? ExpectedConditions.elementToBeClickable(by) : ExpectedConditions.presenceOfElementLocated(by)), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS, force != null); if (getAutomatedBrowser() != null) { getAutomatedBrowser().clickElementIfExists( force, locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime, ifExistsOption); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void selectOptionByTextFromSelectIfExists(final String force, final String optionText, final String locator, final String ifExistsOption) { ++interactionCount; try { MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> SIMPLE_BY.getElement( getWebDriver(), locator, getDefaultExplicitWaitTime(), ExpectedConditions::elementToBeClickable), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectIfExists( force, optionText, locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime(), ifExistsOption); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void selectOptionByTextFromSelectIfExists(final String force, final String optionText, final String locator, final int waitTime, final String ifExistsOption) { ++interactionCount; try { MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> SIMPLE_BY.getElement( getWebDriver(), locator, waitTime, ExpectedConditions::elementToBeClickable), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByTextFromSelectIfExists( force, optionText, locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime, ifExistsOption); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void selectOptionByValueFromSelectIfExists(final String force, final String optionValue, final String locator, final int waitTime, final String ifExistsOption) { ++interactionCount; try { MOUSE_MOVEMENT_UTILS.mouseGlide( getWebDriver(), (JavascriptExecutor) getWebDriver(), () -> SIMPLE_BY.getElement( getWebDriver(), locator, waitTime, ExpectedConditions::elementToBeClickable), Constants.MOUSE_MOVE_TIME, Constants.MOUSE_MOVE_STEPS); if (getAutomatedBrowser() != null) { getAutomatedBrowser().selectOptionByValueFromSelectIfExists( force, optionValue, locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime, ifExistsOption); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void populateElement(final String force, final String locator, final String keystrokeDelay, final String text, final String ifExistsOption) { ++interactionCount; try { glideMouse(locator, getDefaultExplicitWaitTime(), ExpectedConditions::elementToBeClickable); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElement( force, locator, keystrokeDelay, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime(), ifExistsOption); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void populateElement(final String force, final String locator, final String keystrokeDelay, final String text, final int waitTime, final String ifExistsOption) { ++interactionCount; try { glideMouse(locator, waitTime, ExpectedConditions::elementToBeClickable); if (getAutomatedBrowser() != null) { getAutomatedBrowser().populateElement( force, locator, keystrokeDelay, text, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime, ifExistsOption); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void mouseOverIfExists(final String force, final String locator, final String ifExistsOption) { ++interactionCount; try { glideMouse(locator, getDefaultExplicitWaitTime(), ExpectedConditions::presenceOfElementLocated); final Actions action = new Actions(getWebDriver()); if (StringUtils.isNotBlank(force)) { final WebElement element = SIMPLE_BY.getElement( getWebDriver(), locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime(), ExpectedConditions::presenceOfElementLocated); ((JavascriptExecutor) getWebDriver()).executeScript( "arguments[0].dispatchEvent(new Event('mouseover', { bubbles: true }))", element); } else { // Retry to address the org.openqa.selenium.StaleElementReferenceException exception RETRY_SERVICE.getTemplate().execute((RetryCallback<Void, WebElementException>) context -> { final WebElement element = SIMPLE_BY.getElement( getWebDriver(), locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime(), ExpectedConditions::presenceOfElementLocated); action.moveToElement(element).perform(); return null; }); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void mouseOverIfExists(final String force, final String locator, final int waitTime, final String ifExistsOption) { ++interactionCount; try { glideMouse(locator, waitTime, ExpectedConditions::presenceOfElementLocated); final Actions action = new Actions(getWebDriver()); final WebElement element = SIMPLE_BY.getElement( getWebDriver(), locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime, ExpectedConditions::presenceOfElementLocated); if (StringUtils.isNotBlank(force)) { ((JavascriptExecutor) getWebDriver()).executeScript( "arguments[0].dispatchEvent(new Event('mouseover', { bubbles: true }))", element); } else { action.moveToElement(element).perform(); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void focusIfExists(final String force, final String locator, final String ifExistsOption) { ++interactionCount; try { glideMouse(locator, getDefaultExplicitWaitTime(), ExpectedConditions::presenceOfElementLocated); final Actions action = new Actions(getWebDriver()); final WebElement element = SIMPLE_BY.getElement( getWebDriver(), locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : getDefaultExplicitWaitTime(), ExpectedConditions::presenceOfElementLocated); if (StringUtils.isNotBlank(force)) { ((JavascriptExecutor) getWebDriver()).executeScript( "arguments[0].dispatchEvent(new Event('focus', { bubbles: true }))", element); } else { action.moveToElement(element).perform(); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } @Override public void focusIfExists(final String force, final String locator, final int waitTime, final String ifExistsOption) { ++interactionCount; try { glideMouse(locator, waitTime, ExpectedConditions::presenceOfElementLocated); final Actions action = new Actions(getWebDriver()); final WebElement element = SIMPLE_BY.getElement( getWebDriver(), locator, SYSTEM_PROPERTY_UTILS.getPropertyAsBoolean( Constants.MOVE_CURSOR_TO_ELEMENT, false) ? 0 : waitTime, ExpectedConditions::presenceOfElementLocated); if (StringUtils.isNotBlank(force)) { ((JavascriptExecutor) getWebDriver()).executeScript( "arguments[0].dispatchEvent(new Event('focus', { bubbles: true }))", element); } else { action.moveToElement(element).perform(); } } catch (final WebElementException ex) { if (StringUtils.isEmpty(ifExistsOption)) { throw ex; } } } /** * @return the number of user interactions we have simulated. */ public int getInteractionCount() { return interactionCount; } }
[ "matthewcasperson@gmail.com" ]
matthewcasperson@gmail.com
dac669c9a67f0cb4e7c235ca26f1909e72d3ebfe
64e47757a8a5aa3df9a94bf3cca00f6df9eb142a
/Android原生/shipin/app/src/main/java/com/duomizhibo/phonelive/ui/SmallVideoPlayerActivity.java
e8365e72a1efaa82ea6644a8f0ed36ce715deba5
[]
no_license
zhzhxxyy/shipin
61509d21a95006f04d35a5042c17f884c8b3058a
2604fbfbd4f9387dcecd45dae383dd99e342ea5e
refs/heads/master
2022-10-25T09:07:18.053062
2019-10-14T03:59:56
2019-10-14T03:59:56
214,853,011
4
0
null
2022-09-26T19:11:03
2019-10-13T16:21:31
PHP
UTF-8
Java
false
false
29,274
java
package com.duomizhibo.phonelive.ui; import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.graphics.Rect; import android.graphics.drawable.BitmapDrawable; import android.media.AudioManager; import android.media.MediaMetadataRetriever; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.annotation.NonNull; import android.text.TextUtils; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.PopupWindow; import android.widget.TextView; import android.widget.Toast; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.hyphenate.chat.EMChatManager; import com.hyphenate.chat.EMClient; import com.hyphenate.chat.EMMessage; import com.tencent.rtmp.ITXLivePlayListener; import com.tencent.rtmp.TXLiveConstants; import com.tencent.rtmp.TXLivePlayConfig; import com.tencent.rtmp.TXLivePlayer; import com.tencent.rtmp.ui.TXCloudVideoView; import com.duomizhibo.phonelive.AppConfig; import com.duomizhibo.phonelive.AppContext; import com.duomizhibo.phonelive.R; import com.duomizhibo.phonelive.TCConstants; import com.duomizhibo.phonelive.api.remote.ApiUtils; import com.duomizhibo.phonelive.api.remote.PhoneLiveApi; import com.duomizhibo.phonelive.base.ToolBarBaseActivity; import com.duomizhibo.phonelive.bean.ActiveBean; import com.duomizhibo.phonelive.bean.SimpleUserInfo; import com.duomizhibo.phonelive.bean.UserInfo; import com.duomizhibo.phonelive.fragment.CommentDialogFragment; import com.duomizhibo.phonelive.fragment.CommentFragment; import com.duomizhibo.phonelive.fragment.UserInfoDialogFragment; import com.duomizhibo.phonelive.fragment.VideoShareFragment; import com.duomizhibo.phonelive.ui.dialog.LiveCommon; import com.duomizhibo.phonelive.utils.InputMethodUtils; import com.duomizhibo.phonelive.utils.ShareUtils; import com.duomizhibo.phonelive.utils.TDevice; import com.duomizhibo.phonelive.utils.UIHelper; import com.duomizhibo.phonelive.widget.AvatarView; import com.duomizhibo.phonelive.widget.LoadUrlImageView; import com.zhy.http.okhttp.OkHttpUtils; import com.zhy.http.okhttp.callback.StringCallback; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import butterknife.ButterKnife; import butterknife.InjectView; import butterknife.OnClick; import okhttp3.Call; /* * 直播播放页面 * */ public class SmallVideoPlayerActivity extends ToolBarBaseActivity implements View.OnLayoutChangeListener, ITXLivePlayListener,VideoShareFragment.deleteClick { public final static String USER_INFO = "USER_INFO"; @InjectView(R.id.video_view) protected TXCloudVideoView mTXCloudVideoView; //加载中的背景图 @InjectView(R.id.iv_live_look_loading_bg) protected LoadUrlImageView mIvLoadingBg; @InjectView(R.id.tv_attention) protected ImageView mIvAttention; @InjectView(R.id.iv_live_emcee_head) protected AvatarView mAvEmcee; @InjectView(R.id.tv_video_commrntnum) protected TextView mTvCommentNum; @InjectView(R.id.tv_video_laudnum) protected TextView mTvLaudNum; @InjectView(R.id.iv_video_laud) protected ImageView mIvLaud; @InjectView(R.id.iv_video_laudgif) protected ImageView mIvGif; @InjectView(R.id.tv_name) protected TextView mUName; @InjectView(R.id.title) protected TextView mTitle; @InjectView(R.id.btn_cai) protected ImageView mCai; @InjectView(R.id.share_nums) protected TextView mShareCount;//分享数 protected boolean mPausing = false; public boolean mIsRegisted; public boolean mIsConnected; boolean isRequst; private TXLivePlayer mTXLivePlayer; private TXLivePlayConfig mTXPlayConfig = new TXLivePlayConfig(); private String mPlayUrl = "http://2527.vod.myqcloud.com/2527_000007d04afea41591336f60841b5774dcfd0001.f0.flv"; private boolean mPlaying = false; private int mPlayType = TXLivePlayer.PLAY_TYPE_LIVE_RTMP; protected boolean mIsLivePlay = true; private CommentFragment mCommentFragment; private UserInfo mUserInfo; ActiveBean videoBean; String uid; private Handler mHandler; boolean isShowGif = true; private UserInfoDialogFragment mUserInfoDialog; private int mScreenHeight; private EMChatManager mChatManager; SimpleUserInfo mEmceeInfo = new SimpleUserInfo(); private CommentDialogFragment mDialogFragment; private int mIsLike = -1; private MediaMetadataRetriever mmr; @Override protected int getLayoutId() { return R.layout.activity_video_show; } @Override public void initView() { mTXCloudVideoView.setOnClickListener(mClickListener); findViewById(R.id.rl_live_root).getViewTreeObserver().addOnGlobalLayoutListener(mOnGlobalLayoutListenernew); } private ViewTreeObserver.OnGlobalLayoutListener mOnGlobalLayoutListenernew = new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { Rect r = new Rect(); //获取当前界面可视部分 SmallVideoPlayerActivity.this.getWindow().getDecorView().getWindowVisibleDisplayFrame(r); //获取屏幕的高度 if (mScreenHeight == 0) { mScreenHeight = r.height(); } int visibleHeight = r.height(); if (visibleHeight == mScreenHeight) { if (mCommentFragment != null) { mCommentFragment.onSoftInputHide(); } } else { if (mCommentFragment != null) { mCommentFragment.onSoftInputShow(visibleHeight); } } } }; @Override public void initData() { Bundle bundle = getIntent().getBundleExtra(USER_INFO); videoBean = (ActiveBean) bundle.getSerializable(USER_INFO); mUserInfo = videoBean.getUserinfo(); mEmceeInfo.id = videoBean.getUid(); mEmceeInfo.user_nicename = videoBean.getUserinfo().getUser_nicename(); mUName.setText(mEmceeInfo.user_nicename); mHandler = new Handler() { @Override public void handleMessage(Message msg) { if (mIvGif != null && mIvGif.getVisibility() == View.VISIBLE) { mIvGif.setVisibility(View.GONE); } } }; uid = AppContext.getInstance().getLoginUid(); mChatManager = EMClient.getInstance().chatManager(); this.setVolumeControlStream(AudioManager.STREAM_MUSIC); //初始化房间信息 initRoomInfo(); mUserInfoDialog = new UserInfoDialogFragment(); PhoneLiveApi.getVideoInfo(videoBean.getId(), new StringCallback() { @Override public void onError(Call call, Exception e, int id) { } @Override public void onResponse(String response, int id) { try { JSONObject obj = new JSONObject(response); if ("200".equals(obj.getString("ret"))) { JSONObject data = obj.getJSONObject("data"); if (0 == data.getInt("code")) { JSONObject info0 = data.getJSONArray("info").getJSONObject(0); mIsLike = info0.getInt("islike"); if (1 == mIsLike) { mIvLaud.setBackgroundResource(R.drawable.lauded); } if (info0.getInt("isattent") == 1) { mIvAttention.setVisibility(View.GONE); } String comments = info0.getString("comments"); String shares = info0.getString("shares"); String likes = info0.getString("likes"); mTvLaudNum.setText(likes); mTvCommentNum.setText(comments); mShareCount.setText(shares); } } else { AppContext.toast("获取数据失败"); } } catch (JSONException e) { e.printStackTrace(); } } }); } protected void startPlay(String mPlayUrl, int playType) { if (!checkPlayUrl()) { return; } if (mTXLivePlayer == null) { mTXLivePlayer = new TXLivePlayer(this); } mTXLivePlayer.setPlayerView(mTXCloudVideoView); mTXLivePlayer.setRenderRotation(TXLiveConstants.RENDER_ROTATION_PORTRAIT); mTXLivePlayer.setRenderMode(TXLiveConstants.RENDER_MODE_FULL_FILL_SCREEN); mTXLivePlayer.setPlayListener(this); mTXLivePlayer.setConfig(mTXPlayConfig); int result; result = mTXLivePlayer.startPlay(mPlayUrl, playType); if (0 != result) { Intent rstData = new Intent(); if (-1 == result) { rstData.putExtra(TCConstants.ACTIVITY_RESULT, TCConstants.ERROR_MSG_NOT_QCLOUD_LINK); } else { rstData.putExtra(TCConstants.ACTIVITY_RESULT, TCConstants.ERROR_MSG_NOT_QCLOUD_LINK); } mTXCloudVideoView.onPause(); stopPlay(true); closePlayer(); } else { mPlaying = true; } } private void stopPlay(boolean clearLastFrame) { if (mTXLivePlayer != null) { mTXLivePlayer.setPlayListener(null); mTXLivePlayer.stopPlay(clearLastFrame); mPlaying = false; } } private boolean checkPlayUrl() { if (TextUtils.isEmpty(mPlayUrl) || (!mPlayUrl.startsWith("http://") && !mPlayUrl.startsWith("https://") && !mPlayUrl.startsWith("rtmp://"))) { Toast.makeText(getApplicationContext(), "播放地址不合法,目前仅支持rtmp,flv,hls,mp4播放方式!", Toast.LENGTH_SHORT).show(); return false; } if (mIsLivePlay) { if (mPlayUrl.startsWith("rtmp://")) { mPlayType = TXLivePlayer.PLAY_TYPE_LIVE_RTMP; } else if ((mPlayUrl.startsWith("http://"))) { mPlayType = TXLivePlayer.PLAY_TYPE_VOD_MP4; } else { Toast.makeText(getApplicationContext(), "播放地址不合法,直播目前仅支持rtmp,flv播放方式!", Toast.LENGTH_SHORT).show(); return false; } } else { if (mPlayUrl.startsWith("http://") || mPlayUrl.startsWith("https://")) { if (mPlayUrl.contains(".flv")) { mPlayType = TXLivePlayer.PLAY_TYPE_VOD_FLV; } else if (mPlayUrl.contains(".m3u8")) { mPlayType = TXLivePlayer.PLAY_TYPE_VOD_HLS; } else if (mPlayUrl.toLowerCase().contains(".mp4")) { mPlayType = TXLivePlayer.PLAY_TYPE_VOD_MP4; } else { Toast.makeText(getApplicationContext(), "播放地址不合法,点播目前仅支持flv,hls,mp4播放方式!", Toast.LENGTH_SHORT).show(); return false; } } else { Toast.makeText(getApplicationContext(), "播放地址不合法,点播目前仅支持flv,hls,mp4播放方式!", Toast.LENGTH_SHORT).show(); return false; } } return true; } public void setShareCount(String s) { mShareCount.setText(s); } public void setCommentNum(String s) { mTvCommentNum.setText(s); } private void initRoomInfo() { //设置背景图 mIvLoadingBg.setVisibility(View.VISIBLE); mIvLoadingBg.setImageLoadUrl(videoBean.getThumb()); mAvEmcee.setAvatarUrl(mUserInfo.getAvatar()); // mTvCommentNum.setText(videoBean.getComments()); // mTvLaudNum.setText(videoBean.getLikes()); // mShareCount.setText(videoBean.getShares()); mTitle.setText(videoBean.getTitle()); if (!uid.equals(videoBean.getUid())) { if ("1".equals(videoBean.getIslike())) { mIvLaud.setBackgroundResource(R.drawable.lauded); } if ("1".equals(videoBean.getIsattent())) { mIvAttention.setVisibility(View.GONE); } if (1 == videoBean.getIsstep()) { mCai.setImageResource(R.drawable.icon_video_cai_selected); } } else { mIvAttention.setVisibility(View.GONE); mCai.setVisibility(View.GONE); } mPlayUrl = videoBean.getHref(); //初始化直播播放器参数配置 checkPlayUrl(); startPlay(mPlayUrl, mPlayType); } @OnClick({R.id.btn_cai, R.id.btn_comment, R.id.iv_video_more, R.id.iv_video_comment, R.id.iv_video_laud, R.id.iv_video_share, R.id.iv_video_close, R.id.tv_attention}) @Override public void onClick(View v) { switch (v.getId()) { case R.id.ll_live_room_info://左上角点击主播信息 UIHelper.showHomePageActivity(SmallVideoPlayerActivity.this, videoBean.getUid()); break; case R.id.tv_attention: //关注主播 PhoneLiveApi.showFollow(AppContext.getInstance().getLoginUid(), videoBean.getUid(), AppContext.getInstance().getToken(), new PhoneLiveApi.AttentionCallback() { @Override public void callback(boolean isAttention) { mIvAttention.setVisibility(View.GONE); showToast2("关注成功"); } }); break; case R.id.iv_video_comment: showCommentDialog(); break; case R.id.btn_comment: showCommentDialog2(); break; case R.id.iv_video_share: case R.id.iv_video_more: // showSharePopWindow(SmallVideoPlayerActivity.this, v, mEmceeInfo); showSharePopWindow2(); break; case R.id.iv_video_laud: if (mIsLike == 0) { showLaudGif(); } addLikes(); break; case R.id.iv_video_close: closePlayer(); break; case R.id.btn_cai: cai(); break; } } private void cai() { if (videoBean.getIsstep() == 1) { return; } PhoneLiveApi.addVideoStep(videoBean.getId(), new StringCallback() { @Override public void onError(Call call, Exception e, int id) { } @Override public void onResponse(String response, int id) { try { JSONObject obj = new JSONObject(response); if ("200".equals(obj.getString("ret"))) { JSONObject data = obj.getJSONObject("data"); if (0 == data.getInt("code")) { int isstep = data.getJSONArray("info").getJSONObject(0).getInt("isstep"); if (isstep == 1) { videoBean.setIsstep(1); mCai.setImageResource(R.drawable.icon_video_cai_selected); } } AppContext.toast(data.getString("msg")); } } catch (JSONException e) { e.printStackTrace(); } } }); } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { switch (requestCode) { } } @Override public void onPlayEvent(int i, Bundle bundle) { if (i == TXLiveConstants.PLAY_EVT_PLAY_BEGIN) { if (mIvLoadingBg != null) { mIvLoadingBg.setVisibility(View.GONE); } } if (i == TXLiveConstants.PLAY_EVT_PLAY_END) { //循环播放 if (mTXLivePlayer != null) { mTXLivePlayer.seek(0); mTXLivePlayer.resume(); } } } @Override public void onNetStatus(Bundle status) { if (status.getInt(TXLiveConstants.NET_STATUS_VIDEO_WIDTH) > status.getInt(TXLiveConstants.NET_STATUS_VIDEO_HEIGHT)) { if (mTXLivePlayer != null) { mTXLivePlayer.setRenderRotation(TXLiveConstants.RENDER_ROTATION_LANDSCAPE); } } else if (mTXLivePlayer != null) { mTXLivePlayer.setRenderRotation(TXLiveConstants.RENDER_ROTATION_PORTRAIT); } } private View.OnClickListener mClickListener = new View.OnClickListener() { @Override public void onClick(View v) { if (mIsLike == 0) { addLikes(); } showLaudGif(); } }; private void showLaudGif() { if (mIvGif.getVisibility() == View.GONE) { mIvGif.setVisibility(View.VISIBLE); Glide.with(this).load(R.drawable.laud_gif).asGif().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(mIvGif); mHandler.sendEmptyMessageDelayed(0, 2000); } } private void addLikes() { PhoneLiveApi.addLike(uid, videoBean.getId(), new StringCallback() { @Override public void onError(Call call, Exception e, int id) { } @Override public void onResponse(String response, int id) { JSONArray res = ApiUtils.checkIsSuccess(response); if (res != null) { try { if(videoBean!=null){ videoBean.setIslike(res.getJSONObject(0).getString("islike")); videoBean.setLikes(res.getJSONObject(0).getString("likes")); } if(mTvLaudNum!=null){ mTvLaudNum.setText(videoBean.getLikes()); } if(mIvLaud!=null){ mIsLike = res.getJSONObject(0).getInt("islike"); if (mIsLike == 1) { mIvLaud.setBackgroundResource(R.drawable.lauded); } else { mIvLaud.setBackgroundResource(R.drawable.nolaud); } } } catch (JSONException e) { e.printStackTrace(); } } } }); } //评论 private void showCommentDialog() { mCommentFragment = new CommentFragment(); Bundle bundle = new Bundle(); bundle.putSerializable("bean", videoBean); mCommentFragment.setArguments(bundle); mCommentFragment.show(getSupportFragmentManager(), "CommentFragment"); } //评论 private void showCommentDialog2() { if (mDialogFragment == null) { mDialogFragment = new CommentDialogFragment(); Bundle bundle = new Bundle(); bundle.putSerializable("bean", videoBean); mDialogFragment.setArguments(bundle); } mDialogFragment.show(getSupportFragmentManager(), "CommentDialogFragment"); } //视频结束释放资源 private void videoPlayerEnd() { if (mTXLivePlayer != null) { mTXLivePlayer.setPlayListener(null); mTXLivePlayer.stopPlay(true); mTXLivePlayer = null; } if (mHandler != null) { mHandler.removeCallbacksAndMessages(null); mHandler = null; } if (mTXCloudVideoView != null) { mTXCloudVideoView = null; } if (mIvLoadingBg != null) { mIvLoadingBg = null; } if (mCommentFragment != null) { mCommentFragment = null; } } @Override public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { if (v.getId() == R.id.video_view) { if (bottom != 0) { //防止聊天软键盘挤压屏幕导致视频变形 //mVideoSurfaceView.setVideoDimension(mScreenWidth,mScreenHeight); } } else if (v.getId() == R.id.rl_live_root) { if (bottom > oldBottom) { //如果聊天窗口开启,收起软键盘时关闭聊天输入changeEditStatus(false); } } } @Override public void onStart() { super.onStart(); } @Override public void onStop() { super.onStop(); } @Override protected void onResume() { super.onResume(); } @Override protected void onPause() { super.onPause(); } private void closePlayer(){ videoPlayerEnd(); finish(); } @Override public void onBackPressed() { closePlayer(); } @Override protected void onDestroy() {//释放 super.onDestroy(); findViewById(R.id.rl_live_root).getViewTreeObserver().removeGlobalOnLayoutListener(mOnGlobalLayoutListenernew); //解除广播 OkHttpUtils.getInstance().cancelTag("initRoomInfo"); ButterKnife.reset(this); } @Override protected boolean hasActionBar() { return false; } public static void startSmallVideoPlayerActivity(final Context context, final ActiveBean live) { Bundle bundle = new Bundle(); bundle.putSerializable("USER_INFO", live); UIHelper.showSmallLookLiveActivity(context, bundle); } public void sendEMMessage(String isfollow, String content, String touid) { EMMessage message = EMMessage.createTxtSendMessage(content, touid); message.setAttribute("isfollow", isfollow); mChatManager.sendMessage(message); } private void showReportDialog() { final Dialog dialog = new Dialog(SmallVideoPlayerActivity.this, R.style.dialog_no_background); dialog.setContentView(R.layout.dialog_report); Window dialogWindow = dialog.getWindow(); dialogWindow.setGravity(Gravity.BOTTOM); dialogWindow.setWindowAnimations(R.style.dialogstyle); // 添加动画 WindowManager.LayoutParams lp = dialogWindow.getAttributes(); // 获取对话框当前的参数值 lp.width = (int) getResources().getDisplayMetrics().widthPixels - (int) TDevice.dpToPixel(15); // 宽度 lp.height = WindowManager.LayoutParams.WRAP_CONTENT; // 高度 dialogWindow.setAttributes(lp); dialog.setCanceledOnTouchOutside(true); LinearLayout mLlReport = (LinearLayout) dialog.findViewById(R.id.ll_video_report); TextView mTvReport = (TextView) dialog.findViewById(R.id.tv_type); if (uid.equals(videoBean.getUid())) { mTvReport.setText("删除视频"); } else { mTvReport.setText("举报该视频"); } LinearLayout mLlCancel = (LinearLayout) dialog.findViewById(R.id.ll_viedo_cancel); mLlReport.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (uid.equals(videoBean.getUid())) { PhoneLiveApi.setVideoRel(uid, AppContext.getInstance().getToken(), videoBean.getId(), new StringCallback() { @Override public void onError(Call call, Exception e, int id) { } @Override public void onResponse(String response, int id) { JSONArray res = ApiUtils.checkIsSuccess(response); if (res != null) { dialog.dismiss(); showToast3("删除成功", 0); closePlayer(); } } }); } else { PhoneLiveApi.setVideoReport(uid, AppContext.getInstance().getToken(), videoBean.getId(), new StringCallback() { @Override public void onError(Call call, Exception e, int id) { } @Override public void onResponse(String response, int id) { JSONArray res = ApiUtils.checkIsSuccess(response); if (res != null) { showToast3("感谢您的举报,我们会尽快做出处理...", 0); dialog.dismiss(); } } }); } } }); mLlCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); } }); dialog.show(); } //分享pop弹窗 private void showSharePopWindow(final Context context, View v, final SimpleUserInfo mUser) { View view = LayoutInflater.from(context).inflate(R.layout.pop_view_share, null); PopupWindow p = new PopupWindow(view, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, true); view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); p.setBackgroundDrawable(new BitmapDrawable()); p.setOutsideTouchable(true); LinearLayout mLlShare = (LinearLayout) view.findViewById(R.id.ll_live_shar); for (int i = 0; i < AppConfig.SHARE_TYPE.length(); i++) { final ImageView im = new ImageView(context); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams((int) TDevice.dpToPixel(40), (int) TDevice.dpToPixel(60)); if (i > 0) lp.setMargins((int) TDevice.dpToPixel(15), 0, 0, 0); im.setLayoutParams(lp); try { im.setImageResource(context.getResources().getIdentifier(AppConfig.SHARE_TYPE.getString(i) + "_share", "drawable", "com.duomizhibo.phonelive")); } catch (JSONException e) { e.printStackTrace(); } mLlShare.addView(im); final int finalI = i; im.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ShareUtils.share((Activity) context, finalI, mUser); } }); } int[] location = new int[2]; v.getLocationOnScreen(location); //p.showAtLocation(v, Gravity.NO_GRAVITY,location[0] + v.getWidth()/2 - view.getMeasuredWidth()/2,location[1]- view.getMeasuredHeight()); p.showAtLocation(v, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 0); } private void showSharePopWindow2() { VideoShareFragment f = new VideoShareFragment(this); Bundle bundle = new Bundle(); bundle.putSerializable("bean", videoBean); f.setArguments(bundle); f.show(getSupportFragmentManager(), "VideoShareFragment"); } private Dialog mLoadingDialog; public void showLoadingDialog() { if (mLoadingDialog == null) { mLoadingDialog = LiveCommon.loadingDialog(this); } mLoadingDialog.show(); } public void hideLoadingDialog() { if (mLoadingDialog != null) { mLoadingDialog.dismiss(); } } @Override public void delete() { mTXLivePlayer.stopPlay(true); } }
[ "zhzhxxyy@126.com" ]
zhzhxxyy@126.com
79fa0994cd006d7433dffdc460c4c7b708d1c0f8
44fbb8167cbe88c61113402b855d9fd3fff88d7e
/P5_02_Todoc/app/src/main/java/com/cleanup/todoc/data/model/Task.java
6e5ba3b745db792845873c8449edf9b8042faef4
[]
no_license
DsMikael/Projet_5_Todoc
ade49006ff4aabf70f3e505e236a4e2214b45e58
fe448ad245161a86931060e172f6b5cd5e29f541
refs/heads/master
2023-06-22T04:05:41.891860
2021-07-19T09:43:21
2021-07-19T09:43:21
370,989,496
1
0
null
null
null
null
UTF-8
Java
false
false
3,776
java
package com.cleanup.todoc.data.model; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.room.ColumnInfo; import androidx.room.Embedded; import androidx.room.Entity; import androidx.room.PrimaryKey; import androidx.room.RoomWarnings; import org.jetbrains.annotations.NotNull; import java.util.Comparator; /** * <p>Model for the tasks of the application.</p> * * @author Gaëtan HERFRAY */ @Entity(tableName = "tTasks") public class Task { /** * The unique identifier of the task */ @PrimaryKey(autoGenerate = true) @ColumnInfo(name = "tId") private final long id; /** * The unique identifier of the project associated to the task */ @SuppressWarnings(RoomWarnings.PRIMARY_KEY_FROM_EMBEDDED_IS_DROPPED) @Embedded private final Project project; /** * The name of the task */ @ColumnInfo(name = "name") private final String name; /** * The timestamp when the task has been created */ @ColumnInfo(name = "creationTimestamp") private final long creationTimestamp; @Override public @NotNull String toString() { return "Task{" + "id=" + id + ", project=" + project + ", name='" + name + '\'' + ", creationTimestamp=" + creationTimestamp + '}'; } /** * Instantiates a new Task. * * @param id the unique identifier of the task to set * @param project the unique identifier of the project associated to the task to set * @param name the name of the task to set * @param creationTimestamp the timestamp when the task has been created to set */ public Task(long id, Project project, @NonNull String name, long creationTimestamp) { this.id = id; this.project = project; this.name = name; this.creationTimestamp = creationTimestamp; } /** * Returns the unique identifier of the task. * * @return the unique identifier of the task */ public long getId() { return id; } /** * Returns the project associated to the task. * * @return the project associated to the task */ @Nullable public Project getProject() { return project; } /** * Returns the name of the task. * * @return the name of the task */ @NonNull public String getName() { return name; } public long getCreationTimestamp() { return creationTimestamp; } /** * Comparator to sort task from A to Z */ public static class TaskAZComparator implements Comparator<Task> { @Override public int compare(Task left, Task right) { return left.name.compareTo(right.name); } } /** * Comparator to sort task from Z to A */ public static class TaskZAComparator implements Comparator<Task> { @Override public int compare(Task left, Task right) { return right.name.compareTo(left.name); } } /** * Comparator to sort task from last created to first created */ public static class TaskRecentComparator implements Comparator<Task> { @Override public int compare(Task left, Task right) { return (int) (right.creationTimestamp - left.creationTimestamp); } } /** * Comparator to sort task from first created to last created */ public static class TaskOldComparator implements Comparator<Task> { @Override public int compare(Task left, Task right) { return (int) (left.creationTimestamp - right.creationTimestamp); } } }
[ "mickael.silva@live.com" ]
mickael.silva@live.com
9cd4d3ebabdfc41057ec75571c38ab0e3bf20cfb
96e9800b578f0cb94c52df13646ac56219e6abd6
/src/main/java/com/example/spring/aam/model/AssetType.java
fd78ea43e0380cf9bccf696c32b5e41e3ef73a3a
[]
no_license
MatthewJamesBoyle/EntepriseSpringExample
8b24977d449a0ab8a0e026f8d9defd9e8fd340aa
cca8c7f22c18d1ff04b6c318cd2b396c617d8b1c
refs/heads/master
2016-08-03T18:14:50.506359
2015-03-08T00:16:11
2015-03-08T00:16:11
31,832,715
0
0
null
null
null
null
UTF-8
Java
false
false
2,071
java
package com.example.spring.aam.model; import java.io.Serializable; import java.util.HashSet; import java.util.Set; @SuppressWarnings("serial") public class AssetType implements Serializable, IAssetType { /** * */ private Integer id; @Override public String toString() { return "AssetType [id=" + id + ", version=" + version + ", assetTypeName=" + assetTypeName + ", resources=" + resources.toString() + "]"; } /** * */ private Integer version; /** * */ private String assetTypeName; /** * */ private Set<IResource> resources = new HashSet<IResource>(); /* * (non-Javadoc) * * @see com.example.spring.aam.model.IAssetType#getId() */ @Override public Integer getId() { return id; } /* * (non-Javadoc) * * @see com.example.spring.aam.model.IAssetType#setId(java.lang.Integer) */ @Override public void setId(Integer id) { this.id = id; } /* * (non-Javadoc) * * @see com.example.spring.aam.model.IAssetType#getVersion() */ @Override public Integer getVersion() { return this.version; } /* * (non-Javadoc) * * @see * com.example.spring.aam.model.IAssetType#setVersion(java.lang.Integer) */ @Override public void setVersion(Integer version) { this.version = version; } /* * (non-Javadoc) * * @see com.example.spring.aam.model.IAssetType#getAssetTypeName() */ @Override public String getAssetTypeName() { return assetTypeName; } /* * (non-Javadoc) * * @see * com.example.spring.aam.model.IAssetType#setAssetTypeName(java.lang.String * ) */ @Override public void setAssetTypeName(String assetTypeName) { this.assetTypeName = assetTypeName; } /* * (non-Javadoc) * * @see com.example.spring.aam.model.IAssetType#getResources() */ @Override public Set<IResource> getResources() { return resources; } /* * (non-Javadoc) * * @see com.example.spring.aam.model.IAssetType#setResources(java.util.Set) */ @Override public void setResources(Set<IResource> resources) { this.resources = resources; } }
[ "matthewjamesboyle@me.com" ]
matthewjamesboyle@me.com
5c8e8ecd9a73cf1cf309d0e0e441492eb8569334
194caa3ffec4854b41d73eebde8eebace03a858a
/07.Model2MVCShop(URI,pattern)/src/main/java/com/model2/mvc/service/purchase/PurchaseService.java
21574d7866249786f8d4f2672ed7add82d71448e
[]
no_license
youree1226/07refact
b72d2eabbfa91d165b35d7fe83029aa076918996
210d18cb197b759a4c43ec7cd2fe7b6eea619090
refs/heads/master
2020-05-18T11:52:00.209055
2019-05-02T01:12:26
2019-05-02T01:12:26
184,391,577
0
0
null
null
null
null
UTF-8
Java
false
false
762
java
package com.model2.mvc.service.purchase; import java.util.Map; import com.model2.mvc.common.Search; import com.model2.mvc.service.domain.Purchase; public interface PurchaseService { public void addPurchase(Purchase purchase) throws Exception; public Purchase getPurchase(int tranNo) throws Exception; public Purchase getPurchase2(int ProdNo) throws Exception; public Map<String,Object> getPurchaseList(Search search,String buyerId) throws Exception; public Map<String,Object> getSaleList(Search search) throws Exception; public void updatePurchase(Purchase purchase) throws Exception; public void updateTranCode(Purchase purchase) throws Exception; public void cancelPurchase(int tranNo) throws Exception; }
[ "USER@USER-PC" ]
USER@USER-PC
aef570b8a5a4c4fa103009ff4e3d9a5fc24a64a5
96160fbac0a9ab38cf80941e4b3d4b44db6881b7
/ProjetoTopicosEspeciais/src/main/java/fvs/edu/br/topicos/domain/Categoria.java
fd041df365810264bcef307a4f7bbe765c89bd16
[]
no_license
jeffynlima/topicosespeciais
cb2cb72663c53578abc6e9bf79d70d40e9d2ee4a
c84a2a349001cfaa5f2eb71075a186640386813f
refs/heads/master
2020-03-26T22:38:57.462938
2018-11-19T23:10:07
2018-11-19T23:10:07
145,476,688
1
0
null
null
null
null
UTF-8
Java
false
false
1,580
java
package fvs.edu.br.topicos.domain; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToMany; @Entity public class Categoria implements Serializable{ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Integer id; private String nome; @ManyToMany(mappedBy="categorias") List<Produto> produtos = new ArrayList<>(); public Categoria() { } public Categoria(Integer id, String nome) { super(); this.id = id; this.nome = nome; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public List<Produto> getProdutos() { return produtos; } public void setProdutos(List<Produto> produtos) { this.produtos = produtos; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Categoria other = (Categoria) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } }
[ "jeffersonfelipe1900@gmail.com" ]
jeffersonfelipe1900@gmail.com
8cf898906e0ce853597cc6c6bc6fa1aec5fd1632
75e3c5c51791508164ffe80190853c6cdd16e3df
/app/src/main/java/com/example/tlms/NewRegistration2.java
f29b2796d47c23d9a6334d71fc4e692b9ab4f3bb
[]
no_license
JoshhEyu/TLMS
686cd8b633385bae02d85e6c88b0bd5bfedc4e7f
0eb0763f3ef5f383cf86c9fb7c441a67f92e8ed4
refs/heads/master
2022-11-05T17:42:02.270525
2020-06-20T14:34:49
2020-06-20T14:34:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,897
java
package com.example.tlms; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.os.CancellationSignal; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; public class NewRegistration2 extends AppCompatActivity implements ResultListener{ public EditText edit_text_property_no,edit_text_ward_no,edit_text_locality; String property_no,locality,ward_no,property_type; public Spinner sp_property_type; String pan_no,gst_no,contact,email,correspondance_address,trade_owner_name,business_holding_name; AlertDialog.Builder builder; @Override protected void onCreate(Bundle savedInstanceState) { Log.e("inside oncreate","Reg2 created #####################################"); super.onCreate(savedInstanceState); setContentView(R.layout.activity_new_registration2); edit_text_property_no = (EditText) findViewById(R.id.editTextTextPersonName5); edit_text_locality = (EditText) findViewById(R.id.editTextTextPersonName6); edit_text_ward_no = (EditText) findViewById(R.id.editTextNumber); sp_property_type = (Spinner) findViewById(R.id.spinner2); builder = new AlertDialog.Builder(this); sp_property_type.setOnItemSelectedListener( new AdapterView.OnItemSelectedListener() { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { property_type = parent.getItemAtPosition(position).toString(); // Toast.makeText(parent.getContext(), "Selected: " + item, Toast.LENGTH_LONG).show(); } public void onNothingSelected(AdapterView<?> parent) { } } ); } public void OnClickSubmit(View view) { property_no = edit_text_property_no.getText().toString(); locality = edit_text_locality.getText().toString(); //To be changed to spinner later ward_no = edit_text_ward_no.getText().toString(); Log.e("inside submit","submit created #####################################"); if(property_no.isEmpty() || locality.isEmpty() || ward_no.isEmpty() || property_type.isEmpty()){ Log.e("inside if","submit created #####################################"); Toast.makeText(NewRegistration2.this, "Some fields are Empty!!", Toast.LENGTH_LONG).show(); } else{ Log.e("inside else","submit created #####################################"); Bundle bundle = getIntent().getExtras(); pan_no = bundle.getString("pan_no"); gst_no = bundle.getString("gst_no"); contact = bundle.getString("contact"); trade_owner_name = bundle.getString("trade_owner_name"); business_holding_name = bundle.getString("business_holding_name"); email = bundle.getString("email"); correspondance_address = bundle.getString("correspondance_address"); String type = "new_registration"; BackgroundWorker backgroundWorker = new BackgroundWorker(this, this); backgroundWorker.execute(type, pan_no, gst_no,contact,trade_owner_name,business_holding_name,email,correspondance_address,property_no,locality,ward_no,property_type); } } @Override public void setResult(String result) { Log.e("inside result","submit #####################################"); builder.setMessage(result); builder.setCancelable(false); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { launchIntent(); } }); AlertDialog alert = builder.create(); alert.setTitle("Registration Status"); alert.show(); } public void launchIntent(){ Intent intent = new Intent(NewRegistration2.this,Selection.class); intent.putExtra("pan_no",pan_no); intent.putExtra("gst_no",gst_no); intent.putExtra("contact",contact); intent.putExtra("trade_owner_name",trade_owner_name); intent.putExtra("business_holding_name",business_holding_name); intent.putExtra("email",email); intent.putExtra("correspondance_address",correspondance_address); intent.putExtra("property_no",property_no); intent.putExtra("property_type",property_type); intent.putExtra("ward_no",ward_no); intent.putExtra("locality",locality); startActivity(intent); } }
[ "radhikasarda296@gmail.com" ]
radhikasarda296@gmail.com
46c9bca280f4f67b617db665c16927dfe96f69a8
60abe6fcff03427de6424d43668f3a36a58e543f
/jyshop-common/src/main/java/com/qyy/jyshop/util/AppUtil.java
15e3c88af68c0b629610cca778d5ad0d232cd252
[]
no_license
git4wuwenping/jyshop
dc987b6416b0fb594cb3d248ca1d88fd28a0ce53
9ce36394cdcb0514bd49cebddf3a464f6e32b4f6
refs/heads/master
2020-03-28T14:22:28.619311
2018-09-14T13:43:16
2018-09-14T13:43:16
148,481,972
2
3
null
null
null
null
UTF-8
Java
false
false
7,137
java
package com.qyy.jyshop.util; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.math.BigDecimal; import java.math.RoundingMode; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.UUID; import org.apache.commons.lang3.StringUtils; import com.qyy.jyshop.pojo.AjaxResult; import com.qyy.jyshop.pojo.PageAjax; import com.qyy.jyshop.pojo.ParamData; /** * 参数工具 * */ public class AppUtil { /** * 检验参数 * @param key * @param data * @return */ public static String checkParam(ParamData params, String[] args) { String result = null; if(null != args && args.length > 0){ int size = args.length; for (int i = 0; i < size; i++) { String param = args[i]; if (!params.containsKey(param)) {// 检验参数是否传递 result = "缺少参数:" + param; break; } if (null == params.get(param)) {// 检验参数是否为空 result = "参数" + param + "不能为空"; break; } } } return result; } /** * 封装接口返回数据 * @param result * @return */ public static AjaxResult returnObj(String result) { if (StringUtils.isEmpty(result)) { return new AjaxResult(); } return new AjaxResult(result); } /** * 封装带数据的返回 * @param result * @param data * @return */ public static AjaxResult returnObj(Object result, Object data) { if (StringUtil.isEmpty(result)) { return new AjaxResult(data); } return new AjaxResult((int)result,String.valueOf(data)); } /** * 封装带集合的返回 * @param result * @param T * @return */ public static <T> AjaxResult returnList(String result, List<T> list) { if (StringUtils.isEmpty(result)) { return returnObj(result, list); } list = new ArrayList<T>(); return new AjaxResult(0, result, list); } /** * 封装分页查询返回 * @param result * @param list * @return */ public static <T> AjaxResult returnPage(String result, List<T> list) { return returnObj(result, new PageAjax<T>(list)); } /** * 封装分页查询返回 * @param list * @return */ public static <T> PageAjax<T> returnPage(List<T> list){ return new PageAjax<T>(list); } /** * 比较两个实体类属性值是否相等 * @param source * @param target * @return * @throws Exception */ public static boolean entityIsEquals(Object source, Object target) throws Exception { if (source == null || target == null) { return false; } boolean ret = true; Class<?> srcClass = source.getClass(); Field[] fields = srcClass.getDeclaredFields(); String nameKey = null; String srcValue = null; String tarValue = null; for (Field field : fields) { nameKey = field.getName(); srcValue = getClassValue(source, nameKey) == null ? "" : getClassValue(source, nameKey).toString(); tarValue = getClassValue(target, nameKey) == null ? "" : getClassValue(target, nameKey).toString(); if (!srcValue.equals(tarValue)) { ret = false; break; } } return ret; } /** * 根据字段名称取值 * @param obj * @param fieldName * @return * @throws Exception */ private static Object getClassValue(Object obj, String fieldName) throws Exception { @SuppressWarnings("rawtypes") Class beanClass = obj.getClass(); Method[] ms = beanClass.getMethods(); for(Method method: ms){ // 非get方法不取 if(method.getName().startsWith("get")){ Object objValue = method.invoke(obj, new Object[] {}); if(null != objValue){ if(method.getName().toUpperCase().equals(fieldName.toUpperCase()) || method.getName().substring(3).toUpperCase().equals(fieldName.toUpperCase())){ return objValue; } } } } return null; } /** * 生成N位随机数 * @param length * @return */ public static String getRandomString(int length) { Random random = new Random(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; ++i) { int number = random.nextInt(3); long result = 0; switch (number) { case 0: result = Math.round(Math.random() * 25 + 65); sb.append(String.valueOf((char) result)); break; case 1: result = Math.round(Math.random() * 25 + 97); sb.append(String.valueOf((char) result)); break; case 2: sb.append(String.valueOf(new Random().nextInt(10))); break; } } return sb.toString(); } /** * 生成N位纯数字验证码 * @return */ public static String getVerificationCode(int n) { final Random random = new Random(); String verificationCode = ""; for (int i = 0; i < n; i++) { verificationCode += random.nextInt(10); } return verificationCode; } /** * 生产注单号 * @return */ public static String getOrdercode() { String time = String.valueOf(System.currentTimeMillis()); return time + time.subSequence(2, 6) + getVerificationCode(1); } /** * 生成32位UUID * @return */ public static String getUuid() { return UUID.randomUUID().toString().replace("-", ""); } /** * 随机ID生成器,由数字、小写字母和大写字母组成 * @param size * @return */ public static String getUUID(int size) { final char[] digits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; Random random = new Random(); char[] cs = new char[size]; for (int i = 0; i < cs.length; i++) { cs[i] = digits[random.nextInt(digits.length)]; } return new String(cs); } /** * 相除 * @param num1 * @param num2 * @return */ public static String divide(Object num1, Object num2){ Float num = Float.parseFloat(num1.toString()); BigDecimal b1 = new BigDecimal(num); BigDecimal b2 = new BigDecimal(num2.toString()); Double result = b1.divide(b2, 2, RoundingMode.HALF_UP).doubleValue(); return new DecimalFormat("#,##0.00").format(result); } public static String formatValue(double source){ return new DecimalFormat("###0.00").format(source); } public static Double formatDouble(double source){ return Double.parseDouble(formatValue(source)); } public static void main(String[] args) { for(int i = 1; i <= 5; i++){ System.out.println(getUuid()); } // System.out.println(getUUID(5)); // Set<String> sets = new HashSet<String>(); // for(int i = 0; i < 1000000; i ++){ // sets.add(getRandomString(20)); // } // System.out.println(sets.size()); // System.out.println(getRandomString(20)); // AuthOperation op1 = new AuthOperation(); // op1.setOpCode("002"); // op1.setOpid(1); // // AuthOperation op2 = new AuthOperation(); // op2.setOpCode("002"); // op2.setOpid(1); // try { // System.out.println(entityIsEquals(op1, op2)); // } catch (Exception e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } System.out.println(divide(10, "0.75")); } }
[ "12233" ]
12233
25bb5fadaca967fce2f61d30c8cf9c0d46254da7
08114e65b6e55bb9527c516ae0d680d37437ba34
/src/main/java/com/webapp/wooriga/mybatis/challenge/result/ChallengeInfo.java
0a02dbf6e265695eb29192715299c0126b984931
[ "MIT" ]
permissive
whatvita-recruit/wooriga_backend
85f8de6d1992a7f0839043a193247f9e6b5f2900
6b877ff2351786cbb3343b45974d598b3fc59d5a
refs/heads/master
2020-12-22T19:21:19.657587
2020-01-11T17:34:34
2020-01-11T17:34:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
457
java
package com.webapp.wooriga.mybatis.challenge.result; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.webapp.wooriga.mybatis.vo.Challenges; import com.webapp.wooriga.mybatis.vo.EmptyDays; import lombok.Getter; import lombok.Setter; import java.util.ArrayList; @Getter @Setter public class ChallengeInfo { public ArrayList<UserInfo> userInfo; public ArrayList<Challenges> challenges; public ChallengeInfo(){ } }
[ "wjdekdms99@naver.com" ]
wjdekdms99@naver.com
f108001fac53e6eed5325847633bc3396fdb9319
fbe4ff8f3200d7d26cdba0bd1781de24260c4c5c
/jqgrid/src/main/java/com/spring/jqgrid/business/service/PersonService.java
89a270e1eb24686f203d2686ca31e3b581da60f6
[ "MIT" ]
permissive
rejwan052/Spring-Data-JPA-JQGrid-Integration
ce0d82a324142dad9786fefcf907f0045069a82a
2f371e1ec78350ceda47dc476b26b2479df96417
refs/heads/master
2021-01-09T05:24:17.091452
2014-11-08T08:32:44
2014-11-08T08:32:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,310
java
package com.spring.jqgrid.business.service; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.spring.jqgrid.persistence.model.PersonEntity; import com.spring.jqgrid.persistence.repository.PersonRepository; @Service public class PersonService { @Autowired private PersonRepository personRepository; @PersistenceContext(unitName = "hibernatePersistenceUnit") private EntityManager entityManager; /* start JQGrid search queries */ @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByIdAsc(Pageable pageable) { return personRepository.getAllPeopleByIdAsc(pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByIdDesc(Pageable pageable) { return personRepository.getAllPeopleByIdDesc(pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonMobileNumberEq( String personMobileNumber, Pageable pageable) { return personRepository.getAllPeopleByPersonMobileNumberEq( personMobileNumber, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonEmailIdEq( String personEmailId, Pageable pageable) { return personRepository.getAllPeopleByPersonEmailIdEq(personEmailId, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonStateEq(String Peopletate, Pageable pageable) { return personRepository.getAllPeopleByPersonStateEq(Peopletate, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonCityEq(String personCity, Pageable pageable) { return personRepository .getAllPeopleByPersonCityEq(personCity, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonGenderEq(String personGender, Pageable pageable) { return personRepository.getAllPeopleByPersonGenderEq(personGender, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonIdEq(Long personId, Pageable pageable) { return personRepository.getAllPeopleByPersonIdEq(personId, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonIdBw(Long personId, Pageable pageable) { return personRepository.getAllPeopleByPersonIdBw(personId, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonIdEw(Long personId, Pageable pageable) { return personRepository.getAllPeopleByPersonIdEw(personId, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonIdLt(Long personId, Pageable pageable) { return personRepository.getAllPeopleByPersonIdLt(personId, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonIdGt(Long personId, Pageable pageable) { return personRepository.getAllPeopleByPersonIdGt(personId, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonGitUrlEq(String personGitUrl, Pageable pageable) { return personRepository.getAllPeopleByPersonGitUrlEq(personGitUrl, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonPostalCodeEq( String personPostalCode, Pageable pageable) { return personRepository.getAllPeopleByPersonPostalCodeEq( personPostalCode, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonPostalCodeBw( String personPostalCode, Pageable pageable) { return personRepository.getAllPeopleByPersonPostalCodeBw( personPostalCode, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonPostalCodeEw( String personPostalCode, Pageable pageable) { return personRepository.getAllPeopleByPersonPostalCodeEw( personPostalCode, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonDesignationEq( String personDesignation, Pageable pageable) { return personRepository.getAllPeopleByPersonDesignationEq( personDesignation, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonDesignationBw( String personDesignation, Pageable pageable) { return personRepository.getAllPeopleByPersonDesignationBw( personDesignation, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonDesignationEw( String personDesignation, Pageable pageable) { return personRepository.getAllPeopleByPersonDesignationEw( personDesignation, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonProjectValueEq( String personProjectValue, Pageable pageable) { return personRepository.getAllPeopleByPersonProjectValueEq( personProjectValue, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonProjectValueLt( String personProjectValue, Pageable pageable) { return personRepository.getAllPeopleByPersonProjectValueLt( personProjectValue, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonProjectValueGt( String personProjectValue, Pageable pageable) { return personRepository.getAllPeopleByPersonProjectValueGt( personProjectValue, pageable); } @Transactional(readOnly = true, rollbackFor = Exception.class) public Page<PersonEntity> getAllPeopleByPersonBirthDateEq( String personBirthDate, Pageable pageable) { return personRepository.getAllPeopleByPersonBirthDateEq( personBirthDate, pageable); } /* end JQGrid search queries */ @Transactional(readOnly = false, rollbackFor = Exception.class) public PersonEntity savePerson(PersonEntity personEntity) { return personRepository.saveAndFlush(personEntity); } @Transactional(readOnly = true, rollbackFor = Exception.class) public PersonEntity findPersonByEmailId(String personEmailId) { return personRepository.findPersonByEmailId(personEmailId); } @Transactional(readOnly = true, rollbackFor = Exception.class) public PersonEntity findPersonById(Long personId) { return personRepository.findOne(personId); } @Transactional(readOnly = false, rollbackFor = Exception.class) public void deletePersonById(Long personId) { personRepository.delete(personId); } }
[ "harshal.ladhe.91@live.co.uk" ]
harshal.ladhe.91@live.co.uk
261aedc6f435bd56d6acb6e0db829dee2f86a6d3
2ef9eed287e985e3f624efc677ad3de3fedb020b
/app/src/main/java/com/example/a126308/demodatabasecrud/Note.java
81932863378580babddf6bea39a6ef47877c1989
[]
no_license
baobao91/DemoDatabaseCRUD
369eaf7a12c62239997be83170af1f8802890d61
9e44f36ce554283fc46321d45b5b2d17d22aeac3
refs/heads/master
2021-01-21T12:01:24.307151
2017-05-19T06:20:43
2017-05-19T06:20:43
91,772,510
0
0
null
null
null
null
UTF-8
Java
false
false
624
java
package com.example.a126308.demodatabasecrud; import java.io.Serializable; /** * Created by 126308 on 19/5/2017. */ public class Note implements Serializable { private int id; private String noteContent; public Note (int id, String noteContent) { this.id = id; this.noteContent = noteContent; } public String toString() { return "ID:" + id + ", " + noteContent; } public int getId() { return id; } public String getNoteContent() { return noteContent; } public void setNoteContent(String noteContent) { this.noteContent = noteContent; } }
[ "126308@myrp.edu.sg" ]
126308@myrp.edu.sg
1104448f113432e505b3b9401a9351905797edda
452f1a3dd46d6625ae53a4d10a19abedb2037199
/src/main/java/com/android/tools/build/bundletool/splitters/SigningConfigurationVariantGenerator.java
b269566d85f9df0a5824bf9fa3d3c3cee6183ed6
[ "Apache-2.0" ]
permissive
ramy7elmy/bundletool
f2e7838edcc34e9381134a33f7a12dca97539296
24df0e8b56580cef68ba904b3a80e881f4fc641a
refs/heads/master
2022-12-06T20:14:22.919286
2020-08-28T19:04:36
2020-08-28T19:04:36
299,309,508
1
0
Apache-2.0
2020-09-28T12:57:57
2020-09-28T12:57:56
null
UTF-8
Java
false
false
1,909
java
/* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.tools.build.bundletool.splitters; import static com.android.tools.build.bundletool.model.utils.TargetingProtoUtils.sdkVersionFrom; import static com.android.tools.build.bundletool.model.utils.TargetingProtoUtils.sdkVersionTargeting; import static com.android.tools.build.bundletool.model.utils.TargetingProtoUtils.variantTargeting; import static com.android.tools.build.bundletool.model.utils.Versions.ANDROID_R_API_VERSION; import com.android.bundle.Targeting.VariantTargeting; import com.android.tools.build.bundletool.model.BundleModule; import java.util.stream.Stream; /** Generates variant targetings based on signing configuration. */ public final class SigningConfigurationVariantGenerator implements BundleModuleVariantGenerator { private final ApkGenerationConfiguration apkGenerationConfiguration; public SigningConfigurationVariantGenerator( ApkGenerationConfiguration apkGenerationConfiguration) { this.apkGenerationConfiguration = apkGenerationConfiguration; } @Override public Stream<VariantTargeting> generate(BundleModule module) { return apkGenerationConfiguration.getRestrictV3SigningToRPlus() ? Stream.of(variantTargeting(sdkVersionTargeting(sdkVersionFrom(ANDROID_R_API_VERSION)))) : Stream.of(); } }
[ "pankajxdx@gmail.com" ]
pankajxdx@gmail.com
1ae778027e1e37c3226d8d938154fb7adc6b378e
8e3c8598b194ac82a42b99de857f7e388e9127b6
/src/main/java/com/dkasztelan/domain/Karnet.java
6de4fa870c171beee0799891823922f454abf943
[]
no_license
damian11/JAVAEE_PROJEKT_1
22ad5cfff3253b0a6b302cdac5b57dee5005afac
6026e43b6d05c89c90df424240ea0d64d65d4704
refs/heads/master
2021-01-10T12:47:46.799286
2015-11-25T08:29:28
2015-11-25T08:29:28
46,343,549
0
0
null
null
null
null
UTF-8
Java
false
false
826
java
package main.java.com.dkasztelan.domain; public class Karnet { private int id_karnet; private String rodzaj = "brak"; private String opis = "brak"; private double cena; public Karnet() { super(); } public Karnet(String rodzaj, String opis, double cena) { super(); this.rodzaj = rodzaj; this.opis = opis; this.cena = cena; } public int getId_karnet(){ return id_karnet; } public void setId_karnet(int id_karnet){ this.id_karnet = id_karnet; } public String getRodzaj(){ return rodzaj; } public void setRodzaj(String rodzaj){ this.rodzaj = rodzaj; } public String getOpis(){ return opis; } public void setOpis(String opis){ this.opis = opis; } public double getCena(){ return cena; } public void setCena(double cena){ this.cena = cena; } }
[ "damian.kasztelan1@op.pl" ]
damian.kasztelan1@op.pl
8a6e1c06cf8625ff31ce778c4881567df3ef2c72
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_b0bded5ef6c0fe0fe732c6abc76608c9794b6d32/PackageAdminImpl/8_b0bded5ef6c0fe0fe732c6abc76608c9794b6d32_PackageAdminImpl_t.java
ea27786890079170e61df624d4404a55a3f17d6e
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
24,984
java
/******************************************************************************* * Copyright (c) 2003, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.osgi.framework.internal.core; import java.io.IOException; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; import org.eclipse.osgi.framework.adaptor.BundleClassLoader; import org.eclipse.osgi.framework.adaptor.BundleData; import org.eclipse.osgi.framework.debug.Debug; import org.eclipse.osgi.internal.profile.Profile; import org.eclipse.osgi.service.resolver.*; import org.eclipse.osgi.util.NLS; import org.osgi.framework.*; import org.osgi.service.packageadmin.*; /** * PackageAdmin service for the OSGi specification. * * Framework service which allows bundle programmers to inspect the packages * exported in the framework and eagerly update or uninstall bundles. * * If present, there will only be a single instance of this service * registered in the framework. * * <p> The term <i>exported package</i> (and the corresponding interface * {@link ExportedPackage}) refers to a package that has actually been * exported (as opposed to one that is available for export). * * <p> Note that the information about exported packages returned by this * service is valid only until the next time {@link #refreshPackages(org.osgi.framework.Bundle[])} is * called. * If an ExportedPackage becomes stale, (that is, the package it references * has been updated or removed as a result of calling * PackageAdmin.refreshPackages()), * its getName() and getSpecificationVersion() continue to return their * old values, isRemovalPending() returns true, and getExportingBundle() * and getImportingBundles() return null. */ public class PackageAdminImpl implements PackageAdmin { /** framework object */ protected Framework framework; /* * We need to make sure that the GetBundleAction class loads early to prevent a ClassCircularityError when checking permissions. * See bug 161561 */ static { Class c; c = GetBundleAction.class; c.getName(); // to prevent compiler warnings } static class GetBundleAction implements PrivilegedAction { private Class clazz; private PackageAdminImpl impl; public GetBundleAction(PackageAdminImpl impl, Class clazz) { this.impl = impl; this.clazz = clazz; } public Object run() { return impl.getBundlePriv(clazz); } } /** * Constructor. * * @param framework Framework object. */ protected PackageAdminImpl(Framework framework) { this.framework = framework; } public ExportedPackage[] getExportedPackages(Bundle bundle) { ArrayList allExports = new ArrayList(); synchronized (framework.bundles) { ExportPackageDescription[] allDescriptions = framework.adaptor.getState().getExportedPackages(); for (int i = 0; i < allDescriptions.length; i++) { if (!allDescriptions[i].isRoot()) continue; ExportedPackageImpl exportedPackage = createExportedPackage(allDescriptions[i]); if (exportedPackage == null) continue; if (bundle == null || exportedPackage.supplier.getBundle() == bundle) allExports.add(exportedPackage); } } return (ExportedPackage[]) (allExports.size() == 0 ? null : allExports.toArray(new ExportedPackage[allExports.size()])); } private ExportedPackageImpl createExportedPackage(ExportPackageDescription description) { BundleDescription exporter = description.getExporter(); if (exporter == null || exporter.getHost() != null) return null; BundleLoaderProxy proxy = (BundleLoaderProxy) exporter.getUserObject(); if (proxy == null) { BundleHost bundle = (BundleHost) framework.getBundle(exporter.getBundleId()); if (bundle == null) return null; proxy = bundle.getLoaderProxy(); } return new ExportedPackageImpl(description, proxy); } public ExportedPackage getExportedPackage(String name) { ExportedPackage[] allExports = getExportedPackages((Bundle) null); if (allExports == null) return null; ExportedPackage result = null; for (int i = 0; i < allExports.length; i++) { if (name.equals(allExports[i].getName())) { if (result == null) { result = allExports[i]; } else { // TODO not efficient but this is not called very often Version curVersion = Version.parseVersion(result.getSpecificationVersion()); Version newVersion = Version.parseVersion(allExports[i].getSpecificationVersion()); if (newVersion.compareTo(curVersion) >= 0) result = allExports[i]; } } } return result; } public ExportedPackage[] getExportedPackages(String name) { ExportedPackage[] allExports = getExportedPackages((Bundle) null); if (allExports == null) return null; ArrayList result = new ArrayList(1); // rare to have more than one for (int i = 0; i < allExports.length; i++) if (name.equals(allExports[i].getName())) result.add(allExports[i]); return (ExportedPackage[]) (result.size() == 0 ? null : result.toArray(new ExportedPackage[result.size()])); } public void refreshPackages(Bundle[] input) { framework.checkAdminPermission(framework.systemBundle, AdminPermission.RESOLVE); AbstractBundle[] copy = null; if (input != null) { synchronized (input) { copy = new AbstractBundle[input.length]; System.arraycopy(input, 0, copy, 0, input.length); } } final AbstractBundle[] bundles = copy; Thread refresh = framework.secureAction.createThread(new Runnable() { public void run() { doResolveBundles(bundles, true); if ("true".equals(FrameworkProperties.getProperty("osgi.forcedRestart"))) //$NON-NLS-1$ //$NON-NLS-2$ framework.shutdown(); } }, "Refresh Packages"); //$NON-NLS-1$ refresh.start(); } public boolean resolveBundles(Bundle[] bundles) { framework.checkAdminPermission(framework.systemBundle, AdminPermission.RESOLVE); doResolveBundles(null, false); if (bundles == null) bundles = framework.getAllBundles(); for (int i = 0; i < bundles.length; i++) if (!((AbstractBundle) bundles[i]).isResolved()) return false; return true; } synchronized void doResolveBundles(AbstractBundle[] bundles, boolean refreshPackages) { try { if (Profile.PROFILE && Profile.STARTUP) Profile.logEnter("resolve bundles"); //$NON-NLS-1$ framework.publishBundleEvent(Framework.BATCHEVENT_BEGIN, framework.systemBundle); AbstractBundle[] refreshedBundles = null; BundleDescription[] descriptions = null; synchronized (framework.bundles) { int numBundles = bundles == null ? 0 : bundles.length; if (!refreshPackages) // in this case we must make descriptions non-null so we do // not force the removal pendings to be processed when resolving // the state. descriptions = new BundleDescription[0]; else if (numBundles > 0) { ArrayList results = new ArrayList(numBundles); for (int i = 0; i < numBundles; i++) { BundleDescription description = bundles[i].getBundleDescription(); if (description != null && description.getBundleId() != 0 && !results.contains(description)) results.add(description); // add in any bundles that have the same symbolic name see bug (169593) AbstractBundle[] sameNames = framework.bundles.getBundles(bundles[i].getSymbolicName()); if (sameNames != null && sameNames.length > 1) { for (int j = 0; j < sameNames.length; j++) if (sameNames[j] != bundles[i]) { BundleDescription sameName = sameNames[j].getBundleDescription(); if (sameName != null && sameName.getBundleId() != 0 && !results.contains(sameName)) results.add(sameName); } } } descriptions = (BundleDescription[]) (results.size() == 0 ? null : results.toArray(new BundleDescription[results.size()])); } } State systemState = framework.adaptor.getState(); BundleDelta[] delta = systemState.resolve(descriptions).getChanges(); refreshedBundles = processDelta(delta, refreshPackages); // if we end up refreshing the system bundle or one of its fragments the framework will be shutdown and // should be re-started. This call should return without doing further work. if (!framework.isActive()) return; if (refreshPackages) { AbstractBundle[] allBundles = framework.getAllBundles(); for (int i = 0; i < allBundles.length; i++) allBundles[i].unresolvePermissions(); // increment the system state timestamp if we are refreshing packages. // this is needed incase we suspended a bundle from processing the delta (bug 167483) if (delta.length > 0) systemState.setTimeStamp(systemState.getTimeStamp() == Long.MAX_VALUE ? 0 : systemState.getTimeStamp() + 1); } // always resume bundles incase we have lazy-start bundles resumeBundles(refreshedBundles, refreshPackages); } catch (Throwable t) { if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { Debug.println("PackageAdminImpl.doResolveBundles: Error occured :"); //$NON-NLS-1$ Debug.printStackTrace(t); } if (t instanceof RuntimeException) throw (RuntimeException) t; if (t instanceof Error) throw (Error) t; } finally { if (Profile.PROFILE && Profile.STARTUP) Profile.logExit("resolve bundles"); //$NON-NLS-1$ if (framework.isActive()) { framework.publishBundleEvent(Framework.BATCHEVENT_END, framework.systemBundle); if (refreshPackages) framework.publishFrameworkEvent(FrameworkEvent.PACKAGES_REFRESHED, framework.systemBundle, null); } } } private void resumeBundles(AbstractBundle[] bundles, boolean refreshPackages) { if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { Debug.println("PackageAdminImpl: restart the bundles"); //$NON-NLS-1$ } if (bundles == null) return; for (int i = 0; i < bundles.length; i++) { if (!bundles[i].isResolved() || (!refreshPackages && ((bundles[i].getBundleData().getStatus() & Constants.BUNDLE_LAZY_START) == 0 || bundles[i].testStateChanging(Thread.currentThread())))) // skip bundles that are not resolved or // if we are doing resolveBundles then skip non-lazy start bundles and bundles currently changing state by this thread continue; framework.resumeBundle(bundles[i]); } } private void suspendBundle(AbstractBundle bundle) { // attempt to suspend the bundle or obtain the state change lock // Note that this may fail but we cannot quit the // refreshPackages operation because of it. (bug 84169) if (bundle.isActive() && !bundle.isFragment()) { framework.suspendBundle(bundle, true); } else { if (bundle.getStateChanging() != Thread.currentThread()) try { bundle.beginStateChange(); } catch (BundleException e) { framework.publishFrameworkEvent(FrameworkEvent.ERROR, bundle, e); } } if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { if (bundle.stateChanging == null) { Debug.println("Bundle state change lock is clear! " + bundle); //$NON-NLS-1$ Debug.printStackTrace(new Exception("Stack trace")); //$NON-NLS-1$ } } } private void applyRemovalPending(BundleDelta bundleDelta) throws BundleException { if ((bundleDelta.getType() & BundleDelta.REMOVAL_COMPLETE) != 0) { BundleDescription bundle = bundleDelta.getBundle(); if (bundle.getDependents() != null && bundle.getDependents().length > 0) { /* Reaching here is an internal error */ if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { Debug.println("Bundles still depend on removed bundle! " + bundle); //$NON-NLS-1$ Debug.printStackTrace(new Exception("Stack trace")); //$NON-NLS-1$ } throw new BundleException(Msg.OSGI_INTERNAL_ERROR); } BundleLoaderProxy proxy = (BundleLoaderProxy) bundle.getUserObject(); if (proxy != null) { BundleHost.closeBundleLoader(proxy); try { proxy.getBundleHost().getBundleData().close(); } catch (IOException e) { // ignore } } } } private AbstractBundle setResolved(BundleDescription bundleDescription) { if (!bundleDescription.isResolved()) return null; AbstractBundle bundle = framework.getBundle(bundleDescription.getBundleId()); if (bundle == null) { BundleException be = new BundleException(NLS.bind(Msg.BUNDLE_NOT_IN_FRAMEWORK, bundleDescription)); framework.publishFrameworkEvent(FrameworkEvent.ERROR, framework.systemBundle, be); return null; } boolean resolve = true; if (bundle.isFragment()) { BundleDescription[] hosts = bundleDescription.getHost().getHosts(); for (int i = 0; i < hosts.length; i++) { BundleHost host = (BundleHost) framework.getBundle(hosts[i].getBundleId()); resolve = ((BundleFragment) bundle).addHost(host.getLoaderProxy()); } } if (resolve) bundle.resolve(); return bundle; } private AbstractBundle[] applyDeltas(BundleDelta[] bundleDeltas) throws BundleException { ArrayList results = new ArrayList(bundleDeltas.length); for (int i = 0; i < bundleDeltas.length; i++) { int type = bundleDeltas[i].getType(); if ((type & (BundleDelta.REMOVAL_PENDING | BundleDelta.REMOVAL_COMPLETE)) != 0) applyRemovalPending(bundleDeltas[i]); if ((type & BundleDelta.RESOLVED) != 0) { AbstractBundle bundle = setResolved(bundleDeltas[i].getBundle()); if (bundle != null && bundle.isResolved()) results.add(bundle); } } return (AbstractBundle[]) (results.size() == 0 ? null : results.toArray(new AbstractBundle[results.size()])); } private AbstractBundle[] processDelta(BundleDelta[] bundleDeltas, boolean refreshPackages) { ArrayList bundlesList = new ArrayList(bundleDeltas.length); // get all the bundles that are going to be refreshed for (int i = 0; i < bundleDeltas.length; i++) { if ((bundleDeltas[i].getType() & BundleDelta.REMOVAL_COMPLETE) != 0 && (bundleDeltas[i].getType() & BundleDelta.REMOVED) == 0) // this means the bundle was previously pending removal; do not add to list because it was already removed from before. continue; AbstractBundle changedBundle = framework.getBundle(bundleDeltas[i].getBundle().getBundleId()); if (changedBundle != null && !bundlesList.contains(changedBundle)) bundlesList.add(changedBundle); } AbstractBundle[] refresh = (AbstractBundle[]) bundlesList.toArray(new AbstractBundle[bundlesList.size()]); // first sort by id/start-level order Util.sort(refresh); // then sort by dependency order StartLevelManager.sortByDependency(refresh); boolean[] previouslyResolved = new boolean[refresh.length]; AbstractBundle[] resolved = null; try { try { if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { Debug.println("refreshPackages: Suspend each bundle and acquire its state change lock"); //$NON-NLS-1$ } // find which bundles were previously resolved and handle extension bundles boolean restart = false; for (int i = refresh.length - 1; i >= 0; i--) { previouslyResolved[i] = refresh[i].isResolved(); if (refresh[i] == framework.systemBundle) restart = true; else if (((refresh[i].bundledata.getType() & BundleData.TYPE_FRAMEWORK_EXTENSION) != 0) && previouslyResolved[i]) restart = true; else if ((refresh[i].bundledata.getType() & BundleData.TYPE_BOOTCLASSPATH_EXTENSION) != 0) restart = true; } if (restart) { FrameworkProperties.setProperty("osgi.forcedRestart", "true"); //$NON-NLS-1$ //$NON-NLS-2$ // do not shutdown the framework while holding the PackageAdmin lock (bug 194149) return null; } // now suspend each bundle and grab its state change lock. if (refreshPackages) for (int i = refresh.length - 1; i >= 0; i--) suspendBundle(refresh[i]); /* * Refresh the bundles which will unexport the packages. * This will move RESOLVED bundles to the INSTALLED state. */ if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { Debug.println("refreshPackages: refresh the bundles"); //$NON-NLS-1$ } synchronized (framework.bundles) { for (int i = 0; i < refresh.length; i++) refresh[i].refresh(); } // send out unresolved events outside synch block (defect #80610) for (int i = 0; i < refresh.length; i++) { // send out unresolved events if (previouslyResolved[i]) framework.publishBundleEvent(BundleEvent.UNRESOLVED, refresh[i]); } /* * apply Deltas. */ if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { Debug.println("refreshPackages: applying deltas to bundles"); //$NON-NLS-1$ } synchronized (framework.bundles) { resolved = applyDeltas(bundleDeltas); } } finally { /* * Release the state change locks. */ if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { Debug.println("refreshPackages: release the state change locks"); //$NON-NLS-1$ } if (refreshPackages) for (int i = 0; i < refresh.length; i++) { AbstractBundle changedBundle = refresh[i]; changedBundle.completeStateChange(); } } /* * Take this opportunity to clean up the adaptor storage. */ if (refreshPackages) { if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) Debug.println("refreshPackages: clean up adaptor storage"); //$NON-NLS-1$ try { framework.adaptor.compactStorage(); } catch (IOException e) { if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { Debug.println("refreshPackages exception: " + e.getMessage()); //$NON-NLS-1$ Debug.printStackTrace(e); } framework.publishFrameworkEvent(FrameworkEvent.ERROR, framework.systemBundle, new BundleException(Msg.BUNDLE_REFRESH_FAILURE, e)); } } } catch (BundleException e) { if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) { Debug.println("refreshPackages exception: " + e.getMessage()); //$NON-NLS-1$ Debug.printStackTrace(e.getNestedException() == null ? e : e.getNestedException()); } framework.publishFrameworkEvent(FrameworkEvent.ERROR, framework.systemBundle, new BundleException(Msg.BUNDLE_REFRESH_FAILURE, e)); } // send out any resolved. This must be done after the state change locks have been release. if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) Debug.println("refreshPackages: send out RESOLVED events"); //$NON-NLS-1$ if (resolved != null) for (int i = 0; i < resolved.length; i++) framework.publishBundleEvent(BundleEvent.RESOLVED, resolved[i]); return refresh; } public RequiredBundle[] getRequiredBundles(String symbolicName) { AbstractBundle[] bundles; if (symbolicName == null) bundles = framework.getAllBundles(); else bundles = framework.getBundleBySymbolicName(symbolicName); if (bundles == null || bundles.length == 0) return null; ArrayList result = new ArrayList(bundles.length); for (int i = 0; i < bundles.length; i++) { if (bundles[i].isFragment() || !bundles[i].isResolved() || bundles[i].getSymbolicName() == null) continue; result.add(((BundleHost) bundles[i]).getLoaderProxy()); } return result.size() == 0 ? null : (RequiredBundle[]) result.toArray(new RequiredBundle[result.size()]); } public Bundle[] getBundles(String symbolicName, String versionRange) { if (symbolicName == null) { throw new IllegalArgumentException(); } AbstractBundle bundles[] = framework.getBundleBySymbolicName(symbolicName); if (bundles == null) return null; if (versionRange == null) { AbstractBundle[] result = new AbstractBundle[bundles.length]; System.arraycopy(bundles, 0, result, 0, result.length); return result; } // This code depends on the array of bundles being in descending // version order. ArrayList result = new ArrayList(bundles.length); VersionRange range = new VersionRange(versionRange); for (int i = 0; i < bundles.length; i++) { if (range.isIncluded(bundles[i].getVersion())) { result.add(bundles[i]); } } if (result.size() == 0) return null; return (AbstractBundle[]) result.toArray(new AbstractBundle[result.size()]); } public Bundle[] getFragments(Bundle bundle) { return ((AbstractBundle) bundle).getFragments(); } public Bundle[] getHosts(Bundle bundle) { BundleLoaderProxy[] hosts = ((AbstractBundle) bundle).getHosts(); if (hosts == null) return null; Bundle[] result = new Bundle[hosts.length]; for (int i = 0; i < hosts.length; i++) result[i] = hosts[i].getBundleHost(); return result; } Bundle getBundlePriv(Class clazz) { ClassLoader cl = clazz.getClassLoader(); if (cl instanceof BundleClassLoader) return ((BundleLoader) ((BundleClassLoader) cl).getDelegate()).bundle; if (cl == getClass().getClassLoader()) return framework.systemBundle; return null; } public Bundle getBundle(final Class clazz) { if (System.getSecurityManager() == null) return getBundlePriv(clazz); return (Bundle) AccessController.doPrivileged(new GetBundleAction(this, clazz)); } public int getBundleType(Bundle bundle) { return ((AbstractBundle) bundle).isFragment() ? PackageAdmin.BUNDLE_TYPE_FRAGMENT : 0; } protected void cleanup() { //This is only called when the framework is shutting down } protected void setResolvedBundles(SystemBundle systemBundle) { checkSystemBundle(systemBundle); // Now set the actual state of the bundles from the persisted state. State state = framework.adaptor.getState(); BundleDescription[] descriptions = state.getBundles(); for (int i = 0; i < descriptions.length; i++) { if (descriptions[i].getBundleId() == 0) setFrameworkVersion(descriptions[i]); else setResolved(descriptions[i]); } } private void checkSystemBundle(SystemBundle systemBundle) { try { // first check that the system bundle has not changed since last saved state. State state = framework.adaptor.getState(); BundleDescription oldSystemBundle = state.getBundle(0); boolean different = false; if (oldSystemBundle == null || !systemBundle.getBundleData().getVersion().equals(oldSystemBundle.getVersion())) different = true; if (!different && FrameworkProperties.getProperty("osgi.dev") == null) //$NON-NLS-1$ return; // return quick if not in dev mode; system bundle version changes with each build BundleDescription newSystemBundle = state.getFactory().createBundleDescription(state, systemBundle.getHeaders(""), systemBundle.getLocation(), 0); //$NON-NLS-1$ if (newSystemBundle == null) throw new BundleException(Msg.OSGI_SYSTEMBUNDLE_DESCRIPTION_ERROR); if (!different) { // need to check to make sure the system bundle description is up to date in the state. ExportPackageDescription[] oldPackages = oldSystemBundle.getExportPackages(); ExportPackageDescription[] newPackages = newSystemBundle.getExportPackages(); if (oldPackages.length >= newPackages.length) { for (int i = 0; i < newPackages.length && !different; i++) { if (oldPackages[i].getName().equals(newPackages[i].getName())) { Object oldVersion = oldPackages[i].getVersion(); Object newVersion = newPackages[i].getVersion(); different = oldVersion == null ? newVersion != null : !oldVersion.equals(newVersion); } else { different = true; } } } else { different = true; } } if (different) { state.removeBundle(0); state.addBundle(newSystemBundle); // force resolution so packages are properly linked state.resolve(false); } } catch (BundleException e) /* fatal error */{ e.printStackTrace(); throw new RuntimeException(NLS.bind(Msg.OSGI_SYSTEMBUNDLE_CREATE_EXCEPTION, e.getMessage())); } } private void setFrameworkVersion(BundleDescription systemBundle) { ExportPackageDescription[] packages = systemBundle.getExportPackages(); for (int i = 0; i < packages.length; i++) if (packages[i].getName().equals(Constants.OSGI_FRAMEWORK_PACKAGE)) { FrameworkProperties.setProperty(Constants.FRAMEWORK_VERSION, packages[i].getVersion().toString()); break; } FrameworkProperties.setProperty(Constants.OSGI_IMPL_VERSION_KEY, systemBundle.getVersion().toString()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a03fc6ae508351ef143fc98bde32bfdda73cb04a
34611f2860e4df83f364fdea46a59beb33a2a234
/app/src/main/java/com/example/testdemo/BackHandledFragment.java
b901ca869cb098392ac83b63f246977ceb6116c3
[]
no_license
tamam9/Fragment_Skip_Back
d9c4e56d0ed0019617619fa3007c862395a7509c
5b36cd55cce870efd2c6fe63c9c16e6362b6752a
refs/heads/master
2021-01-09T20:29:53.515505
2016-06-10T03:51:46
2016-06-10T03:51:46
60,822,670
0
0
null
null
null
null
UTF-8
Java
false
false
886
java
package com.example.testdemo; import android.os.Bundle; import android.support.v4.app.Fragment; public abstract class BackHandledFragment extends Fragment { protected BackHandledInterface mBackHandledInterface; /** * 所有继承BackHandledFragment的子类都将在这个方法中实现物理Back键按下后的逻辑 */ protected abstract boolean onBackPressed(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!(getActivity() instanceof BackHandledInterface)) { throw new ClassCastException( "Hosting Activity must implement BackHandledInterface"); } else { this.mBackHandledInterface = (BackHandledInterface) getActivity(); } } @Override public void onStart() { super.onStart(); // 告诉FragmentActivity,当前Fragment在栈顶 mBackHandledInterface.setSelectedFragment(this); } }
[ "383606116@qq.com" ]
383606116@qq.com
844c3918e02a87853584265bb040e872448de0e5
fd8d9bb507de41e9ba5a513f11e0f51c789079b9
/Code1/problem_sets/ps3/yardSize/YardCalculatorTester.java
8b703f64cd957f9098265378ef2e934ed1a3dd8d
[]
no_license
SiddheshKhedekar/Java-101
8f003e6c630ea680b09ba35ee42e093ed8e92725
81ad971350181519c50624847ae60034d9b12720
refs/heads/master
2021-06-16T11:46:20.308036
2017-05-30T05:34:28
2017-05-30T05:34:28
92,801,037
1
0
null
null
null
null
UTF-8
Java
false
false
1,188
java
package ps3.yardSize; // You don't need to modify this file public class YardCalculatorTester { public static void main(String[] args) { double length = 40.0; double width = 30.0; YardCalculator calculator = new YardCalculator(length, width); double perimeter = calculator.perimeter(); double area = calculator.area(); double diagonal = calculator.diagonal(); System.out.println("perimeter: " + perimeter); System.out.println("Expected: 42.672"); System.out.println("diagonal: " + diagonal); System.out.println("Expected: 15.24"); length = 60.1; width = 35.5; calculator = new YardCalculator(length, width); perimeter = calculator.perimeter(); area = calculator.area(); diagonal = calculator.diagonal(); System.out.printf("perimeter: %.2f\n", perimeter); System.out.println("Expected: 58.28"); System.out.printf("area: %.2f\n", area); System.out.println("Expected: 198.21"); System.out.printf("diagonal: %.2f\n", diagonal); System.out.println("Expected: 21.28"); } }
[ "siddheshkhedekar@hotmail.com" ]
siddheshkhedekar@hotmail.com
e7a10589fcd94d31ab7c7c745939ed1a507596ad
23a2b7eb695d1468b7d10590dd9eb00b3ca2f910
/app/src/main/java/com/example/user/cheahweiseng/Activity/Lodge/SearchResultActivity.java
260a63778f9bc20ade16536eeb18c1b31db20904
[]
no_license
lzx-zx/cheahweiseng
1ad943711912386fce6cdcab88d16a47380fc653
858f4bcfab6bb5dd1fe5e64cffd3e18bfffb234b
refs/heads/master
2021-05-06T20:33:35.729870
2017-11-29T03:02:48
2017-11-29T03:02:48
112,330,301
0
0
null
null
null
null
UTF-8
Java
false
false
755
java
package com.example.user.cheahweiseng.Activity.Lodge; import android.app.Activity; import android.app.SearchManager; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.example.user.cheahweiseng.R; public class SearchResultActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_search_result); } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); handleIntent(intent); } private void handleIntent(Intent intent) { String query = intent.getStringExtra(SearchManager.QUERY); } }
[ "lzxorochi@gmail.com" ]
lzxorochi@gmail.com
9a1ac423227b89ddf0f529779c549b709d358d8a
5fb94e8b307d9c42dc7496983ebbbc668c49f7dc
/Bluetooth_Social/src/edu/minggo/tencent/weibo/AbstractOAuthProvider.java
8f08117d1cf0366030dc9b6c2f3ecf4331301bce
[]
no_license
chinarefers/bluetooth_social
805c20407ae8c9e39ccd17fc5a63a0a0a42efe21
45c971aa90b7766c4807956be62dcf9ac44a73f9
refs/heads/master
2021-01-21T11:00:24.483624
2015-12-21T05:51:25
2015-12-21T05:51:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,661
java
/* * Copyright (c) 2009 Matthias Kaeppler 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 edu.minggo.tencent.weibo; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; /** * ABC for all provider implementations. If you're writing a custom provider, * you will probably inherit from this class, since it takes a lot of work from * you. * * @author Matthias Kaeppler */ public abstract class AbstractOAuthProvider implements OAuthProvider { private static final long serialVersionUID = 1L; private String requestTokenEndpointUrl; private String accessTokenEndpointUrl; private String authorizationWebsiteUrl; private HttpParameters responseParameters; private Map<String, String> defaultHeaders; private boolean isOAuth10a; private transient OAuthProviderListener listener; public AbstractOAuthProvider(String requestTokenEndpointUrl, String accessTokenEndpointUrl, String authorizationWebsiteUrl) { this.requestTokenEndpointUrl = requestTokenEndpointUrl; this.accessTokenEndpointUrl = accessTokenEndpointUrl; this.authorizationWebsiteUrl = authorizationWebsiteUrl; this.responseParameters = new HttpParameters(); this.defaultHeaders = new HashMap<String, String>(); } public String retrieveRequestToken(OAuthConsumer consumer, String callbackUrl) throws OAuthMessageSignerException, OAuthNotAuthorizedException, OAuthExpectationFailedException, OAuthCommunicationException { // invalidate current credentials, if any consumer.setTokenWithSecret(null, null); // 1.0a expects the callback to be sent while getting the request token. // 1.0 service providers would simply ignore this parameter. retrieveToken(consumer, requestTokenEndpointUrl, OAuth.OAUTH_CALLBACK, callbackUrl); String callbackConfirmed = responseParameters.getFirst(OAuth.OAUTH_CALLBACK_CONFIRMED); responseParameters.remove(OAuth.OAUTH_CALLBACK_CONFIRMED); isOAuth10a = Boolean.TRUE.toString().equals(callbackConfirmed); // 1.0 service providers expect the callback as part of the auth URL, // Do not send when 1.0a. if (isOAuth10a) { return OAuth.addQueryParameters(authorizationWebsiteUrl, OAuth.OAUTH_TOKEN, consumer.getToken()); } else { return OAuth.addQueryParameters(authorizationWebsiteUrl, OAuth.OAUTH_TOKEN, consumer.getToken(), OAuth.OAUTH_CALLBACK, callbackUrl); } } public void retrieveAccessToken(OAuthConsumer consumer, String oauthVerifier) throws OAuthMessageSignerException, OAuthNotAuthorizedException, OAuthExpectationFailedException, OAuthCommunicationException { if (consumer.getToken() == null || consumer.getTokenSecret() == null) { throw new OAuthExpectationFailedException( "Authorized request token or token secret not set. " + "Did you retrieve an authorized request token before?"); } if (isOAuth10a && oauthVerifier != null) { retrieveToken(consumer, accessTokenEndpointUrl, OAuth.OAUTH_VERIFIER, oauthVerifier); } else { retrieveToken(consumer, accessTokenEndpointUrl); } } /** * <p> * Implemented by subclasses. The responsibility of this method is to * contact the service provider at the given endpoint URL and fetch a * request or access token. What kind of token is retrieved solely depends * on the URL being used. * </p> * <p> * Correct implementations of this method must guarantee the following * post-conditions: * <ul> * <li>the {@link OAuthConsumer} passed to this method must have a valid * {@link OAuth#OAUTH_TOKEN} and {@link OAuth#OAUTH_TOKEN_SECRET} set by * calling {@link OAuthConsumer#setTokenWithSecret(String, String)}</li> * <li>{@link #getResponseParameters()} must return the set of query * parameters served by the service provider in the token response, with all * OAuth specific parameters being removed</li> * </ul> * </p> * * @param consumer * the {@link OAuthConsumer} that should be used to sign the request * @param endpointUrl * the URL at which the service provider serves the OAuth token that * is to be fetched * @param additionalParameters * you can pass parameters here (typically OAuth parameters such as * oauth_callback or oauth_verifier) which will go directly into the * signer, i.e. you don't have to put them into the request first, * just so the consumer pull them out again. Pass them sequentially * in key/value order. * @throws OAuthMessageSignerException * if signing the token request fails * @throws OAuthCommunicationException * if a network communication error occurs * @throws OAuthNotAuthorizedException * if the server replies 401 - Unauthorized * @throws OAuthExpectationFailedException * if an expectation has failed, e.g. because the server didn't * reply in the expected format */ protected void retrieveToken(OAuthConsumer consumer, String endpointUrl, String... additionalParameters) throws OAuthMessageSignerException, OAuthCommunicationException, OAuthNotAuthorizedException, OAuthExpectationFailedException { Map<String, String> defaultHeaders = getRequestHeaders(); if (consumer.getConsumerKey() == null || consumer.getConsumerSecret() == null) { throw new OAuthExpectationFailedException("Consumer key or secret not set"); } HttpRequest request = null; HttpResponse response = null; try { request = createRequest(endpointUrl); for (String header : defaultHeaders.keySet()) { request.setHeader(header, defaultHeaders.get(header)); } if (additionalParameters != null) { HttpParameters httpParams = new HttpParameters(); httpParams.putAll(additionalParameters, true); consumer.setAdditionalParameters(httpParams); } if (this.listener != null) { this.listener.prepareRequest(request); } consumer.sign(request); if (this.listener != null) { this.listener.prepareSubmission(request); } response = sendRequest(request); int statusCode = response.getStatusCode(); boolean requestHandled = false; if (this.listener != null) { requestHandled = this.listener.onResponseReceived(request, response); } if (requestHandled) { return; } if (statusCode >= 300) { handleUnexpectedResponse(statusCode, response); } HttpParameters responseParams = OAuth.decodeForm(response.getContent()); String token = responseParams.getFirst(OAuth.OAUTH_TOKEN); String secret = responseParams.getFirst(OAuth.OAUTH_TOKEN_SECRET); String name = responseParams.getFirst("name"); responseParams.remove(OAuth.OAUTH_TOKEN); responseParams.remove(OAuth.OAUTH_TOKEN_SECRET); responseParams.remove("name"); setResponseParameters(responseParams); if (token == null || secret == null) { throw new OAuthExpectationFailedException( "Request token or token secret not set in server reply. " + "The service provider you use is probably buggy."); } consumer.setTokenWithSecret(token, secret); consumer.setName(name); } catch (OAuthNotAuthorizedException e) { throw e; } catch (OAuthExpectationFailedException e) { throw e; } catch (Exception e) { throw new OAuthCommunicationException(e); } finally { try { closeConnection(request, response); } catch (Exception e) { throw new OAuthCommunicationException(e); } } } protected void handleUnexpectedResponse(int statusCode, HttpResponse response) throws Exception { if (response == null) { return; } BufferedReader reader = new BufferedReader(new InputStreamReader(response.getContent())); StringBuilder responseBody = new StringBuilder(); String line = reader.readLine(); while (line != null) { responseBody.append(line); line = reader.readLine(); } switch (statusCode) { case 401: throw new OAuthNotAuthorizedException(responseBody.toString()); default: throw new OAuthCommunicationException("Service provider responded in error: " + statusCode + " (" + response.getReasonPhrase() + ")", responseBody.toString()); } } /** * Overrride this method if you want to customize the logic for building a * request object for the given endpoint URL. * * @param endpointUrl * the URL to which the request will go * @return the request object * @throws Exception * if something breaks */ protected abstract HttpRequest createRequest(String endpointUrl) throws Exception; /** * Override this method if you want to customize the logic for how the given * request is sent to the server. * * @param request * the request to send * @return the response to the request * @throws Exception * if something breaks */ protected abstract HttpResponse sendRequest(HttpRequest request) throws Exception; /** * Called when the connection is being finalized after receiving the * response. Use this to do any cleanup / resource freeing. * * @param request * the request that has been sent * @param response * the response that has been received * @throws Exception * if something breaks */ protected void closeConnection(HttpRequest request, HttpResponse response) throws Exception { // NOP } public HttpParameters getResponseParameters() { return responseParameters; } /** * Returns a single query parameter as served by the service provider in a * token reply. You must call {@link #setResponseParameters} with the set of * parameters before using this method. * * @param key * the parameter name * @return the parameter value */ protected String getResponseParameter(String key) { return responseParameters.getFirst(key); } public void setResponseParameters(HttpParameters parameters) { this.responseParameters = parameters; } public void setOAuth10a(boolean isOAuth10aProvider) { this.isOAuth10a = isOAuth10aProvider; } public boolean isOAuth10a() { return isOAuth10a; } public String getRequestTokenEndpointUrl() { return this.requestTokenEndpointUrl; } public String getAccessTokenEndpointUrl() { return this.accessTokenEndpointUrl; } public String getAuthorizationWebsiteUrl() { return this.authorizationWebsiteUrl; } public void setRequestHeader(String header, String value) { defaultHeaders.put(header, value); } public Map<String, String> getRequestHeaders() { return defaultHeaders; } public void setListener(OAuthProviderListener listener) { this.listener = listener; } public void removeListener(OAuthProviderListener listener) { this.listener = null; } }
[ "1053200192@qq.com" ]
1053200192@qq.com
b79f7ba30112fba581356f172b3be0d7035b3d6c
0609f8042394cdbeed3c28640fd1497a37b70da8
/app/src/main/java/com/fanyafeng/recreation/view/photoview/gestures/FroyoGestureDetector.java
aed7898a40d92275631b6a5a87b10b7a5eb24481
[]
no_license
mrscolove/Recreation
70d3654b2b883f43e5a5cb730cb3b4321f54b927
23c8fa3d3dd4b3ab397968375dbce9ffc6365777
refs/heads/master
2021-06-14T22:16:40.867664
2017-03-29T09:57:33
2017-03-29T09:57:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,317
java
/******************************************************************************* * Copyright 2011, 2012 Chris Banes. * * 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.fanyafeng.recreation.view.photoview.gestures; import android.annotation.TargetApi; import android.content.Context; import android.view.MotionEvent; import android.view.ScaleGestureDetector; @TargetApi(8) public class FroyoGestureDetector extends EclairGestureDetector { protected final ScaleGestureDetector mDetector; public FroyoGestureDetector(Context context) { super(context); ScaleGestureDetector.OnScaleGestureListener mScaleListener = new ScaleGestureDetector.OnScaleGestureListener() { @Override public boolean onScale(ScaleGestureDetector detector) { float scaleFactor = detector.getScaleFactor(); if (Float.isNaN(scaleFactor) || Float.isInfinite(scaleFactor)) return false; mListener.onScale(scaleFactor, detector.getFocusX(), detector.getFocusY()); return true; } @Override public boolean onScaleBegin(ScaleGestureDetector detector) { return true; } @Override public void onScaleEnd(ScaleGestureDetector detector) { // NO-OP } }; mDetector = new ScaleGestureDetector(context, mScaleListener); } @Override public boolean isScaling() { return mDetector.isInProgress(); } @Override public boolean onTouchEvent(MotionEvent ev) { mDetector.onTouchEvent(ev); return super.onTouchEvent(ev); } }
[ "fanyafeng@365rili.com" ]
fanyafeng@365rili.com
14ff461dcc54b3a724063da3d2ef3fbc907de1f3
4023978a370a418abde91dd5f8b6b10fa2306e68
/Shopping/src/main/java/com/siml/shop/board/dao/ReplyDAOImpl.java
8817d3a460bc20222ad43d958b687397ab1b0fb2
[]
no_license
SIML-Seo/shopping
215b4aa6950aad32e40c747657085e2742b51fee
060a4a9be9ee7a445769ceef2eceecd64990a015
refs/heads/master
2020-03-17T08:23:25.167684
2018-07-03T08:14:50
2018-07-03T08:14:50
133,436,473
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package com.siml.shop.board.dao; import java.util.List; import javax.inject.Inject; import org.apache.ibatis.session.SqlSession; import org.springframework.stereotype.Repository; import com.siml.shop.board.dto.ReplyDTO; @Repository public class ReplyDAOImpl implements ReplyDAO { @Inject SqlSession sqlSession; @Override public List<ReplyDTO> list(int boardSeq) { return sqlSession.selectList("reply.list", boardSeq); } @Override public void insert(ReplyDTO dto) { sqlSession.insert("reply.insert", dto); } /*@Override public void update(ReplyDTO dto) { sqlSession.update("reply.update", dto); }*/ @Override public void delete(int seq) { sqlSession.delete("reply.delete", seq); } }
[ "swh1182@naver.com" ]
swh1182@naver.com
b2056df0338d2897481a2bddcb9900aebb67cd8e
2ed1c943dc04444d9763c4a1d4a021b63f5857ec
/src/test/java/test/designpattern/sevenidea/interfaceisolation/violationinterfaceisolation/InterfaceIsolation.java
302df86377c7d55c5fa5e69f09abac583f1a52a9
[]
no_license
HackDream2018/netty_lecture
dc748d27b45599f7c922f85c5022ae9139cd373f
c87d88e7cc93f15ea59c1f007f0fc93455f2ec7f
refs/heads/master
2021-07-02T02:15:38.137086
2020-10-21T13:15:06
2020-10-21T13:15:06
184,960,697
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
package test.designpattern.sevenidea.interfaceisolation.violationinterfaceisolation; /** * @version v1.0 * @author: TianXiang * @description: * @date: 2019/7/20 */ public class InterfaceIsolation { public static void main(String[] args) { C c = new C(); // C类通过依赖接口去调用A类的实现方法 c.depend1(new A()); // D类通过依赖接口去调用B类的实现方法 D d = new D(); d.depend1(new B()); } }
[ "18569069613@163.com" ]
18569069613@163.com
c9578ee1759464c01da3c7ec95d23ed49e7da319
920b8d88fe46763b208ceac71ede8782cf962d8f
/logging/src/test/java/org/slf4j/impl/StaticMarkerBinder.java
eea32dbc0cc38f04729f601f7c673d5fe67d4f41
[]
no_license
licshire/gatein-common
50e7ee2d143e598069a1bbd686a2b91f6533e912
240055cc424542d1af925a059f9df6045263ecbc
refs/heads/master
2021-01-18T00:41:05.578219
2014-03-17T19:42:28
2014-03-17T19:42:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,506
java
/* * Copyright (C) 2009 eXo Platform SAS. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.slf4j.impl; import org.slf4j.IMarkerFactory; import org.slf4j.helpers.BasicMarkerFactory; import org.slf4j.spi.MarkerFactoryBinder; /** * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> * @version $Revision$ */ public class StaticMarkerBinder implements MarkerFactoryBinder { public static final StaticMarkerBinder SINGLETON = new StaticMarkerBinder(); final IMarkerFactory markerFactory = new BasicMarkerFactory(); private StaticMarkerBinder() { } public IMarkerFactory getMarkerFactory() { return markerFactory; } public String getMarkerFactoryClassStr() { return BasicMarkerFactory.class.getName(); } }
[ "julien@julienviet.com" ]
julien@julienviet.com
81679d39c36bfee03154fde7d19b246f6477a445
ff3af0cde41e48de9c474307526b9b19d76c57e4
/app/src/androidTest/java/lu/uni/jungao/bm7/ExampleInstrumentedTest.java
e706c97f3731116559e38bcf8a98c7205e1b242c
[]
no_license
gaojun0816/native_disclosure_bm7
43c8bd06873f829494367aea1352d09887247db1
243a161c4dbf6767e92341e15e8550a2cfb4d365
refs/heads/main
2023-04-02T15:46:21.912463
2021-03-05T08:22:09
2021-03-05T08:22:09
344,742,527
0
0
null
null
null
null
UTF-8
Java
false
false
756
java
package lu.uni.jungao.bm7; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("lu.uni.jungao.ndkcallee", appContext.getPackageName()); } }
[ "gaojun0816@yahoo.com" ]
gaojun0816@yahoo.com
93c8a1a67dd090df94c844b2c26f3e335a5bb0dc
dc7c93443c9b118b74a95dbfefd719f3379cd383
/src/main/java/com/ziggle/authclient/SecurityJwtToken.java
a5a97b133cc147bab87201df4354166c41321681
[]
no_license
youngerier/security-jwt-redis
bd400a9e9617f6c2dd0f1353113e57f613a1e19b
8050dd2a09a5e9e684f5e0c6ae54fac27e1426c6
refs/heads/master
2020-07-07T22:30:24.959667
2019-08-22T03:21:13
2019-08-22T03:21:13
203,494,092
0
0
null
null
null
null
UTF-8
Java
false
false
1,221
java
package com.ziggle.authclient; import java.util.List; /** * @author: wp * @date: 2019-08-19 14:26 */ public class SecurityJwtToken { private Long id; private String username; private String token; private Boolean enabled; private List<Auth> authorities; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getToken() { return token; } public void setToken(String token) { this.token = token; } public Boolean getEnabled() { return enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } public List<Auth> getAuthorities() { return authorities; } public void setAuthorities(List<Auth> authorities) { this.authorities = authorities; } } class Auth{ private String authority; public String getAuthority() { return authority; } public void setAuthority(String authority) { this.authority = authority; } }
[ "muyue1125@gmail.com" ]
muyue1125@gmail.com
4f2a7d44b4bfa2a442926fdadc2a3a4bdc395308
9d0517091fe2313c40bcc88a7c82218030d2075c
/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
efeffe69a5c41cc6aabff0af11429c0495f9e85b
[ "Apache-2.0" ]
permissive
nucoupons/Mobile_Applications
5c63c8d97f48e1051049c5c3b183bbbaae1fa6e6
62239dd0f17066c12a86d10d26bef350e6e9bd43
refs/heads/master
2020-12-04T11:49:53.121041
2020-01-04T12:00:04
2020-01-04T12:00:04
231,754,011
0
0
Apache-2.0
2020-01-04T12:02:30
2020-01-04T11:46:54
Java
UTF-8
Java
false
false
1,276
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.jclouds.chef.strategy; import com.google.inject.ImplementedBy; import org.jclouds.chef.domain.Node; import org.jclouds.chef.strategy.internal.ListNodesInEnvironmentImpl; import java.util.concurrent.ExecutorService; @ImplementedBy(ListNodesInEnvironmentImpl.class) public interface ListNodesInEnvironment { Iterable<? extends Node> execute(String environmentName); Iterable<? extends Node> execute(ExecutorService executor, String environmentName); }
[ "Administrator@fdp" ]
Administrator@fdp
34daa7f7e43f7ee11df11c1234e8ed2ae96e98b1
dd0169d72375dcb9b6507f561a78b734f7dab80e
/comdoc-android/build/generated/source/r/debug/com/google/android/gms/wearable/R.java
3909012306d71da54edd13e21b84dd9745fe4f02
[]
no_license
HyunseolKim/ComDoc
86f34a8d020bc6e41d37f71add1abe8488459a2f
c1e3a2a45e3b46577bf9016bf862e5b038064fd0
refs/heads/master
2021-01-23T15:42:57.089160
2015-10-15T12:52:14
2015-10-15T12:52:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
15,078
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.google.android.gms.wearable; public final class R { public static final class attr { public static final int adSize = 0x7f01001f; public static final int adSizes = 0x7f010020; public static final int adUnitId = 0x7f010021; public static final int appTheme = 0x7f0100e4; public static final int buyButtonAppearance = 0x7f0100eb; public static final int buyButtonHeight = 0x7f0100e8; public static final int buyButtonText = 0x7f0100ea; public static final int buyButtonWidth = 0x7f0100e9; public static final int cameraBearing = 0x7f01003c; public static final int cameraTargetLat = 0x7f01003d; public static final int cameraTargetLng = 0x7f01003e; public static final int cameraTilt = 0x7f01003f; public static final int cameraZoom = 0x7f010040; public static final int circleCrop = 0x7f01003a; public static final int environment = 0x7f0100e5; public static final int fragmentMode = 0x7f0100e7; public static final int fragmentStyle = 0x7f0100e6; public static final int imageAspectRatio = 0x7f010039; public static final int imageAspectRatioAdjust = 0x7f010038; public static final int liteMode = 0x7f010041; public static final int mapType = 0x7f01003b; public static final int maskedWalletDetailsBackground = 0x7f0100ee; public static final int maskedWalletDetailsButtonBackground = 0x7f0100f0; public static final int maskedWalletDetailsButtonTextAppearance = 0x7f0100ef; public static final int maskedWalletDetailsHeaderTextAppearance = 0x7f0100ed; public static final int maskedWalletDetailsLogoImageType = 0x7f0100f2; public static final int maskedWalletDetailsLogoTextColor = 0x7f0100f1; public static final int maskedWalletDetailsTextAppearance = 0x7f0100ec; public static final int uiCompass = 0x7f010042; public static final int uiMapToolbar = 0x7f01004a; public static final int uiRotateGestures = 0x7f010043; public static final int uiScrollGestures = 0x7f010044; public static final int uiTiltGestures = 0x7f010045; public static final int uiZoomControls = 0x7f010046; public static final int uiZoomGestures = 0x7f010047; public static final int useViewLifecycle = 0x7f010048; public static final int windowTransitionStyle = 0x7f010028; public static final int zOrderOnTop = 0x7f010049; } public static final class color { public static final int common_action_bar_splitter = 0x7f0d0017; public static final int common_signin_btn_dark_text_default = 0x7f0d0018; public static final int common_signin_btn_dark_text_disabled = 0x7f0d0019; public static final int common_signin_btn_dark_text_focused = 0x7f0d001a; public static final int common_signin_btn_dark_text_pressed = 0x7f0d001b; public static final int common_signin_btn_default_background = 0x7f0d001c; public static final int common_signin_btn_light_text_default = 0x7f0d001d; public static final int common_signin_btn_light_text_disabled = 0x7f0d001e; public static final int common_signin_btn_light_text_focused = 0x7f0d001f; public static final int common_signin_btn_light_text_pressed = 0x7f0d0020; public static final int common_signin_btn_text_dark = 0x7f0d007c; public static final int common_signin_btn_text_light = 0x7f0d007d; public static final int wallet_bright_foreground_disabled_holo_light = 0x7f0d0066; public static final int wallet_bright_foreground_holo_dark = 0x7f0d0067; public static final int wallet_bright_foreground_holo_light = 0x7f0d0068; public static final int wallet_dim_foreground_disabled_holo_dark = 0x7f0d0069; public static final int wallet_dim_foreground_holo_dark = 0x7f0d006a; public static final int wallet_dim_foreground_inverse_disabled_holo_dark = 0x7f0d006b; public static final int wallet_dim_foreground_inverse_holo_dark = 0x7f0d006c; public static final int wallet_highlighted_text_holo_dark = 0x7f0d006d; public static final int wallet_highlighted_text_holo_light = 0x7f0d006e; public static final int wallet_hint_foreground_holo_dark = 0x7f0d006f; public static final int wallet_hint_foreground_holo_light = 0x7f0d0070; public static final int wallet_holo_blue_light = 0x7f0d0071; public static final int wallet_link_text_light = 0x7f0d0072; public static final int wallet_primary_text_holo_light = 0x7f0d0080; public static final int wallet_secondary_text_holo_dark = 0x7f0d0081; } public static final class drawable { public static final int common_full_open_on_phone = 0x7f02004c; public static final int common_ic_googleplayservices = 0x7f02004d; public static final int common_signin_btn_icon_dark = 0x7f02004e; public static final int common_signin_btn_icon_disabled_dark = 0x7f02004f; public static final int common_signin_btn_icon_disabled_focus_dark = 0x7f020050; public static final int common_signin_btn_icon_disabled_focus_light = 0x7f020051; public static final int common_signin_btn_icon_disabled_light = 0x7f020052; public static final int common_signin_btn_icon_focus_dark = 0x7f020053; public static final int common_signin_btn_icon_focus_light = 0x7f020054; public static final int common_signin_btn_icon_light = 0x7f020055; public static final int common_signin_btn_icon_normal_dark = 0x7f020056; public static final int common_signin_btn_icon_normal_light = 0x7f020057; public static final int common_signin_btn_icon_pressed_dark = 0x7f020058; public static final int common_signin_btn_icon_pressed_light = 0x7f020059; public static final int common_signin_btn_text_dark = 0x7f02005a; public static final int common_signin_btn_text_disabled_dark = 0x7f02005b; public static final int common_signin_btn_text_disabled_focus_dark = 0x7f02005c; public static final int common_signin_btn_text_disabled_focus_light = 0x7f02005d; public static final int common_signin_btn_text_disabled_light = 0x7f02005e; public static final int common_signin_btn_text_focus_dark = 0x7f02005f; public static final int common_signin_btn_text_focus_light = 0x7f020060; public static final int common_signin_btn_text_light = 0x7f020061; public static final int common_signin_btn_text_normal_dark = 0x7f020062; public static final int common_signin_btn_text_normal_light = 0x7f020063; public static final int common_signin_btn_text_pressed_dark = 0x7f020064; public static final int common_signin_btn_text_pressed_light = 0x7f020065; public static final int ic_plusone_medium_off_client = 0x7f02008f; public static final int ic_plusone_small_off_client = 0x7f020090; public static final int ic_plusone_standard_off_client = 0x7f020091; public static final int ic_plusone_tall_off_client = 0x7f020092; public static final int powered_by_google_dark = 0x7f0200ac; public static final int powered_by_google_light = 0x7f0200ad; } public static final class id { public static final int adjust_height = 0x7f0e0019; public static final int adjust_width = 0x7f0e001a; public static final int book_now = 0x7f0e0033; public static final int buyButton = 0x7f0e0030; public static final int buy_now = 0x7f0e0034; public static final int buy_with_google = 0x7f0e0035; public static final int classic = 0x7f0e0037; public static final int donate_with_google = 0x7f0e0036; public static final int grayscale = 0x7f0e0038; public static final int holo_dark = 0x7f0e002b; public static final int holo_light = 0x7f0e002c; public static final int hybrid = 0x7f0e001b; public static final int match_parent = 0x7f0e0032; public static final int monochrome = 0x7f0e0039; public static final int none = 0x7f0e0010; public static final int normal = 0x7f0e000c; public static final int production = 0x7f0e002d; public static final int sandbox = 0x7f0e002e; public static final int satellite = 0x7f0e001c; public static final int selectionDetails = 0x7f0e0031; public static final int slide = 0x7f0e0015; public static final int strict_sandbox = 0x7f0e002f; public static final int terrain = 0x7f0e001d; public static final int wrap_content = 0x7f0e0025; } public static final class integer { public static final int google_play_services_version = 0x7f0c0004; } public static final class raw { public static final int gtm_analytics = 0x7f070000; } public static final class string { public static final int accept = 0x7f080031; public static final int common_android_wear_notification_needs_update_text = 0x7f08000d; public static final int common_android_wear_update_text = 0x7f08000e; public static final int common_android_wear_update_title = 0x7f08000f; public static final int common_google_play_services_enable_button = 0x7f080010; public static final int common_google_play_services_enable_text = 0x7f080011; public static final int common_google_play_services_enable_title = 0x7f080012; public static final int common_google_play_services_error_notification_requested_by_msg = 0x7f080013; public static final int common_google_play_services_install_button = 0x7f080014; public static final int common_google_play_services_install_text_phone = 0x7f080015; public static final int common_google_play_services_install_text_tablet = 0x7f080016; public static final int common_google_play_services_install_title = 0x7f080017; public static final int common_google_play_services_invalid_account_text = 0x7f080018; public static final int common_google_play_services_invalid_account_title = 0x7f080019; public static final int common_google_play_services_needs_enabling_title = 0x7f08001a; public static final int common_google_play_services_network_error_text = 0x7f08001b; public static final int common_google_play_services_network_error_title = 0x7f08001c; public static final int common_google_play_services_notification_needs_installation_title = 0x7f08001d; public static final int common_google_play_services_notification_needs_update_title = 0x7f08001e; public static final int common_google_play_services_notification_ticker = 0x7f08001f; public static final int common_google_play_services_sign_in_failed_text = 0x7f080020; public static final int common_google_play_services_sign_in_failed_title = 0x7f080021; public static final int common_google_play_services_unknown_issue = 0x7f080022; public static final int common_google_play_services_unsupported_text = 0x7f080023; public static final int common_google_play_services_unsupported_title = 0x7f080024; public static final int common_google_play_services_update_button = 0x7f080025; public static final int common_google_play_services_update_text = 0x7f080026; public static final int common_google_play_services_update_title = 0x7f080027; public static final int common_open_on_phone = 0x7f080028; public static final int common_signin_button_text = 0x7f080029; public static final int common_signin_button_text_long = 0x7f08002a; public static final int commono_google_play_services_api_unavailable_text = 0x7f08002b; public static final int create_calendar_message = 0x7f08003c; public static final int create_calendar_title = 0x7f08003d; public static final int decline = 0x7f08003e; public static final int store_picture_message = 0x7f08008d; public static final int store_picture_title = 0x7f08008e; public static final int wallet_buy_button_place_holder = 0x7f08002c; } public static final class style { public static final int Theme_IAPTheme = 0x7f0a00e3; public static final int WalletFragmentDefaultButtonTextAppearance = 0x7f0a00e9; public static final int WalletFragmentDefaultDetailsHeaderTextAppearance = 0x7f0a00ea; public static final int WalletFragmentDefaultDetailsTextAppearance = 0x7f0a00eb; public static final int WalletFragmentDefaultStyle = 0x7f0a00ec; } public static final class styleable { public static final int[] AdsAttrs = { 0x7f01001f, 0x7f010020, 0x7f010021 }; public static final int AdsAttrs_adSize = 0; public static final int AdsAttrs_adSizes = 1; public static final int AdsAttrs_adUnitId = 2; public static final int[] CustomWalletTheme = { 0x7f010028 }; public static final int CustomWalletTheme_windowTransitionStyle = 0; public static final int[] LoadingImageView = { 0x7f010038, 0x7f010039, 0x7f01003a }; public static final int LoadingImageView_circleCrop = 2; public static final int LoadingImageView_imageAspectRatio = 1; public static final int LoadingImageView_imageAspectRatioAdjust = 0; public static final int[] MapAttrs = { 0x7f01003b, 0x7f01003c, 0x7f01003d, 0x7f01003e, 0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a }; public static final int MapAttrs_cameraBearing = 1; public static final int MapAttrs_cameraTargetLat = 2; public static final int MapAttrs_cameraTargetLng = 3; public static final int MapAttrs_cameraTilt = 4; public static final int MapAttrs_cameraZoom = 5; public static final int MapAttrs_liteMode = 6; public static final int MapAttrs_mapType = 0; public static final int MapAttrs_uiCompass = 7; public static final int MapAttrs_uiMapToolbar = 15; public static final int MapAttrs_uiRotateGestures = 8; public static final int MapAttrs_uiScrollGestures = 9; public static final int MapAttrs_uiTiltGestures = 10; public static final int MapAttrs_uiZoomControls = 11; public static final int MapAttrs_uiZoomGestures = 12; public static final int MapAttrs_useViewLifecycle = 13; public static final int MapAttrs_zOrderOnTop = 14; public static final int[] WalletFragmentOptions = { 0x7f0100e4, 0x7f0100e5, 0x7f0100e6, 0x7f0100e7 }; public static final int WalletFragmentOptions_appTheme = 0; public static final int WalletFragmentOptions_environment = 1; public static final int WalletFragmentOptions_fragmentMode = 3; public static final int WalletFragmentOptions_fragmentStyle = 2; public static final int[] WalletFragmentStyle = { 0x7f0100e8, 0x7f0100e9, 0x7f0100ea, 0x7f0100eb, 0x7f0100ec, 0x7f0100ed, 0x7f0100ee, 0x7f0100ef, 0x7f0100f0, 0x7f0100f1, 0x7f0100f2 }; public static final int WalletFragmentStyle_buyButtonAppearance = 3; public static final int WalletFragmentStyle_buyButtonHeight = 0; public static final int WalletFragmentStyle_buyButtonText = 2; public static final int WalletFragmentStyle_buyButtonWidth = 1; public static final int WalletFragmentStyle_maskedWalletDetailsBackground = 6; public static final int WalletFragmentStyle_maskedWalletDetailsButtonBackground = 8; public static final int WalletFragmentStyle_maskedWalletDetailsButtonTextAppearance = 7; public static final int WalletFragmentStyle_maskedWalletDetailsHeaderTextAppearance = 5; public static final int WalletFragmentStyle_maskedWalletDetailsLogoImageType = 10; public static final int WalletFragmentStyle_maskedWalletDetailsLogoTextColor = 9; public static final int WalletFragmentStyle_maskedWalletDetailsTextAppearance = 4; } }
[ "dnlrkgp@gmail.com" ]
dnlrkgp@gmail.com
64f714838122595a56d7636b59fd784d0363f946
04358f1194cd17de5fe2d6ec05d1b758068e047a
/app/src/androidTest/java/com/example/sergio/dibujo/ApplicationTest.java
ef00fa8ddfa80dbed141e30cd14d134c54788cec
[]
no_license
Sergiomv3/Dibujo
af1de5628026238b7e70344d9cc6d925511390fe
9737d94a36f24500dab029283479632d48cf4481
refs/heads/master
2021-01-13T02:03:37.752643
2015-02-05T18:46:50
2015-02-05T18:46:50
30,371,969
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
package com.example.sergio.dibujo; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "sergiomartinv3@gmail.com" ]
sergiomartinv3@gmail.com
1a1cb8c57ab3d130e0f8d22d2233f43b27427a9a
7a365108cb30bb48e153c2c7de729ef68099084f
/src/org/cen/ui/gameboard/GameBoardMouseMoveEvent.java
612fa03f77ddf2854b7d3c65a7fa2fd68b29b6ae
[]
no_license
rouallet/cenSimu
52c9022df056180c91415dac9749e8b8d36218de
3d8572806c4ef3aa83382d3428f6571f97429c15
refs/heads/master
2021-01-18T08:43:22.881888
2015-05-14T13:10:45
2015-05-14T13:10:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
307
java
package org.cen.ui.gameboard; import java.awt.geom.Point2D; public class GameBoardMouseMoveEvent implements IGameBoardEvent { private Point2D position; public GameBoardMouseMoveEvent(Point2D position) { super(); this.position = position; } public Point2D getPosition() { return position; } }
[ "emmanuelz@users.sourceforge.net" ]
emmanuelz@users.sourceforge.net
ad180a784cf04d893b6e629e7d42c0d177071518
a16391756237c2ee2a6883822d8f728636d6b882
/src/main/java/com/mmnttech/me/common/server/controller/CommonController.java
337ad2f2579552c4095e0e3aedfbab322093bebe
[]
no_license
momentum-tech/me-common-server
ecf2876e07c93f239c1641b6fd10cd4623c3fa32
9f2c2a24ad4d334aba5c41de25a4808dc13cd57a
refs/heads/master
2021-05-13T21:45:19.103322
2018-01-24T08:18:48
2018-01-24T08:18:48
116,472,094
0
0
null
null
null
null
UTF-8
Java
false
false
2,656
java
package com.mmnttech.me.common.server.controller; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.mmnttech.me.common.server.common.entity.QueryEntity; import com.mmnttech.me.common.server.common.entity.RtnMessage; import com.mmnttech.me.common.server.service.CommonService; @Controller public class CommonController { private Logger logger = LoggerFactory.getLogger(CommonController.class); @Autowired private CommonService commonService; @ResponseBody @RequestMapping(value = "queryAreaCodeLst") public RtnMessage queryAreaCodeLst(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("queryEntity") QueryEntity queryEntity) { RtnMessage rtnMsg = new RtnMessage(); try { List<Map<String, Object>> records = commonService.queryAreaCodeLst(queryEntity); rtnMsg.setRtnObj(records); } catch (Exception e) { rtnMsg.setIsSuccess(false); rtnMsg.setMessage("查询区域异常: 请稍后再试"); logger.error("queryAreaCodeLst异常" + e); } return rtnMsg; } @ResponseBody @RequestMapping(value = "queryIndustryCodeLst") public RtnMessage queryIndustryCodeLst(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("queryEntity") QueryEntity queryEntity) { RtnMessage rtnMsg = new RtnMessage(); try { List<Map<String, Object>> records = commonService.queryIndustryCodeLst(queryEntity); rtnMsg.setRtnObj(records); } catch(Exception e) { rtnMsg.setIsSuccess(false); rtnMsg.setMessage("查询行业异常: 请稍后再试"); logger.error("queryIndustryCodeLst异常" + e); } return rtnMsg; } @ResponseBody @RequestMapping(value = "queryCategoryCodeLst") public RtnMessage queryCategoryCodeLst(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("QueryEntity") QueryEntity queryEntity) { RtnMessage rtnMsg = new RtnMessage(); try { List<Map<String, Object>> records = commonService.queryCategoryCodeLst(queryEntity); rtnMsg.setRtnObj(records); } catch(Exception e) { rtnMsg.setIsSuccess(false); rtnMsg.setMessage("查询行业异常: 请稍后再试"); logger.error("queryCategoryCodeInfos异常" + e); } return rtnMsg; } }
[ "yyunjie9@163.com" ]
yyunjie9@163.com
f45fe36e24e4d40cbcb431470a0d74bc454aadea
b93fc04cc3359b07ae37338a8c0d48055a42ac5e
/src/Chapter9/ex9_108.java
b6c6a363c696e319c50fe687264b2bcef4391cdc
[]
no_license
vanpuyenbroeck/Udemy_JavaMasterclass
8b48ea87885494e7a268a5b5e57e45375a8f7526
d9eeb1feba6d027e557931df4676a09483dc32e0
refs/heads/master
2020-04-15T18:16:21.196201
2019-02-02T21:41:16
2019-02-02T21:41:16
164,907,858
0
1
null
null
null
null
UTF-8
Java
false
false
44
java
package Chapter9; public class ex9_108 { }
[ "victor.vanp@gmail.com" ]
victor.vanp@gmail.com
8f5f9b4b67a99048ac84db1f4d5f9ad7fb90a450
0f1138e69d3c7fda9879f2b0f809624763eaca5d
/src/main/java/com/yaic/app/syn/service/SynPolicyService.java
91eec4834f644454d0d25351dbab79afcf9e8383
[]
no_license
Jxyxl259/order_provider
23e880de8efb017423c665ce3ec4d899241095a4
f1a884a13d3aca6f01104309f030f5438f7e8b2b
refs/heads/master
2020-03-29T08:21:26.216815
2018-09-21T03:46:08
2018-09-21T03:46:08
149,706,291
0
0
null
null
null
null
UTF-8
Java
false
false
930
java
/* * Created By lujicong (2017-03-20 14:44:31) * Homepage https://github.com/lujicong * Since 2013 - 2017 */ package com.yaic.app.syn.service; import java.util.List; import com.yaic.fa.service.IBaseService; import com.yaic.fa.mybatis.pagehelper.PageInfo; import com.yaic.app.syn.dto.domain.SynPolicyDto; public interface SynPolicyService extends IBaseService<SynPolicyDto> { public PageInfo<SynPolicyDto> findPageInfo(int page, int rows, SynPolicyDto synPolicyDto, String orderBy); public int deleteSynPolicyData(SynPolicyDto synPolicyDto); public String taskSynPolicyDeal(); public String taskSynPolicyDealDesc(); public int taskSynPolicyDealProcess(List<SynPolicyDto> synPolicyList); public String taskSynPolicyProcessDeal(); public int synPolicyProcessDeal(List<SynPolicyDto> synPolicyList); public int querySynPolicyCount(SynPolicyDto synPolicyDto); }
[ "jxy_259_job@163.com" ]
jxy_259_job@163.com
e4487151f3e53697f7e94939f851bc48c1c5d047
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v1-release_source_from_JADX/sources/com/facebook/imagepipeline/producers/LocalFetchProducer.java
1e9d3ed1ab8af128bb638ad0ae16b6e3d4ffe2d2
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
4,230
java
package com.facebook.imagepipeline.producers; import com.facebook.common.internal.Closeables; import com.facebook.common.memory.PooledByteBuffer; import com.facebook.common.memory.PooledByteBufferFactory; import com.facebook.common.references.CloseableReference; import com.facebook.imagepipeline.image.EncodedImage; import com.facebook.imagepipeline.request.ImageRequest; import com.google.android.gms.common.internal.ImagesContract; import java.io.IOException; import java.io.InputStream; import java.util.concurrent.Executor; import javax.annotation.Nullable; public abstract class LocalFetchProducer implements Producer<EncodedImage> { private final Executor mExecutor; private final PooledByteBufferFactory mPooledByteBufferFactory; /* access modifiers changed from: protected */ public abstract EncodedImage getEncodedImage(ImageRequest imageRequest) throws IOException; /* access modifiers changed from: protected */ public abstract String getProducerName(); protected LocalFetchProducer(Executor executor, PooledByteBufferFactory pooledByteBufferFactory) { this.mExecutor = executor; this.mPooledByteBufferFactory = pooledByteBufferFactory; } public void produceResults(Consumer<EncodedImage> consumer, ProducerContext producerContext) { final ProducerListener2 producerListener = producerContext.getProducerListener(); final ImageRequest imageRequest = producerContext.getImageRequest(); final ProducerContext producerContext2 = producerContext; final C10011 r0 = new StatefulProducerRunnable<EncodedImage>(consumer, producerListener, producerContext, getProducerName()) { /* access modifiers changed from: protected */ @Nullable public EncodedImage getResult() throws Exception { EncodedImage encodedImage = LocalFetchProducer.this.getEncodedImage(imageRequest); if (encodedImage == null) { producerListener.onUltimateProducerReached(producerContext2, LocalFetchProducer.this.getProducerName(), false); producerContext2.setExtra(1, ImagesContract.LOCAL); return null; } encodedImage.parseMetaData(); producerListener.onUltimateProducerReached(producerContext2, LocalFetchProducer.this.getProducerName(), true); producerContext2.setExtra(1, ImagesContract.LOCAL); return encodedImage; } /* access modifiers changed from: protected */ public void disposeResult(EncodedImage encodedImage) { EncodedImage.closeSafely(encodedImage); } }; producerContext.addCallbacks(new BaseProducerContextCallbacks() { public void onCancellationRequested() { r0.cancel(); } }); this.mExecutor.execute(r0); } /* access modifiers changed from: protected */ public EncodedImage getByteBufferBackedEncodedImage(InputStream inputStream, int i) throws IOException { CloseableReference closeableReference; if (i <= 0) { try { closeableReference = CloseableReference.m128of(this.mPooledByteBufferFactory.newByteBuffer(inputStream)); } catch (Throwable th) { Closeables.closeQuietly(inputStream); CloseableReference.closeSafely((CloseableReference<?>) null); throw th; } } else { closeableReference = CloseableReference.m128of(this.mPooledByteBufferFactory.newByteBuffer(inputStream, i)); } CloseableReference closeableReference2 = closeableReference; EncodedImage encodedImage = new EncodedImage((CloseableReference<PooledByteBuffer>) closeableReference2); Closeables.closeQuietly(inputStream); CloseableReference.closeSafely((CloseableReference<?>) closeableReference2); return encodedImage; } /* access modifiers changed from: protected */ public EncodedImage getEncodedImage(InputStream inputStream, int i) throws IOException { return getByteBufferBackedEncodedImage(inputStream, i); } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
fc6765763c9b195338c4c42b31dccbae3237b055
9f83bc3b4aad3e3cc31e5ec1fe6dcc1b468798f5
/app/src/androidTest/java/com/bwie/my_004/ExampleInstrumentedTest.java
331d5e51503878a8fc45c95ca08904530dfb1ab7
[]
no_license
ZhouRuiQing/My_004
81f7dac38e0bbff0713753e2f388665f0749be3d
ffc70ad2b11657cb82df95f57d63f681ef1bb981
refs/heads/master
2020-03-27T19:04:12.688419
2018-09-01T03:24:49
2018-09-01T03:24:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
714
java
package com.bwie.my_004; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.bwie.my_004", appContext.getPackageName()); } }
[ "379996854@qq.com" ]
379996854@qq.com
ec29b921c355b249ebf5bdea2ca60834407b3202
bd5db1b8d65837dac840953292cd73e029c6a5c2
/app/src/main/java/com/studio4plus/homerplayer/ui/SnippetPlayer.java
6a9653244e484f8b8dce6c61b60c3e4a6a04332e
[ "MIT" ]
permissive
Sladix/homerplayer
3732f9acf2fb5233ed85bc3d9473d77a784599ed
f2b7ccbb987a0899c955eb92cbad0336a210fcf2
refs/heads/master
2022-12-25T15:26:31.636631
2020-10-12T12:09:59
2020-10-12T12:09:59
300,899,752
0
0
MIT
2020-10-04T00:07:55
2020-10-03T14:30:27
Java
UTF-8
Java
false
false
2,253
java
package com.studio4plus.homerplayer.ui; import android.content.Context; import android.util.Log; import com.crashlytics.android.Crashlytics; import com.studio4plus.homerplayer.model.AudioBook; import com.studio4plus.homerplayer.player.PlaybackController; import com.studio4plus.homerplayer.player.Player; import java.io.File; import de.greenrobot.event.EventBus; /** * Plays the current audiobook for a short amount of time. Just to demonstrate. */ public class SnippetPlayer implements PlaybackController.Observer { private static final long PLAYBACK_TIME_MS = 5000; private static final String TAG = "SnippetPlayer"; private PlaybackController playbackController; private long startPositionMs = -1; private boolean isPlaying = false; public SnippetPlayer(Context context, EventBus eventBus, float playbackSpeed) { Player player = new Player(context, eventBus); player.setPlaybackSpeed(playbackSpeed); playbackController = player.createPlayback(); playbackController.setObserver(this); } public void play(AudioBook audioBook) { AudioBook.Position position = audioBook.getLastPosition(); isPlaying = true; playbackController.start(position.file, position.seekPosition); } public void stop() { playbackController.stop(); } public boolean isPlaying() { return isPlaying; } @Override public void onDuration(File file, long durationMs) {} @Override public void onPlaybackProgressed(long currentPositionMs) { if (startPositionMs < 0) { startPositionMs = currentPositionMs; } else { if (currentPositionMs - startPositionMs > PLAYBACK_TIME_MS) { playbackController.stop(); } } } @Override public void onPlaybackEnded() {} @Override public void onPlaybackStopped(long currentPositionMs) {} @Override public void onPlaybackError(File path) { Crashlytics.log(Log.DEBUG, TAG,"Unable to play snippet: " + path.toString()); } @Override public void onPlayerReleased() { isPlaying = false; } }
[ "marcin@studio4plus.com" ]
marcin@studio4plus.com
4908ecbc8705ebd9df7659e950701d51b5acd32b
012be7116eaa82bae55c3150a01419d609e2383e
/app/final_salon_app2/app/src/main/java/com/example/albatross/final_salon_app/startup.java
46ebf429477f09da7132c28e4d73b8c737f4bda1
[]
no_license
Clrkz/Salon-Mobile-App
2a346d64e8d055f7654fa2048a80249610702f5b
659467b1c6a5a5a8be137ea3ab87b29aabea12c5
refs/heads/master
2023-02-19T19:43:34.637615
2021-01-18T17:59:52
2021-01-18T17:59:52
330,745,506
0
0
null
null
null
null
UTF-8
Java
false
false
1,478
java
package com.example.albatross.final_salon_app; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Point; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Display; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; public class startup extends AppCompatActivity { private static int SPLASH_TIME_OUT = 2000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); Bitmap bmp = Bitmap.createScaledBitmap(BitmapFactory.decodeResource( getResources(),R.drawable.final_startup_f),size.x,size.y,true); setContentView(R.layout.activity_startup); new Handler().postDelayed(new Runnable() { @Override public void run() { Intent startupintent = new Intent(startup.this, MainActivity.class); startActivity(startupintent); finish(); } }, SPLASH_TIME_OUT); } }
[ "143clarkz@gmail.com" ]
143clarkz@gmail.com
b353ea34e79e849e5c57599efc4ee43028bbbe8e
718702c2b2daa9ec84b6f034fb55e6149ffe6fa1
/knowledgebase/api/src/main/java/org/kuali/mobility/knowledgebase/entity/KnowledgeBaseFormSearch.java
cc4c92d54708374a6afc9545604e2e1de7b7e60a
[]
no_license
NewMediaCenter/MobileWeb
88f8d9b5e3b7f072c6548771272aaec96c1dace1
1e40dfa1c4d2ad961f059bd39ad9ee6e76b33a5c
refs/heads/master
2021-01-23T08:34:55.431855
2011-08-05T14:44:32
2011-08-05T14:44:32
2,160,999
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package org.kuali.mobility.knowledgebase.entity; public class KnowledgeBaseFormSearch { private String searchText; public String getSearchText() { return searchText; } public void setSearchText(String searchText) { this.searchText = searchText; } }
[ "jtwalker@c58b5278-a2c8-4678-9377-d879b98ccb7f" ]
jtwalker@c58b5278-a2c8-4678-9377-d879b98ccb7f
86bd832fd2e0789a21a37351a7919ea42f2c151c
989bd192d3af06f5ab2d665ff946635909d4cd72
/2016/Samples/Mobile101-DataSnap/DatasnapServer/proxy/java_blackberry/com/embarcadero/javablackberry/DBXDataTypes.java
93917de8ac5a20434576c649e413c613d8c80eb0
[]
no_license
flrizzato/EmbarcaderoConference
a134cf0ed3a591dc459ad63b08b232cc12edd09a
832b683d7e46b723eb8292c8c4bad940689f1bc3
refs/heads/master
2022-11-25T19:58:41.873423
2022-11-22T15:39:42
2022-11-22T15:39:42
72,447,089
133
155
null
2018-10-28T01:11:06
2016-10-31T14:56:28
Pascal
UTF-8
Java
false
false
4,361
java
//******************************************************* // // Delphi DataSnap Framework // // Copyright(c) 1995-2011 Embarcadero Technologies, Inc. // //******************************************************* package com.embarcadero.javablackberry; /** * Represents the DBXDelphi types wrapped. * */ public class DBXDataTypes { // / <summary>Data types supported by DBX.</summary> // /<summary></summary> static public final int UnknownType = 0; // /<summary>8 bit Ansi String</summary> static public final int AnsiStringType = 1; // /<summary>32 bit Date</summary> static public final int DateType = 2; // /<summary>Blob with a subtype</summary> static public final int BlobType = 3; // /<summary>16 big Boolean</summary> static public final int BooleanType = 4; // /<summary>16 bit signed integer</summary> static public final int Int16Type = 5; // /<summary>32 bit signed integer</summary> static public final int Int32Type = 6; // /<summary>64 bit floating point</summary> static public final int DoubleType = 7; // /<summary>TBcd decimal from the FMTBcd unit</summary> static public final int BcdType = 8; /* { BCD } */ // /<summary>Fixed length byte array</summary> static public final int BytesType = 9; // /<summary>32 bit Time</summary> static public final int TimeType = 10; // /<summary>TDateTime // / Internally managed as a <c>TDBXDataTypes.TimeStampType</c> // /</summary> static public final int DateTimeType = 11; /* { Time-stamp (64 bit) } */ // /<summary>Unsigned 16 bit integer</summary> static public final int UInt16Type = 12; // /<summary>Unsigned 32 bit integer</summary> static public final int UInt32Type = 13; // /<summary>Variable length byte array with maximum length of 64 // kilobytes</summary> static public final int VarBytesType = 15; // /<summary>Oracle cursor type</summary> static public final int CursorType = 17; // /<summary>64 bit integer</summary> static public final int Int64Type = 18; // /<summary>unsigned 64 bit integer</summary> static public final int UInt64Type = 19; // /<summary>Abstract data type</summary> static public final int AdtType = 20; // /<summary>Array data type</summary> static public final int ArrayType = 21; // /<summary>Reference data type</summary> static public final int RefType = 22; // /<summary>Nested table data type</summary> static public final int TableType = 23; // /<summary>TSQLTimeStamp in the SqlTimSt unit</summary> static public final int TimeStampType = 24; // /<summary>Delphi Currency data type in System unit. // / Internally managed as a <c>TDBXDataTypes.BCDType</c> // /</summary> static public final int CurrencyType = 25; // /<summary>UCS2 unicode string</summary> static public final int WideStringType = 26; // /<summary>32 bit floating point</summary> static public final int SingleType = 27; // /<summary>8 bit signed integer</summary> static public final int Int8Type = 28; // /<summary>8 bit unsigned integer</summary> static public final int UInt8Type = 29; // /<summary>Object serialization</summary> static public final int ObjectType = 30; // /<summary>Character array</summary> static public final int CharArrayType = 31; // /<summary>Time Interval</summary> static public final int IntervalType = 32; // /<summary>BinaryBlobType equivalent to <c>BlobType</c> with a // /<c>BinarySubType</c> sub type/ // /</summary> static public final int BinaryBlobType = 33; // /<summary> // / DBXConnection type for DataSnap server methods that receive or set the // server side // / connection. // /</summary> static public final int DBXConnectionType = 34; // /<summary> // / Variant out or return parameter. Not supported as a TDBXReader column. // /</summary> static public final int VariantType = 35; static public final int TimeStampOffsetType = 36; // /<summary>DBX type for a JSON value // /</summary> static public final int JsonValueType = 37; // /<summary> // /DBX type for a callback argument // /</summary> static public final int CallbackType = 38; // /<summary>Maximum number of base types excluding sub types that // / are supported by TDataSet type system. // /</summary> static public final int MaxBaseTypes = 39; }
[ "fernando.rizzato@gmail.com" ]
fernando.rizzato@gmail.com
0bc2322abf019fbbb585399c6883a255964f6f81
652cdee89c08bd773fbb905d21e814c4ea55a38a
/workspace/src/com/company/bean/Book2Bean.java
0eb2599aa94038fa1e62d98c646d030e972c657a
[]
no_license
charlyne/LibraryBookManagement-master
83abfadf9cead7aa097d658a3b4494b3de2a7b7f
b0536c5876e7adb009edbb0a34711222fa3ec83f
refs/heads/master
2020-04-27T12:05:01.625252
2019-03-07T10:11:01
2019-03-07T10:11:01
174,320,345
1
1
null
null
null
null
UTF-8
Java
false
false
528
java
package com.company.bean; /** * Created by didi on 2018/12/24. */ public class Book2Bean extends BookBean{ private int is_return; private String should_return_time; public int getIs_return(){ return this.is_return; } public String should_return_time(){ return this.should_return_time; } public void setIs_return(int is_return){ this.is_return=is_return; } public void setShould_return_time(String should_return_time){this.should_return_time=should_return_time;} }
[ "nanbiandehe@sina.com" ]
nanbiandehe@sina.com
675de3a1b17323f7d8fe8fb1ae94f59ff68048b5
a1b370445cc5844821ebefc2e0ae7a0b773a6fad
/maventest/src/main/java/com/mas/selenium/interceptor/ValidaLogin.java
5be32bf3db475eacdb3d30a2f832f8b376bb1426
[]
no_license
sakalesh7255/sss
341dc50f74b5db8fd0d2dd171bf00669113b42eb
8b74098d1be221d5619dcb5d70e88410854be470
refs/heads/master
2023-06-08T23:06:29.553715
2021-07-01T11:35:36
2021-07-01T11:35:36
381,961,035
0
0
null
null
null
null
UTF-8
Java
false
false
988
java
/* * Classe interceptor para executar antes de todas as requicisoes menos a da index.jsp (pagina de login) */ package com.mas.selenium.interceptor; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.Interceptor; public class ValidaLogin implements Interceptor{ @Override public void destroy() { // TODO Auto-generated method stub } @Override public void init() { // TODO Auto-generated method stub } @Override public String intercept(ActionInvocation invocation) throws Exception { HttpSession session = ServletActionContext.getRequest().getSession(false); if(session==null || session.getAttribute("Usuario")==null){ return "Expirada"; // se nao tiver sessao , chama Login } else{ return invocation.invoke(); // caso ja tiver sessao , segue } } }
[ "arka2@arka2-PC" ]
arka2@arka2-PC
4e0e141f1da22021a2ebcb40a561603cc483a74b
e9d9b668e83560be78b1816f1bbb89d0757c22ce
/ForestryManagement_Collections/src/com/fms/beans/Admin.java
a3e83efb3d24561abc268089fdf38c964c4c0be3
[]
no_license
Vishruth-Subramanyam/ForestryManagement_Collections
9eb066100baaa96fd54906a630f538385c9caa53
8059258ece7b3c5086867cdf975e0a4b9dd897a2
refs/heads/master
2022-02-19T16:43:46.046363
2019-08-26T09:16:00
2019-08-26T09:16:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
495
java
package com.fms.beans; public class Admin { private Integer adminId; private String password; public Integer getAdminId() { return adminId; } public void setAdminId(Integer adminId) { this.adminId = adminId; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public String toString() { return "Admin [adminId=" + adminId + ", password=" + password + "]"; } }
[ "dell@dell-Inspiron-3558" ]
dell@dell-Inspiron-3558
784c59e727261332204225c50c61dab4ade6e078
3524dd4fb908a7ba19530fc0d8135e04290ad4a7
/app/src/main/java/com/jaeger/fragmentos/core/MiscController.java
a4037d50838189e4bd2d72d09dfa9e445fbc84fa
[]
no_license
Jaeger02/Fragmentos
7ea049c862809dc42136212c2838b40dabbe58c2
df37cd480f1343f786f2e43489e8496c35096bae
refs/heads/master
2023-01-05T09:37:21.949810
2020-11-06T03:04:25
2020-11-06T03:04:25
298,448,700
0
0
null
null
null
null
UTF-8
Java
false
false
4,509
java
package com.jaeger.fragmentos.core; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.SharedPreferences; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import com.google.android.material.snackbar.Snackbar; import com.irozon.alertview.AlertActionStyle; import com.irozon.alertview.AlertStyle; import com.irozon.alertview.AlertView; import com.irozon.alertview.interfaces.AlertActionListener; import com.irozon.alertview.objects.AlertAction; import org.jetbrains.annotations.NotNull; import dmax.dialog.SpotsDialog; import com.jaeger.fragmentos.R; import com.jaeger.fragmentos.gui.MainActivity; public class MiscController { private static MiscController instance = null; public String actualFragment; private ProgressDialog progressDialog; private AlertDialog alertDialog; private AlertView alertView; private LayoutInflater inflater; private View layout; private TextView text; private Toast toast; private SharedPreferences sharedPreferences; private SharedPreferences.Editor editor; private MiscController() { } public static MiscController Instance() { if (instance == null) instance = new MiscController(); return instance; } public void MessageBox(View view, String mensaje, int length) { Snackbar.make(view, mensaje, length).show(); } public void MessageBox(AppCompatActivity activity, String title, String message, AlertStyle style) { alertView = new AlertView(title, message, style); alertView.addAction(new AlertAction("Ok", AlertActionStyle.DEFAULT, new AlertActionListener() { @Override public void onActionClick(@NotNull AlertAction action) { } })); alertView.show(activity); } public void MessageBox(AppCompatActivity activity, String title, String message, AlertAction action, AlertStyle style) { alertView = new AlertView(title, message, style); alertView.addAction(action); alertView.show(activity); } public void MessageBox(AppCompatActivity activity, String title, String message, AlertAction action, AlertAction action2, AlertStyle style) { alertView = new AlertView(title, message, style); alertView.addAction(action); alertView.addAction(action2); alertView.show(activity); } public void ShowWait(Context context, String message) { //alertDialog = new SpotsDialog(context, R.style.CustomProgressBar); //Log.i("S",context.toString()); // if(alertDialog != null && alertDialog.isShowing()) // return; alertDialog = new SpotsDialog(context, message, R.style.CustomProgressBar); alertDialog.show(); } public void CloseWait() { if (progressDialog != null && progressDialog.isShowing()) progressDialog.dismiss(); if (alertDialog != null && alertDialog.isShowing()) alertDialog.dismiss(); } public void hideKeyboardFrom(Activity activity) { InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); View f = activity.getCurrentFocus(); if (null != f && null != f.getWindowToken() && EditText.class.isAssignableFrom(f.getClass())) imm.hideSoftInputFromWindow(f.getWindowToken(), 0); else activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); } public void Toast(String message) { inflater = ((MainActivity) MainActivity.GLOBALS.get("app")).getLayoutInflater(); layout = inflater.inflate(R.layout.custom_toast, (ViewGroup)((MainActivity) MainActivity.GLOBALS.get("app")).findViewById(R.id.custom_toast_container)); text = layout.findViewById(R.id.text); text.setText(message); toast = new Toast(FragmentosApplication.getAppContext()); toast.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 80); toast.setDuration(Toast.LENGTH_LONG); toast.setView(layout); toast.show(); } }
[ "aduaperd@gmail.com" ]
aduaperd@gmail.com
4c0ea4788013add8d9026580d6c6ed8b8b043fb7
0fd3708c0f3aeaed5bc7529278c5872124e5f2ff
/src/main/java/com/prgjesusindustry/apivendas/repositories/CidadeRepository.java
577de5989bef2c3dd5660033686da98453190eb5
[]
no_license
paullogoncalves/api-vendas
b46a81d34c0a5857b402984b6b2d45ffc697f50e
91909508edb5d7fd84aee7c1de8055fb6a23a777
refs/heads/main
2023-05-01T20:43:05.689143
2021-05-01T21:22:54
2021-05-01T21:22:54
354,074,429
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package com.prgjesusindustry.apivendas.repositories; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.prgjesusindustry.apivendas.domain.Cidade; @Repository public interface CidadeRepository extends JpaRepository<Cidade, Integer>{ }
[ "paullogoncalves@gmail.com" ]
paullogoncalves@gmail.com
f7d1f288aac7af8052903a33acf2f9d698cd90ce
d96d68d72cc519eaaf1c645e90e89a5fd2071f95
/core/src/test/java/com/google/errorprone/bugpatterns/MissingImplementsComparableTest.java
063986dd03bddd2dfb1bd6484ada050c9f676c14
[ "Apache-2.0" ]
permissive
PicnicSupermarket/error-prone
1e22e603c3e6581f652c0b33a4545b827bbe9ac7
9f8c332d9ea67dfd31d8a91a023392f61097ae8a
refs/heads/master
2023-08-31T01:58:56.562162
2023-08-24T21:00:02
2023-08-24T21:02:22
81,736,167
10
2
Apache-2.0
2023-08-10T16:54:06
2017-02-12T15:33:41
Java
UTF-8
Java
false
false
2,513
java
/* * Copyright 2021 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.bugpatterns; import com.google.errorprone.CompilationTestHelper; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** Unit tests for {@link MissingImplementsComparable} check. */ @RunWith(JUnit4.class) public final class MissingImplementsComparableTest { private final CompilationTestHelper compilationHelper = CompilationTestHelper.newInstance(MissingImplementsComparable.class, getClass()); @Test public void flagsMissingImplementsComparable() { compilationHelper .addSourceLines( "Test.java", "class Test {", " // BUG: Diagnostic contains:", " public int compareTo(Test o) {", " return 0;", " }", "}") .doTest(); } @Test public void doesNotFlagImplementsComparable() { compilationHelper .addSourceLines( "Test.java", "class Test implements Comparable<Test> {", " @Override", " public int compareTo(Test o) {", " return 0;", " }", "}") .doTest(); } @Test public void doesNotFlagComparableSuperType() { compilationHelper .addSourceLines("Foo.java", "abstract class Foo<T> implements Comparable<Foo<T>> {}") .addSourceLines( "Test.java", "class Test extends Foo<String> {", " @Override", " public int compareTo(Foo<String> o) {", " return 0;", " }", "}") .doTest(); } @Test public void doesNotFlagImproperCompareTo() { compilationHelper .addSourceLines( "Test.java", "class Test {", " public int compareTo(Object o) {", " return 0;", " }", "}") .doTest(); } }
[ "error-prone-team+copybara@google.com" ]
error-prone-team+copybara@google.com
4921191eba5fe4f76fd6c5d2eacf4808e2d70a84
4f5c2b8249b71c32c3218a66eedf4d1c03e63425
/src/main/java/com/yoho/springbootdemo/interceptor/TestInterceptor.java
d6ce8cfff139e514ec40a14fc809097049a16cb4
[]
no_license
Tennyson365/springbootdemo
60aa27ea68954150f1e4143a810dc6cd3616846b
5d12b8e7d8a72c6b370b6ef1872c572374d8a151
refs/heads/master
2021-09-04T11:17:48.764316
2018-01-18T07:00:26
2018-01-18T07:00:26
115,401,308
0
0
null
null
null
null
UTF-8
Java
false
false
1,671
java
package com.yoho.springbootdemo.interceptor; import lombok.extern.log4j.Log4j2; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Author: Tennyson * E-Mail:wangxing@bailefen.com * Project:demo4boot * Package:com.yoho.demo.interceptor * DateTime: 2017/12/19 16:21 * Description:测试拦截器 */ @Log4j2 public class TestInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { log.info("========================== 在请求处理之前调用(即controller方法调用之前) =========================="); //只有返回true才会继续执行下去,返回false取消当前请求 return true; } @Override public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { log.info("================ 请求处理之前,视图被渲染之后调用(即controller方法调用之后) ================="); } @Override public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { log.info("====== 在整个请求结束之后调用(即DispatcherServlet渲染了对应视图之后,主要用户清理资源工作) ========"); } }
[ "wangxing@bailefen.com" ]
wangxing@bailefen.com
0eba9175ebf024baf83ce3eb696deb604af484c2
c4b9a50bbc20e524865c539cb8a92251e8ee85d6
/src/org/hahan/javawraper/lang/result/Result8.java
c94f1c0e4a0cf186706ce4139c855b06c1efa713
[]
no_license
hahan2020/freejavax
b684b4a17e6e0201176ed5c064a264ad0ea166b6
3777b4bb7078b08ca19bf19e2ff50293def38708
refs/heads/master
2021-01-20T20:45:29.013180
2016-06-05T06:43:42
2016-06-05T06:43:42
60,445,948
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package org.hahan.javawraper.lang.result; public class Result8<T1, T2, T3, T4, T5, T6, T7, T8> extends Result7<T1, T2, T3, T4, T5, T6, T7> { private T8 result8 = null; public Result8(){} public Result8(T1 result, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8) { super(result, result2, result3, result4, result5, result6, result7); this.result8 = result8; } public T8 getResult8() { return result8; } public void setResult8(T8 result8) { this.result8 = result8; } }
[ "345480567@qq.com" ]
345480567@qq.com
9263ee17056e7182e741f3108fd2a51aa19fc0a7
90688d9712571887f3aa33e56e5c5ce028dfeb06
/src/main/java/com/home/entity/enums/PatientStatus.java
70a9cecdd980c5bc222729282bf90f7d1747e918
[]
no_license
MarkiyanSayevich/Graduation
00ebb440416fc1f25a0afa861bdd97bcef245827
ba9f48e2350f661f769da4f9a87338d92943e317
refs/heads/master
2020-03-18T13:19:09.595394
2018-06-17T22:45:38
2018-06-17T22:45:38
134,775,451
0
0
null
null
null
null
UTF-8
Java
false
false
177
java
package com.home.entity.enums; public enum PatientStatus { БЮДЖЕТНИЙ,ГОСПРОЗРАХУНКОВИЙ,АМБУЛАТОРНИЙ,СТАЦІОНАРНИЙ }
[ "markiyansayevich@gmail.com" ]
markiyansayevich@gmail.com
cb2db48e4265c967bd6b4254a6f420dc421ff0df
4552fde9a44ce055b925179ec1bfe18e567b0bea
/src/main/java/com/capitalbio/common/util/HttpClient.java
0d65ceec9e229d6582b2dd1b5b11cf309efb51ed
[]
no_license
qiuqiuxiaojiang/screen
4e705ad941f22bdfa5e63eeaeb0427bda5d2c954
6b885736cf93acee5363071d6f7186addd886975
refs/heads/master
2022-11-29T13:36:05.359942
2020-08-05T06:27:28
2020-08-05T06:27:28
285,198,427
0
0
null
null
null
null
UTF-8
Java
false
false
5,491
java
package com.capitalbio.common.util; import java.util.List; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.http.Consts; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.protocol.HTTP; import org.apache.http.util.EntityUtils; import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Lists; public class HttpClient { private static Log logger = LogFactory.getLog(HttpClient.class); public static JSONObject post(String url,Map<String, Object> map,String token,String userId){ HttpPost httpPost = new HttpPost(url); httpPost.setHeader("token", token); httpPost.setHeader("userId", userId); String json = JsonUtil.mapToJson(map); System.out.println(json); StringEntity entity = new StringEntity(json, "UTF-8"); httpPost.setEntity(entity); httpPost.addHeader(HTTP.CONTENT_TYPE, "application/json"); try { HttpResponse response = new DefaultHttpClient().execute(httpPost); int code = response.getStatusLine().getStatusCode(); if (code == 200) { String result = EntityUtils.toString(response.getEntity()); logger.info("post===" + result); return JSONObject.parseObject(result); } } catch (Exception e) { logger.error("post==",e); } return null; } public static JSONObject post(String url,Map<String, Object> map){ HttpPost httpPost = new HttpPost(url); String json = JsonUtil.mapToJson(map); System.out.println(json); StringEntity entity = new StringEntity(json, "UTF-8"); httpPost.setEntity(entity); httpPost.addHeader(HTTP.CONTENT_TYPE, "application/json"); try { HttpResponse response = new DefaultHttpClient().execute(httpPost); int code = response.getStatusLine().getStatusCode(); if (code == 200) { String result = EntityUtils.toString(response.getEntity()); logger.info("post===" + result); return JSONObject.parseObject(result); } } catch (Exception e) { logger.error("post==",e); } return null; } /** * url 参数自己拼装 * @param url * @param token * @param userId * @return */ public static JSONObject get(String url,String token,String userId){ HttpGet httpGet = new HttpGet(url); httpGet.setHeader("token", token); httpGet.setHeader("userId", userId); try { HttpResponse response = new DefaultHttpClient().execute(httpGet); int code = response.getStatusLine().getStatusCode(); if (code == 200) { String result = EntityUtils.toString(response.getEntity()); logger.info("get===" + result); return JSONObject.parseObject(result); } } catch (Exception e) { logger.error("get==",e); } return null; } /** * url 参数自己拼装 * @param url * @param token * @param userId * @return */ public static JSONObject get1(String url, String username, String password){ List<NameValuePair> params = Lists.newArrayList(); params.add(new BasicNameValuePair("username", username)); params.add(new BasicNameValuePair("password", password)); String str = ""; try { //转换为键值对 str = EntityUtils.toString(new UrlEncodedFormEntity(params, Consts.UTF_8)); System.out.println(str); //创建Get请求 HttpGet httpGet = new HttpGet(url+"?"+str); HttpResponse response = new DefaultHttpClient().execute(httpGet); int code = response.getStatusLine().getStatusCode(); if (code == 200) { String result = EntityUtils.toString(response.getEntity()); logger.info("get===" + result); return JSONObject.parseObject(result); } } catch (Exception e) { logger.error("get==",e); } return null; } public static JSONObject put(String url,Map<String, Object> map,String token,String userId){ HttpPut httpPut = new HttpPut(url); httpPut.setHeader("token", token); httpPut.setHeader("userId", userId); String json = JsonUtil.mapToJson(map); System.out.println(json); StringEntity entity = new StringEntity(json, "UTF-8"); httpPut.setEntity(entity); httpPut.addHeader(HTTP.CONTENT_TYPE, "application/json"); try { HttpResponse response = new DefaultHttpClient().execute(httpPut); int code = response.getStatusLine().getStatusCode(); if (code == 200) { String result = EntityUtils.toString(response.getEntity()); logger.info("put===" + result); return JSONObject.parseObject(result); } } catch (Exception e) { logger.error("put==",e); } return null; } public static void main(String[] args) { /*HttpClient.get("http://59.110.44.175:8082/chs_fx/rest/wx/getUserInfo?userId=1474542363345", "16078893-291d-4b85-9a35-18873395e154", "1474542363345"); Map<String,Object> map = Maps.newHashMap(); map.put("oldPassword", "123456"); map.put("newPassword", "654321"); HttpClient.put("http://59.110.44.175:8082/chs_fx/rest/wx/updatePassword", map, "16078893-291d-4b85-9a35-18873395e154", "1474542363345");*/ // JSONObject object = HttpClient.get("http://59.110.44.175:8082/chs_fx/rest/wx/verifyMobileAndId?mobile=18612031089&id=43052319881215862X"); // System.out.print(object); } }
[ "daweichen@pc-d2015057.CapitalBio.lex" ]
daweichen@pc-d2015057.CapitalBio.lex
683a1e898781efd27470b6b46f438d13538b92ba
2fabfae10ac3594e38fa01dd3beba129827be213
/src/main/java/lru/cache/LauncherClass.java
cb290aa8f864b9b4d785205d23edc0080dd97304
[]
no_license
jmazgaj/lru-cache
295237d1f3be0ee126f2b303c8a2ea538ec1f625
af3c0473e80cd4485eac6b928425fcde6938b361
refs/heads/master
2021-09-03T17:52:33.002644
2018-01-10T21:54:52
2018-01-10T21:54:52
111,153,153
0
0
null
null
null
null
UTF-8
Java
false
false
389
java
package lru.cache; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; @SpringBootApplication @EnableScheduling public class LauncherClass { public static void main(String[] args) { SpringApplication.run(LauncherClass.class, args); } }
[ "mastahq3a@gmail.com" ]
mastahq3a@gmail.com
0240ca1ec1e127631247b1272660f5311939b430
1daa675860ff13a544c6bd74851ae5d6f8ba47fa
/JAVA/Work/javaexec/src/main/java/tw01_/java/tw_01_03.java
88a66152320c525188ee6c15187af36c44c262cd
[]
no_license
kaevin1004/java--
6d90a7613402e8e839a7c0dfa4f6b43681dde12e
2de34eaf445b7d0946430bcc31d38be8fd5598dd
refs/heads/master
2021-09-12T11:16:44.211681
2018-01-26T09:08:41
2018-01-26T09:08:41
103,893,846
0
0
null
null
null
null
UTF-8
Java
false
false
457
java
package tw01_.java; import java.util.Scanner; public class tw_01_03 { public static void main(String[] args){ int salary = 0; int deposit = 0; Scanner keyboard = new Scanner(System.in); System.out.println("월급을 입력하시오"); salary = keyboard.nextInt(); deposit = 10*12*salary; System.out.println("10년 동안의 저축액:"+deposit); } }
[ "kaevin1004@naver.com" ]
kaevin1004@naver.com
3a98bf1b18c6e48f1c32bb4e4cdb07e5814a2240
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/fcb46f1421fcafe5c0d1d87549254fac99d355c9/after/RandomDoubleForRandomIntegerInspection.java
1d6323e75513c4c6dd9c1a2bb94947280da6b1e2
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,943
java
/* * Copyright 2003-2006 Dave Griffith, Bas Leijdekkers * * 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.siyeh.ig.performance; import com.intellij.codeInsight.daemon.GroupNames; import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.openapi.project.Project; import com.intellij.psi.*; import com.intellij.psi.tree.IElementType; import com.intellij.util.IncorrectOperationException; import com.siyeh.ig.BaseInspectionVisitor; import com.siyeh.ig.ExpressionInspection; import com.siyeh.ig.InspectionGadgetsFix; import com.siyeh.InspectionGadgetsBundle; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.NonNls; public class RandomDoubleForRandomIntegerInspection extends ExpressionInspection { public String getID() { return "UsingRandomNextDoubleForRandomInteger"; } public String getGroupDisplayName() { return GroupNames.PERFORMANCE_GROUP_NAME; } @NotNull protected String buildErrorString(Object... infos) { return InspectionGadgetsBundle.message( "random.double.for.random.integer.problem.descriptor"); } public InspectionGadgetsFix buildFix(PsiElement location) { return new RandomDoubleForRandomIntegerFix(); } private static class RandomDoubleForRandomIntegerFix extends InspectionGadgetsFix { public String getName() { return InspectionGadgetsBundle.message( "random.double.for.random.integer.replace.quickfix"); } public void doFix(Project project, ProblemDescriptor descriptor) throws IncorrectOperationException { final PsiIdentifier name = (PsiIdentifier)descriptor.getPsiElement(); final PsiReferenceExpression expression = (PsiReferenceExpression)name.getParent(); if (expression == null) { return; } final PsiExpression call = (PsiExpression)expression.getParent(); final PsiExpression qualifier = expression.getQualifierExpression(); if (qualifier == null) { return; } final String qualifierText = qualifier.getText(); final PsiBinaryExpression multiplication = (PsiBinaryExpression)getContainingExpression(call); final PsiExpression cast = getContainingExpression(multiplication); assert multiplication != null; final PsiExpression multiplierExpression; final PsiExpression lOperand = multiplication.getLOperand(); if (lOperand.equals(call)) { multiplierExpression = multiplication.getROperand(); } else { multiplierExpression = lOperand; } assert multiplierExpression != null; final String multiplierText = multiplierExpression.getText(); @NonNls final String nextInt = ".nextInt((int) "; replaceExpression(cast, qualifierText + nextInt + multiplierText + ')'); } } public BaseInspectionVisitor buildVisitor() { return new StringEqualsEmptyStringVisitor(); } private static class StringEqualsEmptyStringVisitor extends BaseInspectionVisitor { public void visitMethodCallExpression( @NotNull PsiMethodCallExpression call) { super.visitMethodCallExpression(call); final PsiReferenceExpression methodExpression = call.getMethodExpression(); final String methodName = methodExpression.getReferenceName(); @NonNls final String nextDouble = "nextDouble"; if (!nextDouble.equals(methodName)) { return; } final PsiMethod method = call.resolveMethod(); if (method == null) { return; } final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) { return; } final String className = containingClass.getQualifiedName(); if (!"java.util.Random".equals(className)) { return; } final PsiExpression possibleMultiplierExpression = getContainingExpression(call); if (!isMultiplier(possibleMultiplierExpression)) { return; } final PsiExpression possibleIntCastExpression = getContainingExpression(possibleMultiplierExpression); if (!isIntCast(possibleIntCastExpression)) { return; } registerMethodCallError(call); } private static boolean isMultiplier(PsiExpression expression) { if (expression == null) { return false; } if (!(expression instanceof PsiBinaryExpression)) { return false; } final PsiBinaryExpression binaryExpression = (PsiBinaryExpression)expression; final PsiJavaToken sign = binaryExpression.getOperationSign(); final IElementType tokenType = sign.getTokenType(); return JavaTokenType.ASTERISK.equals(tokenType); } private static boolean isIntCast(PsiExpression expression) { if (expression == null) { return false; } if (!(expression instanceof PsiTypeCastExpression)) { return false; } final PsiTypeCastExpression castExpression = (PsiTypeCastExpression)expression; final PsiType type = castExpression.getType(); return PsiType.INT.equals(type); } } @Nullable static PsiExpression getContainingExpression(PsiExpression exp) { PsiElement ancestor = exp.getParent(); while (true) { if (ancestor == null) { return null; } if (!(ancestor instanceof PsiExpression)) { return null; } if (!(ancestor instanceof PsiParenthesizedExpression)) { return (PsiExpression)ancestor; } ancestor = ancestor.getParent(); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
b4e23fc24f5e28bb3a6ae57e13fb4e6b2c502d3d
72e5a608c04711180b5e924207ce36971788c266
/src/main/java/Moon/Suniypoliya/security/JwtAuthenticationEntryPoint.java
b94e0b40fdde37aa368fb5b342187b7c1ecc86ae
[]
no_license
husniddinprogrammer/Suniy-Poliya-dasturi
21be64ff92fe6412d26902defb31893fabc0e59c
ad481b4085058d74e9de8735fbdd9d89f724cbbe
refs/heads/master
2023-07-20T21:07:10.921818
2021-08-22T15:17:08
2021-08-22T15:17:08
398,830,511
1
0
null
null
null
null
UTF-8
Java
false
false
1,849
java
package Moon.Suniypoliya.security; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.http.MediaType; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.AuthenticationEntryPoint; import org.springframework.stereotype.Component; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Collections; @Component public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint { @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); response.setContentType(MediaType.APPLICATION_JSON_VALUE); String message; // Check if the request as any exception that we have stored in Request final Exception exception = (Exception) request.getAttribute("exception"); // If yes then use it to create the response message else use the authException if (exception != null) { byte[] body = new ObjectMapper().writeValueAsBytes(Collections.singletonMap("cause", exception.toString())); response.getOutputStream().write(body); } else { if (authException.getCause() != null) { message = authException.getCause().toString() + " " + authException.getMessage(); } else { message = authException.getMessage(); } byte[] body = new ObjectMapper().writeValueAsBytes(Collections.singletonMap("error", message)); response.getOutputStream().write(body); } } }
[ "husniddinaliexpress@gmail.com" ]
husniddinaliexpress@gmail.com
35b84c36950359a94aa8d8b4b3240cd73c373ef7
55bf8f5ebe5bba6000570d0a30484e6486a5aae6
/chapter/chapter5/5.3Math类和Random类/5.3.1Mathlei/Example18.java
6473435d69f1b610596059de2cfb881634215c72
[]
no_license
1770383342/java-
e8458b830388366d1c33a43f150c2bf336268b42
9a70e417ae8f761c7aadc0f3b2abf6c4455645a7
refs/heads/master
2021-02-12T12:44:51.617904
2020-07-18T08:00:03
2020-07-18T08:00:03
244,593,527
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
import java.util.Random; public class Example18 { public static void main(String[] args) { Random r1 = new Random(); System.out.println("产生float类型的随机数:" + r1.nextFloat()); System.out.println("产生0~100之间的int类型随机数:" + r1.nextInt(100)); System.out.println("产生double类型的随机数:" + r1.nextDouble()); } }
[ "1770383342@qq.com" ]
1770383342@qq.com
2338f8679fd097528fb753b7c8647519c2ed6a2a
2ba377898c79c5551e8ba18073bc777ce552f4df
/megahack-back-end/src/main/java/br/com/mega/hack/util/TokenDecode.java
c8e9f3e1d94bf495635f8898b19126dcbff4234e
[]
no_license
railsonsm/desafio-sebrae
7ff28ad5f0b77da81dfffef46cf853117add0828
a62237393b8c34fb84c5890ddc40e138c702d00e
refs/heads/master
2022-06-21T14:44:37.832894
2020-05-04T21:11:29
2020-05-04T21:11:29
261,286,612
0
1
null
null
null
null
UTF-8
Java
false
false
280
java
package br.com.mega.hack.util; import com.fasterxml.jackson.annotation.JsonProperty; public class TokenDecode { @JsonProperty("user_id") private Long userId; public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } }
[ "railson170@hotmail.com" ]
railson170@hotmail.com
1227fdf4c0996d239f0e644c9550b9c69cd71af7
31f609157ae46137cf96ce49e217ce7ae0008b1e
/bin/ext-commerce/commerceservices/testsrc/de/hybris/platform/commerceservices/order/hook/impl/DefaultCommerceCartMetadataUpdateValidationHookTest.java
9c655a47d117f90ab06b09a66c223838b237b54b
[]
no_license
natakolesnikova/hybrisCustomization
91d56e964f96373781f91f4e2e7ca417297e1aad
b6f18503d406b65924c21eb6a414eb70d16d878c
refs/heads/master
2020-05-23T07:16:39.311703
2019-05-15T15:08:38
2019-05-15T15:08:38
186,672,599
1
0
null
null
null
null
UTF-8
Java
false
false
3,578
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.commerceservices.order.hook.impl; import static org.mockito.BDDMockito.given; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.commerceservices.service.data.CommerceCartMetadataParameter; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; @UnitTest @RunWith(MockitoJUnitRunner.class) public class DefaultCommerceCartMetadataUpdateValidationHookTest { private final DefaultCommerceCartMetadataUpdateValidationHook defaultCommerceCartMetadataUpdateValidationHook = new DefaultCommerceCartMetadataUpdateValidationHook(); @Mock private CommerceCartMetadataParameter metadataParameter; private static final String LONG_TEXT = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor " + "incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris " + "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum " + "dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia " + "deserunt mollit anim id est laborum."; @Test(expected = IllegalArgumentException.class) public void shouldValidateNameLength() { given(metadataParameter.getName()).willReturn(Optional.of(LONG_TEXT)); given(metadataParameter.getDescription()).willReturn(Optional.of("myQuoteDescription")); defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter); } @Test(expected = IllegalArgumentException.class) public void shouldValidateDescriptionLength() { given(metadataParameter.getName()).willReturn(Optional.of("myQuoteName")); given(metadataParameter.getDescription()).willReturn(Optional.of(LONG_TEXT)); defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter); } @Test public void shouldValidateIfNameDescriptionEmpty() { given(metadataParameter.getName()).willReturn(Optional.empty()); given(metadataParameter.getDescription()).willReturn(Optional.empty()); defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter); } @Test public void shouldValidateName() { given(metadataParameter.getName()).willReturn(Optional.of("myQuoteName")); given(metadataParameter.getDescription()).willReturn(Optional.empty()); defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter); } @Test public void shouldValidateDescription() { given(metadataParameter.getName()).willReturn(Optional.empty()); given(metadataParameter.getDescription()).willReturn(Optional.of("myQuoteDescription")); defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter); } @Test public void shouldValidateNameAndDescription() { given(metadataParameter.getName()).willReturn(Optional.of("myQuoteName")); given(metadataParameter.getDescription()).willReturn(Optional.of("myQuoteDescription")); defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter); } }
[ "nataliia@spadoom.com" ]
nataliia@spadoom.com
0cad3e7051f77631d76e64f2bdca8a7257dda7ee
8dc89f96a38f0bd3582dcb8a209d8edb23890cc1
/vjezbe2016/Pecek-7/src/hr/java/vjezbe/javafx/ZaposleniciController.java
3e7c802ca3ae093128805077e59fcdc5173434c3
[]
no_license
pex-1/Java
bf4b1be2f6905677ff1f9866ee6afed483521ef9
9a3be3892522da98d6c03aa2488b43872a037c9b
refs/heads/master
2020-04-21T12:55:53.968580
2019-02-07T14:19:32
2019-02-07T14:19:32
169,580,921
0
0
null
null
null
null
UTF-8
Java
false
false
911
java
package hr.java.vjezbe.javafx; import java.awt.TextField; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import javax.security.auth.callback.Callback; import hr.java.vjezbe.entitet.Alarm; import hr.java.vjezbe.entitet.Klijent; import hr.java.vjezbe.entitet.MaloprodajnaTvrtka; import hr.java.vjezbe.entitet.Zaposlenik; import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.scene.control.TableColumn; import javafx.scene.control.TableColumn.CellDataFeatures; import javafx.scene.control.TableView; import javafx.scene.control.cell.PropertyValueFactory; public class ZaposleniciController { private List<Klijent> listaKlijenata; private List<Zaposlenik> listaZaposlenika; private List<Alarm> listaAlarma; // private MaloprodajnaTvrtka tvrtka; }
[ "danijel.pecek@estudent.hr" ]
danijel.pecek@estudent.hr
9bb986af89a7de7bb189032d708bc308a5a1cdc2
973ae0ecf98c7224b9e7a42010fd7bf0b6965a2a
/app/src/main/java/br/com/app/platinumapp/appvendas/ViewHolders/ContaRecViewHolders.java
cfa417a5a311eba3b16d4c12107979b82f6730ee
[]
no_license
augustoall/platinumapp
d873690df1d766fe6ccf75caf176f3f351e84644
dc6276505ccdb493dab2cba2810816a7842fc00e
refs/heads/master
2022-12-02T23:02:19.251154
2020-08-20T19:42:45
2020-08-20T19:42:45
288,524,818
0
0
null
null
null
null
UTF-8
Java
false
false
1,121
java
package br.com.app.platinumapp.appvendas.ViewHolders; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.CheckBox; import android.widget.TextView; import br.com.app.platinumapp.appvendas.Model.Receber_SqliteBean; import br.com.app.platinumapp.appvendas.R; /** * Created by JAVA-PC on 09/05/2017. */ public class ContaRecViewHolders extends RecyclerView.ViewHolder { public TextView txv_parcela; public TextView txv_vencimento; public TextView txv_valorreceber; public TextView txv_valorpago; public CheckBox chkSelected; public Receber_SqliteBean mReceber_sqliteBean; public ContaRecViewHolders(View itemView) { super(itemView); txv_parcela = (TextView) itemView.findViewById(R.id.txv_parcela); txv_vencimento = (TextView) itemView.findViewById(R.id.txv_vencimento); txv_valorreceber = (TextView) itemView.findViewById(R.id.txv_valorreceber); txv_valorpago = (TextView) itemView.findViewById(R.id.txv_valorpago); chkSelected = (CheckBox) itemView.findViewById(R.id.chkSelected); } }
[ "augustoall@gmail.com" ]
augustoall@gmail.com
02f3dd0c9b8ff8ceb1132f2a13d3a356c2500695
3ca3d809eb7a27668baab44706fbdda629805e17
/app/src/main/java/com/example/developer/bakingapp/data/Recipe.java
35d2b5d825792d3441e6912db2962956e8cd8a78
[]
no_license
lrpinto/BakingApp
7389df3f47e11921b335dc6d94b18a505feaf8e4
8930112d83f3ee7d1a564e761620663c05b6d94e
refs/heads/master
2020-03-18T22:21:43.971898
2018-05-29T20:45:51
2018-05-29T20:45:51
135,340,665
1
0
null
null
null
null
UTF-8
Java
false
false
2,250
java
package com.example.developer.bakingapp.data; import android.os.Parcel; import android.os.Parcelable; import java.util.ArrayList; public class Recipe implements Parcelable { public static final Creator<Recipe> CREATOR = new Creator<Recipe>() { @Override public Recipe createFromParcel(Parcel in) { return new Recipe(in); } @Override public Recipe[] newArray(int size) { return new Recipe[size]; } }; private int id; private String name; private ArrayList<Ingredient> ingredients; private ArrayList<Step> steps; private int servings; private String image; private Recipe(Parcel in) { id = in.readInt(); name = in.readString(); ingredients = in.createTypedArrayList(Ingredient.CREATOR); steps = in.createTypedArrayList(Step.CREATOR); servings = in.readInt(); image = in.readString(); } public Recipe() { // Constructor for serialization } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(id); dest.writeString(name); dest.writeTypedList(ingredients); dest.writeTypedList(steps); dest.writeInt(servings); dest.writeString(image); } public int getId() { return id; } public void setId(int id) { this.id = id; } @Override public String toString() { return "Recipe{" + "id=" + id + ", name='" + name + '\'' + ", ingredients=" + ingredients + ", steps=" + steps + ", servings=" + servings + ", image='" + image + '\'' + '}'; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getServings() { return servings; } public void setServings(int servings) { this.servings = servings; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } }
[ "xtremelu@gmail.com" ]
xtremelu@gmail.com
b5ae14e8d036be46595e2830c603aec885153eef
32f306f71401f105aba66cb601d4ed93c32f1d4a
/gulimall-ware/src/test/java/com/atguigu/guilimall/GuilimallWareApplicationTests.java
e577e9bcdaea8d784d48e92362023d6df8009e7f
[]
no_license
masamune67/gulimall
d18c86010edb71e59417589aff1679e82b37d269
78f701037b5624c6af385c625318889f44472904
refs/heads/main
2023-08-06T20:06:06.388730
2021-09-26T13:42:30
2021-09-26T13:42:30
410,511,921
0
0
null
null
null
null
UTF-8
Java
false
false
229
java
package com.atguigu.guilimall; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class GuilimallWareApplicationTests { @Test void contextLoads() { } }
[ "qjxxzjl@gmail.com" ]
qjxxzjl@gmail.com
7387a586afe27ec08e535d2b01645e2053882a54
f16c1556d1f84f4d638759ddf0b9cd62c2454cc5
/productService/src/main/java/com/product/entity/OrderEntity.java
353231e6ed4e9b69953ab479ba35321546bbded6
[]
no_license
HelloHang/ecommerce
2a1b8a75a1a4a89a7eb1801cea51c07e28bf0525
99132ebfecbf163c9ee00cc667f39c1e3b37be4f
refs/heads/master
2022-06-22T09:17:34.715074
2019-09-11T09:55:54
2019-09-11T09:55:54
202,358,922
1
0
null
2022-06-21T01:48:22
2019-08-14T13:42:56
Java
UTF-8
Java
false
false
87
java
package com.product.entity; public class OrderEntity extends AbstractOrderEntity { }
[ "dangao@Objectivasoftware.com" ]
dangao@Objectivasoftware.com
8ead8314c3b1217b7d285ae92f904bd8aacb3827
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_flink_new2/Nicad_t1_flink_new25960.java
0194cb25303d72a971f9d11a3c373f4bbbb8d391
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
458
java
// clone pairs:24550:90% // 37016:flink/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/taskmanager/TaskManagersInfo.java public class Nicad_t1_flink_new25960 { public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TaskManagersInfo that = (TaskManagersInfo) o; return Objects.equals(taskManagerInfos, that.taskManagerInfos); } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
c5c18851199a4f354df2e2032b54b3d56d4ee9d7
33443b2e5f093209600b7eb0a3b5061df073175c
/app/src/main/java/com/peoplereport/peoplereport/ClassModels/Reports.java
096d82db5899aa4fd51e39ffa9b88ea5d52fe107
[]
no_license
CV5/PeopleReport
f1b4e53d8f660f49b82355d24c33f529cd7087ac
0cf851fccbd2cc6db02216f7b263b16d93b6961f
refs/heads/master
2020-03-20T17:16:12.903244
2018-06-16T05:27:48
2018-06-16T05:27:48
137,555,705
1
0
null
null
null
null
UTF-8
Java
false
false
3,093
java
package com.peoplereport.peoplereport.ClassModels; import java.util.HashMap; /** * creado por Christian en la fecha 2018-05-24. */ public class Reports { private String foto; private String pictureProfile; private String ubication; private String descripcion; private String usuario; private int views; private HashMap<String, LikesModels> likes; private HashMap<String, LikesModels> comments; private String titulo; private String postid; private String date; private long posttime; public Reports() { } public Reports(String foto, String pictureProfile, String ubication, String descripcion, String usuario, int views, HashMap<String, LikesModels> likes, HashMap<String, LikesModels> comments, String titulo, String postid, String date, long posttime) { this.foto = foto; this.pictureProfile = pictureProfile; this.ubication = ubication; this.descripcion = descripcion; this.usuario = usuario; this.views = views; this.likes = likes; this.comments = comments; this.titulo = titulo; this.postid = postid; this.date = date; this.posttime = posttime; } public String getFoto() { return foto; } public void setFoto(String foto) { this.foto = foto; } public String getPictureProfile() { return pictureProfile; } public void setPictureProfile(String pictureProfile) { this.pictureProfile = pictureProfile; } public String getUbication() { return ubication; } public void setUbication(String ubication) { this.ubication = ubication; } public String getDescripcion() { return descripcion; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } public String getUsuario() { return usuario; } public void setUsuario(String usuario) { this.usuario = usuario; } public int getViews() { return views; } public void setViews(int views) { this.views = views; } public HashMap<String, LikesModels> getLikes() { return likes; } public void setLikes(HashMap<String, LikesModels> likes) { this.likes = likes; } public HashMap<String, LikesModels> getComments() { return comments; } public void setComments(HashMap<String, LikesModels> comments) { this.comments = comments; } public String getTitulo() { return titulo; } public void setTitulo(String titulo) { this.titulo = titulo; } public String getPostid() { return postid; } public void setPostid(String postid) { this.postid = postid; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public long getPosttime() { return posttime; } public void setPosttime(long posttime) { this.posttime = posttime; } }
[ "mrchrist85@gmial.com" ]
mrchrist85@gmial.com
9449384112b8a77a132a92df85dd5cd434186c3b
e6967dcbaf7104f375ee902ef8bcc1de7a1ba8ad
/src/main/java/softuni/onlineblog/initialization/CommentInitialization.java
5b5abdab29116b20b34930a4737491065d322a22
[]
no_license
Valeri12580/Online-Blog
5059a98403ddccd37dfa11f5b71368b315ac7943
d7b05162516ed3066700b573b72ef6fb07696bcc
refs/heads/main
2023-06-09T13:41:35.927638
2023-05-25T13:29:15
2023-05-25T13:29:15
313,601,462
0
0
null
null
null
null
UTF-8
Java
false
false
2,938
java
package softuni.onlineblog.initialization; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import softuni.onlineblog.domain.entities.Article; import softuni.onlineblog.domain.entities.Comment; import softuni.onlineblog.domain.entities.Product; import softuni.onlineblog.domain.entities.User; import softuni.onlineblog.repositories.ArticleRepository; import softuni.onlineblog.repositories.CommentRepository; import softuni.onlineblog.repositories.ProductRepository; import softuni.onlineblog.repositories.UserRepository; import java.time.LocalDateTime; import java.util.List; import java.util.Random; @Component @Order(5) public class CommentInitialization implements CommandLineRunner { private CommentRepository commentRepository; private ArticleRepository articleRepository; private UserRepository userRepository; private ProductRepository productRepository; @Autowired public CommentInitialization(CommentRepository commentRepository, ArticleRepository articleRepository, UserRepository userRepository, ProductRepository productRepository) { this.commentRepository = commentRepository; this.articleRepository = articleRepository; this.userRepository = userRepository; this.productRepository = productRepository; } @Override public void run(String... args) throws Exception { User admin = this.userRepository.findUserByUsername("valeri").get(); User user = this.userRepository.findUserByUsername("ivan").get(); initArticleComments(admin, user); initShopComments(user); } private void initArticleComments(User admin, User user) { Comment comment = new Comment("Wow amazing article!!!", admin, LocalDateTime.now()); Comment commentTwo = new Comment("The article is very good!Im very exited about your next one...", user, LocalDateTime.now()); Article article = this.articleRepository.findAll().get(new Random().nextInt(2)); comment.setPublishedIn(article); commentTwo.setPublishedIn(article); commentRepository.saveAll(List.of(comment, commentTwo)); } private void initShopComments(User user) { Comment comment = new Comment("This product is amazing!I got 250kg of fat for one week like im using steroids!!", user, LocalDateTime.now()); Comment commentTwo = new Comment("This shirt is so small for my big muscles....", user, LocalDateTime.now()); Product product = productRepository.findByTitle("Whey protein").get(); Product productTwo = productRepository.findByTitle("T-shirt").get(); comment.setPublishedIn(product); commentTwo.setPublishedIn(productTwo); commentRepository.saveAll(List.of(comment, commentTwo)); } }
[ "valeri125we@gmail.com" ]
valeri125we@gmail.com
0cb71c4dfbe4928d62cd0428cb113053ee98515d
23eaf717fda54af96f3e224dde71c6eb7a196d8c
/custos-core-services/sharing-core-service/src/main/java/org/apache/custos/sharing/persistance/repository/EntityTypeRepository.java
93a2ce62cc7b706aee8d42069ffe8b97fe21a946
[ "Apache-2.0" ]
permissive
etsangsplk/airavata-custos
8a0e52f0da10ec29e13de03d546962e6038e6266
2d341849dd8ea8a7c2efec6cc73b01dfd495352e
refs/heads/master
2023-02-09T22:56:26.576113
2020-10-14T01:15:22
2020-10-14T01:15:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,167
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.custos.sharing.persistance.repository; import org.apache.custos.sharing.persistance.model.EntityType; import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; public interface EntityTypeRepository extends JpaRepository<EntityType, String> { public List<EntityType> findAllByTenantId(long tenantId); }
[ "irjanith@gmail.com" ]
irjanith@gmail.com
1cb3d7ded9cc27fef7c33dfce967f8491fd93273
d07afe443ae012093c993abf7e31f26745faa90e
/source/src/test/java/spoon/test/position/testclasses/ArrayArgParameter.java
e3958ade917927f28834e88b6c3f533a044f9630
[]
no_license
pvojtechovsky/sonarqube-repair
3041d843ab6c74c4621a588cd27a9294dcfbdcc6
59a6119be0171ab97839ddff36a4fa2ab589a5e5
refs/heads/master
2020-03-20T22:20:31.230897
2018-06-18T18:51:24
2018-06-18T18:51:24
137,793,391
0
0
null
2018-06-18T18:52:38
2018-06-18T18:52:38
null
UTF-8
Java
false
false
152
java
package spoon.test.position.testclasses; public interface ArrayArgParameter { void m1(String[] arg); void m2(String []arg); void m3(String arg[]); }
[ "ashutosh1598@yahoo.com.au" ]
ashutosh1598@yahoo.com.au
cc438ba58f89dcf03d76b44e04b272e82b1f1c21
b0717e8bd896db1d871ce2033c63c8babec8457c
/src/main/java/net/lemonmodel/patterns/parser/PrettyPrinter.java
d982ae6818363b9335e2894e428f52c92c23f55a
[]
no_license
blanser/lemon.patterns
eb7c86af45dcce52644b98ba225e4509c1638411
ac381139ca896e527281f4d1828f1340748820c5
refs/heads/master
2020-12-01T01:08:17.665722
2014-08-06T12:18:38
2014-08-06T12:18:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
110,104
java
package net.lemonmodel.patterns.parser; import net.lemonmodel.patterns.parser.Absyn.*; public class PrettyPrinter { //For certain applications increasing the initial size of the buffer may improve performance. private static final int INITIAL_BUFFER_SIZE = 128; //You may wish to change the parentheses used in precedence. private static final String _L_PAREN = new String("("); private static final String _R_PAREN = new String(")"); //You may wish to change render private static void render(String s) { if (s.equals("{")) { buf_.append("\n"); indent(); buf_.append(s); _n_ = _n_ + 2; buf_.append("\n"); indent(); } else if (s.equals("(") || s.equals("[")) buf_.append(s); else if (s.equals(")") || s.equals("]")) { backup(); buf_.append(s); buf_.append(" "); } else if (s.equals("}")) { _n_ = _n_ - 2; backup(); backup(); buf_.append(s); buf_.append("\n"); indent(); } else if (s.equals(",")) { backup(); buf_.append(s); buf_.append(" "); } else if (s.equals(";")) { backup(); buf_.append(s); buf_.append("\n"); indent(); } else if (s.equals("")) return; else { buf_.append(s); buf_.append(" "); } } // print and show methods are defined for each category. public static String print(net.lemonmodel.patterns.parser.Absyn.Statements foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.Statements foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.Statement foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.Statement foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.ListStatement foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.ListStatement foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.Pattern foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.Pattern foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.NounPattern foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.NounPattern foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.VerbPattern foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.VerbPattern foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.AdjectivePattern foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.AdjectivePattern foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.ListPattern foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.ListPattern foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.Arg foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.Arg foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.OntologyFrameElement foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.OntologyFrameElement foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.ListOntologyFrameElement foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.ListOntologyFrameElement foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.PNP foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.PNP foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.NP foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.NP foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.VP foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.VP foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.AP foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.AP foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.POSTaggedWord foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.POSTaggedWord foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.ListPOSTaggedWord foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.ListPOSTaggedWord foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.ScalarMembership foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.ScalarMembership foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.ListScalarMembership foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.ListScalarMembership foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.Category foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.Category foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.ListCategory foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.ListCategory foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.POSTag foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.POSTag foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.Gender foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.Gender foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String print(net.lemonmodel.patterns.parser.Absyn.URI foo) { pp(foo, 0); trim(); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } public static String show(net.lemonmodel.patterns.parser.Absyn.URI foo) { sh(foo); String temp = buf_.toString(); buf_.delete(0,buf_.length()); return temp; } /*** You shouldn't need to change anything beyond this point. ***/ private static void pp(net.lemonmodel.patterns.parser.Absyn.Statements foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EStatments) { net.lemonmodel.patterns.parser.Absyn.EStatments _estatments = (net.lemonmodel.patterns.parser.Absyn.EStatments) foo; if (_i_ > 0) render(_L_PAREN); pp(_estatments.liststatement_, 0); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.Statement foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPrefix) { net.lemonmodel.patterns.parser.Absyn.EPrefix _eprefix = (net.lemonmodel.patterns.parser.Absyn.EPrefix) foo; if (_i_ > 0) render(_L_PAREN); render("@prefix"); pp(_eprefix.ident_, 0); render(":"); pp(_eprefix.fulluri_, 0); render("."); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ELexicon) { net.lemonmodel.patterns.parser.Absyn.ELexicon _elexicon = (net.lemonmodel.patterns.parser.Absyn.ELexicon) foo; if (_i_ > 0) render(_L_PAREN); render("Lexicon"); render("("); pp(_elexicon.uri_, 0); render(","); printQuoted(_elexicon.string_); render(","); pp(_elexicon.listpattern_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.ListStatement foo, int _i_) { for (java.util.Iterator<Statement> it = foo.iterator(); it.hasNext();) { pp(it.next(), 0); if (it.hasNext()) { render(""); } else { render(""); } } } private static void pp(net.lemonmodel.patterns.parser.Absyn.Pattern foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPatternWithForm) { net.lemonmodel.patterns.parser.Absyn.EPatternWithForm _epatternwithform = (net.lemonmodel.patterns.parser.Absyn.EPatternWithForm) foo; if (_i_ > 0) render(_L_PAREN); pp(_epatternwithform.pattern_, 0); render("with"); pp(_epatternwithform.listcategory_, 0); printQuoted(_epatternwithform.string_); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENoun) { net.lemonmodel.patterns.parser.Absyn.ENoun _enoun = (net.lemonmodel.patterns.parser.Absyn.ENoun) foo; if (_i_ > 0) render(_L_PAREN); pp(_enoun.nounpattern_, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENounWithGender) { net.lemonmodel.patterns.parser.Absyn.ENounWithGender _enounwithgender = (net.lemonmodel.patterns.parser.Absyn.ENounWithGender) foo; if (_i_ > 0) render(_L_PAREN); pp(_enounwithgender.nounpattern_, 0); pp(_enounwithgender.gender_, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EVerb) { net.lemonmodel.patterns.parser.Absyn.EVerb _everb = (net.lemonmodel.patterns.parser.Absyn.EVerb) foo; if (_i_ > 0) render(_L_PAREN); pp(_everb.verbpattern_, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAdjective) { net.lemonmodel.patterns.parser.Absyn.EAdjective _eadjective = (net.lemonmodel.patterns.parser.Absyn.EAdjective) foo; if (_i_ > 0) render(_L_PAREN); pp(_eadjective.adjectivepattern_, 0); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.NounPattern foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EName) { net.lemonmodel.patterns.parser.Absyn.EName _ename = (net.lemonmodel.patterns.parser.Absyn.EName) foo; if (_i_ > 0) render(_L_PAREN); render("Name"); render("("); pp(_ename.pnp_, 0); render(","); pp(_ename.uri_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EClassNoun) { net.lemonmodel.patterns.parser.Absyn.EClassNoun _eclassnoun = (net.lemonmodel.patterns.parser.Absyn.EClassNoun) foo; if (_i_ > 0) render(_L_PAREN); render("ClassNoun"); render("("); pp(_eclassnoun.np_, 0); render(","); pp(_eclassnoun.uri_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERelationalNoun1) { net.lemonmodel.patterns.parser.Absyn.ERelationalNoun1 _erelationalnoun1 = (net.lemonmodel.patterns.parser.Absyn.ERelationalNoun1) foo; if (_i_ > 0) render(_L_PAREN); render("RelationalNoun"); render("("); pp(_erelationalnoun1.np_, 0); render(","); pp(_erelationalnoun1.uri_, 0); render(","); render("propSubj"); render("="); pp(_erelationalnoun1.arg_1, 0); render(","); render("propObj"); render("="); pp(_erelationalnoun1.arg_2, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERelationalNoun2) { net.lemonmodel.patterns.parser.Absyn.ERelationalNoun2 _erelationalnoun2 = (net.lemonmodel.patterns.parser.Absyn.ERelationalNoun2) foo; if (_i_ > 0) render(_L_PAREN); render("RelationalNoun"); render("("); pp(_erelationalnoun2.np_, 0); render(","); pp(_erelationalnoun2.uri_, 0); render(","); render("propObj"); render("="); pp(_erelationalnoun2.arg_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERelationalMultivalentNoun) { net.lemonmodel.patterns.parser.Absyn.ERelationalMultivalentNoun _erelationalmultivalentnoun = (net.lemonmodel.patterns.parser.Absyn.ERelationalMultivalentNoun) foo; if (_i_ > 0) render(_L_PAREN); render("RelationalMultivalentNoun"); render("("); pp(_erelationalmultivalentnoun.np_, 0); render(","); pp(_erelationalmultivalentnoun.uri_, 0); render(","); render("["); pp(_erelationalmultivalentnoun.listontologyframeelement_, 0); render("]"); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun1) { net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun1 _eclassrelationalnoun1 = (net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun1) foo; if (_i_ > 0) render(_L_PAREN); render("ClassRelationalNoun"); render("("); pp(_eclassrelationalnoun1.np_, 0); render(","); render("class"); render("="); pp(_eclassrelationalnoun1.uri_1, 0); render(","); render("property"); render("="); pp(_eclassrelationalnoun1.uri_2, 0); render(","); render("propSubj"); render("="); pp(_eclassrelationalnoun1.arg_1, 0); render(","); render("propObj"); render("="); pp(_eclassrelationalnoun1.arg_2, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun2) { net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun2 _eclassrelationalnoun2 = (net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun2) foo; if (_i_ > 0) render(_L_PAREN); render("ClassRelationalNoun"); render("("); pp(_eclassrelationalnoun2.np_, 0); render(","); render("class"); render("="); pp(_eclassrelationalnoun2.uri_1, 0); render(","); render("property"); render("="); pp(_eclassrelationalnoun2.uri_2, 0); render(","); render("propObj"); render("="); pp(_eclassrelationalnoun2.arg_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.VerbPattern foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EStateVerb1) { net.lemonmodel.patterns.parser.Absyn.EStateVerb1 _estateverb1 = (net.lemonmodel.patterns.parser.Absyn.EStateVerb1) foo; if (_i_ > 0) render(_L_PAREN); render("StateVerb"); render("("); pp(_estateverb1.vp_, 0); render(","); pp(_estateverb1.uri_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EStateVerb2) { net.lemonmodel.patterns.parser.Absyn.EStateVerb2 _estateverb2 = (net.lemonmodel.patterns.parser.Absyn.EStateVerb2) foo; if (_i_ > 0) render(_L_PAREN); render("StateVerb"); render("("); pp(_estateverb2.vp_, 0); render(","); pp(_estateverb2.uri_, 0); render(","); render("propObj"); render("="); pp(_estateverb2.arg_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EStateVerb3) { net.lemonmodel.patterns.parser.Absyn.EStateVerb3 _estateverb3 = (net.lemonmodel.patterns.parser.Absyn.EStateVerb3) foo; if (_i_ > 0) render(_L_PAREN); render("StateVerb"); render("("); pp(_estateverb3.vp_, 0); render(","); pp(_estateverb3.uri_, 0); render(","); render("propSubj"); render("="); pp(_estateverb3.arg_1, 0); render(","); render("propObj"); render("="); pp(_estateverb3.arg_2, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ETelicEventVerb) { net.lemonmodel.patterns.parser.Absyn.ETelicEventVerb _eteliceventverb = (net.lemonmodel.patterns.parser.Absyn.ETelicEventVerb) foo; if (_i_ > 0) render(_L_PAREN); render("telic"); pp(_eteliceventverb.verbpattern_, 2); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENontelicEventVerb) { net.lemonmodel.patterns.parser.Absyn.ENontelicEventVerb _enonteliceventverb = (net.lemonmodel.patterns.parser.Absyn.ENontelicEventVerb) foo; if (_i_ > 0) render(_L_PAREN); render("nontelic"); pp(_enonteliceventverb.verbpattern_, 2); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDunnotelicEventVerb) { net.lemonmodel.patterns.parser.Absyn.EDunnotelicEventVerb _edunnoteliceventverb = (net.lemonmodel.patterns.parser.Absyn.EDunnotelicEventVerb) foo; if (_i_ > 0) render(_L_PAREN); pp(_edunnoteliceventverb.verbpattern_, 3); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb1) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb1 _econsequenceverb1 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb1) foo; if (_i_ > 0) render(_L_PAREN); render("ConsequenceVerb"); render("("); pp(_econsequenceverb1.vp_, 0); render(","); pp(_econsequenceverb1.uri_1, 0); render(","); render("propSubj"); render("="); pp(_econsequenceverb1.ontologyframeelement_1, 0); render(","); render("propObj"); render("="); pp(_econsequenceverb1.ontologyframeelement_2, 0); render(","); pp(_econsequenceverb1.uri_2, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb2) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb2 _econsequenceverb2 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb2) foo; if (_i_ > 0) render(_L_PAREN); render("ConsequenceVerb"); render("("); pp(_econsequenceverb2.vp_, 0); render(","); pp(_econsequenceverb2.uri_, 0); render(","); render("propSubj"); render("="); pp(_econsequenceverb2.ontologyframeelement_1, 0); render(","); render("propObj"); render("="); pp(_econsequenceverb2.ontologyframeelement_2, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb3) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb3 _econsequenceverb3 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb3) foo; if (_i_ > 0) render(_L_PAREN); render("ConsequenceVerb"); render("("); pp(_econsequenceverb3.vp_, 0); render(","); pp(_econsequenceverb3.uri_1, 0); render(","); render("propSubj"); render("="); pp(_econsequenceverb3.ontologyframeelement_, 0); render(","); pp(_econsequenceverb3.uri_2, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb4) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb4 _econsequenceverb4 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb4) foo; if (_i_ > 0) render(_L_PAREN); render("ConsequenceVerb"); render("("); pp(_econsequenceverb4.vp_, 0); render(","); pp(_econsequenceverb4.uri_, 0); render(","); render("propSubj"); render("="); pp(_econsequenceverb4.ontologyframeelement_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb5) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb5 _econsequenceverb5 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb5) foo; if (_i_ > 0) render(_L_PAREN); render("ConsequenceVerb"); render("("); pp(_econsequenceverb5.vp_, 0); render(","); pp(_econsequenceverb5.uri_1, 0); render(","); render("propObj"); render("="); pp(_econsequenceverb5.ontologyframeelement_, 0); render(","); pp(_econsequenceverb5.uri_2, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb6) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb6 _econsequenceverb6 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb6) foo; if (_i_ > 0) render(_L_PAREN); render("ConsequenceVerb"); render("("); pp(_econsequenceverb6.vp_, 0); render(","); pp(_econsequenceverb6.uri_, 0); render(","); render("propObj"); render("="); pp(_econsequenceverb6.ontologyframeelement_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb7) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb7 _econsequenceverb7 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb7) foo; if (_i_ > 0) render(_L_PAREN); render("ConsequenceVerb"); render("("); pp(_econsequenceverb7.vp_, 0); render(","); pp(_econsequenceverb7.uri_1, 0); render(","); render(","); pp(_econsequenceverb7.uri_2, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb8) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb8 _econsequenceverb8 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb8) foo; if (_i_ > 0) render(_L_PAREN); render("ConsequenceVerb"); render("("); pp(_econsequenceverb8.vp_, 0); render(","); pp(_econsequenceverb8.uri_, 0); render(","); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDurativeEventVerb) { net.lemonmodel.patterns.parser.Absyn.EDurativeEventVerb _edurativeeventverb = (net.lemonmodel.patterns.parser.Absyn.EDurativeEventVerb) foo; if (_i_ > 2) render(_L_PAREN); render("durative"); pp(_edurativeeventverb.verbpattern_, 3); if (_i_ > 2) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EInstantEventVerb) { net.lemonmodel.patterns.parser.Absyn.EInstantEventVerb _einstanteventverb = (net.lemonmodel.patterns.parser.Absyn.EInstantEventVerb) foo; if (_i_ > 2) render(_L_PAREN); render("instant"); pp(_einstanteventverb.verbpattern_, 3); if (_i_ > 2) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EEventVerb) { net.lemonmodel.patterns.parser.Absyn.EEventVerb _eeventverb = (net.lemonmodel.patterns.parser.Absyn.EEventVerb) foo; if (_i_ > 3) render(_L_PAREN); render("EventVerb"); render("("); pp(_eeventverb.vp_, 0); render(","); pp(_eeventverb.uri_, 0); render(","); render("["); pp(_eeventverb.listontologyframeelement_, 0); render("]"); render(")"); if (_i_ > 3) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.AdjectivePattern foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIntersectiveAdjective) { net.lemonmodel.patterns.parser.Absyn.EIntersectiveAdjective _eintersectiveadjective = (net.lemonmodel.patterns.parser.Absyn.EIntersectiveAdjective) foo; if (_i_ > 0) render(_L_PAREN); render("IntersectiveAdjective"); render("("); pp(_eintersectiveadjective.ap_, 0); render(","); pp(_eintersectiveadjective.uri_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIntersectiveObjectPropertyAdjective) { net.lemonmodel.patterns.parser.Absyn.EIntersectiveObjectPropertyAdjective _eintersectiveobjectpropertyadjective = (net.lemonmodel.patterns.parser.Absyn.EIntersectiveObjectPropertyAdjective) foo; if (_i_ > 0) render(_L_PAREN); render("IntersectiveObjectPropertyAdjective"); render("("); pp(_eintersectiveobjectpropertyadjective.ap_, 0); render(","); pp(_eintersectiveobjectpropertyadjective.uri_1, 0); render(","); pp(_eintersectiveobjectpropertyadjective.uri_2, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIntersectiveDataPropertyAdjective) { net.lemonmodel.patterns.parser.Absyn.EIntersectiveDataPropertyAdjective _eintersectivedatapropertyadjective = (net.lemonmodel.patterns.parser.Absyn.EIntersectiveDataPropertyAdjective) foo; if (_i_ > 0) render(_L_PAREN); render("IntersectiveDataPropertyAdjective"); render("("); pp(_eintersectivedatapropertyadjective.ap_, 0); render(","); pp(_eintersectivedatapropertyadjective.uri_, 0); render(","); printQuoted(_eintersectivedatapropertyadjective.string_); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPropertyModifyingAdjective) { net.lemonmodel.patterns.parser.Absyn.EPropertyModifyingAdjective _epropertymodifyingadjective = (net.lemonmodel.patterns.parser.Absyn.EPropertyModifyingAdjective) foo; if (_i_ > 0) render(_L_PAREN); render("PropertyModifyingAdjective"); render("("); pp(_epropertymodifyingadjective.ap_, 0); render(","); pp(_epropertymodifyingadjective.uri_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERelationalAdjective) { net.lemonmodel.patterns.parser.Absyn.ERelationalAdjective _erelationaladjective = (net.lemonmodel.patterns.parser.Absyn.ERelationalAdjective) foo; if (_i_ > 0) render(_L_PAREN); render("RelationalAdjective"); render("("); pp(_erelationaladjective.ap_, 0); render(","); pp(_erelationaladjective.uri_, 0); render(","); render("relationalArg"); render("="); pp(_erelationaladjective.arg_, 0); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EScalarAdjective) { net.lemonmodel.patterns.parser.Absyn.EScalarAdjective _escalaradjective = (net.lemonmodel.patterns.parser.Absyn.EScalarAdjective) foo; if (_i_ > 0) render(_L_PAREN); render("ScalarAdjective"); render("("); pp(_escalaradjective.ap_, 0); render(","); render("["); pp(_escalaradjective.listscalarmembership_, 0); render("]"); render(")"); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.ListPattern foo, int _i_) { for (java.util.Iterator<Pattern> it = foo.iterator(); it.hasNext();) { pp(it.next(), 0); if (it.hasNext()) { render(","); } else { render(""); } } } private static void pp(net.lemonmodel.patterns.parser.Absyn.Arg foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EOptionalArg) { net.lemonmodel.patterns.parser.Absyn.EOptionalArg _eoptionalarg = (net.lemonmodel.patterns.parser.Absyn.EOptionalArg) foo; if (_i_ > 0) render(_L_PAREN); pp(_eoptionalarg.arg_, 0); render("optional"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERestrictedArg) { net.lemonmodel.patterns.parser.Absyn.ERestrictedArg _erestrictedarg = (net.lemonmodel.patterns.parser.Absyn.ERestrictedArg) foo; if (_i_ > 0) render(_L_PAREN); pp(_erestrictedarg.arg_, 0); render("restrictedTo"); pp(_erestrictedarg.uri_, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESubject) { net.lemonmodel.patterns.parser.Absyn.ESubject _esubject = (net.lemonmodel.patterns.parser.Absyn.ESubject) foo; if (_i_ > 0) render(_L_PAREN); render("Subject"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDirectObject) { net.lemonmodel.patterns.parser.Absyn.EDirectObject _edirectobject = (net.lemonmodel.patterns.parser.Absyn.EDirectObject) foo; if (_i_ > 0) render(_L_PAREN); render("DirectObject"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIndirectObject) { net.lemonmodel.patterns.parser.Absyn.EIndirectObject _eindirectobject = (net.lemonmodel.patterns.parser.Absyn.EIndirectObject) foo; if (_i_ > 0) render(_L_PAREN); render("IndirectObject"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECopulativeArg) { net.lemonmodel.patterns.parser.Absyn.ECopulativeArg _ecopulativearg = (net.lemonmodel.patterns.parser.Absyn.ECopulativeArg) foo; if (_i_ > 0) render(_L_PAREN); render("CopulativeArg"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECopulativeSubject) { net.lemonmodel.patterns.parser.Absyn.ECopulativeSubject _ecopulativesubject = (net.lemonmodel.patterns.parser.Absyn.ECopulativeSubject) foo; if (_i_ > 0) render(_L_PAREN); render("CopulativeSubject"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPrepositionalObject) { net.lemonmodel.patterns.parser.Absyn.EPrepositionalObject _eprepositionalobject = (net.lemonmodel.patterns.parser.Absyn.EPrepositionalObject) foo; if (_i_ > 0) render(_L_PAREN); render("PrepositionalObject"); render("("); printQuoted(_eprepositionalobject.string_); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPostpositionalObject) { net.lemonmodel.patterns.parser.Absyn.EPostpositionalObject _epostpositionalobject = (net.lemonmodel.patterns.parser.Absyn.EPostpositionalObject) foo; if (_i_ > 0) render(_L_PAREN); render("PostpositionalObject"); render("("); printQuoted(_epostpositionalobject.string_); render(")"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPossessiveAdjunct) { net.lemonmodel.patterns.parser.Absyn.EPossessiveAdjunct _epossessiveadjunct = (net.lemonmodel.patterns.parser.Absyn.EPossessiveAdjunct) foo; if (_i_ > 0) render(_L_PAREN); render("PossessiveAdjunct"); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.OntologyFrameElement foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EURIAsSynArg) { net.lemonmodel.patterns.parser.Absyn.EURIAsSynArg _euriassynarg = (net.lemonmodel.patterns.parser.Absyn.EURIAsSynArg) foo; if (_i_ > 0) render(_L_PAREN); pp(_euriassynarg.uri_, 0); render("as"); pp(_euriassynarg.arg_, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EArgAsOFE) { net.lemonmodel.patterns.parser.Absyn.EArgAsOFE _eargasofe = (net.lemonmodel.patterns.parser.Absyn.EArgAsOFE) foo; if (_i_ > 0) render(_L_PAREN); pp(_eargasofe.arg_, 0); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.ListOntologyFrameElement foo, int _i_) { for (java.util.Iterator<OntologyFrameElement> it = foo.iterator(); it.hasNext();) { pp(it.next(), 0); if (it.hasNext()) { render(","); } else { render(""); } } } private static void pp(net.lemonmodel.patterns.parser.Absyn.PNP foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPNPSimple) { net.lemonmodel.patterns.parser.Absyn.EPNPSimple _epnpsimple = (net.lemonmodel.patterns.parser.Absyn.EPNPSimple) foo; if (_i_ > 0) render(_L_PAREN); printQuoted(_epnpsimple.string_); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPNPComplex) { net.lemonmodel.patterns.parser.Absyn.EPNPComplex _epnpcomplex = (net.lemonmodel.patterns.parser.Absyn.EPNPComplex) foo; if (_i_ > 0) render(_L_PAREN); render("["); pp(_epnpcomplex.listpostaggedword_, 0); render("]"); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.NP foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENPSimple) { net.lemonmodel.patterns.parser.Absyn.ENPSimple _enpsimple = (net.lemonmodel.patterns.parser.Absyn.ENPSimple) foo; if (_i_ > 0) render(_L_PAREN); printQuoted(_enpsimple.string_); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENPComplex) { net.lemonmodel.patterns.parser.Absyn.ENPComplex _enpcomplex = (net.lemonmodel.patterns.parser.Absyn.ENPComplex) foo; if (_i_ > 0) render(_L_PAREN); render("["); pp(_enpcomplex.listpostaggedword_, 0); render("]"); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.VP foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EVPSimple) { net.lemonmodel.patterns.parser.Absyn.EVPSimple _evpsimple = (net.lemonmodel.patterns.parser.Absyn.EVPSimple) foo; if (_i_ > 0) render(_L_PAREN); printQuoted(_evpsimple.string_); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EVPComplex) { net.lemonmodel.patterns.parser.Absyn.EVPComplex _evpcomplex = (net.lemonmodel.patterns.parser.Absyn.EVPComplex) foo; if (_i_ > 0) render(_L_PAREN); render("["); pp(_evpcomplex.listpostaggedword_, 0); render("]"); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.AP foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAPSimple) { net.lemonmodel.patterns.parser.Absyn.EAPSimple _eapsimple = (net.lemonmodel.patterns.parser.Absyn.EAPSimple) foo; if (_i_ > 0) render(_L_PAREN); printQuoted(_eapsimple.string_); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAPComplex) { net.lemonmodel.patterns.parser.Absyn.EAPComplex _eapcomplex = (net.lemonmodel.patterns.parser.Absyn.EAPComplex) foo; if (_i_ > 0) render(_L_PAREN); render("["); pp(_eapcomplex.listpostaggedword_, 0); render("]"); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.POSTaggedWord foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPOSTaggedHeadWord) { net.lemonmodel.patterns.parser.Absyn.EPOSTaggedHeadWord _epostaggedheadword = (net.lemonmodel.patterns.parser.Absyn.EPOSTaggedHeadWord) foo; if (_i_ > 0) render(_L_PAREN); printQuoted(_epostaggedheadword.string_); render("/"); pp(_epostaggedheadword.postag_, 0); render("="); render("head"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPOSTaggedWord) { net.lemonmodel.patterns.parser.Absyn.EPOSTaggedWord _epostaggedword = (net.lemonmodel.patterns.parser.Absyn.EPOSTaggedWord) foo; if (_i_ > 0) render(_L_PAREN); printQuoted(_epostaggedword.string_); render("/"); pp(_epostaggedword.postag_, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedHeadWord) { net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedHeadWord _elemmapostaggedheadword = (net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedHeadWord) foo; if (_i_ > 0) render(_L_PAREN); printQuoted(_elemmapostaggedheadword.string_1); render("/"); printQuoted(_elemmapostaggedheadword.string_2); render("/"); pp(_elemmapostaggedheadword.postag_, 0); render("="); render("head"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedWord) { net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedWord _elemmapostaggedword = (net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedWord) foo; if (_i_ > 0) render(_L_PAREN); printQuoted(_elemmapostaggedword.string_1); render("/"); printQuoted(_elemmapostaggedword.string_2); render("/"); pp(_elemmapostaggedword.postag_, 0); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.ListPOSTaggedWord foo, int _i_) { for (java.util.Iterator<POSTaggedWord> it = foo.iterator(); it.hasNext();) { pp(it.next(), 0); if (it.hasNext()) { render(""); } else { render(""); } } } private static void pp(net.lemonmodel.patterns.parser.Absyn.ScalarMembership foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.CovariantScalarMembership) { net.lemonmodel.patterns.parser.Absyn.CovariantScalarMembership _covariantscalarmembership = (net.lemonmodel.patterns.parser.Absyn.CovariantScalarMembership) foo; if (_i_ > 0) render(_L_PAREN); pp(_covariantscalarmembership.uri_, 0); render("covariant"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ContravariantScalarMembership) { net.lemonmodel.patterns.parser.Absyn.ContravariantScalarMembership _contravariantscalarmembership = (net.lemonmodel.patterns.parser.Absyn.ContravariantScalarMembership) foo; if (_i_ > 0) render(_L_PAREN); pp(_contravariantscalarmembership.uri_, 0); render("contravariant"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.CentralScalarMembership) { net.lemonmodel.patterns.parser.Absyn.CentralScalarMembership _centralscalarmembership = (net.lemonmodel.patterns.parser.Absyn.CentralScalarMembership) foo; if (_i_ > 0) render(_L_PAREN); pp(_centralscalarmembership.uri_, 0); render("central"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.GreaterThanScalarMembership) { net.lemonmodel.patterns.parser.Absyn.GreaterThanScalarMembership _greaterthanscalarmembership = (net.lemonmodel.patterns.parser.Absyn.GreaterThanScalarMembership) foo; if (_i_ > 0) render(_L_PAREN); pp(_greaterthanscalarmembership.uri_1, 0); render(">"); pp(_greaterthanscalarmembership.double_, 0); render("for"); pp(_greaterthanscalarmembership.uri_2, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.LessThanScalarMembership) { net.lemonmodel.patterns.parser.Absyn.LessThanScalarMembership _lessthanscalarmembership = (net.lemonmodel.patterns.parser.Absyn.LessThanScalarMembership) foo; if (_i_ > 0) render(_L_PAREN); pp(_lessthanscalarmembership.uri_1, 0); render("<"); pp(_lessthanscalarmembership.double_, 0); render("for"); pp(_lessthanscalarmembership.uri_2, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.BoundedScalarMembership) { net.lemonmodel.patterns.parser.Absyn.BoundedScalarMembership _boundedscalarmembership = (net.lemonmodel.patterns.parser.Absyn.BoundedScalarMembership) foo; if (_i_ > 0) render(_L_PAREN); pp(_boundedscalarmembership.double_1, 0); render("<"); pp(_boundedscalarmembership.uri_1, 0); render("<"); pp(_boundedscalarmembership.double_2, 0); render("for"); pp(_boundedscalarmembership.uri_2, 0); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.ListScalarMembership foo, int _i_) { for (java.util.Iterator<ScalarMembership> it = foo.iterator(); it.hasNext();) { pp(it.next(), 0); if (it.hasNext()) { render(","); } else { render(""); } } } private static void pp(net.lemonmodel.patterns.parser.Absyn.Category foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESingular) { net.lemonmodel.patterns.parser.Absyn.ESingular _esingular = (net.lemonmodel.patterns.parser.Absyn.ESingular) foo; if (_i_ > 0) render(_L_PAREN); render("singular"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDual) { net.lemonmodel.patterns.parser.Absyn.EDual _edual = (net.lemonmodel.patterns.parser.Absyn.EDual) foo; if (_i_ > 0) render(_L_PAREN); render("dual"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPlural) { net.lemonmodel.patterns.parser.Absyn.EPlural _eplural = (net.lemonmodel.patterns.parser.Absyn.EPlural) foo; if (_i_ > 0) render(_L_PAREN); render("plural"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENominative) { net.lemonmodel.patterns.parser.Absyn.ENominative _enominative = (net.lemonmodel.patterns.parser.Absyn.ENominative) foo; if (_i_ > 0) render(_L_PAREN); render("nominative"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAccusative) { net.lemonmodel.patterns.parser.Absyn.EAccusative _eaccusative = (net.lemonmodel.patterns.parser.Absyn.EAccusative) foo; if (_i_ > 0) render(_L_PAREN); render("accusative"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EGenitive) { net.lemonmodel.patterns.parser.Absyn.EGenitive _egenitive = (net.lemonmodel.patterns.parser.Absyn.EGenitive) foo; if (_i_ > 0) render(_L_PAREN); render("genitive"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDative) { net.lemonmodel.patterns.parser.Absyn.EDative _edative = (net.lemonmodel.patterns.parser.Absyn.EDative) foo; if (_i_ > 0) render(_L_PAREN); render("dative"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EComparative) { net.lemonmodel.patterns.parser.Absyn.EComparative _ecomparative = (net.lemonmodel.patterns.parser.Absyn.EComparative) foo; if (_i_ > 0) render(_L_PAREN); render("comparative"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESuperlative) { net.lemonmodel.patterns.parser.Absyn.ESuperlative _esuperlative = (net.lemonmodel.patterns.parser.Absyn.ESuperlative) foo; if (_i_ > 0) render(_L_PAREN); render("superlative"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPresent) { net.lemonmodel.patterns.parser.Absyn.EPresent _epresent = (net.lemonmodel.patterns.parser.Absyn.EPresent) foo; if (_i_ > 0) render(_L_PAREN); render("present"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPast) { net.lemonmodel.patterns.parser.Absyn.EPast _epast = (net.lemonmodel.patterns.parser.Absyn.EPast) foo; if (_i_ > 0) render(_L_PAREN); render("past"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EFuture) { net.lemonmodel.patterns.parser.Absyn.EFuture _efuture = (net.lemonmodel.patterns.parser.Absyn.EFuture) foo; if (_i_ > 0) render(_L_PAREN); render("future"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EFirstPerson) { net.lemonmodel.patterns.parser.Absyn.EFirstPerson _efirstperson = (net.lemonmodel.patterns.parser.Absyn.EFirstPerson) foo; if (_i_ > 0) render(_L_PAREN); render("firstPerson"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESecondPerson) { net.lemonmodel.patterns.parser.Absyn.ESecondPerson _esecondperson = (net.lemonmodel.patterns.parser.Absyn.ESecondPerson) foo; if (_i_ > 0) render(_L_PAREN); render("secondPerson"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EThirdPerson) { net.lemonmodel.patterns.parser.Absyn.EThirdPerson _ethirdperson = (net.lemonmodel.patterns.parser.Absyn.EThirdPerson) foo; if (_i_ > 0) render(_L_PAREN); render("thirdPerson"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EImperfect) { net.lemonmodel.patterns.parser.Absyn.EImperfect _eimperfect = (net.lemonmodel.patterns.parser.Absyn.EImperfect) foo; if (_i_ > 0) render(_L_PAREN); render("imperfect"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EImperative) { net.lemonmodel.patterns.parser.Absyn.EImperative _eimperative = (net.lemonmodel.patterns.parser.Absyn.EImperative) foo; if (_i_ > 0) render(_L_PAREN); render("imperative"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIndicative) { net.lemonmodel.patterns.parser.Absyn.EIndicative _eindicative = (net.lemonmodel.patterns.parser.Absyn.EIndicative) foo; if (_i_ > 0) render(_L_PAREN); render("indicative"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESubjunctive) { net.lemonmodel.patterns.parser.Absyn.ESubjunctive _esubjunctive = (net.lemonmodel.patterns.parser.Absyn.ESubjunctive) foo; if (_i_ > 0) render(_L_PAREN); render("subjunctive"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConditional) { net.lemonmodel.patterns.parser.Absyn.EConditional _econditional = (net.lemonmodel.patterns.parser.Absyn.EConditional) foo; if (_i_ > 0) render(_L_PAREN); render("conditional"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EGerundive) { net.lemonmodel.patterns.parser.Absyn.EGerundive _egerundive = (net.lemonmodel.patterns.parser.Absyn.EGerundive) foo; if (_i_ > 0) render(_L_PAREN); render("gerundive"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EInfinitive) { net.lemonmodel.patterns.parser.Absyn.EInfinitive _einfinitive = (net.lemonmodel.patterns.parser.Absyn.EInfinitive) foo; if (_i_ > 0) render(_L_PAREN); render("infinitive"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EParticiple) { net.lemonmodel.patterns.parser.Absyn.EParticiple _eparticiple = (net.lemonmodel.patterns.parser.Absyn.EParticiple) foo; if (_i_ > 0) render(_L_PAREN); render("participle"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAnyCat) { net.lemonmodel.patterns.parser.Absyn.EAnyCat _eanycat = (net.lemonmodel.patterns.parser.Absyn.EAnyCat) foo; if (_i_ > 0) render(_L_PAREN); pp(_eanycat.uri_1, 0); render("=>"); pp(_eanycat.uri_2, 0); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.ListCategory foo, int _i_) { for (java.util.Iterator<Category> it = foo.iterator(); it.hasNext();) { pp(it.next(), 0); if (it.hasNext()) { render(""); } else { render(""); } } } private static void pp(net.lemonmodel.patterns.parser.Absyn.POSTag foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAdjectivePOS) { net.lemonmodel.patterns.parser.Absyn.EAdjectivePOS _eadjectivepos = (net.lemonmodel.patterns.parser.Absyn.EAdjectivePOS) foo; if (_i_ > 0) render(_L_PAREN); render("adjective"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAdpositionPOS) { net.lemonmodel.patterns.parser.Absyn.EAdpositionPOS _eadpositionpos = (net.lemonmodel.patterns.parser.Absyn.EAdpositionPOS) foo; if (_i_ > 0) render(_L_PAREN); render("adposition"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAdverbPOS) { net.lemonmodel.patterns.parser.Absyn.EAdverbPOS _eadverbpos = (net.lemonmodel.patterns.parser.Absyn.EAdverbPOS) foo; if (_i_ > 0) render(_L_PAREN); render("adverb"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EArticlePOS) { net.lemonmodel.patterns.parser.Absyn.EArticlePOS _earticlepos = (net.lemonmodel.patterns.parser.Absyn.EArticlePOS) foo; if (_i_ > 0) render(_L_PAREN); render("article"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EBulletPOS) { net.lemonmodel.patterns.parser.Absyn.EBulletPOS _ebulletpos = (net.lemonmodel.patterns.parser.Absyn.EBulletPOS) foo; if (_i_ > 0) render(_L_PAREN); render("bullet"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECircumpositionPOS) { net.lemonmodel.patterns.parser.Absyn.ECircumpositionPOS _ecircumpositionpos = (net.lemonmodel.patterns.parser.Absyn.ECircumpositionPOS) foo; if (_i_ > 0) render(_L_PAREN); render("circumposition"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EColonPOSPOS) { net.lemonmodel.patterns.parser.Absyn.EColonPOSPOS _ecolonpospos = (net.lemonmodel.patterns.parser.Absyn.EColonPOSPOS) foo; if (_i_ > 0) render(_L_PAREN); render("colon"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECommaPOS) { net.lemonmodel.patterns.parser.Absyn.ECommaPOS _ecommapos = (net.lemonmodel.patterns.parser.Absyn.ECommaPOS) foo; if (_i_ > 0) render(_L_PAREN); render("comma"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConjunctionPOS) { net.lemonmodel.patterns.parser.Absyn.EConjunctionPOS _econjunctionpos = (net.lemonmodel.patterns.parser.Absyn.EConjunctionPOS) foo; if (_i_ > 0) render(_L_PAREN); render("conjunction"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECopulaPOS) { net.lemonmodel.patterns.parser.Absyn.ECopulaPOS _ecopulapos = (net.lemonmodel.patterns.parser.Absyn.ECopulaPOS) foo; if (_i_ > 0) render(_L_PAREN); render("copula"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDeterminerPOS) { net.lemonmodel.patterns.parser.Absyn.EDeterminerPOS _edeterminerpos = (net.lemonmodel.patterns.parser.Absyn.EDeterminerPOS) foo; if (_i_ > 0) render(_L_PAREN); render("determiner"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EInterjectionPOS) { net.lemonmodel.patterns.parser.Absyn.EInterjectionPOS _einterjectionpos = (net.lemonmodel.patterns.parser.Absyn.EInterjectionPOS) foo; if (_i_ > 0) render(_L_PAREN); render("interjection"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENounPOS) { net.lemonmodel.patterns.parser.Absyn.ENounPOS _enounpos = (net.lemonmodel.patterns.parser.Absyn.ENounPOS) foo; if (_i_ > 0) render(_L_PAREN); render("noun"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENumeralPOS) { net.lemonmodel.patterns.parser.Absyn.ENumeralPOS _enumeralpos = (net.lemonmodel.patterns.parser.Absyn.ENumeralPOS) foo; if (_i_ > 0) render(_L_PAREN); render("numeral"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EParticlePOS) { net.lemonmodel.patterns.parser.Absyn.EParticlePOS _eparticlepos = (net.lemonmodel.patterns.parser.Absyn.EParticlePOS) foo; if (_i_ > 0) render(_L_PAREN); render("particle"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPointPOS) { net.lemonmodel.patterns.parser.Absyn.EPointPOS _epointpos = (net.lemonmodel.patterns.parser.Absyn.EPointPOS) foo; if (_i_ > 0) render(_L_PAREN); render("point"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPostpositionPOS) { net.lemonmodel.patterns.parser.Absyn.EPostpositionPOS _epostpositionpos = (net.lemonmodel.patterns.parser.Absyn.EPostpositionPOS) foo; if (_i_ > 0) render(_L_PAREN); render("postposition"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPrepositionPOS) { net.lemonmodel.patterns.parser.Absyn.EPrepositionPOS _eprepositionpos = (net.lemonmodel.patterns.parser.Absyn.EPrepositionPOS) foo; if (_i_ > 0) render(_L_PAREN); render("preposition"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPronounPOS) { net.lemonmodel.patterns.parser.Absyn.EPronounPOS _epronounpos = (net.lemonmodel.patterns.parser.Absyn.EPronounPOS) foo; if (_i_ > 0) render(_L_PAREN); render("pronoun"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPunctuationPOS) { net.lemonmodel.patterns.parser.Absyn.EPunctuationPOS _epunctuationpos = (net.lemonmodel.patterns.parser.Absyn.EPunctuationPOS) foo; if (_i_ > 0) render(_L_PAREN); render("punctuation"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESemiColonPOS) { net.lemonmodel.patterns.parser.Absyn.ESemiColonPOS _esemicolonpos = (net.lemonmodel.patterns.parser.Absyn.ESemiColonPOS) foo; if (_i_ > 0) render(_L_PAREN); render("semiColon"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESlashPOS) { net.lemonmodel.patterns.parser.Absyn.ESlashPOS _eslashpos = (net.lemonmodel.patterns.parser.Absyn.ESlashPOS) foo; if (_i_ > 0) render(_L_PAREN); render("slash"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EVerbPOS) { net.lemonmodel.patterns.parser.Absyn.EVerbPOS _everbpos = (net.lemonmodel.patterns.parser.Absyn.EVerbPOS) foo; if (_i_ > 0) render(_L_PAREN); render("verb"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAnyPOS) { net.lemonmodel.patterns.parser.Absyn.EAnyPOS _eanypos = (net.lemonmodel.patterns.parser.Absyn.EAnyPOS) foo; if (_i_ > 0) render(_L_PAREN); printQuoted(_eanypos.string_); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.Gender foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EMascGender) { net.lemonmodel.patterns.parser.Absyn.EMascGender _emascgender = (net.lemonmodel.patterns.parser.Absyn.EMascGender) foo; if (_i_ > 0) render(_L_PAREN); render("masculine"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EFemGender) { net.lemonmodel.patterns.parser.Absyn.EFemGender _efemgender = (net.lemonmodel.patterns.parser.Absyn.EFemGender) foo; if (_i_ > 0) render(_L_PAREN); render("feminine"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENeutGender) { net.lemonmodel.patterns.parser.Absyn.ENeutGender _eneutgender = (net.lemonmodel.patterns.parser.Absyn.ENeutGender) foo; if (_i_ > 0) render(_L_PAREN); render("neuter"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECommonGender) { net.lemonmodel.patterns.parser.Absyn.ECommonGender _ecommongender = (net.lemonmodel.patterns.parser.Absyn.ECommonGender) foo; if (_i_ > 0) render(_L_PAREN); render("commonGender"); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EOtherGender) { net.lemonmodel.patterns.parser.Absyn.EOtherGender _eothergender = (net.lemonmodel.patterns.parser.Absyn.EOtherGender) foo; if (_i_ > 0) render(_L_PAREN); render("otherGender"); if (_i_ > 0) render(_R_PAREN); } } private static void pp(net.lemonmodel.patterns.parser.Absyn.URI foo, int _i_) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EQName) { net.lemonmodel.patterns.parser.Absyn.EQName _eqname = (net.lemonmodel.patterns.parser.Absyn.EQName) foo; if (_i_ > 0) render(_L_PAREN); pp(_eqname.ident_1, 0); render(":"); pp(_eqname.ident_2, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EQName2) { net.lemonmodel.patterns.parser.Absyn.EQName2 _eqname2 = (net.lemonmodel.patterns.parser.Absyn.EQName2) foo; if (_i_ > 0) render(_L_PAREN); render(":"); pp(_eqname2.ident_, 0); if (_i_ > 0) render(_R_PAREN); } else if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EURI) { net.lemonmodel.patterns.parser.Absyn.EURI _euri = (net.lemonmodel.patterns.parser.Absyn.EURI) foo; if (_i_ > 0) render(_L_PAREN); pp(_euri.fulluri_, 0); if (_i_ > 0) render(_R_PAREN); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.Statements foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EStatments) { net.lemonmodel.patterns.parser.Absyn.EStatments _estatments = (net.lemonmodel.patterns.parser.Absyn.EStatments) foo; render("("); render("EStatments"); render("["); sh(_estatments.liststatement_); render("]"); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.Statement foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPrefix) { net.lemonmodel.patterns.parser.Absyn.EPrefix _eprefix = (net.lemonmodel.patterns.parser.Absyn.EPrefix) foo; render("("); render("EPrefix"); sh(_eprefix.ident_); sh(_eprefix.fulluri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ELexicon) { net.lemonmodel.patterns.parser.Absyn.ELexicon _elexicon = (net.lemonmodel.patterns.parser.Absyn.ELexicon) foo; render("("); render("ELexicon"); sh(_elexicon.uri_); sh(_elexicon.string_); render("["); sh(_elexicon.listpattern_); render("]"); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.ListStatement foo) { for (java.util.Iterator<Statement> it = foo.iterator(); it.hasNext();) { sh(it.next()); if (it.hasNext()) render(","); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.Pattern foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPatternWithForm) { net.lemonmodel.patterns.parser.Absyn.EPatternWithForm _epatternwithform = (net.lemonmodel.patterns.parser.Absyn.EPatternWithForm) foo; render("("); render("EPatternWithForm"); sh(_epatternwithform.pattern_); render("["); sh(_epatternwithform.listcategory_); render("]"); sh(_epatternwithform.string_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENoun) { net.lemonmodel.patterns.parser.Absyn.ENoun _enoun = (net.lemonmodel.patterns.parser.Absyn.ENoun) foo; render("("); render("ENoun"); sh(_enoun.nounpattern_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENounWithGender) { net.lemonmodel.patterns.parser.Absyn.ENounWithGender _enounwithgender = (net.lemonmodel.patterns.parser.Absyn.ENounWithGender) foo; render("("); render("ENounWithGender"); sh(_enounwithgender.nounpattern_); sh(_enounwithgender.gender_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EVerb) { net.lemonmodel.patterns.parser.Absyn.EVerb _everb = (net.lemonmodel.patterns.parser.Absyn.EVerb) foo; render("("); render("EVerb"); sh(_everb.verbpattern_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAdjective) { net.lemonmodel.patterns.parser.Absyn.EAdjective _eadjective = (net.lemonmodel.patterns.parser.Absyn.EAdjective) foo; render("("); render("EAdjective"); sh(_eadjective.adjectivepattern_); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.NounPattern foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EName) { net.lemonmodel.patterns.parser.Absyn.EName _ename = (net.lemonmodel.patterns.parser.Absyn.EName) foo; render("("); render("EName"); sh(_ename.pnp_); sh(_ename.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EClassNoun) { net.lemonmodel.patterns.parser.Absyn.EClassNoun _eclassnoun = (net.lemonmodel.patterns.parser.Absyn.EClassNoun) foo; render("("); render("EClassNoun"); sh(_eclassnoun.np_); sh(_eclassnoun.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERelationalNoun1) { net.lemonmodel.patterns.parser.Absyn.ERelationalNoun1 _erelationalnoun1 = (net.lemonmodel.patterns.parser.Absyn.ERelationalNoun1) foo; render("("); render("ERelationalNoun1"); sh(_erelationalnoun1.np_); sh(_erelationalnoun1.uri_); sh(_erelationalnoun1.arg_1); sh(_erelationalnoun1.arg_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERelationalNoun2) { net.lemonmodel.patterns.parser.Absyn.ERelationalNoun2 _erelationalnoun2 = (net.lemonmodel.patterns.parser.Absyn.ERelationalNoun2) foo; render("("); render("ERelationalNoun2"); sh(_erelationalnoun2.np_); sh(_erelationalnoun2.uri_); sh(_erelationalnoun2.arg_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERelationalMultivalentNoun) { net.lemonmodel.patterns.parser.Absyn.ERelationalMultivalentNoun _erelationalmultivalentnoun = (net.lemonmodel.patterns.parser.Absyn.ERelationalMultivalentNoun) foo; render("("); render("ERelationalMultivalentNoun"); sh(_erelationalmultivalentnoun.np_); sh(_erelationalmultivalentnoun.uri_); render("["); sh(_erelationalmultivalentnoun.listontologyframeelement_); render("]"); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun1) { net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun1 _eclassrelationalnoun1 = (net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun1) foo; render("("); render("EClassRelationalNoun1"); sh(_eclassrelationalnoun1.np_); sh(_eclassrelationalnoun1.uri_1); sh(_eclassrelationalnoun1.uri_2); sh(_eclassrelationalnoun1.arg_1); sh(_eclassrelationalnoun1.arg_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun2) { net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun2 _eclassrelationalnoun2 = (net.lemonmodel.patterns.parser.Absyn.EClassRelationalNoun2) foo; render("("); render("EClassRelationalNoun2"); sh(_eclassrelationalnoun2.np_); sh(_eclassrelationalnoun2.uri_1); sh(_eclassrelationalnoun2.uri_2); sh(_eclassrelationalnoun2.arg_); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.VerbPattern foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EStateVerb1) { net.lemonmodel.patterns.parser.Absyn.EStateVerb1 _estateverb1 = (net.lemonmodel.patterns.parser.Absyn.EStateVerb1) foo; render("("); render("EStateVerb1"); sh(_estateverb1.vp_); sh(_estateverb1.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EStateVerb2) { net.lemonmodel.patterns.parser.Absyn.EStateVerb2 _estateverb2 = (net.lemonmodel.patterns.parser.Absyn.EStateVerb2) foo; render("("); render("EStateVerb2"); sh(_estateverb2.vp_); sh(_estateverb2.uri_); sh(_estateverb2.arg_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EStateVerb3) { net.lemonmodel.patterns.parser.Absyn.EStateVerb3 _estateverb3 = (net.lemonmodel.patterns.parser.Absyn.EStateVerb3) foo; render("("); render("EStateVerb3"); sh(_estateverb3.vp_); sh(_estateverb3.uri_); sh(_estateverb3.arg_1); sh(_estateverb3.arg_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ETelicEventVerb) { net.lemonmodel.patterns.parser.Absyn.ETelicEventVerb _eteliceventverb = (net.lemonmodel.patterns.parser.Absyn.ETelicEventVerb) foo; render("("); render("ETelicEventVerb"); sh(_eteliceventverb.verbpattern_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENontelicEventVerb) { net.lemonmodel.patterns.parser.Absyn.ENontelicEventVerb _enonteliceventverb = (net.lemonmodel.patterns.parser.Absyn.ENontelicEventVerb) foo; render("("); render("ENontelicEventVerb"); sh(_enonteliceventverb.verbpattern_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDunnotelicEventVerb) { net.lemonmodel.patterns.parser.Absyn.EDunnotelicEventVerb _edunnoteliceventverb = (net.lemonmodel.patterns.parser.Absyn.EDunnotelicEventVerb) foo; render("("); render("EDunnotelicEventVerb"); sh(_edunnoteliceventverb.verbpattern_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb1) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb1 _econsequenceverb1 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb1) foo; render("("); render("EConsequenceVerb1"); sh(_econsequenceverb1.vp_); sh(_econsequenceverb1.uri_1); sh(_econsequenceverb1.ontologyframeelement_1); sh(_econsequenceverb1.ontologyframeelement_2); sh(_econsequenceverb1.uri_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb2) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb2 _econsequenceverb2 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb2) foo; render("("); render("EConsequenceVerb2"); sh(_econsequenceverb2.vp_); sh(_econsequenceverb2.uri_); sh(_econsequenceverb2.ontologyframeelement_1); sh(_econsequenceverb2.ontologyframeelement_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb3) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb3 _econsequenceverb3 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb3) foo; render("("); render("EConsequenceVerb3"); sh(_econsequenceverb3.vp_); sh(_econsequenceverb3.uri_1); sh(_econsequenceverb3.ontologyframeelement_); sh(_econsequenceverb3.uri_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb4) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb4 _econsequenceverb4 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb4) foo; render("("); render("EConsequenceVerb4"); sh(_econsequenceverb4.vp_); sh(_econsequenceverb4.uri_); sh(_econsequenceverb4.ontologyframeelement_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb5) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb5 _econsequenceverb5 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb5) foo; render("("); render("EConsequenceVerb5"); sh(_econsequenceverb5.vp_); sh(_econsequenceverb5.uri_1); sh(_econsequenceverb5.ontologyframeelement_); sh(_econsequenceverb5.uri_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb6) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb6 _econsequenceverb6 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb6) foo; render("("); render("EConsequenceVerb6"); sh(_econsequenceverb6.vp_); sh(_econsequenceverb6.uri_); sh(_econsequenceverb6.ontologyframeelement_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb7) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb7 _econsequenceverb7 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb7) foo; render("("); render("EConsequenceVerb7"); sh(_econsequenceverb7.vp_); sh(_econsequenceverb7.uri_1); sh(_econsequenceverb7.uri_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb8) { net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb8 _econsequenceverb8 = (net.lemonmodel.patterns.parser.Absyn.EConsequenceVerb8) foo; render("("); render("EConsequenceVerb8"); sh(_econsequenceverb8.vp_); sh(_econsequenceverb8.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDurativeEventVerb) { net.lemonmodel.patterns.parser.Absyn.EDurativeEventVerb _edurativeeventverb = (net.lemonmodel.patterns.parser.Absyn.EDurativeEventVerb) foo; render("("); render("EDurativeEventVerb"); sh(_edurativeeventverb.verbpattern_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EInstantEventVerb) { net.lemonmodel.patterns.parser.Absyn.EInstantEventVerb _einstanteventverb = (net.lemonmodel.patterns.parser.Absyn.EInstantEventVerb) foo; render("("); render("EInstantEventVerb"); sh(_einstanteventverb.verbpattern_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EEventVerb) { net.lemonmodel.patterns.parser.Absyn.EEventVerb _eeventverb = (net.lemonmodel.patterns.parser.Absyn.EEventVerb) foo; render("("); render("EEventVerb"); sh(_eeventverb.vp_); sh(_eeventverb.uri_); render("["); sh(_eeventverb.listontologyframeelement_); render("]"); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.AdjectivePattern foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIntersectiveAdjective) { net.lemonmodel.patterns.parser.Absyn.EIntersectiveAdjective _eintersectiveadjective = (net.lemonmodel.patterns.parser.Absyn.EIntersectiveAdjective) foo; render("("); render("EIntersectiveAdjective"); sh(_eintersectiveadjective.ap_); sh(_eintersectiveadjective.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIntersectiveObjectPropertyAdjective) { net.lemonmodel.patterns.parser.Absyn.EIntersectiveObjectPropertyAdjective _eintersectiveobjectpropertyadjective = (net.lemonmodel.patterns.parser.Absyn.EIntersectiveObjectPropertyAdjective) foo; render("("); render("EIntersectiveObjectPropertyAdjective"); sh(_eintersectiveobjectpropertyadjective.ap_); sh(_eintersectiveobjectpropertyadjective.uri_1); sh(_eintersectiveobjectpropertyadjective.uri_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIntersectiveDataPropertyAdjective) { net.lemonmodel.patterns.parser.Absyn.EIntersectiveDataPropertyAdjective _eintersectivedatapropertyadjective = (net.lemonmodel.patterns.parser.Absyn.EIntersectiveDataPropertyAdjective) foo; render("("); render("EIntersectiveDataPropertyAdjective"); sh(_eintersectivedatapropertyadjective.ap_); sh(_eintersectivedatapropertyadjective.uri_); sh(_eintersectivedatapropertyadjective.string_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPropertyModifyingAdjective) { net.lemonmodel.patterns.parser.Absyn.EPropertyModifyingAdjective _epropertymodifyingadjective = (net.lemonmodel.patterns.parser.Absyn.EPropertyModifyingAdjective) foo; render("("); render("EPropertyModifyingAdjective"); sh(_epropertymodifyingadjective.ap_); sh(_epropertymodifyingadjective.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERelationalAdjective) { net.lemonmodel.patterns.parser.Absyn.ERelationalAdjective _erelationaladjective = (net.lemonmodel.patterns.parser.Absyn.ERelationalAdjective) foo; render("("); render("ERelationalAdjective"); sh(_erelationaladjective.ap_); sh(_erelationaladjective.uri_); sh(_erelationaladjective.arg_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EScalarAdjective) { net.lemonmodel.patterns.parser.Absyn.EScalarAdjective _escalaradjective = (net.lemonmodel.patterns.parser.Absyn.EScalarAdjective) foo; render("("); render("EScalarAdjective"); sh(_escalaradjective.ap_); render("["); sh(_escalaradjective.listscalarmembership_); render("]"); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.ListPattern foo) { for (java.util.Iterator<Pattern> it = foo.iterator(); it.hasNext();) { sh(it.next()); if (it.hasNext()) render(","); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.Arg foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EOptionalArg) { net.lemonmodel.patterns.parser.Absyn.EOptionalArg _eoptionalarg = (net.lemonmodel.patterns.parser.Absyn.EOptionalArg) foo; render("("); render("EOptionalArg"); sh(_eoptionalarg.arg_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ERestrictedArg) { net.lemonmodel.patterns.parser.Absyn.ERestrictedArg _erestrictedarg = (net.lemonmodel.patterns.parser.Absyn.ERestrictedArg) foo; render("("); render("ERestrictedArg"); sh(_erestrictedarg.arg_); sh(_erestrictedarg.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESubject) { net.lemonmodel.patterns.parser.Absyn.ESubject _esubject = (net.lemonmodel.patterns.parser.Absyn.ESubject) foo; render("ESubject"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDirectObject) { net.lemonmodel.patterns.parser.Absyn.EDirectObject _edirectobject = (net.lemonmodel.patterns.parser.Absyn.EDirectObject) foo; render("EDirectObject"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIndirectObject) { net.lemonmodel.patterns.parser.Absyn.EIndirectObject _eindirectobject = (net.lemonmodel.patterns.parser.Absyn.EIndirectObject) foo; render("EIndirectObject"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECopulativeArg) { net.lemonmodel.patterns.parser.Absyn.ECopulativeArg _ecopulativearg = (net.lemonmodel.patterns.parser.Absyn.ECopulativeArg) foo; render("ECopulativeArg"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECopulativeSubject) { net.lemonmodel.patterns.parser.Absyn.ECopulativeSubject _ecopulativesubject = (net.lemonmodel.patterns.parser.Absyn.ECopulativeSubject) foo; render("ECopulativeSubject"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPrepositionalObject) { net.lemonmodel.patterns.parser.Absyn.EPrepositionalObject _eprepositionalobject = (net.lemonmodel.patterns.parser.Absyn.EPrepositionalObject) foo; render("("); render("EPrepositionalObject"); sh(_eprepositionalobject.string_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPostpositionalObject) { net.lemonmodel.patterns.parser.Absyn.EPostpositionalObject _epostpositionalobject = (net.lemonmodel.patterns.parser.Absyn.EPostpositionalObject) foo; render("("); render("EPostpositionalObject"); sh(_epostpositionalobject.string_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPossessiveAdjunct) { net.lemonmodel.patterns.parser.Absyn.EPossessiveAdjunct _epossessiveadjunct = (net.lemonmodel.patterns.parser.Absyn.EPossessiveAdjunct) foo; render("EPossessiveAdjunct"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.OntologyFrameElement foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EURIAsSynArg) { net.lemonmodel.patterns.parser.Absyn.EURIAsSynArg _euriassynarg = (net.lemonmodel.patterns.parser.Absyn.EURIAsSynArg) foo; render("("); render("EURIAsSynArg"); sh(_euriassynarg.uri_); sh(_euriassynarg.arg_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EArgAsOFE) { net.lemonmodel.patterns.parser.Absyn.EArgAsOFE _eargasofe = (net.lemonmodel.patterns.parser.Absyn.EArgAsOFE) foo; render("("); render("EArgAsOFE"); sh(_eargasofe.arg_); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.ListOntologyFrameElement foo) { for (java.util.Iterator<OntologyFrameElement> it = foo.iterator(); it.hasNext();) { sh(it.next()); if (it.hasNext()) render(","); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.PNP foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPNPSimple) { net.lemonmodel.patterns.parser.Absyn.EPNPSimple _epnpsimple = (net.lemonmodel.patterns.parser.Absyn.EPNPSimple) foo; render("("); render("EPNPSimple"); sh(_epnpsimple.string_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPNPComplex) { net.lemonmodel.patterns.parser.Absyn.EPNPComplex _epnpcomplex = (net.lemonmodel.patterns.parser.Absyn.EPNPComplex) foo; render("("); render("EPNPComplex"); render("["); sh(_epnpcomplex.listpostaggedword_); render("]"); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.NP foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENPSimple) { net.lemonmodel.patterns.parser.Absyn.ENPSimple _enpsimple = (net.lemonmodel.patterns.parser.Absyn.ENPSimple) foo; render("("); render("ENPSimple"); sh(_enpsimple.string_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENPComplex) { net.lemonmodel.patterns.parser.Absyn.ENPComplex _enpcomplex = (net.lemonmodel.patterns.parser.Absyn.ENPComplex) foo; render("("); render("ENPComplex"); render("["); sh(_enpcomplex.listpostaggedword_); render("]"); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.VP foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EVPSimple) { net.lemonmodel.patterns.parser.Absyn.EVPSimple _evpsimple = (net.lemonmodel.patterns.parser.Absyn.EVPSimple) foo; render("("); render("EVPSimple"); sh(_evpsimple.string_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EVPComplex) { net.lemonmodel.patterns.parser.Absyn.EVPComplex _evpcomplex = (net.lemonmodel.patterns.parser.Absyn.EVPComplex) foo; render("("); render("EVPComplex"); render("["); sh(_evpcomplex.listpostaggedword_); render("]"); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.AP foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAPSimple) { net.lemonmodel.patterns.parser.Absyn.EAPSimple _eapsimple = (net.lemonmodel.patterns.parser.Absyn.EAPSimple) foo; render("("); render("EAPSimple"); sh(_eapsimple.string_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAPComplex) { net.lemonmodel.patterns.parser.Absyn.EAPComplex _eapcomplex = (net.lemonmodel.patterns.parser.Absyn.EAPComplex) foo; render("("); render("EAPComplex"); render("["); sh(_eapcomplex.listpostaggedword_); render("]"); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.POSTaggedWord foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPOSTaggedHeadWord) { net.lemonmodel.patterns.parser.Absyn.EPOSTaggedHeadWord _epostaggedheadword = (net.lemonmodel.patterns.parser.Absyn.EPOSTaggedHeadWord) foo; render("("); render("EPOSTaggedHeadWord"); sh(_epostaggedheadword.string_); sh(_epostaggedheadword.postag_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPOSTaggedWord) { net.lemonmodel.patterns.parser.Absyn.EPOSTaggedWord _epostaggedword = (net.lemonmodel.patterns.parser.Absyn.EPOSTaggedWord) foo; render("("); render("EPOSTaggedWord"); sh(_epostaggedword.string_); sh(_epostaggedword.postag_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedHeadWord) { net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedHeadWord _elemmapostaggedheadword = (net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedHeadWord) foo; render("("); render("ELemmaPOSTaggedHeadWord"); sh(_elemmapostaggedheadword.string_1); sh(_elemmapostaggedheadword.string_2); sh(_elemmapostaggedheadword.postag_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedWord) { net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedWord _elemmapostaggedword = (net.lemonmodel.patterns.parser.Absyn.ELemmaPOSTaggedWord) foo; render("("); render("ELemmaPOSTaggedWord"); sh(_elemmapostaggedword.string_1); sh(_elemmapostaggedword.string_2); sh(_elemmapostaggedword.postag_); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.ListPOSTaggedWord foo) { for (java.util.Iterator<POSTaggedWord> it = foo.iterator(); it.hasNext();) { sh(it.next()); if (it.hasNext()) render(","); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.ScalarMembership foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.CovariantScalarMembership) { net.lemonmodel.patterns.parser.Absyn.CovariantScalarMembership _covariantscalarmembership = (net.lemonmodel.patterns.parser.Absyn.CovariantScalarMembership) foo; render("("); render("CovariantScalarMembership"); sh(_covariantscalarmembership.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ContravariantScalarMembership) { net.lemonmodel.patterns.parser.Absyn.ContravariantScalarMembership _contravariantscalarmembership = (net.lemonmodel.patterns.parser.Absyn.ContravariantScalarMembership) foo; render("("); render("ContravariantScalarMembership"); sh(_contravariantscalarmembership.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.CentralScalarMembership) { net.lemonmodel.patterns.parser.Absyn.CentralScalarMembership _centralscalarmembership = (net.lemonmodel.patterns.parser.Absyn.CentralScalarMembership) foo; render("("); render("CentralScalarMembership"); sh(_centralscalarmembership.uri_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.GreaterThanScalarMembership) { net.lemonmodel.patterns.parser.Absyn.GreaterThanScalarMembership _greaterthanscalarmembership = (net.lemonmodel.patterns.parser.Absyn.GreaterThanScalarMembership) foo; render("("); render("GreaterThanScalarMembership"); sh(_greaterthanscalarmembership.uri_1); sh(_greaterthanscalarmembership.double_); sh(_greaterthanscalarmembership.uri_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.LessThanScalarMembership) { net.lemonmodel.patterns.parser.Absyn.LessThanScalarMembership _lessthanscalarmembership = (net.lemonmodel.patterns.parser.Absyn.LessThanScalarMembership) foo; render("("); render("LessThanScalarMembership"); sh(_lessthanscalarmembership.uri_1); sh(_lessthanscalarmembership.double_); sh(_lessthanscalarmembership.uri_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.BoundedScalarMembership) { net.lemonmodel.patterns.parser.Absyn.BoundedScalarMembership _boundedscalarmembership = (net.lemonmodel.patterns.parser.Absyn.BoundedScalarMembership) foo; render("("); render("BoundedScalarMembership"); sh(_boundedscalarmembership.double_1); sh(_boundedscalarmembership.uri_1); sh(_boundedscalarmembership.double_2); sh(_boundedscalarmembership.uri_2); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.ListScalarMembership foo) { for (java.util.Iterator<ScalarMembership> it = foo.iterator(); it.hasNext();) { sh(it.next()); if (it.hasNext()) render(","); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.Category foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESingular) { net.lemonmodel.patterns.parser.Absyn.ESingular _esingular = (net.lemonmodel.patterns.parser.Absyn.ESingular) foo; render("ESingular"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDual) { net.lemonmodel.patterns.parser.Absyn.EDual _edual = (net.lemonmodel.patterns.parser.Absyn.EDual) foo; render("EDual"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPlural) { net.lemonmodel.patterns.parser.Absyn.EPlural _eplural = (net.lemonmodel.patterns.parser.Absyn.EPlural) foo; render("EPlural"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENominative) { net.lemonmodel.patterns.parser.Absyn.ENominative _enominative = (net.lemonmodel.patterns.parser.Absyn.ENominative) foo; render("ENominative"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAccusative) { net.lemonmodel.patterns.parser.Absyn.EAccusative _eaccusative = (net.lemonmodel.patterns.parser.Absyn.EAccusative) foo; render("EAccusative"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EGenitive) { net.lemonmodel.patterns.parser.Absyn.EGenitive _egenitive = (net.lemonmodel.patterns.parser.Absyn.EGenitive) foo; render("EGenitive"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDative) { net.lemonmodel.patterns.parser.Absyn.EDative _edative = (net.lemonmodel.patterns.parser.Absyn.EDative) foo; render("EDative"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EComparative) { net.lemonmodel.patterns.parser.Absyn.EComparative _ecomparative = (net.lemonmodel.patterns.parser.Absyn.EComparative) foo; render("EComparative"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESuperlative) { net.lemonmodel.patterns.parser.Absyn.ESuperlative _esuperlative = (net.lemonmodel.patterns.parser.Absyn.ESuperlative) foo; render("ESuperlative"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPresent) { net.lemonmodel.patterns.parser.Absyn.EPresent _epresent = (net.lemonmodel.patterns.parser.Absyn.EPresent) foo; render("EPresent"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPast) { net.lemonmodel.patterns.parser.Absyn.EPast _epast = (net.lemonmodel.patterns.parser.Absyn.EPast) foo; render("EPast"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EFuture) { net.lemonmodel.patterns.parser.Absyn.EFuture _efuture = (net.lemonmodel.patterns.parser.Absyn.EFuture) foo; render("EFuture"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EFirstPerson) { net.lemonmodel.patterns.parser.Absyn.EFirstPerson _efirstperson = (net.lemonmodel.patterns.parser.Absyn.EFirstPerson) foo; render("EFirstPerson"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESecondPerson) { net.lemonmodel.patterns.parser.Absyn.ESecondPerson _esecondperson = (net.lemonmodel.patterns.parser.Absyn.ESecondPerson) foo; render("ESecondPerson"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EThirdPerson) { net.lemonmodel.patterns.parser.Absyn.EThirdPerson _ethirdperson = (net.lemonmodel.patterns.parser.Absyn.EThirdPerson) foo; render("EThirdPerson"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EImperfect) { net.lemonmodel.patterns.parser.Absyn.EImperfect _eimperfect = (net.lemonmodel.patterns.parser.Absyn.EImperfect) foo; render("EImperfect"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EImperative) { net.lemonmodel.patterns.parser.Absyn.EImperative _eimperative = (net.lemonmodel.patterns.parser.Absyn.EImperative) foo; render("EImperative"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EIndicative) { net.lemonmodel.patterns.parser.Absyn.EIndicative _eindicative = (net.lemonmodel.patterns.parser.Absyn.EIndicative) foo; render("EIndicative"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESubjunctive) { net.lemonmodel.patterns.parser.Absyn.ESubjunctive _esubjunctive = (net.lemonmodel.patterns.parser.Absyn.ESubjunctive) foo; render("ESubjunctive"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConditional) { net.lemonmodel.patterns.parser.Absyn.EConditional _econditional = (net.lemonmodel.patterns.parser.Absyn.EConditional) foo; render("EConditional"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EGerundive) { net.lemonmodel.patterns.parser.Absyn.EGerundive _egerundive = (net.lemonmodel.patterns.parser.Absyn.EGerundive) foo; render("EGerundive"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EInfinitive) { net.lemonmodel.patterns.parser.Absyn.EInfinitive _einfinitive = (net.lemonmodel.patterns.parser.Absyn.EInfinitive) foo; render("EInfinitive"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EParticiple) { net.lemonmodel.patterns.parser.Absyn.EParticiple _eparticiple = (net.lemonmodel.patterns.parser.Absyn.EParticiple) foo; render("EParticiple"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAnyCat) { net.lemonmodel.patterns.parser.Absyn.EAnyCat _eanycat = (net.lemonmodel.patterns.parser.Absyn.EAnyCat) foo; render("("); render("EAnyCat"); sh(_eanycat.uri_1); sh(_eanycat.uri_2); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.ListCategory foo) { for (java.util.Iterator<Category> it = foo.iterator(); it.hasNext();) { sh(it.next()); if (it.hasNext()) render(","); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.POSTag foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAdjectivePOS) { net.lemonmodel.patterns.parser.Absyn.EAdjectivePOS _eadjectivepos = (net.lemonmodel.patterns.parser.Absyn.EAdjectivePOS) foo; render("EAdjectivePOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAdpositionPOS) { net.lemonmodel.patterns.parser.Absyn.EAdpositionPOS _eadpositionpos = (net.lemonmodel.patterns.parser.Absyn.EAdpositionPOS) foo; render("EAdpositionPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAdverbPOS) { net.lemonmodel.patterns.parser.Absyn.EAdverbPOS _eadverbpos = (net.lemonmodel.patterns.parser.Absyn.EAdverbPOS) foo; render("EAdverbPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EArticlePOS) { net.lemonmodel.patterns.parser.Absyn.EArticlePOS _earticlepos = (net.lemonmodel.patterns.parser.Absyn.EArticlePOS) foo; render("EArticlePOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EBulletPOS) { net.lemonmodel.patterns.parser.Absyn.EBulletPOS _ebulletpos = (net.lemonmodel.patterns.parser.Absyn.EBulletPOS) foo; render("EBulletPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECircumpositionPOS) { net.lemonmodel.patterns.parser.Absyn.ECircumpositionPOS _ecircumpositionpos = (net.lemonmodel.patterns.parser.Absyn.ECircumpositionPOS) foo; render("ECircumpositionPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EColonPOSPOS) { net.lemonmodel.patterns.parser.Absyn.EColonPOSPOS _ecolonpospos = (net.lemonmodel.patterns.parser.Absyn.EColonPOSPOS) foo; render("EColonPOSPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECommaPOS) { net.lemonmodel.patterns.parser.Absyn.ECommaPOS _ecommapos = (net.lemonmodel.patterns.parser.Absyn.ECommaPOS) foo; render("ECommaPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EConjunctionPOS) { net.lemonmodel.patterns.parser.Absyn.EConjunctionPOS _econjunctionpos = (net.lemonmodel.patterns.parser.Absyn.EConjunctionPOS) foo; render("EConjunctionPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECopulaPOS) { net.lemonmodel.patterns.parser.Absyn.ECopulaPOS _ecopulapos = (net.lemonmodel.patterns.parser.Absyn.ECopulaPOS) foo; render("ECopulaPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EDeterminerPOS) { net.lemonmodel.patterns.parser.Absyn.EDeterminerPOS _edeterminerpos = (net.lemonmodel.patterns.parser.Absyn.EDeterminerPOS) foo; render("EDeterminerPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EInterjectionPOS) { net.lemonmodel.patterns.parser.Absyn.EInterjectionPOS _einterjectionpos = (net.lemonmodel.patterns.parser.Absyn.EInterjectionPOS) foo; render("EInterjectionPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENounPOS) { net.lemonmodel.patterns.parser.Absyn.ENounPOS _enounpos = (net.lemonmodel.patterns.parser.Absyn.ENounPOS) foo; render("ENounPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENumeralPOS) { net.lemonmodel.patterns.parser.Absyn.ENumeralPOS _enumeralpos = (net.lemonmodel.patterns.parser.Absyn.ENumeralPOS) foo; render("ENumeralPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EParticlePOS) { net.lemonmodel.patterns.parser.Absyn.EParticlePOS _eparticlepos = (net.lemonmodel.patterns.parser.Absyn.EParticlePOS) foo; render("EParticlePOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPointPOS) { net.lemonmodel.patterns.parser.Absyn.EPointPOS _epointpos = (net.lemonmodel.patterns.parser.Absyn.EPointPOS) foo; render("EPointPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPostpositionPOS) { net.lemonmodel.patterns.parser.Absyn.EPostpositionPOS _epostpositionpos = (net.lemonmodel.patterns.parser.Absyn.EPostpositionPOS) foo; render("EPostpositionPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPrepositionPOS) { net.lemonmodel.patterns.parser.Absyn.EPrepositionPOS _eprepositionpos = (net.lemonmodel.patterns.parser.Absyn.EPrepositionPOS) foo; render("EPrepositionPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPronounPOS) { net.lemonmodel.patterns.parser.Absyn.EPronounPOS _epronounpos = (net.lemonmodel.patterns.parser.Absyn.EPronounPOS) foo; render("EPronounPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EPunctuationPOS) { net.lemonmodel.patterns.parser.Absyn.EPunctuationPOS _epunctuationpos = (net.lemonmodel.patterns.parser.Absyn.EPunctuationPOS) foo; render("EPunctuationPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESemiColonPOS) { net.lemonmodel.patterns.parser.Absyn.ESemiColonPOS _esemicolonpos = (net.lemonmodel.patterns.parser.Absyn.ESemiColonPOS) foo; render("ESemiColonPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ESlashPOS) { net.lemonmodel.patterns.parser.Absyn.ESlashPOS _eslashpos = (net.lemonmodel.patterns.parser.Absyn.ESlashPOS) foo; render("ESlashPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EVerbPOS) { net.lemonmodel.patterns.parser.Absyn.EVerbPOS _everbpos = (net.lemonmodel.patterns.parser.Absyn.EVerbPOS) foo; render("EVerbPOS"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EAnyPOS) { net.lemonmodel.patterns.parser.Absyn.EAnyPOS _eanypos = (net.lemonmodel.patterns.parser.Absyn.EAnyPOS) foo; render("("); render("EAnyPOS"); sh(_eanypos.string_); render(")"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.Gender foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EMascGender) { net.lemonmodel.patterns.parser.Absyn.EMascGender _emascgender = (net.lemonmodel.patterns.parser.Absyn.EMascGender) foo; render("EMascGender"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EFemGender) { net.lemonmodel.patterns.parser.Absyn.EFemGender _efemgender = (net.lemonmodel.patterns.parser.Absyn.EFemGender) foo; render("EFemGender"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ENeutGender) { net.lemonmodel.patterns.parser.Absyn.ENeutGender _eneutgender = (net.lemonmodel.patterns.parser.Absyn.ENeutGender) foo; render("ENeutGender"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.ECommonGender) { net.lemonmodel.patterns.parser.Absyn.ECommonGender _ecommongender = (net.lemonmodel.patterns.parser.Absyn.ECommonGender) foo; render("ECommonGender"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EOtherGender) { net.lemonmodel.patterns.parser.Absyn.EOtherGender _eothergender = (net.lemonmodel.patterns.parser.Absyn.EOtherGender) foo; render("EOtherGender"); } } private static void sh(net.lemonmodel.patterns.parser.Absyn.URI foo) { if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EQName) { net.lemonmodel.patterns.parser.Absyn.EQName _eqname = (net.lemonmodel.patterns.parser.Absyn.EQName) foo; render("("); render("EQName"); sh(_eqname.ident_1); sh(_eqname.ident_2); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EQName2) { net.lemonmodel.patterns.parser.Absyn.EQName2 _eqname2 = (net.lemonmodel.patterns.parser.Absyn.EQName2) foo; render("("); render("EQName2"); sh(_eqname2.ident_); render(")"); } if (foo instanceof net.lemonmodel.patterns.parser.Absyn.EURI) { net.lemonmodel.patterns.parser.Absyn.EURI _euri = (net.lemonmodel.patterns.parser.Absyn.EURI) foo; render("("); render("EURI"); sh(_euri.fulluri_); render(")"); } } private static void pp(Integer n, int _i_) { buf_.append(n); buf_.append(" "); } private static void pp(Double d, int _i_) { buf_.append(d); buf_.append(" "); } private static void pp(String s, int _i_) { buf_.append(s); buf_.append(" "); } private static void pp(Character c, int _i_) { buf_.append("'" + c.toString() + "'"); buf_.append(" "); } private static void sh(Integer n) { render(n.toString()); } private static void sh(Double d) { render(d.toString()); } private static void sh(Character c) { render(c.toString()); } private static void sh(String s) { printQuoted(s); } private static void printQuoted(String s) { render("\"" + s + "\""); } private static void indent() { int n = _n_; while (n > 0) { buf_.append(" "); n--; } } private static void backup() { if (buf_.charAt(buf_.length() - 1) == ' ') { buf_.setLength(buf_.length() - 1); } } private static void trim() { while (buf_.length() > 0 && buf_.charAt(0) == ' ') buf_.deleteCharAt(0); while (buf_.length() > 0 && buf_.charAt(buf_.length()-1) == ' ') buf_.deleteCharAt(buf_.length()-1); } private static int _n_ = 0; private static StringBuilder buf_ = new StringBuilder(INITIAL_BUFFER_SIZE); }
[ "john@mccr.ae" ]
john@mccr.ae
c86928864483aac3a1356b7ef33908200db2f450
1ae55a5ba5538dd7d1a0f2d0334365157eb98ae9
/F2.1IntroductingFunctionalProgramming/src/com/android/Main.java
33423bd6bd25bd295bc904cc6de95264412c2aad
[]
no_license
noelflattery/Java2Share
8f88af90e3203fc2db629f40c299e83870efc3cc
9bd6de800785a0acc3102aa7ec1255c6697229a8
refs/heads/master
2023-05-01T00:28:17.526809
2021-05-24T11:54:44
2021-05-24T11:54:44
368,162,098
1
0
null
null
null
null
UTF-8
Java
false
false
906
java
package com.android; import java.util.function.Predicate; /**contains Main method that we use to call methods in Examples to show different aspects of * predicate and Functional interfaces * To see video tutorial for this section of code * <a href="https://youtu.be/8cFj6gYDndk">Video tutorial</a> * For all 177 videos, which cover all the topics in this course go to * <a href="https://youtube.com/playlist?list=PL8PS0RTQpPaeIdTmq935ugrUHQJTavuX-">Complete Course Video Tutorial</a> * @author NoelF * @see com.android.Examples * @see com.android.Examples#ex1() * @see com.android.Examples#ex2() * */ public class Main { public static void main(String[]args) { //Examples.ex1(); Examples.ex2(); /* Predicate pred=s->true; pred=(Object s)->{ String mys=(String)s; if(mys.length()>10) return true; return false; }; System.out.println(pred.test("hello"));;*/ } }
[ "noelflattery@gmail.com" ]
noelflattery@gmail.com
8fbf1b612c7d74e7c668d6b05b64fc1d978310ec
52c36ce3a9d25073bdbe002757f08a267abb91c6
/src/main/java/com/alipay/api/domain/KoubeiMarketingDataCustomreportQueryModel.java
d973402a714aa4bdf80d409f1a94c065dc9fb3ab
[ "Apache-2.0" ]
permissive
itc7/alipay-sdk-java-all
d2f2f2403f3c9c7122baa9e438ebd2932935afec
c220e02cbcdda5180b76d9da129147e5b38dcf17
refs/heads/master
2022-08-28T08:03:08.497774
2020-05-27T10:16:10
2020-05-27T10:16:10
267,271,062
0
0
Apache-2.0
2020-05-27T09:02:04
2020-05-27T09:02:04
null
UTF-8
Java
false
false
1,280
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 自定义数据报表数据查询接口 * * @author auto create * @since 1.0, 2018-07-26 14:03:45 */ public class KoubeiMarketingDataCustomreportQueryModel extends AlipayObject { private static final long serialVersionUID = 3299651797185891565L; /** * 规则KEY */ @ApiField("condition_key") private String conditionKey; /** * 额外增加的查询过滤条件 */ @ApiListField("filter_tags") @ApiField("filter_tag") private List<FilterTag> filterTags; /** * 一次拉多少条 */ @ApiField("max_count") private String maxCount; public String getConditionKey() { return this.conditionKey; } public void setConditionKey(String conditionKey) { this.conditionKey = conditionKey; } public List<FilterTag> getFilterTags() { return this.filterTags; } public void setFilterTags(List<FilterTag> filterTags) { this.filterTags = filterTags; } public String getMaxCount() { return this.maxCount; } public void setMaxCount(String maxCount) { this.maxCount = maxCount; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
29088dd04ee77cdf013ce66442610ad44b1ded9f
a891920efaefe70b529d6018058066068d2bf204
/src/ankh/ui/lists/stated/StatedItemsList.java
8de062af7cec5dae334f8f1ef71cf9095123cba9
[]
no_license
ankhzet/AnkhApp
cfd56d6550d65f3e37c5645bf5de6ce4f09d27bf
c7203db46f5f0eee6ca83ff2b2529ff60b6cf4f4
HEAD
2016-08-12T04:52:14.534320
2016-02-14T00:52:36
2016-02-14T00:52:36
44,909,871
0
0
null
null
null
null
UTF-8
Java
false
false
2,520
java
package ankh.ui.lists.stated; import java.util.ArrayList; import java.util.Collection; import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import javafx.collections.ObservableListBase; /** * * @author Ankh Zet (ankhzet@gmail.com) * @param <Item> * @param <Stated> */ public abstract class StatedItemsList<Item, Stated extends StatedItem<? extends Item>> extends ObservableListBase<Stated> { ObservableList<Stated> backingArray; public StatedItemsList() { backingArray = FXCollections.observableArrayList(); } public StatedItemsList(ObservableList<? extends Item> c) { this(); addAllItems(c); c.addListener((ListChangeListener<Item>) change -> synk(change.getList())); } private void synk(ObservableList<? extends Item> l) { ArrayList<Item> n = new ArrayList<>(l); ArrayList<Stated> d = new ArrayList<>(); for (Stated stated : backingArray) { Item i = stated.getItem(); if (!l.contains(i)) d.add(stated); else n.remove(i); } beginChange(); try { if (d.size() > 0) removeAll(d); if (n.size() > 0) for (Item item : n) add(l.indexOf(item), newStated(item)); } finally { endChange(); } } public final void addAllItems(Collection<? extends Item> c) { beginChange(); try { for (Item item : c) add(newStated(item)); } finally { endChange(); } } @Override public Stated get(int index) { return backingArray.get(index); } @Override public int size() { return backingArray.size(); } @Override public void add(int index, Stated element) { beginChange(); try { backingArray.add(index, element); nextAdd(index, index + 1); } finally { endChange(); } } @Override public Stated remove(int index) { beginChange(); try { Stated s = backingArray.remove(index); nextRemove(index, s); return s; } finally { endChange(); } } @Override public Stated set(int index, Stated element) { beginChange(); try { Stated s = backingArray.set(index, element); nextSet(index, s); return s; } finally { endChange(); } } public Stated stated(Item item) { for (Stated stated : this) if (stated.getItem() == item) return stated; return null; } protected abstract Stated newStated(Item item); }
[ "ankhzet@gmail.com" ]
ankhzet@gmail.com
101169175742659d07395d25a11bb5b23230d350
bb5699d17098e90b6bf31b66826c640e241256f1
/src/main/java/com/goldenstudios/codingchallenges/hackerrank/arrays/easy/HourGlassSum.java
5188656ec8573ca23ca5c99d62e3d985b3966e67
[]
no_license
Sreek-Swarnapuri/CodingChallenges
21dee35d6d380547c4d70e895a13e08bc3a096bf
c99034d897ac5aa472a924750e560cc651bd2192
refs/heads/master
2023-04-19T07:13:18.370264
2021-05-05T06:32:37
2021-05-05T06:32:37
234,491,883
0
0
null
null
null
null
UTF-8
Java
false
false
1,363
java
package com.goldenstudios.codingchallenges.hackerrank.arrays.easy; import java.util.Scanner; public class HourGlassSum { static int hourGlassSum(int[][] arr){ int high = arr[0][0] + arr[0][1] + arr[0][2] +arr[1][1] +arr[2][0] + arr[2][1] + arr[2][2] ;; for(int i =0; i < 6; i++){ for(int j=0; j < 6 ; j++){ if((i+2)<6 && (j+2)<6){ int total = arr[i][j] + arr[i][j+1] + arr[i][j+2] +arr[i+1][j+1] +arr[i+2][j] + arr[i+2][j+1] + arr[i+2][j+2] ; if(total>high) high = total; } } } return high; } private static final Scanner scanner = new Scanner(System.in); public static void main(String[] args){ int[][] arr = new int[6][6]; for(int i =0; i<6; i++){ String[] arrRowItems = scanner.nextLine().split(" "); scanner.skip("(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?"); for(int j = 0; j<6; j++){ int arrItem = Integer.parseInt(arrRowItems[j]); arr[i][j] = arrItem; } int result = hourGlassSum(arr); } } }
[ "sreekar.swarnapuri@hotmail.com" ]
sreekar.swarnapuri@hotmail.com
86713804b647eed1d8f9170a05cc69c39f45105a
9554309f7b3f33ca912b54370f03cf0c3710d105
/app/src/main/java/com/lshl/ui/me/adapter/MeMenuItemAdapter.java
3cf29d748862d31be04a2cbe88cd57475901b682
[]
no_license
lvqingfeng/Lshl
ab490ffe492deba94f9522b71b829b8998b669eb
15ae1cdfd2155a6a04a20edf58107e5d9265d647
refs/heads/master
2021-07-09T21:42:34.913186
2017-10-10T09:34:01
2017-10-10T09:34:01
106,397,119
0
0
null
null
null
null
UTF-8
Java
false
false
5,863
java
package com.lshl.ui.me.adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.lshl.R; import com.lshl.base.BindingViewHolder; import com.lshl.bean.MenuItemBean; import com.lshl.databinding.MyMenuTypeOneBinding; import com.lshl.databinding.MyMenuTypeTwoBinding; import com.lshl.databinding.SpaceItemBinding; import java.util.ArrayList; import java.util.List; /** * 作者:吕振鹏 * 创建时间:10月22日 * 时间:10:35 * 版本:v1.0.0 * 类描述: * 修改时间: */ public class MeMenuItemAdapter extends RecyclerView.Adapter<BindingViewHolder> { /**** *砍掉的功能图标 R.drawable.ic_vector_project,R.drawable.ic_vector_recruit,R.drawable.ic_vector_dscs,R.drawable.ic_vector_me_recruit, * 对应的背景色R.drawable.bg_round_yellow, R.drawable.bg_round_green,R.drawable.bg_round_blue,, R.drawable.bg_round_green * */ private int[] mMenuIcon = {R.drawable.ic_vector_me_community, R.drawable.ic_vector_me_vip, R.drawable.ic_vector_me_settring, R.drawable.ic_vector_my_profile, R.drawable.ic_vector_my_wealth, R.drawable.ic_vector_my_coc, R.drawable.ic_vector_look_help, R.drawable.ic_vector_reputation, R.drawable.ic_vector_goods, R.drawable.ic_vector_talk}; private int[] mMenuBg = {R.drawable.bg_round_green, R.drawable.bg_round_yellow , R.drawable.bg_round_deep_blue , R.drawable.bg_round_cuilv , R.drawable.bg_round_deep_blue , R.drawable.bg_round_orange , R.drawable.bg_round_blue}; private static final int TYPE_ONE = 1; private static final int TYPE_TWO = 2; private static final int TYPE_SPACE = 3; private List<MenuItemBean> mListData; private Context mContext; private LayoutInflater mInflater; private int mHintItemPosition = -1; public MeMenuItemAdapter(Context context) { mInflater = LayoutInflater.from(context); mContext = context; mListData = new ArrayList<>(); initData(); } public void hintItem(int position) { mHintItemPosition = position; notifyDataSetChanged(); } private void initData() { String[] menuStr = mContext.getResources().getStringArray(R.array.me_menu); for (int i = 0; i < menuStr.length; i++) { MenuItemBean bean = new MenuItemBean(); bean.setMenuName(menuStr[i]); bean.setMenuRes(mMenuIcon[i]); if (i >= 3 && mMenuBg.length > i - 3) bean.setMenuBg(mMenuBg[i - 3]); mListData.add(bean); } } @Override public int getItemViewType(int position) { if (position < 3) { return TYPE_ONE; } else if (position == 3 || position == 7) { return TYPE_SPACE; } return TYPE_TWO; } @Override public BindingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { switch (viewType) { case TYPE_ONE: View rootOne = mInflater.inflate(R.layout.item_layout_me_menu_type_one, parent, false); return new ViewHolderTypeOne(rootOne); case TYPE_TWO: View rootTwo = mInflater.inflate(R.layout.item_layout_me_menu_type_two, parent, false); return new ViewHolderTypeTwo(rootTwo); case TYPE_SPACE: View rootView = mInflater.inflate(R.layout.item_layout_space, parent, false); return new ViewHoldeSpace(rootView); } return null; } @Override public void onBindViewHolder(BindingViewHolder holder, int position) { int viewType = getItemViewType(position); switch (viewType) { case TYPE_ONE: MyMenuTypeOneBinding oneBinding = ((ViewHolderTypeOne) holder).getBinding(); MenuItemBean itemOneBean = mListData.get(position); oneBinding.ivItemIcon.setImageResource(itemOneBean.getMenuRes()); oneBinding.tvItemName.setText(itemOneBean.getMenuName()); break; case TYPE_TWO: if (position != mHintItemPosition) { MyMenuTypeTwoBinding twoBinding = ((ViewHolderTypeTwo) holder).getBinding(); MenuItemBean itemTwoBean = null; if (position > 3 && position < 7) { itemTwoBean = mListData.get(position - 1); } else if (position > 7) { itemTwoBean = mListData.get(position - 2); } twoBinding.ivItemIcon.setImageResource(itemTwoBean.getMenuRes()); twoBinding.tvItemName.setText(itemTwoBean.getMenuName()); twoBinding.ivItemIcon.setBackgroundResource(itemTwoBean.getMenuBg()); } break; } } @Override public int getItemCount() { if (mHintItemPosition != -1) return mListData == null ? 0 : mListData.size() + 2 - 1; else return mListData == null ? 0 : mListData.size() + 2; } private class ViewHolderTypeOne extends BindingViewHolder<MyMenuTypeOneBinding> { ViewHolderTypeOne(View itemView) { super(MyMenuTypeOneBinding.bind(itemView)); } } private class ViewHolderTypeTwo extends BindingViewHolder<MyMenuTypeTwoBinding> { ViewHolderTypeTwo(View itemView) { super(MyMenuTypeTwoBinding.bind(itemView)); } } private class ViewHoldeSpace extends BindingViewHolder<SpaceItemBinding> { public ViewHoldeSpace(View view) { super(SpaceItemBinding.bind(view)); } } }
[ "imperial_nice@sina.com" ]
imperial_nice@sina.com
c216604b9b98c95a4a3b52098686580fae49d9de
518c63357694e7f50e91130156940c6634b7b766
/src/main/java/ua/ithillel/Homework6/transport/Passenger.java
bd990b090f34360fefc30baf9451673a62dc9ece
[]
no_license
chekhunov/HillelElem
085efcaebb04f1c8af29b3757cac33552cb81873
a283723b3af30bb668e5a5fbed2f7423bb4479ff
refs/heads/master
2022-07-30T13:03:17.241563
2019-09-30T16:36:23
2019-09-30T16:36:23
211,899,380
0
0
null
2022-06-21T01:58:23
2019-09-30T16:02:19
Java
UTF-8
Java
false
false
703
java
package Homework6.transport; import Homework6.interfaces.ITransport; public class Passenger extends Transport implements ITransport { private int numberOfSeats; public Passenger(String name, int consumptionFuel, int speed, int price, int numberOfSeats) { super(name, consumptionFuel, speed, price); this.numberOfSeats = numberOfSeats; } public int getNumberOfSeats() { return numberOfSeats; } public void setNumberOfSeats(int numberOfSeats) { this.numberOfSeats = numberOfSeats; } @Override public String toString() { return "Passenger{" + "numberOfSeats=" + numberOfSeats + '}'; } }
[ "scdesignk@gmail.com" ]
scdesignk@gmail.com
2739c28f72881a5c1e3ea413007faa669203c067
46dae33b62a3c9e64d912cf199c104552f97eaaa
/Source/org/jfree/chart/plot/RainbowPalette.java
c9b198d041f47f2cb1cbb01fd3251ede7f3bccdb
[]
no_license
lacedemonian/StockGrapher
6d7609cab32a868e481959efceb07d40ac404ead
06fa8916c09971947e5f1b683964ae3d34fa18df
refs/heads/master
2021-01-11T03:05:42.457420
2016-10-18T22:43:38
2016-10-18T22:43:38
71,095,788
0
0
null
null
null
null
UTF-8
Java
false
false
4,083
java
/* * Decompiled with CFR 0_115. */ package org.jfree.chart.plot; import java.io.Serializable; import org.jfree.chart.plot.ColorPalette; public class RainbowPalette extends ColorPalette implements Serializable { private static final long serialVersionUID = -1906707320728242478L; private int[] red = new int[]{255, 0, 120, 115, 111, 106, 102, 97, 93, 88, 84, 79, 75, 70, 66, 61, 57, 52, 48, 43, 39, 34, 30, 25, 21, 16, 12, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 10, 14, 19, 23, 28, 32, 37, 41, 46, 50, 55, 59, 64, 68, 73, 77, 82, 86, 91, 95, 100, 104, 109, 113, 118, 123, 127, 132, 136, 141, 145, 150, 154, 159, 163, 168, 172, 177, 181, 186, 190, 195, 199, 204, 208, 213, 217, 222, 226, 231, 235, 240, 244, 249, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; private int[] green = new int[]{255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 11, 15, 20, 24, 29, 33, 38, 42, 47, 51, 56, 60, 65, 69, 74, 78, 83, 87, 92, 96, 101, 105, 110, 114, 119, 123, 128, 132, 137, 141, 146, 150, 155, 159, 164, 168, 173, 177, 182, 186, 191, 195, 200, 204, 209, 213, 218, 222, 227, 231, 236, 241, 245, 250, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 248, 243, 239, 234, 230, 225, 221, 216, 212, 207, 203, 198, 194, 189, 185, 180, 176, 171, 167, 162, 158, 153, 149, 144, 140, 135, 131, 126, 122, 117, 113, 108, 104, 99, 95, 90, 86, 81, 77, 72, 68, 63, 59, 54, 50, 45, 41, 36, 32, 27, 23, 18, 14, 9, 5, 0}; private int[] blue = new int[]{255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 247, 242, 238, 233, 229, 224, 220, 215, 211, 206, 202, 197, 193, 188, 184, 179, 175, 170, 166, 161, 157, 152, 148, 143, 139, 134, 130, 125, 121, 116, 112, 107, 103, 98, 94, 89, 85, 80, 76, 71, 67, 62, 58, 53, 49, 44, 40, 35, 31, 26, 22, 17, 13, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; public RainbowPalette() { this.initialize(); } public void initialize() { this.setPaletteName("Rainbow"); this.r = new int[this.red.length]; this.g = new int[this.green.length]; this.b = new int[this.blue.length]; System.arraycopy(this.red, 0, this.r, 0, this.red.length); System.arraycopy(this.green, 0, this.g, 0, this.green.length); System.arraycopy(this.blue, 0, this.b, 0, this.blue.length); } }
[ "elijah.robinson@stu.bmcc.cuny.edu" ]
elijah.robinson@stu.bmcc.cuny.edu
e680f640a32c78d0d14b63bf68260dd8a491c13f
bb7bfee247bae32756d443f1a560f4801929c157
/org.eclipselabs.simpleocl.resource.simpleocl.ui/src-gen/org/eclipselabs/simpleocl/resource/simpleocl/ui/debug/SimpleoclDebugModelPresentation.java
5e0b519aabb9b12d2ef9b724478442e3ee397c0e
[]
no_license
dwagelaar/simpleocl
fd22fc6c7c0d766398912af17eb07037183f2ed9
264b444f0e3ccb6b034cd5152b37b57d44b0fdb9
refs/heads/master
2021-01-09T20:22:53.166997
2020-01-02T14:28:10
2020-01-02T14:28:10
63,477,702
3
1
null
null
null
null
UTF-8
Java
false
false
1,865
java
/** * <copyright> * </copyright> * * */ package org.eclipselabs.simpleocl.resource.simpleocl.ui.debug; public class SimpleoclDebugModelPresentation implements org.eclipse.debug.ui.IDebugModelPresentation { public SimpleoclDebugModelPresentation() { super(); } public void addListener(org.eclipse.jface.viewers.ILabelProviderListener listener) { // do nothing } public void dispose() { // do nothing } public boolean isLabelProperty(Object element, String property) { return false; } public void removeListener(org.eclipse.jface.viewers.ILabelProviderListener listener) { // do nothing } public org.eclipse.ui.IEditorInput getEditorInput(Object element) { if (element instanceof org.eclipse.core.resources.IFile) { return new org.eclipse.ui.part.FileEditorInput((org.eclipse.core.resources.IFile) element); } else if (element instanceof org.eclipse.debug.core.model.ILineBreakpoint) { return new org.eclipse.ui.part.FileEditorInput((org.eclipse.core.resources.IFile) ((org.eclipse.debug.core.model.ILineBreakpoint) element).getMarker().getResource()); } else { return null; } } public String getEditorId(org.eclipse.ui.IEditorInput input, Object element) { if (element instanceof org.eclipse.core.resources.IFile || element instanceof org.eclipse.debug.core.model.ILineBreakpoint) { return org.eclipselabs.simpleocl.resource.simpleocl.ui.SimpleoclUIPlugin.EDITOR_ID; } return null; } public void setAttribute(String attribute, Object value) { // not supported } public org.eclipse.swt.graphics.Image getImage(Object element) { return null; } public String getText(Object element) { return null; } public void computeDetail(org.eclipse.debug.core.model.IValue value, org.eclipse.debug.ui.IValueDetailListener listener) { // listener.detailComputed(value, "detail"); } }
[ "dwagelaar@gmail.com" ]
dwagelaar@gmail.com
998c084de8ac21121be1aaddf33e1fb8964aa63d
2cc99428c4421ad28eeaea13f2d05048f718f75d
/app/src/main/java/com/example/asus/yarafirstproject/retrofit/model/User.java
46750b7dc27995d5fd15c89a818ffd25b46c05b0
[ "MIT" ]
permissive
NaarGes/Android-YaraTechTest
1fec61123ef19a9cb2a5ae889f675f1c20412b38
5043af21c8b3faaea62286920ab3e405dfe2f459
refs/heads/master
2020-03-24T21:09:01.856860
2018-08-06T07:04:25
2018-08-06T07:04:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,852
java
package com.example.asus.yarafirstproject.retrofit.model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class User { @SerializedName("id") @Expose private Integer id; @SerializedName("name") @Expose private String name; @SerializedName("username") @Expose private String username; @SerializedName("email") @Expose private String email; @SerializedName("address") @Expose private Address address; @SerializedName("phone") @Expose private String phone; @SerializedName("website") @Expose private String website; @SerializedName("company") @Expose private Company company; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } 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 Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getWebsite() { return website; } public void setWebsite(String website) { this.website = website; } public Company getCompany() { return company; } public void setCompany(Company company) { this.company = company; } }
[ "narges.sadeghi73@gmail.com" ]
narges.sadeghi73@gmail.com
aff0c09793ebc4ee02675818874866cdde9afd8a
5029bf02bd5d5c5d7af19c7fe68020c8cafc3510
/domain-base/src/main/java/net/pkhapps/hexagonal/domain/base/annotation/SpecificationFactory.java
ca0f2781657fb928d7b78c649f4b2b2c502271e3
[ "Apache-2.0" ]
permissive
peholmst/hexagonal-base
6d2805bb3965d508e75303fad485d0b039b48f95
f400e52eb3d8a9b8f674bc27b2aaba45d8176bc7
refs/heads/main
2023-01-23T02:51:53.842105
2020-11-27T13:02:36
2020-11-27T13:02:36
316,056,847
2
1
null
null
null
null
UTF-8
Java
false
false
1,565
java
/* * Copyright 2020 Petter Holmström * * 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 net.pkhapps.hexagonal.domain.base.annotation; import org.springframework.stereotype.Component; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Specialization of the {@link Component} annotation indicating that the annotated bean is a * {@linkplain org.springframework.data.jpa.domain.Specification specification} factory. Specification factories * are used to build specifications that in turn are used when querying * {@linkplain net.pkhapps.hexagonal.domain.base.BaseRepository repositories}. The factory methods are instance methods * in order to make them mockable during testing (as opposed to having them as static factory methods in a * non-instantiable utility class). */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Component public @interface SpecificationFactory { String value() default ""; }
[ "petter.holmstrom@outlook.com" ]
petter.holmstrom@outlook.com
eebd97357d9c294b03f4888fd9a114284511893a
470917f620a01d8571716653ad410cdb3f26eac7
/java/com/google/devtoolsdriver/devtools/Page.java
e4e3e70a6d8a4f98cd2537e20398ef713153d42f
[ "Apache-2.0" ]
permissive
johspaeth/devtools-driver
1581c7a7c2a08cbb140affc83a716cd1d9d009e9
9df65bd9f68f735bc4b510fd1b3841d647a8b171
refs/heads/master
2020-07-02T20:44:28.983314
2017-08-18T17:19:54
2017-08-18T17:19:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,497
java
// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.devtoolsdriver.devtools; import static com.google.devtoolsdriver.devtools.DevtoolsDomain.PAGE; import javax.json.JsonObject; /** * Factory for messages in the devtools Page domain. For a specification of this domain's methods, * see the <a href="https://chromedevtools.github.io/debugger-protocol-viewer/tot/Page/">debugging * protocol viewer</a>. Note that not all the domain's methods have been implemented yet. */ public final class Page { private static DevtoolsCommand command(String methodSuffix) { return new DevtoolsCommand.NoOptionals(PAGE.methodName(methodSuffix)); } public static DevtoolsCommand enable() { return command("enable"); } public static DevtoolsCommand disable() { return command("disable"); } public static DevtoolsCommand addScriptToEvaluateOnLoad(String scriptSource) { return command("addScriptToEvaluateOnLoad").with("scriptSource", scriptSource); } public static DevtoolsCommand removeScriptToEvaluateOnLoad(String identifier) { return command("removeScriptToEvaluateOnLoad").with("identifier", identifier); } public static DevtoolsCommand setAutoAttachToCreatedPages(boolean autoAttach) { return command("setAutoAttachToCreatedPages").with("autoAttach", autoAttach); } /** A fluent Devtools command that exposes the ability to add optional properties */ public static final class ReloadCommand extends DevtoolsCommand.WithOptionals<ReloadCommand> { private ReloadCommand() { super(PAGE.methodName("reload")); } private ReloadCommand(JsonObject command) { super(PAGE.methodName("reload"), command); } public ReloadCommand withIgnoreCache(boolean ignoreCache) { return with("ignoreCache", ignoreCache); } public ReloadCommand withScriptToEvaluateOnLoad(String scriptToEvaluateOnLoad) { return with("scriptToEvaluateOnLoad", scriptToEvaluateOnLoad); } @Override ReloadCommand create(JsonObject params) { return new ReloadCommand(params); } } public static ReloadCommand reload() { return new ReloadCommand(); } public static DevtoolsCommand navigate(String url) { return command("navigate").with("url", url); } public static DevtoolsCommand getNavigationHistory() { return command("getNavigationHistory"); } public static DevtoolsCommand navigateToHistoryEntry(int entryId) { return command("navigateToHistoryEntry").with("entryId", entryId); } /** Moved to Network in the latest tip-of-tree */ public static DevtoolsCommand getCookies() { return command("getCookies"); } /** Moved to network in the latest tip-of-tree */ public static DevtoolsCommand deleteCookie(String cookieName, String url) { return command("deleteCookie").with("cookieName", cookieName).with("url", url); } public static DevtoolsCommand getResourceTree() { return command("getResourceTree"); } public static DevtoolsCommand getResourceContent(String frameId, String url) { return command("getResourceContent").with("url", url).with("frameId", frameId); } /** A fluent Devtools command that exposes the ability to add optional properties */ public static final class SearchInResourceCommand extends DevtoolsCommand.WithOptionals<SearchInResourceCommand> { private SearchInResourceCommand() { super(PAGE.methodName("searchInResource")); } private SearchInResourceCommand(JsonObject params) { super(PAGE.methodName("searchInResource"), params); } public SearchInResourceCommand withCaseSensitive(boolean caseSensitive) { return with("caseSensitive", caseSensitive); } public SearchInResourceCommand withIsRegex(boolean isRegex) { return with("isRegex", isRegex); } @Override SearchInResourceCommand create(JsonObject params) { return new SearchInResourceCommand(params); } } public static SearchInResourceCommand searchInResource(String frameId, String url, String query) { return new SearchInResourceCommand() .with("frameId", frameId) .with("url", url) .with("query", query); } public static DevtoolsCommand setDocumentContent(String frameId, String html) { return command("setDocumentContent").with("frameId", frameId).with("html", html); } public static DevtoolsCommand captureScreenshot() { return command("captureScreenshot"); } /** A fluent Devtools command that exposes the ability to add optional properties */ public static final class StartScreencastCommand extends DevtoolsCommand.WithOptionals<StartScreencastCommand> { private StartScreencastCommand() { super(PAGE.methodName("startScreencast")); } private StartScreencastCommand(JsonObject command) { super(PAGE.methodName("startScreencast"), command); } public StartScreencastCommand withFormat(String format) { return with("format", format); } public StartScreencastCommand withQuality(long quality) { return with("quality", quality); } public StartScreencastCommand withMaxHeight(long maxHeight) { return with("maxHeight", maxHeight); } public StartScreencastCommand withEveryNthFrame(long everyNthFrame) { return with("everyNthFrame", everyNthFrame); } @Override StartScreencastCommand create(JsonObject params) { return new StartScreencastCommand(params); } } public static StartScreencastCommand startScreencast() { return new StartScreencastCommand(); } public static DevtoolsCommand stopScreencast() { return command("stopScreencast"); } public static DevtoolsCommand screencastFrameAck(int sessionId) { return command("screencastFrameAck").with("sessionId", sessionId); } /** A fluent Devtools command that exposes the ability to add optional properties */ public static final class HandleJavaScriptDialogCommand extends DevtoolsCommand.WithOptionals<HandleJavaScriptDialogCommand> { private HandleJavaScriptDialogCommand() { super(PAGE.methodName("handleJavaScriptDialog")); } private HandleJavaScriptDialogCommand(JsonObject params) { super(PAGE.methodName("handleJavaScriptDialog"), params); } public HandleJavaScriptDialogCommand withPromptText(String promptText) { return with("promptText", promptText); } @Override HandleJavaScriptDialogCommand create(JsonObject params) { return new HandleJavaScriptDialogCommand(params); } } public static HandleJavaScriptDialogCommand handleJavaScriptDialog(boolean accept) { return new HandleJavaScriptDialogCommand().with("accept", accept); } public static DevtoolsCommand setColorPickerEnabled(boolean enabled) { return command("setColorPickerEnabled").with("enabled", enabled); } /** A fluent Devtools command that exposes the ability to add optional properties */ public static final class SetOverlayMessageCommand extends DevtoolsCommand.WithOptionals<SetOverlayMessageCommand> { private SetOverlayMessageCommand() { super(PAGE.methodName("setOverlayMessage")); } private SetOverlayMessageCommand(JsonObject command) { super(PAGE.methodName("setOverlayMessage"), command); } public SetOverlayMessageCommand withMessage(String message) { return with("message", message); } @Override SetOverlayMessageCommand create(JsonObject command) { return new SetOverlayMessageCommand(command); } } public static SetOverlayMessageCommand setOverlayMessage() { return new SetOverlayMessageCommand(); } public static DevtoolsCommand getAppManifest() { return command("getAppManifest"); } public static DevtoolsCommand setBlockedEventsWarningThreshold(long threshold) { return command("setBlockedEventsWarningThreshold").with("threshold", threshold); } private Page() {} }
[ "cltsd27@gmail.com" ]
cltsd27@gmail.com
54ea0a6522c11faa89bd4965fac649d148ac7528
2ae6aa7ddc95cd56554a28c7039b51b2a9c52bb1
/src/com/societe/projet/alphabets/datas/AlphabetDatas.java
86063526a408fcbb6bae47cc28a72d0fb302b905
[]
no_license
JeremieFrc/asciiArtV2
02a12fea416918a7a31a1ad058262aa89335a810
51099aedc5510a7357a369fb4162350decdb400a
refs/heads/master
2020-04-01T18:54:34.937354
2018-10-17T21:43:43
2018-10-17T21:43:43
153,523,140
0
0
null
null
null
null
UTF-8
Java
false
false
21,745
java
package com.societe.projet.alphabets.datas; public class AlphabetDatas { public static final String[] DEFAULT_ASCII_ART = { " # ## ## ## ### ### ## # # ### ## # # # # # ### # ## # ## ## ### # # # # # # # # # # ### ### ", "# # # # # # # # # # # # # # # # # ### # # # # # # # # # # # # # # # # # # # # # # # # ", "### ## # # # ## ## # # ### # # ## # ### # # # # ## # # ## # # # # # # ### # # # ## ", "# # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ### # # # # " ,"# # ## ## ## ### # ## # # ### # # # ### # # # # # # # # # ## # ### # # # # # # ### # "}; public static final String [] DEFAULT_ASCII_ART2 = { " # ## ## ## ### ### ## # # ### ## # # # # # ### # ## # ## ## ### # # # # # # # # # # ### ### " , "# # # # # # # # # # # # # # # # # ### # # # # # # # # # # # # # # # # # # # # # # # # " , "### ## # # # ## ## # # ### # # ## # ### # # # # ## # # ## # # # # # # ### # # # ## " , "# # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ### # # # # " , "# # ## ## ## ### # ## # # ### # # # ### # # # # # # # # # ## # ### # # # # # # ### # "}; public static final String [] DEFAULT_ASCII_ART3 = { " .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .-----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .-----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. ", " | .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |", " | | | || | _ _ | || | _ _ | || | __ | || | ___ | || | _ | || | __ | || | __ | || | _ | || | _ | || | | || | | || | | || | __ | || | ____ | || | __ | || | _____ | || | ______ | || | _ _ | || | _______ | || | ______ | || | _______ | || | ____ | || | ______ | || | | || | | || | _ | || | | || | _ | || | ______ | || | ____ | || | __ | || | ______ | || | ______ | || | ________ | || | _________ | || | _________ | || | ______ | || | ____ ____ | || | _____ | || | _____ | || | ___ ____ | || | _____ | || | ____ ____ | || | ____ _____ | || | ____ | || | ______ | || | ___ | || | _______ | || | _______ | || | _________ | || | _____ _____ | || | ____ ____ | || | _____ _____ | || | ____ ____ | || | ____ ____ | || | ________ | || | ___ | || | ___ | || | ___ | || | | || | | || | __ | || | ______ | || | ______ | || | ________ | || | _________ | || | _________ | || | ______ | || | ____ ____ | || | _____ | || | _____ | || | ___ ____ | || | _____ | || | ____ ____ | || | ____ _____ | || | ____ | || | ______ | || | ___ | || | _______ | || | _______ | || | _________ | || | _____ _____ | || | ____ ____ | || | _____ _____ | || | ____ ____ | || | ____ ____ | || | ________ | || | __ | || | _ | || | __ | || | | |", " | | _ | || | | || | | || | _| || |_ | || | _ / / | || | .' _ '. | || | | | | || | .' _| | || | |_ `. | || | /\\| |/\\ | || | | | | || | | || | | || | | || | / / | || | .' '. | || | / | | || | / ___ `. | || | / ____ `. | || | | | | | | || | | _____| | || | .' ____ \\ | || | | ___ | | || | .' __ '. | || | .' ____ '. | || | _ | || | _ | || | / / | || | ______ | || | \\ \\ | || | / _ __ `. | || | .' __ \\ | || | / \\ | || | |_ _ \\ | || | .' ___ | | || | |_ ___ `. | || | |_ ___ | | || | |_ ___ | | || | .' ___ | | || | |_ || _| | || | |_ _| | || | |_ _| | || | |_ ||_ _| | || | |_ _| | || ||_ \\ / || || ||_ \\|_ _| | || | .' `. | || | |_ __\\ | || | .' '. | || | |_ __ \\ | || | / ___ | | || | | _ _ | | || ||_ _||_ _|| || ||_ _| |_ _| | || ||_ _||_ _| | || | |_ _||_ _|| || | |_ _||_ _| | || | | __ _| | || | | _| | || | |_ | | || | / _ \\ | || | | || | __ | || | / \\ | || | |_ _ \\ | || | .' ___ | | || | |_ ___ `. | || | |_ ___ | | || | |_ ___ | | || | .' ___ | | || | |_ || _| | || | |_ _| | || | |_ _| | || | |_ ||_ _| | || | |_ _| | || ||_ \\ / | | || ||_ \\|_ _|| || | .' `. | || | |_ __ \\ | || | .' '. | || | |_ __ \\ | || | / ___ | | || | | _ _ | | || ||_ _||_ _|| || ||_ _| |_ _| | || ||_ _||_ _|| || | |_ _||_ _| | || | |_ _||_ _| | || | | __ _| | || | .' _/ | || | | | | || | \\_ `. | || | ___.-. | |", " | | | | | || | \\_|\\_| | || | |_| || |_| | || | (_)/ / | || | | (_) '___ | || | \\_| | || | | | | || | | | | || | \\ / | || | ___| |___ | || | | || | ______ | || | | || | / / | || | | .--. | | || | `| | | || | |_/___) | | || | `' __) | | || | | |__| |_ | || | | |____ | || | | |____\\_| | || | |_/ / / | || | | (__) | | || | | (____) | | || | (_) | || | (_) | || | / / | || | |______| | || | \\ \\ | || | |_/____) | | || | / .' \\ | | || | / /\\ \\ | || | | |_) | | || | / .' \\_| | || | | | `.\\ | || | | |_ \\_| | || | | |_ \\_| | || | / .' \\_| | || | | |__| | | || | | | | || | | | | || | | |_/ / | || | | | | || | | \\/ | | || | | \\ | | | || | / .--. \\ | || | | |__) | | || | / .-. \\ | || | | |__) | | || | | (__ \\_| | || | |_/ | | \\_| | || | | | | | | || | \\ \\ / / | || | | | /\\ | | | || | \\ \\ / /| || | \\ \\ / / | || | |_/ / / | || | | | | || | | | | || | |_/ \\_| | || | | || | | | | || | / /\\ \\ | || | | |_) | | || | / .' \\_| | || | | | `.\\ | || | | |_ \\_| | || | | |_ \\_| | || | / .' \\_| | || | | |__| | | || | | | | || | | | | || | | |_/ / | || | | | | || | | \\/ | | || | | \\ | | | || | / .--. \\ | || | | |__) | | || | / .-. \\ | || | | |__) | | || | | (__ \\_| | || | |_/ | | \\_| | || | | | | | | || | \\ \\ / / | || | | | /\\ | | | || | \\ \\ // | || | \\ \\ / / | || | |_/ / / | || | | | | || | | | | || | | | | || | | ___| | |", " | | | | | || | | || | |_| || |_| | || | / / _ | || | .`___'/ _/ | || | | || | | | | || | | | | || | |_ _| | || | |___ ___| | || | | || | |______| | || | | || | / / | || | | | | | | || | | | | || | .'____.' | || | _ |__ '. | || | |____ _| | || | '_.____''. | || | | '____`'. | || | / / | || | .`____'. | || | '_.____. | | || | _ | || | _ | || | < < | || | ______ | || | > > | || | / ___.' | || | | | (_/ | | || | / ____ \\ | || | | __'. | || | | | | || | | | | | | || | | _| _ | || | | _| | || | | | ____ | || | | __ | | || | | | | || | _ | | | || | | __'. | || | | | _ | || | | |\\ /| | | || | | |\\\\| | | || | | | | | | || | | ___/ | || | | | | | | || | | __ / | || | '.___`-. | || | | | | || | | ' ' | | || | \\ \\ / / | || | | |/ \\| | | || | > `' < | || | \\ \\/ / | || | .'.' _ | || | | | | || | | | | || | | || | | || | \\_| | || | / ____ \\ | || | | __'. | || | | | | || | | | | | | || | | _| _ | || | | _| | || | | | ____ | || | | __ | | || | | | | || | _ | | | || | | __'. | || | | | _ | || | | |\\ /| | | || | | |\\\\| | | || | | | | | | || | | ___/ | || | | | | | | || | | __ / | || | '.___`-. | || | | | | || | | ' ' | | || | \\ \\ / / | || | | |/ \\| | | || | > `' < | || | \\ \\/ / | || | .'.' _ | || | < < | || | | | | || | > > | || | '-' | |", " | | | | | || | | || | |_||_| | || | / / (_) | || | | (___) \\_ | || | | || | | |_ | || | _| | | || | / \\ | || | | | | || | _ | || | | || | _ | || | / / | || | | `--' | | || | _| |_ | || | / /____ | || | | \\____) | | || | _| |_ | || | | \\____) | | || | | (____) | | || | / / | || | | (____) | | || | | \\____| | | || | (_) | || | | ) | || | \\ \\ | || | |______| | || | / / | || | |_| | || | \\ `.__.'\\ | || | _/ / \\ \\| || | _| |__) | | || | \\ `.___.'\\| || | _| |___.' / | || | _| |___/ | | || | _| |_ | || | \\ `.___] _| | || | _| | | |_ | || | _| |_ | || | | |_' | | || | _| |\\ \\_ | || | _| |__/ | | || | _| |_\\/_| |_| || | _| |_\\ |_ | || | \\ `--' / | || | _| |_ | || | \\ `-' \\_ | || | _| | \\\\_ | || | |`\\____) | | || | _| |_ | || | \\ `--' / | || | \\ ' / | || | | /\\ | | || | _/ /'`\\ \\| || | _| |_ | || | _/ /__/ | | || | | |_ | || | _| | | || | | || | | || | | || | _/ / \\ \\| || | _| |__) | | || | \\ `.___.'\\| || | _| |___.' / | || | _| |___/ | | || | _| |_ | || | \\ `.___] _| | || | _| | | |_ | || | _| |_ | || | | |_' | | || | _| |\\ \\_ | || | _| |__/ | | || | _| |_\\/_| |_| || | _| |_\\ |_ | || | \\ `--' / | || | _| |_ | || | \\ `-' \\_ | || | _| | \\ \\_ | || | |`\\____) | | || | _| |_ | || | \\ `--' / | || | \\ ' / | || | | /\\ | | || | _/ /'`\\\\_ | || | _| |_ | || | _/ /__/ | | || | | |_ | || | | | | || | _| | | || | | |", " | | |_| | || | | || | | || | /_/ | || | `._____.\\__|| || | | || | `.__| | || | |__,' | || | \\/|_|\\/ | || | |_| | || | )_/ | || | | || | (_) | || | /_/ | || | '.____.' | || | |_____| | || | |_______| | || | \\______.' | || | |_____| | || | \\______.' | || | '.______.' | || | /_/ | || | `.______.' | || | \\______,' | || | | || | )/ | || | \\_\\ | || | | || | /_/ | || | (_) | || | `.___ .' | || ||____| |____|| || | |_______/ | || | `._____.' | || | |________.' | || | |_________| | || | |_____| | || | `._____.' | || | |____||____| | || | |_____| | || | `.___.' | || | |____||____| | || | |________| | || ||_____||_____|| || ||_____|\\____|| || | `.____.' | || | |_____| | || | `.___.\\__| | || | |____| |___| | || | |_______.' | || | |_____| | || | `.__.' | || | \\_/ | || | |__/ \\__| | || | |____||____|| || | |______| | || | |________| | || | |___| | || | |___| | || | | || | _______ | || | | || ||____| |____|| || | |_______/ | || | `._____.' | || | |________.' | || | |_________| | || | |_____| | || | `._____.' | || | |____||____| | || | |_____| | || | `.___.' | || | |____||____| | || | |________| | || ||_____||_____|| || ||_____|\\____|| || | `.____.' | || | |_____| | || | `.___.\\__| | || | |____| |___| | || | |_______.' | || | |_____| | || | `.__.' | || | \\_/ | || | |__/ \\__| | || | |____||____| | || | |______| | || | |________| | || | `.__\\ | || | |_| | || | /__.' | || | | |", " | | (_) | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | |_______| | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | |", " | '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |", " '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' " }; }
[ "ferlayjeremie@gmail.com" ]
ferlayjeremie@gmail.com
5a78251bce6243e199a30031177f0217c4c4914f
948315d14076b9dec52c8369dff29fce9d40356a
/InterviewBit/RainWaterTrapped.java
121d28f69989c9a93fd53464e953fbd392e64e9d
[]
no_license
Abhi464/Algorithms
515b6629e37b1cfc45ae6ea7c8d2421e9051045f
69cdb3fab2acc8b5eeb31bec00bc8e5e22a1b6bf
refs/heads/master
2022-11-10T14:35:30.478578
2022-10-30T22:45:56
2022-10-30T22:45:56
112,111,471
0
2
null
2022-10-30T22:45:57
2017-11-26T19:45:40
Java
UTF-8
Java
false
false
596
java
public class RainWaterTrapped{ public int trap(final int[] A) { int[] left = new int[A.length]; int[] right = new int[A.length]; left[0] = A[0]; for(int i = 1 ; i < A.length ; i++){ left[i] = Math.max( left[i-1],A[i] ); } right[A.length-1] = A[A.length-1]; for(int i = A.length-2 ; i >= 0 ; i--){ right[i] = Math.max(right[i+1],A[i]); } int water = 0; for(int i = 0 ;i < A.length ; i++){ water += Math.min( left[i],right[i] )-A[i]; } return water; } }
[ "abhishek.rai@abhishekrai.local" ]
abhishek.rai@abhishekrai.local
69497dccc0ef1173496e3ceaef86add395ffed1f
97f3db236b6abd94ad459cd505dda87798e36fcc
/src/AutomationScripts.java
0c1b330d1606231b61605cbde7a87aa5959bb60d
[]
no_license
lavanyareddy512/mysfdcgit1
81cf7e2a62ea3b65a7b08282c3db0e1fac57b1a9
838834b44b85b05d1d79232f6264696369ee0cf6
refs/heads/master
2022-02-21T13:21:32.661100
2019-07-22T17:24:27
2019-07-22T17:24:27
198,269,049
0
0
null
null
null
null
UTF-8
Java
false
false
10,485
java
import java.io.IOException; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import com.relevantcodes.extentreports.LogStatus; public class AutomationScripts extends ReusableMethods { public static void main(String[] args) throws InterruptedException, IOException { TC1_loginErrorMessage(); TC2_loginToSalesforce(); TC3_checkRememberMe(); TC4A_forgotPasswordLink(); TC4B_forgotPasswordWrongPassword(); TC5_userDropdown(); } public static void logger() { ReusableMethods.report.endTest(logger); ReusableMethods.report.flush(); } public static void login() throws InterruptedException { //Enter Username WebElement userName = driver.findElement(By.xpath("//input[@id='username']")); enterText(userName, "mike.arnhold123-xnjq@force.com", "User Name"); //Enter Password WebElement password = driver.findElement(By.xpath("//input[@id='password']")); enterText(password, "arnhold@123", "Password"); //Click on login button WebElement loginButton = driver.findElement(By.xpath("//input[@id='Login']")); clickButton(loginButton, "Login Button"); } public static void TC1_loginErrorMessage() throws InterruptedException, IOException { createTestScriptReport("TC1_loginErrorMessage"); initializeDriver(); String[][] data = readXlData("C:\\myProject\\GIT\\SFDC_Testing_Excel_Data\\TC1_loginErrorMessage.xls","Sheet1"); String url = data[1][1]; String userNameData = data[1][2]; //String passwordData = data[1][3]; String passwordData = null; launchURL(); Thread.sleep(3000); //Enter Username WebElement userName = driver.findElement(By.xpath("//input[@id='username']")); enterText(userName, userNameData, "User Name"); //Enter Password //WebElement password = driver.findElement(By.xpath("//input[@id='password']")); //enterText(password, passwordData, "Password"); //Click on login button WebElement loginButton = driver.findElement(By.xpath("//input[@id='Login']")); clickButton(loginButton, "Login Button"); Thread.sleep(5000); //Validating Error Message WebElement errorMessage = driver.findElement(By.xpath("//div[@id='error']")); validateTextMessage(errorMessage, "Please enter your password.", "Error Message forEmpty password."); //Thread.sleep(5000); //Qutting/Closing the Web browser Window //driver.quit(); driver.close(); //Logging Reports System.out.println("Test case Executed. Unable to login to Salesforce Application."); logger.log(LogStatus.PASS, "Test case Executed. Unable to login to Salesforce Application."); System.out.println("TC1_loginErrorMessage is completed"); //logger.log(LogStatus.INFO, "TC1_loginErrorMessage is completed"); logger(); } public static void TC2_loginToSalesforce() throws InterruptedException, IOException { createTestScriptReport("TC2_loginToSalesforce"); initializeDriver(); String[][] data = readXlData("C:\\myProject\\GIT\\SFDC_Testing_Excel_Data\\TC2_loginToSalesforce.xls","Sheet1"); String url = data[1][1]; String userNameData = data[1][2]; String passwordData = data[1][3]; launchURL(); Thread.sleep(3000); //Enter Username WebElement userName = driver.findElement(By.xpath("//input[@id='username']")); enterText(userName, userNameData, "User Name"); //Enter Password WebElement password = driver.findElement(By.xpath("//input[@id='password']")); enterText(password, passwordData, "Password"); //Click on login button WebElement loginButton = driver.findElement(By.xpath("//input[@id='Login']")); clickButton(loginButton, "Login Button"); Thread.sleep(5000); //Qutting/Closing the Web browser Window //driver.quit(); driver.close(); //Logging Reports System.out.println("Test case Executed. Logged into Salesforce Application Successfully."); logger.log(LogStatus.PASS, "Test case Executed. Logged into Salesforce Application Successfully."); System.out.println("TC2_loginToSalesforce is completed"); //logger.log(LogStatus.INFO, "TC2_loginToSalesforce is completed"); logger(); } public static void TC3_checkRememberMe() throws InterruptedException, IOException { createTestScriptReport("TC3_checkRememberMe"); initializeDriver(); String[][] data = readXlData("C:\\myProject\\GIT\\SFDC_Testing_Excel_Data\\TC2_loginToSalesforce.xls","Sheet1"); String url = data[1][1]; String userNameData = data[1][2]; String passwordData = data[1][3]; launchURL(); Thread.sleep(3000); //Enter Username WebElement userName = driver.findElement(By.xpath("//input[@id='username']")); enterText(userName, userNameData, "User Name"); //Enter Password WebElement password = driver.findElement(By.xpath("//input[@id='password']")); enterText(password, passwordData, "Password"); //selecting the RememberMe CheckBox WebElement rememberMeCheckBox = driver.findElement(By.xpath("//input[@id='rememberUn']")); selectCheckBox(rememberMeCheckBox, "Remember Me Checkbox"); Thread.sleep(5000); //Click on login button WebElement loginButton = driver.findElement(By.xpath("//input[@id='Login']")); clickButton(loginButton, "Login Button"); Thread.sleep(5000); //Select User Dropdown WebElement userDropdown = driver.findElement(By.xpath("//span[@id='userNavLabel']")); selectDropdown(userDropdown, "userDropdown Menu"); //Click on logout button WebElement userLogout = driver.findElement(By.xpath("//a[contains(text(),'Logout')]")); clickButton(userLogout, "Logout from User Dropdown"); Thread.sleep(5000); /* WebElement promptAlertButton = driver.findElement(By.id("tryLexDialogX")); promptAlertButton.click(); */ //Qutting/Closing the Web browser Window //driver.quit(); driver.close(); //Logging Reports System.out.println("Test case Executed. Username is saved in Browser"); logger.log(LogStatus.PASS, "Test case Executed. Username is saved in Browser"); System.out.println("TC3_checkRememberMe is completed"); //logger.log(LogStatus.INFO, "TC3_checkRememberMe is completed"); logger(); } public static void TC4A_forgotPasswordLink() throws InterruptedException, IOException { createTestScriptReport("TC4A_forgotPasswordLink"); initializeDriver(); String[][] data = readXlData("C:\\myProject\\GIT\\SFDC_Testing_Excel_Data\\TC4A_forgotPasswordLink.xls","Sheet1"); String userNameData = data[1][0]; launchURL(); Thread.sleep(3000); //Enter Username WebElement userName = driver.findElement(By.xpath("//input[@id='username']")); enterText(userName, userNameData, "User Name"); //Click on ForgotPassword Link WebElement forgotPassword = driver.findElement(By.xpath("//a[@id='forgot_password_link']")); clickLink(forgotPassword, "Forgot Password Link"); //Enter Username/Email Id to send the Password Link WebElement uName = driver.findElement(By.xpath("//input[@id='un']")); enterText(uName, userNameData, "User Name/Emaild to send the Password Reset Link"); //Click on Continue Button WebElement Continue = driver.findElement(By.xpath("//input[@id='continue']")); clickButton(Continue, "Continue Button to send the Password Reset Link"); //Click on Cancel Button //WebElement Cancel = driver.findElement(By.xpath("//a[@class='secondary button fiftyfifty mb16']")); //clickButton(Cancel, "Cancel Button to Reset Password"); //Qutting/Closing the Web browser Window //driver.quit(); driver.close(); //Logging Reports System.out.println("Test case Executed. Password Rest Link has been sent to Email ID"); logger.log(LogStatus.PASS, "Test case Executed. Password Rest Link has been sent to Email ID"); System.out.println("TC4A_forgotPasswordLink is completed"); //logger.log(LogStatus.INFO, "TC4A_forgotPasswordLink is completed"); logger(); } public static void TC4B_forgotPasswordWrongPassword() throws InterruptedException, IOException { createTestScriptReport("TC4B_forgotPasswordWrongPassword"); initializeDriver(); String[][] data = readXlData("C:\\myProject\\GIT\\SFDC_Testing_Excel_Data\\TC4B_forgotPasswordWrongPassword.xls","Sheet1"); String url = data[1][1]; String userNameData = data[1][1]; String passwordData = data[1][2]; launchURL(); Thread.sleep(3000); //Enter Username WebElement userName = driver.findElement(By.xpath("//input[@id='username']")); enterText(userName, userNameData, "User Name"); //Enter Password WebElement password = driver.findElement(By.xpath("//input[@id='password']")); enterText(password, passwordData, "Password"); //Click on login button WebElement loginButton = driver.findElement(By.xpath("//input[@id='Login']")); clickButton(loginButton, "Login Button"); Thread.sleep(5000); //Validating Error Message WebElement errorMessage = driver.findElement(By.xpath("//div[@id='error']")); String expectedMessage = "Please check your username and password. If you still can't log in, contact your Salesforce administrator."; Thread.sleep(5000); validateTextMessage(errorMessage, expectedMessage, "Error Message for wrong user name and password"); //Qutting/Closing the Web browser Window //driver.quit(); driver.close(); //Logging Reports System.out.println("Test case Executed. Error Message for wrong user name and password is validated"); logger.log(LogStatus.PASS, "Test case Executed. Error Message for wrong user name and password is validated"); System.out.println("TC4B_forgotPasswordWrongPassword is completed"); //logger.log(LogStatus.INFO, "TC4B_forgotPasswordWrongPassword is completed"); logger(); } public static void TC5_userDropdown() throws InterruptedException { createTestScriptReport("TC5_userDropdown"); initializeDriver(); launchURL(); Thread.sleep(3000); login(); Thread.sleep(5000); //Select User Dropdown WebElement userDropdown = driver.findElement(By.xpath("//span[@id='userNavLabel']")); selectDropdown(userDropdown, "userDropdown Menu"); //Qutting/Closing the Web browser Window //driver.quit(); driver.close(); //Logging Reports System.out.println("Test case Executed. Selected Userdropdown Menu."); logger.log(LogStatus.PASS, "Test case Executed. Selected Userdropdown Menu."); System.out.println("TC05_UserMenuDropDown is completed"); //logger.log(LogStatus.INFO, "TC05_UserMenuDropDown is completed"); logger(); } }
[ "lavanyareddy512@gmail.com" ]
lavanyareddy512@gmail.com
3e2f509fd31b591aeacc3fed7fa2dedfe5a24929
bfb76febd4f6b12ab554a0c8fef6900cd5af1ee9
/app/src/main/java/github/com/mrkenitvnn/multipleviewholder/MysteryBookItem.java
17cf9336c2ca04e7f1f9815feab724395e454a70
[]
no_license
mozaa-vn/MultipleViewHolder
0a7bad906c7e3541e728dbdf3d580427cea44c8b
a9a47b00848efc6af1bd021cdd833d384c8cd587
refs/heads/master
2021-06-23T06:00:51.146094
2017-07-21T09:38:49
2017-07-21T09:38:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
466
java
package github.com.mrkenitvnn.multipleviewholder; import com.google.auto.value.AutoValue; import github.com.mrkenitvnn.multipleviewholder.adapter.Item; import github.com.mrkenitvnn.multipleviewholder.entities.MysteryBook; @AutoValue public abstract class MysteryBookItem implements Item { public static MysteryBookItem instance (MysteryBook book) { return new AutoValue_MysteryBookItem(book); } public abstract MysteryBook mysteryBook (); }
[ "mry.nsth@yahoo.com" ]
mry.nsth@yahoo.com
747f0ee63160f0267d6b2b8542fa913f77dbb329
39868b82f14f3dd78bbd7c42c8f0470506e9afea
/GPPets_hw10/src/hw10_P3.java
2213fe478964a718aeb823243b2155437c175034
[]
no_license
GPPet/java-course
471e49c066ea90781289a049e93fe459299423c2
8a7f5665ee35a70bc60c1abcdb00ce9d6aad9955
refs/heads/master
2021-01-01T19:02:10.390896
2015-06-21T20:54:42
2015-06-21T20:54:42
34,452,778
0
0
null
null
null
null
UTF-8
Java
false
false
1,567
java
import java.util.HashMap; import java.util.Scanner; public class hw10_P3 { public static void main(String[] args) { // Напишете програма, която приема 5 карти от тестето за игра. // Програмата трябва да извежда на екрана дали играчът има чифт, сет или каре. // Картите да са числата от 2 до 10 плюс буквите: J, Q, K, A. // Scanner input = new Scanner(System.in); // System.out.println("Please, enter the cards:"); // String text = input.nextLine(); String text = "2,2,J,J,Q"; String[] splitText = text.split("\\W"); int count = 0; HashMap<String, Integer> cardCount = new HashMap<String, Integer>(); for(String card : splitText){ if(card != "") cardCount.putIfAbsent(card, count); } for(String card : cardCount.keySet()){ count = 0; for(int i = 0; i < splitText.length; i++){ if(splitText[i].equals(card)) count++; } cardCount.put(card, count); } System.out.print("Unique cards: " ); for(String card : cardCount.keySet()){ if(cardCount.get(card)==1) System.out.print(card + " "); } System.out.println(); System.out.println("Counting cards: " ); for(String card : cardCount.keySet()){ if(card!="" && cardCount.get(card)==2) System.out.println("Pair: " + card); if(card!="" && cardCount.get(card)==3) System.out.println("Set: " + card); if(card!="" && cardCount.get(card)==4) System.out.println("Quads: " + card); } } }
[ "gppetrova@gmail.com" ]
gppetrova@gmail.com
b6ccfecf9a1071bbaef68a6a07db36c53dfc1405
8efead99e95efd3d239a8a082e9f6402c5ae581d
/src/main/java/org/compuscene/metrics/prometheus/SlowLogAppender.java
8006655ef17c3a849545021b33f72ef7e2e3510d
[ "Apache-2.0" ]
permissive
kojilin/elasticsearch-prometheus-exporter
71bfb87f18ddad9025cd808197ace3a1ec610b47
a4965c87444647e216a097a16bb2bba84ac2f308
refs/heads/master
2021-01-11T21:34:43.158457
2017-03-22T07:46:21
2017-03-22T07:46:21
78,811,292
0
0
null
2017-01-13T03:21:02
2017-01-13T03:21:02
null
UTF-8
Java
false
false
2,060
java
package org.compuscene.metrics.prometheus; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.LoggerContext; import org.apache.logging.log4j.core.appender.AbstractAppender; import org.apache.logging.log4j.core.config.Configuration; public class SlowLogAppender extends AbstractAppender { private static final String METRIC_NAME = "indices_slowlog_count"; private final String node; private final PrometheusMetricsCatalog catalog; SlowLogAppender(String node, PrometheusMetricsCatalog catalog) { super("SlowLogAppender", null, null); this.node = node; this.catalog = catalog; } @Override public void append(LogEvent logEvent) { catalog.incCounter("indices_slowlog_count", 1, node, logEvent.getLoggerName(), logEvent.getLevel().name()); } @Override public void start() { super.start(); catalog.registerCounter(METRIC_NAME, "Count of slowlog", "node", "logger_name", "level"); LoggerContext context = (LoggerContext) LogManager.getContext(false); Configuration config = context.getConfiguration(); addAppenderToLoggerConfig(config, "index.search.slowlog.query"); addAppenderToLoggerConfig(config, "index.search.slowlog.fetch"); addAppenderToLoggerConfig(config, "index.indexing.slowlog.index"); context.updateLoggers(config); } private void addAppenderToLoggerConfig(Configuration configuration, String loggerName) { configuration.getLoggerConfig(loggerName).addAppender(this, null, null); catalog.setCounter(METRIC_NAME, 0, node, loggerName, Level.WARN.toString()); catalog.setCounter(METRIC_NAME, 0, node, loggerName, Level.INFO.toString()); catalog.setCounter(METRIC_NAME, 0, node, loggerName, Level.DEBUG.toString()); catalog.setCounter(METRIC_NAME, 0, node, loggerName, Level.TRACE.toString()); } }
[ "koji.lin@gmail.com" ]
koji.lin@gmail.com
be0978ac26f972789d0d2872ef37cf05b08e2b52
803ff42c2413c463fa0b18fa55e1b7fdbc4a54ca
/app/src/main/java/fr/prove/thingy/model/proxy/CardGuard.java
bfbc21864bc9ad4ee991179996efdb31c1cf6ae3
[]
no_license
GuillaumeMuret/ThingyProve
a39a89d6e8eb4005e63ee1de2812df83cb0c5404
f63c05b062009dbce111c1949797e4b68c63a042
refs/heads/master
2021-05-03T14:04:21.742032
2017-07-26T08:06:22
2017-07-26T08:06:22
69,807,158
1
0
null
null
null
null
UTF-8
Java
false
false
3,420
java
/** * @file CardGuard.java * @brief proxy of the CardGuard. * * @version 1.0 * @date 14/04/2016 * @author Guillaume Muret * @copyright * Copyright (c) 2016, PRØVE * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of PRØVE, Angers 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 PRØVE 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 PRØVE AND 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 fr.prove.thingy.model.proxy; import android.os.Bundle; import org.json.JSONException; import org.json.JSONObject; import fr.prove.thingy.bus.BusProtocol; import fr.prove.thingy.communication.Postman; import fr.prove.thingy.communication.protocole.ProcessOut; import fr.prove.thingy.communication.protocole.ProtocoleVocabulary; import fr.prove.thingy.communication.protocole.NameProcessOut; public class CardGuard extends ProxyModel { /** * Constructor of the CardGuard * @param postman : the postman */ public CardGuard(Postman postman) { super(postman); } /** * encryption of the owner, function, params to create a Json String. * @param procedureOut : the process to call * @param data : the data * @return the json object convert into string */ @Override protected String toJSONString(ProcessOut procedureOut, Bundle data) { JSONObject mainObj = new JSONObject(); JSONObject params = new JSONObject(); try { mainObj.put(ProtocoleVocabulary.JSON_OWNER, procedureOut.owner); mainObj.put(ProtocoleVocabulary.JSON_NUMOWNER, procedureOut.numOwner); mainObj.put(ProtocoleVocabulary.JSON_PROCESS, procedureOut.process); switch (procedureOut.process) { case NameProcessOut.CARD_GUARD_ASK_CHECK_CARD_ID: params.put(ProtocoleVocabulary.JSON_PARAMS_CARD_ID, data.getString(BusProtocol.BUS_DATA_CARDGUARD_CARDID)); break; } mainObj.put(ProtocoleVocabulary.JSON_PARAMS, params); } catch (JSONException e) { e.printStackTrace(); } return mainObj.toString(); } }
[ "guillaume.muret@reseau.eseo.fr" ]
guillaume.muret@reseau.eseo.fr
28dc371d4f9f37002323ae94d84d371cf25b86d6
d34c0a1de7ebccf1d33a347439443377e22d87db
/src/org/opentutorials/javatutorials/method/ReturnDemo3.java
30da6ff0f0cc20e7ab616675a5c8136d302c7fa1
[]
no_license
GENIEYOO/lifecoding_java
c0da6ea18e58ac7173ad96e2d6b5dee714c5862c
ca41ec1d27c85437b69be192ee4c7ca99d148367
refs/heads/master
2021-09-11T13:12:31.225484
2018-04-07T11:13:50
2018-04-07T11:13:50
null
0
0
null
null
null
null
UHC
Java
false
false
422
java
package org.opentutorials.javatutorials.method; public class ReturnDemo3 { public static String getMember1() { return "최진혁"; } public static String getMember2() { return "최유빈"; } public static String getMember3() { return "한아람"; } public static void main(String[] args) { System.out.println(getMember1()); System.out.println(getMember2()); System.out.println(getMember3()); } }
[ "forstudym.m@gmail.com" ]
forstudym.m@gmail.com
fcb5ce62dbf9a2e0accf81e64313a31c08bc11a7
a52ebb91b6ddc8be638e00e22c650319fb9c755b
/resumeapi/src/main/java/com/example/resumeapi/config/JwtAuthenticationEntryPoint.java
75f4afc09fb27e5050144c4dcb510446bc10e7da
[]
no_license
satya8189/Demo2020
d530bd6afcd7d2ec69bec9760e4f85b4f687c591
077e4e60f37780767f049eebe22b4fec687f6a98
refs/heads/master
2022-12-28T00:28:04.872402
2020-10-17T04:21:42
2020-10-17T04:21:42
287,802,692
0
0
null
2020-10-17T04:21:43
2020-08-15T18:25:57
Java
UTF-8
Java
false
false
782
java
package com.example.resumeapi.config; import java.io.IOException; import java.io.Serializable; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.AuthenticationEntryPoint; import org.springframework.stereotype.Component; @Component public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable { private static final long serialVersionUID = -7858869558953243875L; @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException { response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); } }
[ "satyach8189@gmail.com" ]
satyach8189@gmail.com
ef6d90b62a07d439e15638a40f8c6ba8214e7e9e
5a155f8741c46f168b0ce1eac90f6d1d673fdf07
/java/javase-basic/sockProjectet/src/ip/test.java
a837e2e664f35a647068e489f5091ef9925e74ed
[]
no_license
gitjinyubao/MyProject
10b308948597ef726af858260b8622814ddd5b25
ed71b23f82ff272f6c90f0513f0e94a9accd0849
refs/heads/master
2021-09-04T01:28:08.560749
2018-01-14T02:40:15
2018-01-14T02:40:15
null
0
0
null
null
null
null
GB18030
Java
false
false
476
java
package ip; import java.net.InetAddress; import java.net.UnknownHostException; /* * 网络编程三要素: * A:IP地址 * B:端口号 * C:协议 * IP地址: * 网络中计算机的唯一标识 */ public class test { public static void main(String[] args) throws UnknownHostException { InetAddress id = InetAddress.getByName("DESKTOP-BJE3HIU"); System.out.println(id.getHostAddress() + ":" +id.getHostName()); } }
[ "2045279403@qq.com" ]
2045279403@qq.com
1dc963527b5d712423f9bb6a0659e63070d20e67
2ddd83fcda82f79394c99ce78cecd28ce0b0591b
/TermProject/src/Physics.java
d749d5effc36cfe3d97d9663823dcce315c824c1
[]
no_license
JIEunnnnn/Game
f5a3267003f4244b256332bcf7ca4dcf254dec45
ed5c052d7ec1bacee61013d1f529610c7654de9b
refs/heads/master
2020-04-14T10:39:38.978239
2019-01-02T04:04:48
2019-01-02T04:04:48
null
0
0
null
null
null
null
IBM852
Java
false
false
329
java
public class Physics extends Study { void DoPhysics(Status status, HealthPT healthPT, Sports sports, MilitaryArts militaryArts){ this.DoStudy(status); healthPT.DoStudy(); //healthPT└ă ░┤├╝ sports.DoStudy(); //sports└ă ░┤├╝ militaryArts.DoStudy(); //militaryArts└ă ░┤├╝ } { } }
[ "moon970516@naver.com" ]
moon970516@naver.com
c65a8557a3ce45279e6df215a6f6b4cae91cf69f
9f281de26bf62175f2775a1db496d3539834a1c7
/Java_017_oop/src/com/callor/oop/Product_03.java
6feaf14f3b94f60989643842ec88d44ac0322ea7
[]
no_license
jeong-mincheol/Biz_2021_01_403_java
7bb63ee2241f215b1dcf05bd8630cd12d1c6958e
31b491b75687372b5ef950378d7b76bab23dcd72
refs/heads/master
2023-03-23T00:04:11.785428
2021-03-10T07:26:36
2021-03-10T07:26:36
334,847,354
0
0
null
null
null
null
UTF-8
Java
false
false
2,852
java
package com.callor.oop; import java.util.Scanner; import com.callor.oop.model.ProductVO; public class Product_03 { public static void main(String[] args) { // VO 클래스를 배열로 선언하고 사용(데이터 저장, 읽기)하려면 // 선언된 배열 요소요소를 모두 다시 초기화(생성)하는 과정이 필요하다 // 이 과정이 생략되면 // NullPointerException이 발생한다 ProductVO[] pVO = new ProductVO[5]; for(int i = 0 ; i < pVO.length ; i++) { pVO[i] = new ProductVO(); } Scanner scan = new Scanner(System.in); System.out.println("================================="); System.out.println("나라쇼핑몰 상품관리 V1"); System.out.println("---------------------------------"); System.out.println("상품정보를 입력하시오"); String strN = 3 + ""; // "3"이라는 문자열로 저장 / ""안에 빈칸이 있으면 오류 int intN = Integer.valueOf(strN); for(int i = 0 ; i < pVO.length ; i++) { // 연속된 값으로 상품코드 생성 String pCode = (i +1) + ""; pVO[i].strPCode = pCode; System.out.println(pCode + " 번 상품정보 입력"); System.out.print("상품코드 >> "); pVO[i].strPCode = scan.nextLine(); System.out.print("상품이름 >> "); pVO[i].strPname = scan.nextLine(); System.out.print("거래처 >> "); pVO[i].strDName = scan.nextLine(); System.out.print("품목 >> "); pVO[i].strItem = scan.nextLine(); while(true) { System.out.print("매입단가 >> "); String strIPrice = scan.nextLine(); int intIPrice = Integer.valueOf(strIPrice); if(intIPrice < 0) { System.out.println("매입단가는 0이상 입력하세요"); } else { pVO[i].iPrice = intIPrice; break; } } /* System.out.print("매입단가 >> "); String iPrice = scan.nextLine(); pVO[i].iPrice = Integer.valueOf(iPrice); if(Integer.valueOf(iPrice) < 0 ) { System.out.println("0미만값은 입력불가"); break; } */ System.out.print("매출단가 >> "); String strOPrice = scan.nextLine(); int intOPrice = Integer.valueOf(strOPrice); if(intOPrice < 0) { System.out.println("매입단가는 0이상 입력하세요"); } else { // 정상처리되었으면 // 단가가 0이상 입력되었으면 // VO에 값을 저장하고 // 다음단계로 진행 // 현 시점의 while()은 중단하라 pVO[i].oPrice = intOPrice; break; } /* System.out.print("매출단가 >> "); String oPrice = scan.nextLine(); pVO[i].oPrice = Integer.valueOf(oPrice); if(Integer.valueOf(oPrice) < 0 ) { System.out.println("0미만값은 입력불가"); break; } */ pVO[i].toString(); System.out.println("==============================="); } } }
[ "jmc5371@nate.com" ]
jmc5371@nate.com
553042f798b11454688c6b9a59ff1732da8ed0f8
737e41ccbf6b71b358c33fd13f0979f8cf044f0d
/blog/src/main/java/com/lyx/bolg/BolgApplication.java
d49f0ab942eca5f315ba115737bbb8e0f9db8dfd
[]
no_license
895536807/blog
cc40b39b971a609edf9f7050df54b6eaf113e8aa
581793be5c80fdff3141caf02c9d5a47bf2c1d84
refs/heads/master
2021-05-19T03:48:43.507184
2020-03-31T06:06:38
2020-03-31T06:06:38
251,515,258
0
0
null
null
null
null
UTF-8
Java
false
false
313
java
package com.lyx.bolg; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class BolgApplication { public static void main(String[] args) { SpringApplication.run(BolgApplication.class, args); } }
[ "895536807@qq.com" ]
895536807@qq.com
1e03f1e1486eb0cbaef7f1becbd574d173eb4634
23156cb24a0291aab2e104a607cfba052323938e
/SchedulerFLM2/src/main/java/main/app/FLMPlannerHelloWorld.java
9cd3b288ae0feb5f4a76a650f08154d64f685adc
[]
no_license
drools/sxdrools
c4d694c9903f133491fcb479bde0410b00d56508
d9cd30a2c8bd3edfa8799a9a848f002eee170295
refs/heads/master
2016-09-06T01:22:48.755628
2012-06-28T14:29:38
2012-06-28T14:29:38
null
0
0
null
null
null
null
SHIFT_JIS
Java
false
false
4,229
java
package main.app; import java.util.ArrayList; import main.data.DataStorage; import main.data.ExportData; import main.data.ImportData; import main.data.RuleLogger; import main.domain.PlannerSolution; import org.drools.planner.config.XmlSolverFactory; import org.drools.planner.core.Solver; import org.drools.planner.core.score.director.drools.DroolsScoreDirector; import org.drools.planner.core.solver.DefaultSolver; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class FLMPlannerHelloWorld { // エンジン用ロガーの作成 static final Logger logger = LoggerFactory .getLogger(FLMPlannerHelloWorld.class); // データ倉庫の作成 public static DataStorage storage; // ソルバーの作成 public static final String SOLVER_CONFIG = "/FLMPlannerSolverConfig.xml"; public static final String TEST_CONFIG = "/FLMPlannerRuleCheck.xml"; // 計算の実行 public static void runData(String inFile) { // データのインポート ImportData importer = new ImportData(); importer.importFromXLS(inFile); storage = importer.getStorage(); // ソルバーの初期化 long startTimeCounter = System.currentTimeMillis(); XmlSolverFactory solverFactory = new XmlSolverFactory(); solverFactory.configure(SOLVER_CONFIG); DefaultSolver solver = (DefaultSolver) solverFactory.buildSolver(); // 初期解決値の設定 PlannerSolution initialSolution = new PlannerSolution( storage.scheduleList, storage.classroomList, storage.dayList, storage.blockedClassroomList, storage.courseTotalSizeList); solver.setPlanningProblem(initialSolution); // 開催日程計画開始 solver.solve(); // 開催日程計画結果の取得 PlannerSolution solvedSolution = (PlannerSolution) solver .getBestSolution(); // 最終結果のスコアの表示 logger.info(solvedSolution.getScore().toString()); // 計算時間の表示 long elapsedTimeMillis = System.currentTimeMillis() - startTimeCounter; System.out.println("Elapsed time: " + (int) (elapsedTimeMillis / (60 * 1000F)) + "min " + elapsedTimeMillis / 1000F + "sec"); // スケジュールリストへの格納 storage.scheduleList = solvedSolution.getScheduleList(); } // 計算結果のチェック public static void checkOutput(String exportMessage) { XmlSolverFactory solverFactory = new XmlSolverFactory(); solverFactory.configure(TEST_CONFIG); Solver solver = solverFactory.buildSolver(); // 初期解決値の設定 PlannerSolution initialSolution = new PlannerSolution( storage.scheduleList, storage.classroomList, storage.dayList, storage.blockedClassroomList, storage.courseTotalSizeList); // スコアディレクターの作成 DroolsScoreDirector scoreDirector = (DroolsScoreDirector) solver .getScoreDirectorFactory().buildScoreDirector(); scoreDirector.setWorkingSolution(initialSolution); // ルールのロガーの作成・書き込み ArrayList<RuleLogger> ruleLogList = new ArrayList<RuleLogger>(); ruleLogList.add(new RuleLogger(exportMessage, "")); scoreDirector.getWorkingMemory().setGlobal("ruleLog", ruleLogList); scoreDirector.calculateScore(); storage.ruleLog = (ArrayList<RuleLogger>) scoreDirector.getWorkingMemory().getGlobal("ruleLog"); // 最終結果のスコアの表示 logger.info(initialSolution.getScore().toString()); } // データのエクスポート public static void exportResult(String outFile, String logFile) { ExportData exporter = new ExportData(storage.scheduleList, storage.ruleLog); logger.info("Export to XLS: " + exporter.exportToXLS(outFile)); if (!logFile.equals("")) { logger.info("Export Log = " + exporter.exportLogText(logFile)); } } public static void main(String[] args) { runData(args[0]); String msg = args[0]; msg = msg.replace(".xls", "").replace("DroolsMaster", ""); if (msg.lastIndexOf("\\") > 0) { msg = msg.substring(msg.lastIndexOf("\\")+1); } checkOutput("Planning month: " + msg); if (args.length == 2) { exportResult(args[1], ""); } else { exportResult(args[1], args[2]); } } }
[ "take_hiro_mail@yahoo.co.jp" ]
take_hiro_mail@yahoo.co.jp
082a0d77b6408eb3ad03f165720cbaa29ac1c7c6
fca3e2e7afc21abdea5efa9a246f5d8ce545454f
/app/src/main/java/com/shentu/paper/app/utils/AsmTest.java
fa843a91087e0913d56f55a66fb74e3e11f96511
[ "Apache-2.0" ]
permissive
walkthehorizon/MicroWallPager
4c664ac871bda4f644dc155e9854bbc994c77d7b
47828dbae0e04331c46bee6773efbec331f3f167
refs/heads/master
2021-11-01T08:36:34.496269
2021-10-20T09:42:21
2021-10-20T09:42:21
133,635,969
3
1
null
null
null
null
UTF-8
Java
false
false
158
java
package com.shentu.paper.app.utils; public class AsmTest { public static void main(String[] args) { int a=1, b=2; int c = a+b; } }
[ "mingming.li@ximalaya.com" ]
mingming.li@ximalaya.com
93dda59c84db1441fc3411b6a1027e513f6a7bc6
d7afe1c1bd386a61b338959f6e4df77338aaa83a
/workspace7/Ch13_BetterWebView/gen/tw/com/flag/ch13_hellowebview/R.java
1474be44e112e9c21aa7c48749958235772d940e
[]
no_license
bobo101/webview
8549d923cc72ddc7cbf4e4c9bd7c9c0d4e8cf3dd
79c303a78ff7b55784ac8cff826118cdb83a5385
refs/heads/master
2020-06-07T09:45:15.542178
2014-11-11T09:10:02
2014-11-11T09:10:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,047
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 tw.com.flag.ch13_hellowebview; public final class R { public static final class attr { } public static final class drawable { public static final int ic_launcher=0x7f020000; } public static final class id { public static final int menu_settings=0x7f070001; public static final int wv=0x7f070000; } public static final class layout { public static final int activity_main=0x7f030000; } public static final class menu { public static final int activity_main=0x7f060000; } public static final class string { public static final int app_name=0x7f040000; public static final int hello_world=0x7f040001; public static final int menu_settings=0x7f040002; } 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=0x7f050000; /** Application theme. All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f050001; } }
[ "bobo@fontech.com.tw" ]
bobo@fontech.com.tw
d4701d045c6145182f3d1b2b5a597a562fe09e94
b8c7fd99a6fea6725eba5d73b6cff0dbd3dc1bd5
/epctagcoder/src/main/java/org/epctagcoder/parse/GSRNP/ParseGSRNP.java
edf715900ab62419d8890a8f60033fb4d97f1f27
[ "Apache-2.0" ]
permissive
jlcout/epctagcoder
20e0115f76933185f0906f650fd201bd72ca796c
77162175ee7c1ab32ee649a7b4f2ad650ea850ef
refs/heads/master
2022-11-04T11:30:14.328772
2022-10-10T00:09:33
2022-10-10T00:09:33
78,162,035
60
34
Apache-2.0
2022-10-10T00:09:35
2017-01-06T01:19:24
Java
UTF-8
Java
false
false
10,680
java
package org.epctagcoder.parse.GSRNP; import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.epctagcoder.option.PrefixLength; import org.epctagcoder.option.TableItem; import org.epctagcoder.option.GSRNP.GSRNPFilterValue; import org.epctagcoder.option.GSRNP.GSRNPHeader; import org.epctagcoder.option.GSRNP.GSRNPTagSize; import org.epctagcoder.option.GSRNP.partitionTable.GSRNPPartitionTableList; import org.epctagcoder.result.GSRNP; import org.epctagcoder.util.Converter; public class ParseGSRNP { private static final Integer RESERVED = 0; // 24 zero bits private GSRNP gsrnp = new GSRNP(); private String companyPrefix; private PrefixLength prefixLength; private GSRNPTagSize tagSize; private GSRNPFilterValue filterValue; private String serviceReference; private String rfidTag; private String epcTagURI; private String epcPureIdentityURI; private TableItem tableItem; public static ChoiceStep Builder() { return new Steps(); } private ParseGSRNP(Steps steps) { this.companyPrefix = steps.companyPrefix; this.tagSize = steps.tagSize; this.filterValue = steps.filterValue; this.serviceReference = steps.serviceReference; this.rfidTag = steps.rfidTag; this.epcTagURI = steps.epcTagURI; this.epcPureIdentityURI = steps.epcPureIdentityURI; parse(); } private void parse() { Optional<String> optionalCompanyPrefix = Optional.ofNullable(companyPrefix); Optional<String> optionalRfidTag = Optional.ofNullable(rfidTag); Optional<String> optionalEpcTagURI = Optional.ofNullable(epcTagURI); Optional<String> optionalEpcPureIdentityURI = Optional.ofNullable(epcPureIdentityURI); if ( optionalRfidTag.isPresent() ) { String inputBin = Converter.hexToBin(rfidTag); String headerBin = inputBin.substring(0, 8); String filterBin = inputBin.substring(8,11); String partitionBin = inputBin.substring(11,14); GSRNPPartitionTableList GSRNPPartitionTableList = new GSRNPPartitionTableList(); tableItem = GSRNPPartitionTableList.getPartitionByValue( Integer.parseInt(partitionBin, 2) ); String companyPrefixBin = inputBin.substring(14,14+tableItem.getM()); String serialWithExtensionBin = inputBin.substring(14+tableItem.getM(),14+tableItem.getM()+tableItem.getN()); String filterDec = Long.toString( Long.parseLong(filterBin, 2) ); String companyPrefixDec = Converter.binToDec(companyPrefixBin); //Long.toString( Long.parseLong(companyPrefixBin, 2) ); serviceReference = Converter.strZero(Converter.binToDec(serialWithExtensionBin), tableItem.getDigits() ); companyPrefix = Converter.strZero(companyPrefixDec, tableItem.getL()); filterValue = GSRNPFilterValue.forCode( Integer.parseInt(filterDec) ); tagSize = GSRNPTagSize.forCode( GSRNPHeader.forCode(headerBin).getTagSize() ); prefixLength = PrefixLength.forCode(tableItem.getL()); } else { if ( optionalCompanyPrefix.isPresent() ) { GSRNPPartitionTableList GSRNPPartitionTableList = new GSRNPPartitionTableList(); prefixLength = PrefixLength.forCode( companyPrefix.length() ); validateCompanyPrefix(); tableItem = GSRNPPartitionTableList.getPartitionByL( prefixLength.getValue() ); validateServiceReference(); } else { if ( optionalEpcTagURI.isPresent() ) { Pattern pattern = Pattern.compile("(urn:epc:tag:gsrnp-)(96)\\:([0-7])\\.(\\d+)\\.(\\d+)"); Matcher matcher = pattern.matcher(epcTagURI); if ( matcher.matches() ) { tagSize = GSRNPTagSize.forCode( Integer.parseInt(matcher.group(2)) ); filterValue = GSRNPFilterValue.forCode( Integer.parseInt(matcher.group(3)) ); companyPrefix = matcher.group(4); prefixLength = PrefixLength.forCode( matcher.group(4).length() ); serviceReference = matcher.group(5); } else { throw new IllegalArgumentException("EPC Tag URI is invalid"); } } else if ( optionalEpcPureIdentityURI.isPresent() ) { Pattern pattern = Pattern.compile("(urn:epc:id:gsrnp)\\:(\\d+)\\.(\\d+)"); Matcher matcher = pattern.matcher(epcPureIdentityURI); if ( matcher.matches() ) { companyPrefix = matcher.group(2); prefixLength = PrefixLength.forCode( matcher.group(2).length() ); serviceReference = matcher.group(3); } else { throw new IllegalArgumentException("EPC Pure Identity is invalid"); } } GSRNPPartitionTableList GSRNPPartitionTableList = new GSRNPPartitionTableList(); tableItem = GSRNPPartitionTableList.getPartitionByL( prefixLength.getValue() ); } } String outputBin = getBinary(); String outputHex = Converter.binToHex( outputBin ); gsrnp.setEpcScheme("gsrnp"); gsrnp.setApplicationIdentifier("AI 8017"); gsrnp.setTagSize(Integer.toString(tagSize.getValue())); gsrnp.setFilterValue(Integer.toString(filterValue.getValue()) ); gsrnp.setPartitionValue(Integer.toString(tableItem.getPartitionValue())); gsrnp.setPrefixLength(Integer.toString(prefixLength.getValue())); gsrnp.setCompanyPrefix(companyPrefix); gsrnp.setServiceReference(serviceReference); gsrnp.setCheckDigit(Integer.toString(getCheckDigit())); gsrnp.setEpcPureIdentityURI(String.format("urn:epc:id:gsrnp:%s.%s", companyPrefix, serviceReference)); gsrnp.setEpcTagURI(String.format("urn:epc:tag:gsrnp-%s:%s.%s.%s", tagSize.getValue(), filterValue.getValue(), companyPrefix, serviceReference)); gsrnp.setEpcRawURI(String.format("urn:epc:raw:%s.x%s", tagSize.getValue(), outputHex )); gsrnp.setBinary(outputBin); gsrnp.setRfidTag(outputHex); } private Integer getCheckDigit() { String value = new StringBuilder() .append(companyPrefix) .append(serviceReference) .toString(); Integer d18 = (10 - ((3 * (Character.getNumericValue(value.charAt(0)) + Character.getNumericValue(value.charAt(2)) + Character.getNumericValue(value.charAt(4)) + Character.getNumericValue(value.charAt(6)) + Character.getNumericValue(value.charAt(8)) + Character.getNumericValue(value.charAt(10)) + Character.getNumericValue(value.charAt(12)) + Character.getNumericValue(value.charAt(14)) + Character.getNumericValue(value.charAt(16))) + (Character.getNumericValue(value.charAt(1)) + Character.getNumericValue(value.charAt(3)) + Character.getNumericValue(value.charAt(5)) + Character.getNumericValue(value.charAt(7)) + Character.getNumericValue(value.charAt(9)) + Character.getNumericValue(value.charAt(11)) + Character.getNumericValue(value.charAt(13)) + Character.getNumericValue(value.charAt(15)))) % 10)) % 10; return d18; } private String getBinary() { StringBuilder bin = new StringBuilder(); bin.append( Converter.decToBin(tagSize.getHeader(), 8) ); bin.append( Converter.decToBin(filterValue.getValue(), 3) ); bin.append( Converter.decToBin(tableItem.getPartitionValue(), 3) ); bin.append( Converter.decToBin(Integer.parseInt(companyPrefix), tableItem.getM()) ); //bin.append( Converter.strZero(BigDec2Bin.dec2bin(serviceReference), tableItem.getN()) ); bin.append( Converter.decToBin(Integer.parseInt(serviceReference), tableItem.getN()) ); bin.append( Converter.decToBin(RESERVED, 24) ); return bin.toString(); } public GSRNP getGSRNP() { return gsrnp; } public String getRfidTag() { return Converter.binToHex( getBinary() ); } private void validateServiceReference() { StringBuilder value = new StringBuilder() .append(serviceReference); if ( value.length()!=tableItem.getDigits() ) { throw new IllegalArgumentException(String.format("Service Reference \"%s\" has %d length and should have %d length", serviceReference, value.length(), tableItem.getDigits())); } } private void validateCompanyPrefix() { Optional<PrefixLength> optionalpPefixLenght = Optional.ofNullable(prefixLength); if ( !optionalpPefixLenght.isPresent() ) { throw new IllegalArgumentException("Company Prefix is invalid. Length not found in the partition table"); } } public static interface ChoiceStep { ServiceReferenceStep withCompanyPrefix(String companyPrefix); BuildStep withRFIDTag(String rfidTag); BuildStep withEPCTagURI(String epcTagURI); TagSizeStep withEPCPureIdentityURI(String epcPureIdentityURI); } public static interface ServiceReferenceStep { TagSizeStep withServiceReference(String serviceReference); } public static interface TagSizeStep { FilterValueStep withTagSize( GSRNPTagSize tagSize ); } public static interface FilterValueStep { BuildStep withFilterValue( GSRNPFilterValue filterValue ); } public static interface BuildStep { ParseGSRNP build(); } private static class Steps implements ChoiceStep, ServiceReferenceStep, TagSizeStep, FilterValueStep, BuildStep { private String companyPrefix; private GSRNPTagSize tagSize; private GSRNPFilterValue filterValue; private String serviceReference; private String rfidTag; private String epcTagURI; private String epcPureIdentityURI; @Override public ParseGSRNP build() { return new ParseGSRNP(this); } // @Override // public SerialStep withExtensionDigit(SSCCExtensionDigit extensionDigit) { // this.extensionDigit = extensionDigit; // return this; // } @Override public BuildStep withFilterValue(GSRNPFilterValue filterValue) { this.filterValue = filterValue; return this; } @Override public FilterValueStep withTagSize(GSRNPTagSize tagSize) { this.tagSize = tagSize; return this; } @Override public TagSizeStep withServiceReference(String serviceReference) { this.serviceReference = serviceReference; return this; } @Override public ServiceReferenceStep withCompanyPrefix(String companyPrefix) { this.companyPrefix = companyPrefix; return this; } @Override public BuildStep withRFIDTag(String rfidTag) { this.rfidTag = rfidTag; return this; } @Override public BuildStep withEPCTagURI(String epcTagURI) { this.epcTagURI = epcTagURI; return this; } @Override public TagSizeStep withEPCPureIdentityURI(String epcPureIdentityURI) { this.epcPureIdentityURI = epcPureIdentityURI; return this; } } }
[ "jlcout@tardis" ]
jlcout@tardis
9e8ee230d836b6886ffea64a509d3cf8c6f3bf9e
422361a62a05ac82a37dfdbdd446b2b7b0182696
/app/src/main/java/com/example/hugoc/myapplication/Magasin.java
5d0adba642a3c4e0c806680bde4e68a66840af24
[]
no_license
hugochaye/MyApplication
e9d5c6b0e929954ec9f25db8a9d387090fedd8d4
842e9156a16b3ecc601ae20836b5f8e5ca803d8c
refs/heads/master
2020-04-11T22:26:09.890561
2018-12-17T11:54:33
2018-12-17T11:54:33
162,136,169
0
0
null
null
null
null
UTF-8
Java
false
false
17,391
java
package com.example.hugoc.myapplication; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageButton; import android.widget.TextView; import org.w3c.dom.Text; public class Magasin extends AppCompatActivity { private ImageButton axe1; private ImageButton axe2; private ImageButton axe3; private ImageButton axe4; private ImageButton axe5; private ImageButton axe6; private ImageButton axe7; private ImageButton axe8; private ImageButton axe9; private ImageButton axe10; private ImageButton axe11; private ImageButton axe12; private TextView prixaxe1; private TextView prixaxe2; private TextView prixaxe3; private TextView prixaxe4; private TextView prixaxe5; private TextView prixaxe6; private TextView prixaxe7; private TextView prixaxe8; private TextView prixaxe9; private TextView prixaxe10; private TextView prixaxe11; private TextView prixaxe12; private int paxe1; private int paxe2; private int paxe3; private int paxe4; private int paxe5; private int paxe6; private int paxe7; private int paxe8; private int paxe9; private int paxe10; private int paxe11; private int paxe12; private TextView Argent; private int Gold; private int Strenght; SharedPreferences.Editor editor; SharedPreferences prefs; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_magasin); Bundle extras = getIntent().getExtras(); Gold = extras.getInt("Gold"); prefs = getPreferences(Context.MODE_PRIVATE); editor = prefs.edit(); Argent = (TextView) findViewById(R.id.Argent); Argent.setText("Gold : " + Gold); paxe1 = prefs.getInt("axe1", 0); paxe2 = prefs.getInt("axe2", 0); paxe3 = prefs.getInt("axe3", 0); paxe4 = prefs.getInt("axe4", 0); paxe5 = prefs.getInt("axe5", 0); paxe6 = prefs.getInt("axe6", 0); paxe7 = prefs.getInt("axe7", 0); paxe8 = prefs.getInt("axe8", 0); paxe9 = prefs.getInt("axe9", 0); paxe10 = prefs.getInt("axe10", 0); paxe11 = prefs.getInt("axe11", 0); paxe12 = prefs.getInt("axe12", 0); axe1 = (ImageButton) findViewById(R.id.axe1); axe2 = (ImageButton) findViewById(R.id.axe2); axe3 = (ImageButton) findViewById(R.id.axe3); axe4 = (ImageButton) findViewById(R.id.axe4); axe5 = (ImageButton) findViewById(R.id.axe5); axe6 = (ImageButton) findViewById(R.id.axe6); axe7 = (ImageButton) findViewById(R.id.axe7); axe8 = (ImageButton) findViewById(R.id.axe8); axe9 = (ImageButton) findViewById(R.id.axe9); axe10 = (ImageButton) findViewById(R.id.axe10); axe11 = (ImageButton) findViewById(R.id.axe11); axe12 = (ImageButton) findViewById(R.id.axe12); prixaxe1 = (TextView) findViewById(R.id.prixaxe1); prixaxe2 = (TextView) findViewById(R.id.prixaxe2); prixaxe3 = (TextView) findViewById(R.id.prixaxe3); prixaxe4 = (TextView) findViewById(R.id.prixaxe4); prixaxe5 = (TextView) findViewById(R.id.prixaxe5); prixaxe6 = (TextView) findViewById(R.id.prixaxe6); prixaxe7 = (TextView) findViewById(R.id.prixaxe7); prixaxe8 = (TextView) findViewById(R.id.prixaxe8); prixaxe9 = (TextView) findViewById(R.id.prixaxe9); prixaxe10 = (TextView) findViewById(R.id.prixaxe10); prixaxe11 = (TextView) findViewById(R.id.prixaxe11); prixaxe12 = (TextView) findViewById(R.id.prixaxe12); if ( paxe1 == 1){ prixaxe1.setVisibility(View.INVISIBLE); axe1.setImageResource(R.drawable.sold); axe1.setClickable(false); } if ( paxe2 == 1){ prixaxe2.setVisibility(View.INVISIBLE); axe2.setImageResource(R.drawable.sold); axe2.setClickable(false); } if ( paxe3 == 1){ prixaxe3.setVisibility(View.INVISIBLE); axe3.setImageResource(R.drawable.sold); axe3.setClickable(false); } if ( paxe4 == 1){ prixaxe4.setVisibility(View.INVISIBLE); axe4.setImageResource(R.drawable.sold); axe4.setClickable(false); } if ( paxe5 == 1){ prixaxe5.setVisibility(View.INVISIBLE); axe5.setImageResource(R.drawable.sold); axe5.setClickable(false); } if ( paxe6 == 1){ prixaxe6.setVisibility(View.INVISIBLE); axe6.setImageResource(R.drawable.sold); axe6.setClickable(false); } if ( paxe7 == 1){ prixaxe7.setVisibility(View.INVISIBLE); axe7.setImageResource(R.drawable.sold); axe7.setClickable(false); } if ( paxe8 == 1){ prixaxe8.setVisibility(View.INVISIBLE); axe8.setImageResource(R.drawable.sold); axe8.setClickable(false); } if ( paxe9 == 1){ prixaxe9.setVisibility(View.INVISIBLE); axe9.setImageResource(R.drawable.sold); axe9.setClickable(false); } if ( paxe10 == 1){ prixaxe10.setVisibility(View.INVISIBLE); axe10.setImageResource(R.drawable.sold); axe10.setClickable(false); } if ( paxe11 == 1){ prixaxe11.setVisibility(View.INVISIBLE); axe11.setImageResource(R.drawable.sold); axe11.setClickable(false); } if ( paxe12 == 1){ prixaxe12.setVisibility(View.INVISIBLE); axe12.setImageResource(R.drawable.sold); axe12.setClickable(false); } // faire ça pour toutes les haches axe1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe1.getText() + "")){ prixaxe1.setVisibility(View.INVISIBLE); axe1.setImageResource(R.drawable.sold); axe1.setClickable(false); editor.putInt("axe1", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe1.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 10000); } } }); axe2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe2.getText() + "")){ prixaxe2.setVisibility(View.INVISIBLE); axe2.setImageResource(R.drawable.sold); axe2.setClickable(false); editor.putInt("axe2", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe2.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 100000); } } }); axe3.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe3.getText() + "")){ prixaxe3.setVisibility(View.INVISIBLE); axe3.setImageResource(R.drawable.sold); axe3.setClickable(false); editor.putInt("axe3", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe3.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 1000000); } } }); axe4.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe4.getText() + "")){ prixaxe4.setVisibility(View.INVISIBLE); axe4.setImageResource(R.drawable.sold); axe4.setClickable(false); editor.putInt("axe4", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe4.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 100000000); } } }); axe5.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe5.getText() + "")){ prixaxe5.setVisibility(View.INVISIBLE); axe5.setImageResource(R.drawable.sold); axe5.setClickable(false); editor.putInt("axe5", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe5.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 1000000000); } } }); axe6.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe6.getText() + "")){ prixaxe6.setVisibility(View.INVISIBLE); axe6.setImageResource(R.drawable.sold); axe6.setClickable(false); editor.putInt("axe6", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe6.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 100000000); } } }); axe7.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe7.getText() + "")){ prixaxe7.setVisibility(View.INVISIBLE); axe7.setImageResource(R.drawable.sold); axe7.setClickable(false); editor.putInt("axe7", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe7.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 1000000000); } } }); axe8.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe8.getText() + "")){ prixaxe8.setVisibility(View.INVISIBLE); axe8.setImageResource(R.drawable.sold); axe8.setClickable(false); editor.putInt("axe8", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe8.getText() + ""); Argent.setText(Gold + 33); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 1000000000); } } }); axe9.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe9.getText() + "")){ prixaxe9.setVisibility(View.INVISIBLE); axe9.setImageResource(R.drawable.sold); axe9.setClickable(false); editor.putInt("axe9", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe9.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 1000000000); } } }); axe10.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe10.getText() + "")){ prixaxe10.setVisibility(View.INVISIBLE); axe10.setImageResource(R.drawable.sold); axe10.setClickable(false); editor.putInt("axe10", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe10.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 1000000000); } } }); axe11.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe11.getText() + "")){ prixaxe11.setVisibility(View.INVISIBLE); axe11.setImageResource(R.drawable.sold); axe11.setClickable(false); editor.putInt("axe11", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe11.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 1000000000); } } }); axe12.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (Gold >= Integer.parseInt(prixaxe12.getText() + "")){ prixaxe12.setVisibility(View.INVISIBLE); axe12.setImageResource(R.drawable.sold); axe12.setClickable(false); editor.putInt("axe12", 1); editor.commit(); Gold -= Integer.parseInt(prixaxe12.getText() + ""); Argent.setText(Gold + ""); editor.putInt("Gold", Gold); editor.commit(); Argent.setText("Gold : " + Gold); Strenght = prefs.getInt("Strenght", 0); editor.putInt("Strenght", Strenght + 1000000000); editor.commit(); } } }); } }
[ "44088066+hugochaye@users.noreply.github.com" ]
44088066+hugochaye@users.noreply.github.com
404362812c6c2382f9ca4bd3e8ba1e8e807a9b94
ca3c3e3142ce44f78d1656334149137693c28e4d
/src/main/java/ch7_Thread_Per_Message/change/Host2.java
3a1ce933d13c08069209a34bc426545a3d2e0b38
[]
no_license
raintor/multithread_design_pattern
e3be781a6e73c85f722027cf7ca506202e8a4254
fbc4f0eb447bba76b9d9df5d858cfc9952ade67e
refs/heads/master
2020-07-31T07:33:31.946856
2020-02-29T08:35:07
2020-02-29T08:35:07
210,531,717
0
0
null
null
null
null
UTF-8
Java
false
false
1,346
java
package ch7_Thread_Per_Message.change; /** * @author: raintor * @Date: 2019/10/17 20:13 * @Description: * 将开启线程的方式不使用匿名内部类的方式,这里采用内部类的方式 */ public class Host2 { private final Helper helper = new Helper(); public void request(int count,char c){ System.out.println("Main start"); new HelperThread(count,c).start(); System.out.println("Main end"); } private class Helper{ public void handle(int count,char c){ System.out.println(" handle("+count+","+c+"),Begin"); for(int i = 0;i<count;i++){ slowy(); System.out.print(c); } System.out.println(""); System.out.println(" handle("+count+","+c+"),End"); } private void slowy() { try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } } private class HelperThread extends Thread{ private final int count; private final char c; private HelperThread(int count, char c) { this.count = count; this.c = c; } @Override public void run() { helper.handle(count,c); } } }
[ "2837714831@qq.com" ]
2837714831@qq.com
5c5d08308577296628c1b2e6b82bd68a92ff48cc
f1bc50d6bcb51d54bb9a2771f1a41e40fef0a0c5
/src/main/java/org/springframework/security/authentication/InsufficientAuthenticationException.java
5e4a7c0ce7e7fdb1eaab12d209a87812de6ae15e
[ "Apache-2.0" ]
permissive
xiezhifeng/saml
22a594a28f71b2e8cf37f253d8c67c3c780712dd
06df6ee47e12999d1345b49537ffc91570ea6926
refs/heads/main
2023-03-16T15:13:50.189853
2021-03-17T13:13:43
2021-03-17T13:13:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package org.springframework.security.authentication; import org.springframework.security.core.AuthenticationException; public class InsufficientAuthenticationException extends AuthenticationException { public InsufficientAuthenticationException(String msg) { super(msg); } public InsufficientAuthenticationException(String msg, Throwable t) { super(msg, t); } }
[ "pushkin.a.s.06061799@gmail.com" ]
pushkin.a.s.06061799@gmail.com
86295be436c37efd0d1a0e519965194204091f1a
884f99f07fe59237bd572297e39231dd2fd86217
/src/main/java/com/koznem/recipe/repositories/UnitOfMeasureRepository.java
b22daee491a91206130e6005cc3f346718a188c3
[]
no_license
koznem24/spring5-recipe-app
027c5d71498a8ed06e1ff76a7df3027ed0c68af0
7ef70306b3bf5110bb4c30fb0ee966e7201a12da
refs/heads/master
2023-04-02T20:30:35.741595
2021-04-08T10:19:42
2021-04-08T10:19:42
345,453,211
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.koznem.recipe.repositories; import com.koznem.recipe.domain.UnitOfMeasure; import org.springframework.data.repository.CrudRepository; import java.util.Optional; public interface UnitOfMeasureRepository extends CrudRepository<UnitOfMeasure, Long> { Optional<UnitOfMeasure> findByDescription(String description); }
[ "koznem24@gmail.com" ]
koznem24@gmail.com
6ab2c14a86dfec972e5d3c2a7619bdde94605182
d8b54465cb26e704ab6e2d00314e502011756bc7
/app/src/main/java/me/riddhimanadib/fastformbuilder/SaveFormInstanceActivity.java
5cf6b0652a68ad76aa0f86f38ccfc1f3ca473982
[ "Apache-2.0" ]
permissive
AmitBarjatya/FormMaster
37b8817bba57abcecae265226f558fe39d40c8ed
24862f0dfbe73019c6cac1a02f33ed64cc9cd6ab
refs/heads/master
2021-06-24T20:50:09.597268
2017-09-13T06:00:37
2017-09-13T06:00:37
103,231,816
0
0
null
2017-09-12T06:34:46
2017-09-12T06:34:46
null
UTF-8
Java
false
false
5,060
java
package me.riddhimanadib.fastformbuilder; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.RecyclerView; import android.view.MenuItem; import java.util.ArrayList; import java.util.List; import me.riddhimanadib.formmaster.helper.FormBuildHelper; import me.riddhimanadib.formmaster.model.FormElement; import me.riddhimanadib.formmaster.model.FormHeader; import me.riddhimanadib.formmaster.model.FormObject; /** * Created by Amit Barjatya on 9/12/17. */ public class SaveFormInstanceActivity extends AppCompatActivity { private static final String KEY = "form_elements"; private static final String KEY_TYPE = "form_elements_type"; private RecyclerView mRecyclerView; private FormBuildHelper mFormBuilder; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_fullscreen_form); setupToolBar(); if (savedInstanceState == null) { setupForm(); } else { setupForm(savedInstanceState); } } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); ArrayList<FormObject> objects = new ArrayList<>(mFormBuilder.getAllObjects()); outState.putParcelableArrayList(KEY, objects); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; } return super.onOptionsItemSelected(item); } private void setupToolBar() { final ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayShowTitleEnabled(false); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setHomeButtonEnabled(true); } } private void setupForm() { mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView); mFormBuilder = new FormBuildHelper(this, mRecyclerView); FormHeader header1 = FormHeader.createInstance().setTitle("Personal Info"); FormElement element11 = FormElement.createInstance().setType(FormElement.TYPE_EDITTEXT_EMAIL).setTitle("Email").setHint("Enter Email"); FormElement element12 = FormElement.createInstance().setType(FormElement.TYPE_EDITTEXT_PHONE).setTitle("Phone").setValue("+8801712345678"); FormHeader header2 = FormHeader.createInstance().setTitle("Family Info"); FormElement element21 = FormElement.createInstance().setType(FormElement.TYPE_EDITTEXT_TEXT_SINGLELINE).setTitle("Location").setValue("Dhaka"); FormElement element22 = FormElement.createInstance().setType(FormElement.TYPE_EDITTEXT_TEXT_MULTILINE).setTitle("Address"); FormElement element23 = FormElement.createInstance().setType(FormElement.TYPE_EDITTEXT_NUMBER).setTitle("Zip Code").setValue("1000"); FormHeader header3 = FormHeader.createInstance().setTitle("Schedule"); FormElement element31 = FormElement.createInstance().setType(FormElement.TYPE_PICKER_DATE).setTitle("Date"); FormElement element32 = FormElement.createInstance().setType(FormElement.TYPE_PICKER_TIME).setTitle("Time"); FormElement element33 = FormElement.createInstance().setType(FormElement.TYPE_EDITTEXT_PASSWORD).setTitle("Password").setValue("abcd1234"); FormHeader header4 = FormHeader.createInstance().setTitle("Preferred Items"); List<String> fruits = new ArrayList<>(); fruits.add("Banana"); fruits.add("Orange"); fruits.add("Mango"); fruits.add("Guava"); FormElement element41 = FormElement.createInstance().setType(FormElement.TYPE_SPINNER_DROPDOWN).setTitle("Single Item").setOptions(fruits); FormElement element42 = FormElement.createInstance().setType(FormElement.TYPE_PICKER_MULTI_CHECKBOX).setTitle("Multi Items").setOptions(fruits); List<FormObject> formItems = new ArrayList<>(); formItems.add(header1); formItems.add(element11); formItems.add(element12); formItems.add(header2); formItems.add(element21); formItems.add(element22); formItems.add(element23); formItems.add(header3); formItems.add(element31); formItems.add(element32); formItems.add(element33); formItems.add(header4); formItems.add(element41); formItems.add(element42); mFormBuilder.addFormElements(formItems); mFormBuilder.refreshView(); } private void setupForm(Bundle bundle) { mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView); mFormBuilder = new FormBuildHelper(this, mRecyclerView); ArrayList<FormObject> objects = bundle.getParcelableArrayList(KEY); mFormBuilder.addFormElements(objects); mFormBuilder.refreshView(); } }
[ "lavibarjatya@gmail.com" ]
lavibarjatya@gmail.com
755a0b96317910bb1e4bcef955ddd93dfd061ed2
bec77cdb3616c2ba77d3e74fe5781715a5c2a876
/src/main/java/org/reaktivity/reaktive/httpserver/internal/HttpServerProviderImpl.java
855310bcc2c03921984c63cf91948a3da5579a64
[ "Apache-2.0" ]
permissive
reaktivity/reaktive-httpserver.java
d425eff82b0e382d438f71a5572a1a4897ab8153
b885ba4b4b0bfbdb9532c95fafca14d841813951
refs/heads/develop
2022-05-07T12:12:03.462829
2020-10-16T04:52:55
2020-10-16T04:52:55
80,589,141
1
1
NOASSERTION
2022-03-10T16:06:24
2017-02-01T04:22:26
Java
UTF-8
Java
false
false
1,811
java
/** * Copyright 2016-2017 The Reaktivity Project * * The Reaktivity Project 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.reaktivity.reaktive.httpserver.internal; import java.io.IOException; import java.net.InetSocketAddress; import org.reaktivity.nukleus.Configuration; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsServer; import com.sun.net.httpserver.spi.HttpServerProvider; @SuppressWarnings("restriction") public final class HttpServerProviderImpl extends HttpServerProvider { public static final ThreadLocal<Configuration> CONFIGURATION = new ThreadLocal<Configuration>() { protected Configuration initialValue() { return new Configuration(); } }; @Override public HttpServer createHttpServer( InetSocketAddress addr, int backlog) throws IOException { HttpServer server = new HttpServerImpl(CONFIGURATION.get()); if (addr != null) { server.bind(addr, backlog); } return server; } @Override public HttpsServer createHttpsServer( InetSocketAddress addr, int backlog) throws IOException { throw new UnsupportedOperationException("not yet implemented"); } }
[ "john.fallows@kaazing.com" ]
john.fallows@kaazing.com