blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
131 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
32 values
content
stringlengths
3
9.45M
authors
sequencelengths
1
1
author_id
stringlengths
0
313
ebc3efcb917c99e1346b94b71857ff79bd1f045c
0ae04e33577b4239d2a5163a17e075325eda6805
/Assignment2/src/ca/utoronto/utm/othello/viewcontroller/ClausesStopwatchEventHandler.java
0af5f5ebc9b19912848d322ce4d55e30c676ca23
[]
no_license
shadowshadow725/CSC207H5F
f81d11a277d16ab6000114b5da91346d3b587407
6cc3840fde4ec483022a473dc6b0e183a557a8b9
refs/heads/master
2023-02-21T17:34:56.161193
2021-01-24T20:57:18
2021-01-24T20:57:18
332,552,365
1
0
null
null
null
null
UTF-8
Java
false
false
892
java
package ca.utoronto.utm.othello.viewcontroller; import ca.utoronto.utm.othello.model.Othello; import javafx.animation.Timeline; import javafx.event.ActionEvent; import javafx.event.Event; import javafx.event.EventHandler; import java.sql.SQLOutput; /** * Stop watch EventHandler * * @author team RankedFlexofFour */ public class ClausesStopwatchEventHandler implements EventHandler<ActionEvent> { private int secondsLeft; private ClausesStopwatch cs ; private Timeline countdownTimeline; public ClausesStopwatchEventHandler(int sec, ClausesStopwatch cs, Timeline tl){ this.secondsLeft = sec; this.cs = cs; this.countdownTimeline = tl; } @Override public void handle(ActionEvent event) { cs.secondPass(); cs.notifyObservers(); if (secondsLeft <= 0) { countdownTimeline.stop(); } } }
44ca25ec9ee574c1b5447ac99770c8c6318a96b1
dd227b26dcafc86c421365095df9849c256eaa5b
/MapEditor2/MapEditor.java
3cd6a396189bd614de0d2d4723e3468902537610
[]
no_license
Ethen80/TankWar
f0e9b30316463db4e0548a962b2e12a34b7ea224
4337f40724f2df0b28a54496c3b4541357d60e05
refs/heads/master
2022-10-10T08:37:00.380169
2020-06-04T01:16:10
2020-06-04T01:16:10
267,213,563
0
0
null
null
null
null
UTF-8
Java
false
false
124
java
package MapEditor2; public class MapEditor { public static void main(String[] args) { new FrameMain(); } }
32c03d36ee304f30cbe55acfcb9c5c5e0597dcc5
a35d63bf12540450433ef4bb5aac8f1d74054471
/jpa-interface-sample/src/main/java/com/sample/jpa/model/state/StateDiagram.java
5455d9033357db2103f5fb20437527ac6f9810ac
[]
no_license
Consolefire/sample-projects
2439f7bf07e78c5052823e350cc1bb61d04618c7
37391a584223da7bb087cf456a8f0a3fc9ed0cda
refs/heads/master
2021-01-10T17:39:33.323339
2016-04-29T13:42:32
2016-04-29T13:43:06
50,579,290
0
0
null
null
null
null
UTF-8
Java
false
false
2,222
java
/** * */ package com.sample.jpa.model.state; import java.util.HashSet; import java.util.Set; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Table; import com.sample.jpa.model.framework.DirectedGraph; import com.sample.jpa.model.service.Service; /** * @author sabuj.das * */ @Entity @Table @Access(AccessType.PROPERTY) public class StateDiagram extends DirectedGraph<Service, State, StateNode> { @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getId() { return super.getId(); } @Override @OneToMany(targetEntity = StateNode.class, cascade = CascadeType.ALL) public Set<StateNode> getNodes() { return super.getNodes(); } @Override @OneToOne(targetEntity = Service.class, cascade = CascadeType.ALL) @JoinColumn(name = "owner_node_id") public Service getOwner() { return super.getOwner(); } @Override @OneToOne(targetEntity = StateNode.class, cascade = CascadeType.ALL) public Set<StateNode> getRoots() { return super.getRoots(); } public void addStateTransition(StateNode sourceNode, StateNode targetNode) { if(null == targetNode){ return; } if(null == sourceNode){ addNode(targetNode); } addNode(targetNode, sourceNode); StateTransition stateTransition = new StateTransition(); stateTransition.setSource(sourceNode); stateTransition.setTarget(targetNode); sourceNode.addTransition(stateTransition); } public Set<StateNode> getStateNodesOf(StateNode.Type type){ Set<StateNode> nodes = new HashSet<>(); for (StateNode sn : getNodes()) { if(type.equals(sn.getType())){ nodes.add(sn); } } return nodes; } public StateDiagram copy(){ StateDiagram diagram = new StateDiagram(); return diagram; } /** * @param diagram */ public void copy(StateDiagram diagram) { } }
cd882bd366ab984bda5272cad1b817bcceec7fa1
795642815477885267d4544ad7e89d3e6c86f2b1
/src/test/java/de/rkable/coverity/metrics/DirectoryTest.java
285a8abdbe8e63c692b56fb05f7835eba73a5116
[]
no_license
MarkDrei/CoverityMetricsAnalyzer
5c799c8be2e78bbedeb2021476f8d9d41e2caadf
2185e3eab0a0b7e63c92dfe2033ee6b4f59c86d1
refs/heads/master
2020-03-24T07:46:57.209726
2018-10-11T16:16:56
2018-10-11T16:16:56
142,574,678
0
0
null
null
null
null
UTF-8
Java
false
false
1,694
java
package de.rkable.coverity.metrics; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; public class DirectoryTest { @Test public void testThatDirectoryWithoutSlashIsInvalid() { assertThrows(IllegalArgumentException.class, () -> new Directory("")); } @Test public void testSimpleHierarchyPrintout() { Directory directory = new Directory("/"); String expected = "directory: /\n"; assertEquals(expected, directory.printHierarchy()); } @Test public void testSimpleHierarchyWithNamePrintout() { Directory directory = new Directory("/root"); String expected = "directory: /root\n"; assertEquals(expected, directory.printHierarchy()); } @Test public void testTwoLevelHierarchy() { Directory root = new Directory("/root"); Directory child = new Directory("/root/child"); root.addChild(child); String expected = "directory: /root\n" + " directory: /root/child\n"; assertEquals(expected, root.printHierarchy()); } @Test public void testHierarchyWithFiles() { Directory root = new Directory("/root"); File file = new File("/root/fileA"); root.addFile(file); Directory child = new Directory("/root/child"); root.addChild(child); String expected = "directory: /root\n" + " file: /root/fileA\n" + " directory: /root/child\n"; assertEquals(expected, root.printHierarchy()); } }
251474d87919e925bf58075cb32be0498d0fa86a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_fcd3e8f059326743f6ae13579e41f7cbb6799bcc/Plus1BannerView/3_fcd3e8f059326743f6ae13579e41f7cbb6799bcc_Plus1BannerView_t.java
1335c4c1ec15dbb68a0c17dada5a0c2b909c7141
[]
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
5,076
java
/** * Copyright (c) 2011, Alexander Klestov <[email protected]> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the "Wapstart" nor the names * of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package ru.wapstart.plus1.sdk; import android.content.Context; import android.content.Intent; import android.graphics.*; import android.util.AttributeSet; import android.view.View; import android.view.animation.Animation; import android.view.animation.TranslateAnimation; import android.widget.ImageView; import android.widget.TextView; import android.widget.LinearLayout; /** * @author Alexander Klestov <[email protected]> * @copyright Copyright (c) 2011, Wapstart */ public class Plus1BannerView extends LinearLayout { private Plus1Banner banner; private TextView title; private TextView content; private ImageView image; private Animation hideAnimation = null; private Animation showAnimation = null; public Plus1BannerView(Context context) { super(context); init(); } public Plus1BannerView(Context context, AttributeSet attr) { super(context, attr); init(); } public Plus1Banner getBanner() { return banner; } public void setBanner(Plus1Banner banner) { this.banner = banner; if ((banner != null) && (banner.getId() > 0)) { if (getVisibility() == INVISIBLE) { startAnimation(showAnimation); setVisibility(VISIBLE); } title.setText(banner.getTitle()); content.setText(banner.getTitle()); String imageUrl = null; if (!banner.getPictureUrl().equals("")) imageUrl = banner.getPictureUrl(); else if (!banner.getPictureUrlPng().equals("")) imageUrl = banner.getPictureUrlPng(); if (imageUrl != null) new ImageDowloader(this.image).execute(imageUrl); } else if (getVisibility() == VISIBLE) { startAnimation(hideAnimation); setVisibility(INVISIBLE); } } private void init() { setBackgroundResource(R.drawable.wp_banner_background); ImageView shild = new ImageView(getContext()); shild.setImageResource(R.drawable.wp_banner_shild); shild.setMaxWidth(9); addView(shild); LinearLayout ll = new LinearLayout(getContext()); ll.setOrientation(VERTICAL); this.title = new TextView(getContext()); title.setTypeface(Typeface.SANS_SERIF, Typeface.BOLD); title.setTextSize(14f); title.setTextColor(Color.WHITE); ll.addView(title); this.content = new TextView(getContext()); content.setTypeface(Typeface.SANS_SERIF); content.setTextSize(13f); content.setTextColor(Color.WHITE); ll.addView(content); this.image = new ImageView(getContext()); ll.addView(image); addView(ll); setOnClickListener( new OnClickListener() { public void onClick(View view) { if ( (banner == null) || (banner.getLink() == null) ) return; // TODO: click2call getContext().startActivity( new Intent( Intent.ACTION_VIEW, android.net.Uri.parse(banner.getLink()) ) ); } } ); this.showAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, -1f, Animation.RELATIVE_TO_SELF, 0f ); showAnimation.setDuration(500); this.hideAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, -1f ); hideAnimation.setDuration(500); setVisibility(INVISIBLE); } }
80fff90a7abc11937ace928dd2663ede0114a2f1
f689208b82a9a8262d97a73e3e87ee9069b1c171
/SimonJiayan/src/SimonJiayan/MoveInterfaceJiayan.java
5f0bb77481afd17251ba1de535b4a096acc39f6c
[]
no_license
summ99/SimonJiayan6
cebac2c4b8ede3b45a524baf5d7e9e3c077f1836
c8bf02f1af2e7b112c027c8727df4a7699584ce7
refs/heads/master
2021-01-11T23:11:30.578164
2017-01-11T17:34:12
2017-01-11T17:34:12
78,555,919
0
0
null
null
null
null
UTF-8
Java
false
false
108
java
package SimonJiayan; public interface MoveInterfaceJiayan { ButtonInterfaceJiayan getButton(); }
[ "Student [email protected]" ]
1538107bd9d8c7fbcf4d5c7fd47439400d820037
dfcf12d0015a2bd1e8da5ebfd9add6585aee6414
/flamingo/src/main/java/org/pushingpixels/flamingo/internal/ui/common/CommandButtonLayoutManagerTile.java
253dc128f77ff464cb29c727310062de5ff5df07
[ "BSD-3-Clause" ]
permissive
https-ultronhouse-com/radiance
1176a6222ee3e765af599cb5e00eaefcee95f61f
0f4851821b311de7a92244565685817c46069f74
refs/heads/master
2020-06-25T20:05:09.965232
2019-07-21T14:29:46
2019-07-21T14:29:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
20,249
java
/* * Copyright (c) 2005-2019 Radiance Kirill Grouchnikov. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * o Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * o Neither the name of the copyright holder nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.pushingpixels.flamingo.internal.ui.common; import org.pushingpixels.flamingo.api.common.*; import org.pushingpixels.flamingo.api.common.JCommandButton.CommandButtonKind; import org.pushingpixels.flamingo.internal.utils.FlamingoUtilities; import org.pushingpixels.neon.icon.ResizableIcon; import org.pushingpixels.substance.internal.utils.SubstanceMetricsUtilities; import javax.swing.*; import java.awt.*; import java.util.ArrayList; public class CommandButtonLayoutManagerTile implements CommandButtonLayoutManager { @Override public int getPreferredIconSize(AbstractCommandButton commandButton) { return FlamingoUtilities.getScaledSize(32, commandButton.getFont().getSize(), 2.0, 4); } @Override public Dimension getPreferredSize(AbstractCommandButton commandButton) { Insets borderInsets = commandButton.getInsets(); int by = borderInsets.top + borderInsets.bottom; FontMetrics fm = SubstanceMetricsUtilities.getFontMetrics(commandButton.getFont()); String buttonText = commandButton.getText(); int titleWidth = (buttonText == null) ? 0 : fm .stringWidth(commandButton.getText()); String extraText = commandButton.getExtraText(); int extraWidth = (extraText == null) ? 0 : fm.stringWidth(extraText); double textWidth = Math.max(titleWidth, extraWidth); int layoutHGap = FlamingoUtilities.getHLayoutGap(commandButton); boolean hasIcon = (commandButton.getIcon() != null); boolean hasText = (textWidth > 0); boolean hasPopupIcon = FlamingoUtilities.hasPopupAction(commandButton); int prefIconSize = hasIcon ? this.getPreferredIconSize(commandButton) : 0; // start with the left insets int width = borderInsets.left; // icon? if (hasIcon) { // padding before the icon width += layoutHGap; // icon width width += prefIconSize; // padding after the icon width += layoutHGap; } // text? if (hasText) { // padding before the text width += layoutHGap; // text width width += textWidth; // padding after the text width += layoutHGap; } // popup icon? if (hasPopupIcon) { // padding before the popup icon width += 2 * layoutHGap; // text width width += 1 + fm.getHeight() / 2; // padding after the popup icon width += 2 * layoutHGap; } if (commandButton instanceof JCommandButton) { JCommandButton jcb = (JCommandButton) commandButton; CommandButtonKind buttonKind = jcb.getCommandButtonKind(); boolean hasSeparator = false; if (buttonKind == CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION && (hasIcon || hasText)) { hasSeparator = true; } if (buttonKind == CommandButtonKind.ACTION_AND_POPUP_MAIN_POPUP && hasIcon) { hasSeparator = true; } if (hasSeparator) { // space for a vertical separator width += new JSeparator(JSeparator.VERTICAL).getPreferredSize().width; } } // right insets width += borderInsets.right; // and remove the padding before the first and after the last elements width -= 2 * layoutHGap; return new Dimension(width, by + Math.max(prefIconSize, 2 * (fm.getAscent() + fm.getDescent()))); } @Override public Point getActionKeyTipAnchorCenterPoint(AbstractCommandButton commandButton) { CommandButtonLayoutInfo layoutInfo = this.getLayoutInfo(commandButton); boolean hasIcon = (commandButton.getIcon() != null); int height = commandButton.getHeight(); if (commandButton.getComponentOrientation().isLeftToRight()) { // If the button shows icon, the key tip is at the right edge of the icon // otherwise it is at the right edge of the full action click area int x = hasIcon ? layoutInfo.iconRect.x + layoutInfo.iconRect.width : layoutInfo.actionClickArea.x + layoutInfo.actionClickArea.width; return new Point(x, (height + layoutInfo.actionClickArea.height) / 2); } else { // If the button shows icon, the key tip is at the left edge of the icon // otherwise it is at the left edge of the full action click area int x = hasIcon ? layoutInfo.iconRect.x : layoutInfo.actionClickArea.x; return new Point(x, (height + layoutInfo.actionClickArea.height) / 2); } } @Override public Point getPopupKeyTipAnchorCenterPoint(AbstractCommandButton commandButton) { CommandButtonLayoutInfo layoutInfo = this.getLayoutInfo(commandButton); int height = commandButton.getHeight(); if (commandButton.getComponentOrientation().isLeftToRight()) { return new Point(layoutInfo.popupClickArea.x + layoutInfo.popupClickArea.width, (height + layoutInfo.popupClickArea.height) / 2); } else { return new Point(layoutInfo.popupClickArea.x, (height + layoutInfo.popupClickArea.height) / 2); } } @Override public CommandButtonLayoutInfo getLayoutInfo(AbstractCommandButton commandButton) { CommandButtonLayoutInfo result = new CommandButtonLayoutInfo(); result.actionClickArea = new Rectangle(0, 0, 0, 0); result.popupClickArea = new Rectangle(0, 0, 0, 0); Insets ins = commandButton.getInsets(); result.iconRect = new Rectangle(); result.popupActionRect = new Rectangle(); boolean ltr = commandButton.getComponentOrientation().isLeftToRight(); int width = commandButton.getWidth(); int height = commandButton.getHeight(); int prefWidth = this.getPreferredSize(commandButton).width; int shiftX = 0; if (width > prefWidth) { // We have more horizontal space than needed to display the content. // Consult the horizontal alignment attribute of the command button to see // how we should shift the content horizontally. switch (commandButton.getHorizontalAlignment()) { case SwingConstants.LEADING: if (!ltr) { // shift everything to the right shiftX = width - prefWidth; } break; case SwingConstants.CENTER: // shift everything to be centered horizontally shiftX = (width - prefWidth) / 2; break; case SwingConstants.TRAILING: if (ltr) { // shift everything to the right shiftX = width - prefWidth; } } } ResizableIcon buttonIcon = commandButton.getIcon(); String buttonText = commandButton.getText(); String buttonExtraText = commandButton.getExtraText(); boolean hasIcon = (buttonIcon != null); boolean hasText = (buttonText != null) || (buttonExtraText != null); boolean hasPopupIcon = FlamingoUtilities.hasPopupAction(commandButton); FontMetrics fm = SubstanceMetricsUtilities.getFontMetrics(commandButton.getFont()); int labelHeight = fm.getAscent() + fm.getDescent(); JCommandButton.CommandButtonKind buttonKind = (commandButton instanceof JCommandButton) ? ((JCommandButton) commandButton).getCommandButtonKind() : JCommandButton.CommandButtonKind.ACTION_ONLY; int layoutHGap = FlamingoUtilities.getHLayoutGap(commandButton); if (ltr) { int x = ins.left + shiftX - layoutHGap; // icon if (hasIcon) { x += layoutHGap; int iconHeight = buttonIcon.getIconHeight(); int iconWidth = buttonIcon.getIconWidth(); result.iconRect.x = x; result.iconRect.y = (height - iconHeight) / 2; result.iconRect.width = iconWidth; result.iconRect.height = iconHeight; x += (iconWidth + layoutHGap); } // text if (hasText) { x += layoutHGap; TextLayoutInfo lineLayoutInfo = new TextLayoutInfo(); lineLayoutInfo.text = commandButton.getText(); lineLayoutInfo.textRect = new Rectangle(); lineLayoutInfo.textRect.x = x; lineLayoutInfo.textRect.y = (height - 2 * labelHeight) / 2; lineLayoutInfo.textRect.width = (buttonText == null) ? 0 : fm.stringWidth(buttonText); lineLayoutInfo.textRect.height = labelHeight; result.textLayoutInfoList = new ArrayList<>(); result.textLayoutInfoList.add(lineLayoutInfo); String extraText = commandButton.getExtraText(); TextLayoutInfo extraLineLayoutInfo = new TextLayoutInfo(); extraLineLayoutInfo.text = extraText; extraLineLayoutInfo.textRect = new Rectangle(); extraLineLayoutInfo.textRect.x = x; extraLineLayoutInfo.textRect.y = lineLayoutInfo.textRect.y + labelHeight; extraLineLayoutInfo.textRect.width = (extraText == null) ? 0 : fm.stringWidth(extraText); extraLineLayoutInfo.textRect.height = labelHeight; result.extraTextLayoutInfoList = new ArrayList<>(); result.extraTextLayoutInfoList.add(extraLineLayoutInfo); x += Math.max(lineLayoutInfo.textRect.width, extraLineLayoutInfo.textRect.width); x += layoutHGap; } if (hasPopupIcon) { x += 2 * layoutHGap; result.popupActionRect.x = x; result.popupActionRect.y = (height - labelHeight) / 2 - 1; result.popupActionRect.width = 1 + labelHeight / 2; result.popupActionRect.height = labelHeight + 2; x += result.popupActionRect.width; x += 2 * layoutHGap; } int xBorderBetweenActionAndPopup = 0; int verticalSeparatorWidth = new JSeparator(JSeparator.VERTICAL) .getPreferredSize().width; // compute the action and popup click areas switch (buttonKind) { case ACTION_ONLY: result.actionClickArea.x = 0; result.actionClickArea.y = 0; result.actionClickArea.width = width; result.actionClickArea.height = height; result.isTextInActionArea = true; break; case POPUP_ONLY: result.popupClickArea.x = 0; result.popupClickArea.y = 0; result.popupClickArea.width = width; result.popupClickArea.height = height; result.isTextInActionArea = false; break; case ACTION_AND_POPUP_MAIN_ACTION: // 1. break before popup icon if button has text or icon // 2. no break (all popup) if button has no text and no icon if (hasText || hasIcon) { // shift popup action rectangle to the right to // accomodate the vertical separator result.popupActionRect.x += verticalSeparatorWidth; xBorderBetweenActionAndPopup = result.popupActionRect.x - 2 * layoutHGap; result.actionClickArea.x = 0; result.actionClickArea.y = 0; result.actionClickArea.width = xBorderBetweenActionAndPopup; result.actionClickArea.height = height; result.popupClickArea.x = xBorderBetweenActionAndPopup; result.popupClickArea.y = 0; result.popupClickArea.width = width - xBorderBetweenActionAndPopup; result.popupClickArea.height = height; result.separatorOrientation = CommandButtonSeparatorOrientation.VERTICAL; result.separatorArea = new Rectangle(); result.separatorArea.x = xBorderBetweenActionAndPopup; result.separatorArea.y = 0; result.separatorArea.width = verticalSeparatorWidth; result.separatorArea.height = height; } else { result.popupClickArea.x = 0; result.popupClickArea.y = 0; result.popupClickArea.width = width; result.popupClickArea.height = height; } result.isTextInActionArea = true; break; case ACTION_AND_POPUP_MAIN_POPUP: // 1. break after icon if button has icon // 2. no break (all popup) if button has no icon if (hasIcon) { // shift text rectangles and popup action rectangle to the // right // to accomodate the vertical separator if (result.textLayoutInfoList != null) { for (TextLayoutInfo textLayoutInfo : result.textLayoutInfoList) { textLayoutInfo.textRect.x += verticalSeparatorWidth; } } if (result.extraTextLayoutInfoList != null) { for (TextLayoutInfo extraTextLayoutInfo : result.extraTextLayoutInfoList) { extraTextLayoutInfo.textRect.x += verticalSeparatorWidth; } } result.popupActionRect.x += verticalSeparatorWidth; xBorderBetweenActionAndPopup = result.iconRect.x + result.iconRect.width + layoutHGap; result.actionClickArea.x = 0; result.actionClickArea.y = 0; result.actionClickArea.width = xBorderBetweenActionAndPopup; result.actionClickArea.height = height; result.popupClickArea.x = xBorderBetweenActionAndPopup; result.popupClickArea.y = 0; result.popupClickArea.width = width - xBorderBetweenActionAndPopup; result.popupClickArea.height = height; result.separatorOrientation = CommandButtonSeparatorOrientation.VERTICAL; result.separatorArea = new Rectangle(); result.separatorArea.x = xBorderBetweenActionAndPopup; result.separatorArea.y = 0; result.separatorArea.width = verticalSeparatorWidth; result.separatorArea.height = height; } else { result.popupClickArea.x = 0; result.popupClickArea.y = 0; result.popupClickArea.width = width; result.popupClickArea.height = height; } result.isTextInActionArea = false; break; } } else { int x = width - ins.right - shiftX + layoutHGap; // icon if (hasIcon) { x -= layoutHGap; int iconHeight = buttonIcon.getIconHeight(); int iconWidth = buttonIcon.getIconWidth(); result.iconRect.x = x - iconWidth; result.iconRect.y = (height - iconHeight) / 2; result.iconRect.width = iconWidth; result.iconRect.height = iconHeight; x -= (iconWidth + layoutHGap); } // text if (hasText) { x -= layoutHGap; TextLayoutInfo lineLayoutInfo = new TextLayoutInfo(); lineLayoutInfo.text = commandButton.getText(); lineLayoutInfo.textRect = new Rectangle(); lineLayoutInfo.textRect.width = (buttonText == null) ? 0 : fm.stringWidth(buttonText); lineLayoutInfo.textRect.x = x - lineLayoutInfo.textRect.width; lineLayoutInfo.textRect.y = (height - 2 * labelHeight) / 2; lineLayoutInfo.textRect.height = labelHeight; result.textLayoutInfoList = new ArrayList<>(); result.textLayoutInfoList.add(lineLayoutInfo); String extraText = commandButton.getExtraText(); TextLayoutInfo extraLineLayoutInfo = new TextLayoutInfo(); extraLineLayoutInfo.text = extraText; extraLineLayoutInfo.textRect = new Rectangle(); extraLineLayoutInfo.textRect.width = (extraText == null) ? 0 : fm.stringWidth(buttonText); extraLineLayoutInfo.textRect.x = x - extraLineLayoutInfo.textRect.width; extraLineLayoutInfo.textRect.y = lineLayoutInfo.textRect.y + labelHeight; extraLineLayoutInfo.textRect.height = labelHeight; result.extraTextLayoutInfoList = new ArrayList<TextLayoutInfo>(); result.extraTextLayoutInfoList.add(extraLineLayoutInfo); x -= Math.max(lineLayoutInfo.textRect.width, extraLineLayoutInfo.textRect.width); x -= layoutHGap; } if (hasPopupIcon) { x -= 2 * layoutHGap; result.popupActionRect.width = 1 + labelHeight / 2; result.popupActionRect.x = x - result.popupActionRect.width; result.popupActionRect.y = (height - labelHeight) / 2 - 1; result.popupActionRect.height = labelHeight + 2; x -= result.popupActionRect.width; x -= 2 * layoutHGap; } int xBorderBetweenActionAndPopup = 0; int verticalSeparatorWidth = new JSeparator(JSeparator.VERTICAL) .getPreferredSize().width; // compute the action and popup click areas switch (buttonKind) { case ACTION_ONLY: result.actionClickArea.x = 0; result.actionClickArea.y = 0; result.actionClickArea.width = width; result.actionClickArea.height = height; result.isTextInActionArea = true; break; case POPUP_ONLY: result.popupClickArea.x = 0; result.popupClickArea.y = 0; result.popupClickArea.width = width; result.popupClickArea.height = height; result.isTextInActionArea = false; break; case ACTION_AND_POPUP_MAIN_ACTION: // 1. break before popup icon if button has text or icon // 2. no break (all popup) if button has no text and no icon if (hasText || hasIcon) { // shift popup action rectangle to the left to // accomodate the vertical separator result.popupActionRect.x -= verticalSeparatorWidth; xBorderBetweenActionAndPopup = result.popupActionRect.x + result.popupActionRect.width + 2 * layoutHGap; result.actionClickArea.x = xBorderBetweenActionAndPopup; result.actionClickArea.y = 0; result.actionClickArea.width = width - xBorderBetweenActionAndPopup; result.actionClickArea.height = height; result.popupClickArea.x = 0; result.popupClickArea.y = 0; result.popupClickArea.width = xBorderBetweenActionAndPopup; result.popupClickArea.height = height; result.separatorOrientation = CommandButtonSeparatorOrientation.VERTICAL; result.separatorArea = new Rectangle(); result.separatorArea.x = xBorderBetweenActionAndPopup; result.separatorArea.y = 0; result.separatorArea.width = verticalSeparatorWidth; result.separatorArea.height = height; } else { result.popupClickArea.x = 0; result.popupClickArea.y = 0; result.popupClickArea.width = width; result.popupClickArea.height = height; } result.isTextInActionArea = true; break; case ACTION_AND_POPUP_MAIN_POPUP: // 1. break after icon if button has icon // 2. no break (all popup) if button has no icon if (hasIcon) { // shift text rectangles and popup action rectangle to the // left to accomodate the vertical separator if (result.textLayoutInfoList != null) { for (TextLayoutInfo textLayoutInfo : result.textLayoutInfoList) { textLayoutInfo.textRect.x -= verticalSeparatorWidth; } } if (result.extraTextLayoutInfoList != null) { for (TextLayoutInfo extraTextLayoutInfo : result.extraTextLayoutInfoList) { extraTextLayoutInfo.textRect.x -= verticalSeparatorWidth; } } result.popupActionRect.x -= verticalSeparatorWidth; xBorderBetweenActionAndPopup = result.iconRect.x - layoutHGap; result.actionClickArea.x = xBorderBetweenActionAndPopup; result.actionClickArea.y = 0; result.actionClickArea.width = width - xBorderBetweenActionAndPopup; result.actionClickArea.height = height; result.popupClickArea.x = 0; result.popupClickArea.y = 0; result.popupClickArea.width = xBorderBetweenActionAndPopup; result.popupClickArea.height = height; result.separatorOrientation = CommandButtonSeparatorOrientation.VERTICAL; result.separatorArea = new Rectangle(); result.separatorArea.x = xBorderBetweenActionAndPopup; result.separatorArea.y = 0; result.separatorArea.width = verticalSeparatorWidth; result.separatorArea.height = height; } else { result.popupClickArea.x = 0; result.popupClickArea.y = 0; result.popupClickArea.width = width; result.popupClickArea.height = height; } result.isTextInActionArea = false; break; } } return result; } }
c491bcfdb0c27440100b42a7cdb9d705e2085c5b
b23404e272db01f2bf46320565c11b9e02cf0c61
/new/pps/src/main/java/ice/cn/joy/ggg/api/model/CollectHolder.java
ab036f8c44759142c0cd6abbf0342df8974c7908
[]
no_license
brucesq/brucedamon001
95ab98798f1c29d722a397681956c24ff4091385
92ab181f90005afffb354d10768921545912119c
refs/heads/master
2021-05-29T09:35:05.115101
2011-12-20T05:42:28
2011-12-20T05:42:28
32,131,555
0
1
null
null
null
null
UTF-8
Java
false
false
749
java
// ********************************************************************** // // Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // Ice version 3.4.0 package cn.joy.ggg.api.model; // <auto-generated> // // Generated from file `community.ice' // // Warning: do not edit this file. // // </auto-generated> public final class CollectHolder { public CollectHolder() { } public CollectHolder(Collect value) { this.value = value; } public Collect value; }
[ "quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141" ]
quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141
acdb2abb83a5ebfc8b15f9f7a27d5a589ca3d044
674b570ccd852f88e3f3ef946072cf3a9ca7229f
/app/src/main/java/br/unifor/pin/ssa/activity/SolicitacaoDetailActivity.java
c22395b8ff4e093909668cc8c74a4ce007ea961d
[]
no_license
danjorge/AgendamentoUniforAndroid
2f985057fe9111830145ff6e1b5f9d2d98a3657e
8d992140edc70dc2e69afadb7ceee6e0badc22b6
refs/heads/master
2021-01-15T09:42:01.401960
2016-06-03T18:59:30
2016-06-03T18:59:30
48,251,973
0
0
null
null
null
null
UTF-8
Java
false
false
3,992
java
package br.unifor.pin.ssa.activity; import android.content.Context; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.TextView; import br.unifor.pin.ssa.R; import br.unifor.pin.ssa.entity.Solicitacao; /** * Classe de iniciacao da Activity de detalhe da solicitacao * Created by Daniel Jorge on 08/04/2016. */ public class SolicitacaoDetailActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_solicitacao_detail); final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); } setTitle(""); /** * Recupera o objeto passado de outra activity/fragment para setar nas labels que compoem a activity */ Solicitacao solicitacao = (Solicitacao) getIntent().getSerializableExtra("Solicitacao"); TextView txtIdSolicitacao = (TextView) findViewById(R.id.txt_id_solicitacao); TextView txtStatusSolicitacao = (TextView) findViewById(R.id.txt_status_solicitacao_detail); TextView txtSolicitante = (TextView) findViewById(R.id.txt_solicitante_detail); TextView txtAssuntoSolicitacao = (TextView) findViewById(R.id.txt_assunto_solicitacao_detail); TextView txtDscSolicitacao = (TextView) findViewById(R.id.txt_dsc_solicitacao_detail); TextView labelRespostaSolicitacao = (TextView) findViewById(R.id.label_resposta_solicitacao_detail); TextView txtRespostaSolicitacao = (TextView ) findViewById(R.id.txt_resposta_solicitacao_detail); if (txtIdSolicitacao != null) { txtIdSolicitacao.setText(solicitacao.getId().toString()); } if (txtStatusSolicitacao != null) { txtStatusSolicitacao.setText(solicitacao.getStatusSolicitacao().getDescricao().toUpperCase()); } if (txtSolicitante != null) { txtSolicitante.setText(solicitacao.getUsuario().getNome()); } if (txtAssuntoSolicitacao != null) { txtAssuntoSolicitacao.setText(solicitacao.getAssunto().toUpperCase()); } if (txtDscSolicitacao != null) { txtDscSolicitacao.setText(solicitacao.getDescricao().toUpperCase()); } if (labelRespostaSolicitacao != null) { labelRespostaSolicitacao.setVisibility(solicitacao.getRespostaSolicitacao() != null ? View.VISIBLE : View.GONE); } if (txtRespostaSolicitacao != null) { txtRespostaSolicitacao.setVisibility(solicitacao.getRespostaSolicitacao() != null ? View.VISIBLE : View.GONE); txtRespostaSolicitacao.setText(txtRespostaSolicitacao.getVisibility() == View.VISIBLE ? solicitacao.getRespostaSolicitacao().toUpperCase() : ""); } } public void hideSoftKeyboard() { if(getCurrentFocus()!=null) { InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0); } } @Override public void onBackPressed() { super.onBackPressed(); hideSoftKeyboard(); overridePendingTransition(R.anim.right_out, R.anim.left_in); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()){ case android.R.id.home: onBackPressed(); return false; } return super.onOptionsItemSelected(item); } }
837b1a357caf16b71b9e042a06dd9282f1166cf6
5ee228d4a113066323175f280b73aad7b06b0c81
/realestate/src/com/realestate/action/ModifyHouseInfoActionTransfer.java
43a916a2aff3fd47aa94c6465b5c1ffd51265757
[]
no_license
zzxwill/huffman4zzxwill
e06125262afa9140ac407b104e5d0e1d23c319fb
f60e499a017a7e36fd132029180de76e676f7a94
refs/heads/master
2021-01-16T01:08:15.143548
2008-12-31T16:02:00
2008-12-31T16:02:00
32,726,230
0
0
null
null
null
null
UTF-8
Java
false
false
664
java
package com.realestate.action; import com.opensymphony.xwork2.ActionSupport; import com.realestate.dao.HouseDAO; import com.realestate.pojo.House; public class ModifyHouseInfoActionTransfer extends ActionSupport{ private String id; private House house; public String execute(){ house = new House(); HouseDAO dao = new HouseDAO(); house = dao.findById(Integer.valueOf(id)); return SUCCESS; } public String getId(){ return this.id; } public void setId(String id){ this.id = id; } public House getHouse(){ return this.house; } public void setHouse(House house){ this.house = house; } }
[ "zzxwill@9ba967c2-d752-11dd-8179-53c65a4d6d95" ]
zzxwill@9ba967c2-d752-11dd-8179-53c65a4d6d95
6e9cb7131fbfefc5c6605c1f80d9d1d5a1523536
85f4410fece930dc2cca6669eb4c7a448ecd024b
/CallKit/src/main/java/io/rong/callkit/MyInputDialog.java
27266f74afeba5ff819907647d614392a0b6e2b8
[]
no_license
runla/24
ef30548ab647454ac390df8fd795dd8c6d786362
94caa23a6087282857ae36c633c534c3c746410f
refs/heads/master
2020-03-14T01:45:13.318168
2018-04-28T07:36:18
2018-04-28T07:36:18
131,384,218
0
0
null
null
null
null
UTF-8
Java
false
false
5,352
java
package io.rong.callkit; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.TextView; import com.example.fansonlib.widget.dialogfragment.base.BaseDialogFragment; import com.example.fansonlib.widget.dialogfragment.base.Utils; import com.example.fansonlib.widget.dialogfragment.base.ViewHolder; /** * Created by chenjianrun on 2017/10/23. * 描述:简单输入对话框 */ public class MyInputDialog extends BaseDialogFragment { public static final String CONTENT_PARAM = "InputContent"; private String content; private EditText mEditInput; private TextView mTvSend; private TextView mTvPicture; private OnTextSendListener mOnTextSendListener; // 系统软键盘 private InputMethodManager mInputMethodManager; @Override public int intLayoutId() { return R.layout.dialog_input; } /** * 创建对话框实例 * @return */ public static MyInputDialog newInstance(){ MyInputDialog dialog = new MyInputDialog(); return dialog; } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setShowBottom(true); setOutCancel(true); if (savedInstanceState!=null){ content = savedInstanceState.getString(CONTENT_PARAM); } } @Override public void convertView(ViewHolder holder, BaseDialogFragment dialog) { mEditInput = holder.getView(R.id.edit_input); mTvSend = holder.getView(R.id.tv_send); mTvPicture = holder.getView(R.id.tv_pic); // 弹出软键盘 mInputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); // 发送按钮点击事件 mTvSend.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mOnTextSendListener != null) { mOnTextSendListener.onTextSend(mEditInput.getText().toString().trim(),false); } mEditInput.setText(""); // dismiss(); // mInputMethodManager.hideSoftInputFromWindow(mEditInput.getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS); } }); mTvSend.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mOnTextSendListener != null) { mOnTextSendListener.onTextSend(mEditInput.getText().toString().trim(),false); } } }); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putString(CONTENT_PARAM,mEditInput.getText().toString().trim()); } @Override public void onStart() { super.onStart(); Window window = getDialog().getWindow(); if (window != null) { WindowManager.LayoutParams lp = window.getAttributes(); lp.width = Utils.getScreenWidth(getContext()); window.setAttributes(lp); } } @Override public void dismiss() { super.dismiss(); KeyBoardCancle(); // hintKeyboard(); // mInputMethodManager.toggleSoftInput(0,InputMethodManager.HIDE_IMPLICIT_ONLY); // mInputMethodManager.hideSoftInputFromWindow(mEditInput.getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS); } private void hintKeyboard() { //切换软键盘的显示与隐藏 InputMethodManager imm = (InputMethodManager)getContext().getSystemService(Context.INPUT_METHOD_SERVICE); Activity activity = (Activity) getContext(); imm.toggleSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0, InputMethodManager.HIDE_NOT_ALWAYS); if(imm.isActive()&&activity.getCurrentFocus()!=null){ if (activity.getCurrentFocus().getWindowToken()!=null) { imm.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), InputMethodManager.RESULT_HIDDEN); } } } // 强制隐藏软键盘 public void KeyBoardCancle() { Activity activity = (Activity) getContext(); View view = activity.getWindow().peekDecorView(); if (view != null) { InputMethodManager inputmanger = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); inputmanger.hideSoftInputFromWindow(view.getWindowToken(), 0); } } @Override public void onResume() { super.onResume(); } /** * 设置发送内容的结果回调 * @param mOnTextSendListener */ public MyInputDialog setmOnTextSendListener(OnTextSendListener mOnTextSendListener) { this.mOnTextSendListener = mOnTextSendListener; return this; } public interface OnTextSendListener { /** * * @param msg * @param askOpen 提问开关 */ void onTextSend(String msg, boolean askOpen); } }
9ddb30c6b937a9552e3ed9ab9bdab6e4ace8960e
d12cf10d9e6d53a2d401671cb65588f0a6b2529a
/Exercise-3/src/ChessboardWithArrayTest.java
eda52e9fa0de9116932e2a0e71975a32f240cbad
[]
no_license
Aggidevara/java
d1a9a615b84ccc72aa0e3c59ab2a5a91414f0abc
84713f23d98a48a69c8491166c0466256b0bd85f
refs/heads/master
2020-03-28T10:16:58.815556
2018-09-21T03:34:06
2018-09-21T03:34:06
148,096,990
0
0
null
null
null
null
UTF-8
Java
false
false
415
java
import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class ChessboardWithArrayTest { @Before public void setUp() throws Exception { } @After public void tearDown() throws Exception { } @Test public void chessPattern() { ChessboardWithArray chess=new ChessboardWithArray(); chess.chessPattern(); } }
362358c10b3f3cde5cdf9d2197ce67bd82fb1487
0ca5ec38507c92317e7dc844a3f13015999497f1
/app/babybox/events/map/TouchEvent.java
7f347b414f12e186da2d755e701432cda73afac6
[]
no_license
mybabybox/BB-Server2
525201b00af2f70326a078b3a28c64de7f510b37
5e2822ac59d08f8f01c7ece07adacfb1d24207ad
refs/heads/master
2021-01-10T06:54:29.902876
2016-04-18T03:15:34
2016-04-18T03:15:34
45,766,176
1
1
null
null
null
null
UTF-8
Java
false
false
117
java
package babybox.events.map; import java.util.HashMap; public class TouchEvent extends HashMap<String, Object> { }
6ef0b264d8a54b83a509a7a09e87433cca950b79
2cd99ada931d731e98a7a288c59fb50935b4c089
/src/test/java/Pages/MyAppsPage.java
d188418e30e59dad829d13d3d9b3e13f744cea91
[]
no_license
salmon500apps/pbxPlus
c8ea552e70108e8aba2babff206b7d37c8cd48ed
682d67a603a4d88ed4b810415ca86b6e177caef0
refs/heads/master
2022-12-24T14:40:30.954789
2020-10-05T11:22:53
2020-10-05T11:22:53
301,376,022
0
0
null
null
null
null
UTF-8
Java
false
false
377
java
package Pages; import org.openqa.selenium.By; public class MyAppsPage { //public static By createAccount=By.xpath("//a[@id='createAccountSubmit']"); public static By allappslink=By.xpath("//*[@class='border-0 card-body card-padding']/h5"); public static String pbxpluslinknm = "Click on PBX PLus link"; public static String botuplinknm = "Click on Botup link"; }
9da0548df0297a1373dbbf578975e18084cdd7ef
238b826c6b620d7c5bba9c2b967debda5b40bfbf
/jnf-parent/jnf-bean/src/main/java/com/jsjn/jnf/bean/bo/integration/yfb/.svn/text-base/RefundOrderReqBo.java.svn-base
49f7a6cfa159160ea50c833c36a33d77e3291e5e
[]
no_license
rankyangel2014/Spring
6972acd9dd806a8d6b98d110603dca389083f64d
ecef7e8c6b0b38bad430946d09bbfc699f2de815
refs/heads/master
2021-01-22T04:24:21.988756
2017-09-22T09:28:01
2017-09-22T09:28:01
92,461,626
0
1
null
null
null
null
UTF-8
Java
false
false
4,032
package com.jsjn.jnf.bean.bo.integration.yfb; import java.io.Serializable; /** * * @author nicolaslonely * */ public class RefundOrderReqBo implements Serializable{ /** * */ private static final long serialVersionUID = 1L; /** * 系统接入方 */ private String merchantNo; /** * 公钥索引 */ private String publicKeyIndex; /** * 接口版本号 */ private String version; /** * 签名 */ private String signature; /** * 签名算法 */ private String signAlgorithm; /** * 编码类型 */ private String inputCharset; /** * 提交时间 yyyyMMddHHmmss */ private String submitTime; /** * 服务器异步通知 URL */ private String notifyUrl; /** * 退款单号 */ private String refundOrderNo; /** * 原商户唯一订单 号 */ private String origOutOrderNo; /** * 原订单创建时间 */ private String origOrderTime; /** * 退款订单创建时间 */ private String refundOrderTime; /** * 退款金额 */ private String refundAmount; /** * 操作人 */ private String operator; /** * 退款理由 */ private String refundReason; /** * 备注 */ private String remark; /** * 扩展信息 */ private String tunnelData; public String getMerchantNo() { return merchantNo; } public void setMerchantNo(String merchantNo) { this.merchantNo = merchantNo; } public String getPublicKeyIndex() { return publicKeyIndex; } public void setPublicKeyIndex(String publicKeyIndex) { this.publicKeyIndex = publicKeyIndex; } public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } public String getSignature() { return signature; } public void setSignature(String signature) { this.signature = signature; } public String getSignAlgorithm() { return signAlgorithm; } public void setSignAlgorithm(String signAlgorithm) { this.signAlgorithm = signAlgorithm; } public String getInputCharset() { return inputCharset; } public void setInputCharset(String inputCharset) { this.inputCharset = inputCharset; } public String getSubmitTime() { return submitTime; } public void setSubmitTime(String submitTime) { this.submitTime = submitTime; } public String getNotifyUrl() { return notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getRefundOrderNo() { return refundOrderNo; } public void setRefundOrderNo(String refundOrderNo) { this.refundOrderNo = refundOrderNo; } public String getOrigOutOrderNo() { return origOutOrderNo; } public void setOrigOutOrderNo(String origOutOrderNo) { this.origOutOrderNo = origOutOrderNo; } public String getOrigOrderTime() { return origOrderTime; } public void setOrigOrderTime(String origOrderTime) { this.origOrderTime = origOrderTime; } public String getRefundOrderTime() { return refundOrderTime; } public void setRefundOrderTime(String refundOrderTime) { this.refundOrderTime = refundOrderTime; } public String getRefundAmount() { return refundAmount; } public void setRefundAmount(String refundAmount) { this.refundAmount = refundAmount; } public String getOperator() { return operator; } public void setOperator(String operator) { this.operator = operator; } public String getRefundReason() { return refundReason; } public void setRefundReason(String refundReason) { this.refundReason = refundReason; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getTunnelData() { return tunnelData; } public void setTunnelData(String tunnelData) { this.tunnelData = tunnelData; } }
5840492209186e9feff210cb82d2dde2d8e15421
ed6242f28b2969e52135d25accbb78ef0755af91
/VoVanChien/exe4/android/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/com/facebook/react/R.java
787b00882bccabbf9d7ee3510d86a6e8420626f5
[]
no_license
hoangpro123/LTDD3
4f1b2a1ad7bffbc6d290765cc545ea9b6bcd4273
f8d9d38809dceeb728a7438db2a16f65be679acb
refs/heads/master
2023-01-10T17:55:08.599309
2019-10-31T03:37:43
2019-10-31T03:37:43
214,081,552
1
0
null
2023-01-05T11:04:28
2019-10-10T03:50:42
Java
UTF-8
Java
false
false
138,038
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package com.facebook.react; public final class R { private R() {} public static final class anim { private anim() {} public static final int abc_fade_in = 0x7f010000; public static final int abc_fade_out = 0x7f010001; public static final int abc_grow_fade_in_from_bottom = 0x7f010002; public static final int abc_popup_enter = 0x7f010003; public static final int abc_popup_exit = 0x7f010004; public static final int abc_shrink_fade_out_from_bottom = 0x7f010005; public static final int abc_slide_in_bottom = 0x7f010006; public static final int abc_slide_in_top = 0x7f010007; public static final int abc_slide_out_bottom = 0x7f010008; public static final int abc_slide_out_top = 0x7f010009; public static final int abc_tooltip_enter = 0x7f01000a; public static final int abc_tooltip_exit = 0x7f01000b; public static final int catalyst_fade_in = 0x7f01000c; public static final int catalyst_fade_out = 0x7f01000d; public static final int catalyst_push_up_in = 0x7f01000e; public static final int catalyst_push_up_out = 0x7f01000f; public static final int catalyst_slide_down = 0x7f010010; public static final int catalyst_slide_up = 0x7f010011; } public static final class attr { private attr() {} public static final int actionBarDivider = 0x7f020000; public static final int actionBarItemBackground = 0x7f020001; public static final int actionBarPopupTheme = 0x7f020002; public static final int actionBarSize = 0x7f020003; public static final int actionBarSplitStyle = 0x7f020004; public static final int actionBarStyle = 0x7f020005; public static final int actionBarTabBarStyle = 0x7f020006; public static final int actionBarTabStyle = 0x7f020007; public static final int actionBarTabTextStyle = 0x7f020008; public static final int actionBarTheme = 0x7f020009; public static final int actionBarWidgetTheme = 0x7f02000a; public static final int actionButtonStyle = 0x7f02000b; public static final int actionDropDownStyle = 0x7f02000c; public static final int actionLayout = 0x7f02000d; public static final int actionMenuTextAppearance = 0x7f02000e; public static final int actionMenuTextColor = 0x7f02000f; public static final int actionModeBackground = 0x7f020010; public static final int actionModeCloseButtonStyle = 0x7f020011; public static final int actionModeCloseDrawable = 0x7f020012; public static final int actionModeCopyDrawable = 0x7f020013; public static final int actionModeCutDrawable = 0x7f020014; public static final int actionModeFindDrawable = 0x7f020015; public static final int actionModePasteDrawable = 0x7f020016; public static final int actionModePopupWindowStyle = 0x7f020017; public static final int actionModeSelectAllDrawable = 0x7f020018; public static final int actionModeShareDrawable = 0x7f020019; public static final int actionModeSplitBackground = 0x7f02001a; public static final int actionModeStyle = 0x7f02001b; public static final int actionModeWebSearchDrawable = 0x7f02001c; public static final int actionOverflowButtonStyle = 0x7f02001d; public static final int actionOverflowMenuStyle = 0x7f02001e; public static final int actionProviderClass = 0x7f02001f; public static final int actionViewClass = 0x7f020020; public static final int activityChooserViewStyle = 0x7f020021; public static final int actualImageResource = 0x7f020022; public static final int actualImageScaleType = 0x7f020023; public static final int actualImageUri = 0x7f020024; public static final int alertDialogButtonGroupStyle = 0x7f020025; public static final int alertDialogCenterButtons = 0x7f020026; public static final int alertDialogStyle = 0x7f020027; public static final int alertDialogTheme = 0x7f020028; public static final int allowStacking = 0x7f020029; public static final int alpha = 0x7f02002a; public static final int alphabeticModifiers = 0x7f02002b; public static final int arrowHeadLength = 0x7f02002c; public static final int arrowShaftLength = 0x7f02002d; public static final int autoCompleteTextViewStyle = 0x7f02002e; public static final int autoSizeMaxTextSize = 0x7f02002f; public static final int autoSizeMinTextSize = 0x7f020030; public static final int autoSizePresetSizes = 0x7f020031; public static final int autoSizeStepGranularity = 0x7f020032; public static final int autoSizeTextType = 0x7f020033; public static final int background = 0x7f020034; public static final int backgroundImage = 0x7f020035; public static final int backgroundSplit = 0x7f020036; public static final int backgroundStacked = 0x7f020037; public static final int backgroundTint = 0x7f020038; public static final int backgroundTintMode = 0x7f020039; public static final int barLength = 0x7f02003a; public static final int borderlessButtonStyle = 0x7f02003b; public static final int buttonBarButtonStyle = 0x7f02003c; public static final int buttonBarNegativeButtonStyle = 0x7f02003d; public static final int buttonBarNeutralButtonStyle = 0x7f02003e; public static final int buttonBarPositiveButtonStyle = 0x7f02003f; public static final int buttonBarStyle = 0x7f020040; public static final int buttonGravity = 0x7f020041; public static final int buttonIconDimen = 0x7f020042; public static final int buttonPanelSideLayout = 0x7f020043; public static final int buttonStyle = 0x7f020044; public static final int buttonStyleSmall = 0x7f020045; public static final int buttonTint = 0x7f020046; public static final int buttonTintMode = 0x7f020047; public static final int checkboxStyle = 0x7f020048; public static final int checkedTextViewStyle = 0x7f020049; public static final int closeIcon = 0x7f02004a; public static final int closeItemLayout = 0x7f02004b; public static final int collapseContentDescription = 0x7f02004c; public static final int collapseIcon = 0x7f02004d; public static final int color = 0x7f02004e; public static final int colorAccent = 0x7f02004f; public static final int colorBackgroundFloating = 0x7f020050; public static final int colorButtonNormal = 0x7f020051; public static final int colorControlActivated = 0x7f020052; public static final int colorControlHighlight = 0x7f020053; public static final int colorControlNormal = 0x7f020054; public static final int colorError = 0x7f020055; public static final int colorPrimary = 0x7f020056; public static final int colorPrimaryDark = 0x7f020057; public static final int colorSwitchThumbNormal = 0x7f020058; public static final int commitIcon = 0x7f020059; public static final int contentDescription = 0x7f02005a; public static final int contentInsetEnd = 0x7f02005b; public static final int contentInsetEndWithActions = 0x7f02005c; public static final int contentInsetLeft = 0x7f02005d; public static final int contentInsetRight = 0x7f02005e; public static final int contentInsetStart = 0x7f02005f; public static final int contentInsetStartWithNavigation = 0x7f020060; public static final int controlBackground = 0x7f020061; public static final int coordinatorLayoutStyle = 0x7f020062; public static final int customNavigationLayout = 0x7f020063; public static final int defaultQueryHint = 0x7f020064; public static final int dialogCornerRadius = 0x7f020065; public static final int dialogPreferredPadding = 0x7f020066; public static final int dialogTheme = 0x7f020067; public static final int displayOptions = 0x7f020068; public static final int divider = 0x7f020069; public static final int dividerHorizontal = 0x7f02006a; public static final int dividerPadding = 0x7f02006b; public static final int dividerVertical = 0x7f02006c; public static final int drawableSize = 0x7f02006d; public static final int drawerArrowStyle = 0x7f02006e; public static final int dropDownListViewStyle = 0x7f02006f; public static final int dropdownListPreferredItemHeight = 0x7f020070; public static final int editTextBackground = 0x7f020071; public static final int editTextColor = 0x7f020072; public static final int editTextStyle = 0x7f020073; public static final int elevation = 0x7f020074; public static final int expandActivityOverflowButtonDrawable = 0x7f020075; public static final int fadeDuration = 0x7f020076; public static final int failureImage = 0x7f020077; public static final int failureImageScaleType = 0x7f020078; public static final int firstBaselineToTopHeight = 0x7f020079; public static final int font = 0x7f02007a; public static final int fontFamily = 0x7f02007b; public static final int fontProviderAuthority = 0x7f02007c; public static final int fontProviderCerts = 0x7f02007d; public static final int fontProviderFetchStrategy = 0x7f02007e; public static final int fontProviderFetchTimeout = 0x7f02007f; public static final int fontProviderPackage = 0x7f020080; public static final int fontProviderQuery = 0x7f020081; public static final int fontStyle = 0x7f020082; public static final int fontVariationSettings = 0x7f020083; public static final int fontWeight = 0x7f020084; public static final int gapBetweenBars = 0x7f020085; public static final int goIcon = 0x7f020086; public static final int height = 0x7f020087; public static final int hideOnContentScroll = 0x7f020088; public static final int homeAsUpIndicator = 0x7f020089; public static final int homeLayout = 0x7f02008a; public static final int icon = 0x7f02008b; public static final int iconTint = 0x7f02008c; public static final int iconTintMode = 0x7f02008d; public static final int iconifiedByDefault = 0x7f02008e; public static final int imageButtonStyle = 0x7f02008f; public static final int indeterminateProgressStyle = 0x7f020090; public static final int initialActivityCount = 0x7f020091; public static final int isLightTheme = 0x7f020092; public static final int itemPadding = 0x7f020093; public static final int keylines = 0x7f020094; public static final int lastBaselineToBottomHeight = 0x7f020095; public static final int layout = 0x7f020096; public static final int layout_anchor = 0x7f020097; public static final int layout_anchorGravity = 0x7f020098; public static final int layout_behavior = 0x7f020099; public static final int layout_dodgeInsetEdges = 0x7f02009a; public static final int layout_insetEdge = 0x7f02009b; public static final int layout_keyline = 0x7f02009c; public static final int lineHeight = 0x7f02009d; public static final int listChoiceBackgroundIndicator = 0x7f02009e; public static final int listDividerAlertDialog = 0x7f02009f; public static final int listItemLayout = 0x7f0200a0; public static final int listLayout = 0x7f0200a1; public static final int listMenuViewStyle = 0x7f0200a2; public static final int listPopupWindowStyle = 0x7f0200a3; public static final int listPreferredItemHeight = 0x7f0200a4; public static final int listPreferredItemHeightLarge = 0x7f0200a5; public static final int listPreferredItemHeightSmall = 0x7f0200a6; public static final int listPreferredItemPaddingLeft = 0x7f0200a7; public static final int listPreferredItemPaddingRight = 0x7f0200a8; public static final int logo = 0x7f0200a9; public static final int logoDescription = 0x7f0200aa; public static final int maxButtonHeight = 0x7f0200ab; public static final int measureWithLargestChild = 0x7f0200ac; public static final int multiChoiceItemLayout = 0x7f0200ad; public static final int navigationContentDescription = 0x7f0200ae; public static final int navigationIcon = 0x7f0200af; public static final int navigationMode = 0x7f0200b0; public static final int numericModifiers = 0x7f0200b1; public static final int overlapAnchor = 0x7f0200b2; public static final int overlayImage = 0x7f0200b3; public static final int paddingBottomNoButtons = 0x7f0200b4; public static final int paddingEnd = 0x7f0200b5; public static final int paddingStart = 0x7f0200b6; public static final int paddingTopNoTitle = 0x7f0200b7; public static final int panelBackground = 0x7f0200b8; public static final int panelMenuListTheme = 0x7f0200b9; public static final int panelMenuListWidth = 0x7f0200ba; public static final int placeholderImage = 0x7f0200bb; public static final int placeholderImageScaleType = 0x7f0200bc; public static final int popupMenuStyle = 0x7f0200bd; public static final int popupTheme = 0x7f0200be; public static final int popupWindowStyle = 0x7f0200bf; public static final int preserveIconSpacing = 0x7f0200c0; public static final int pressedStateOverlayImage = 0x7f0200c1; public static final int progressBarAutoRotateInterval = 0x7f0200c2; public static final int progressBarImage = 0x7f0200c3; public static final int progressBarImageScaleType = 0x7f0200c4; public static final int progressBarPadding = 0x7f0200c5; public static final int progressBarStyle = 0x7f0200c6; public static final int queryBackground = 0x7f0200c7; public static final int queryHint = 0x7f0200c8; public static final int radioButtonStyle = 0x7f0200c9; public static final int ratingBarStyle = 0x7f0200ca; public static final int ratingBarStyleIndicator = 0x7f0200cb; public static final int ratingBarStyleSmall = 0x7f0200cc; public static final int retryImage = 0x7f0200cd; public static final int retryImageScaleType = 0x7f0200ce; public static final int roundAsCircle = 0x7f0200cf; public static final int roundBottomEnd = 0x7f0200d0; public static final int roundBottomLeft = 0x7f0200d1; public static final int roundBottomRight = 0x7f0200d2; public static final int roundBottomStart = 0x7f0200d3; public static final int roundTopEnd = 0x7f0200d4; public static final int roundTopLeft = 0x7f0200d5; public static final int roundTopRight = 0x7f0200d6; public static final int roundTopStart = 0x7f0200d7; public static final int roundWithOverlayColor = 0x7f0200d8; public static final int roundedCornerRadius = 0x7f0200d9; public static final int roundingBorderColor = 0x7f0200da; public static final int roundingBorderPadding = 0x7f0200db; public static final int roundingBorderWidth = 0x7f0200dc; public static final int searchHintIcon = 0x7f0200dd; public static final int searchIcon = 0x7f0200de; public static final int searchViewStyle = 0x7f0200df; public static final int seekBarStyle = 0x7f0200e0; public static final int selectableItemBackground = 0x7f0200e1; public static final int selectableItemBackgroundBorderless = 0x7f0200e2; public static final int showAsAction = 0x7f0200e3; public static final int showDividers = 0x7f0200e4; public static final int showText = 0x7f0200e5; public static final int showTitle = 0x7f0200e6; public static final int singleChoiceItemLayout = 0x7f0200e7; public static final int spinBars = 0x7f0200e8; public static final int spinnerDropDownItemStyle = 0x7f0200e9; public static final int spinnerStyle = 0x7f0200ea; public static final int splitTrack = 0x7f0200eb; public static final int srcCompat = 0x7f0200ec; public static final int state_above_anchor = 0x7f0200ed; public static final int statusBarBackground = 0x7f0200ee; public static final int subMenuArrow = 0x7f0200ef; public static final int submitBackground = 0x7f0200f0; public static final int subtitle = 0x7f0200f1; public static final int subtitleTextAppearance = 0x7f0200f2; public static final int subtitleTextColor = 0x7f0200f3; public static final int subtitleTextStyle = 0x7f0200f4; public static final int suggestionRowLayout = 0x7f0200f5; public static final int switchMinWidth = 0x7f0200f6; public static final int switchPadding = 0x7f0200f7; public static final int switchStyle = 0x7f0200f8; public static final int switchTextAppearance = 0x7f0200f9; public static final int textAllCaps = 0x7f0200fa; public static final int textAppearanceLargePopupMenu = 0x7f0200fb; public static final int textAppearanceListItem = 0x7f0200fc; public static final int textAppearanceListItemSecondary = 0x7f0200fd; public static final int textAppearanceListItemSmall = 0x7f0200fe; public static final int textAppearancePopupMenuHeader = 0x7f0200ff; public static final int textAppearanceSearchResultSubtitle = 0x7f020100; public static final int textAppearanceSearchResultTitle = 0x7f020101; public static final int textAppearanceSmallPopupMenu = 0x7f020102; public static final int textColorAlertDialogListItem = 0x7f020103; public static final int textColorSearchUrl = 0x7f020104; public static final int theme = 0x7f020105; public static final int thickness = 0x7f020106; public static final int thumbTextPadding = 0x7f020107; public static final int thumbTint = 0x7f020108; public static final int thumbTintMode = 0x7f020109; public static final int tickMark = 0x7f02010a; public static final int tickMarkTint = 0x7f02010b; public static final int tickMarkTintMode = 0x7f02010c; public static final int tint = 0x7f02010d; public static final int tintMode = 0x7f02010e; public static final int title = 0x7f02010f; public static final int titleMargin = 0x7f020110; public static final int titleMarginBottom = 0x7f020111; public static final int titleMarginEnd = 0x7f020112; public static final int titleMarginStart = 0x7f020113; public static final int titleMarginTop = 0x7f020114; public static final int titleMargins = 0x7f020115; public static final int titleTextAppearance = 0x7f020116; public static final int titleTextColor = 0x7f020117; public static final int titleTextStyle = 0x7f020118; public static final int toolbarNavigationButtonStyle = 0x7f020119; public static final int toolbarStyle = 0x7f02011a; public static final int tooltipForegroundColor = 0x7f02011b; public static final int tooltipFrameBackground = 0x7f02011c; public static final int tooltipText = 0x7f02011d; public static final int track = 0x7f02011e; public static final int trackTint = 0x7f02011f; public static final int trackTintMode = 0x7f020120; public static final int ttcIndex = 0x7f020121; public static final int viewAspectRatio = 0x7f020122; public static final int viewInflaterClass = 0x7f020123; public static final int voiceIcon = 0x7f020124; public static final int windowActionBar = 0x7f020125; public static final int windowActionBarOverlay = 0x7f020126; public static final int windowActionModeOverlay = 0x7f020127; public static final int windowFixedHeightMajor = 0x7f020128; public static final int windowFixedHeightMinor = 0x7f020129; public static final int windowFixedWidthMajor = 0x7f02012a; public static final int windowFixedWidthMinor = 0x7f02012b; public static final int windowMinWidthMajor = 0x7f02012c; public static final int windowMinWidthMinor = 0x7f02012d; public static final int windowNoTitle = 0x7f02012e; } public static final class bool { private bool() {} public static final int abc_action_bar_embed_tabs = 0x7f030000; public static final int abc_allow_stacked_button_bar = 0x7f030001; public static final int abc_config_actionMenuItemAllCaps = 0x7f030002; } public static final class color { private color() {} public static final int abc_background_cache_hint_selector_material_dark = 0x7f040000; public static final int abc_background_cache_hint_selector_material_light = 0x7f040001; public static final int abc_btn_colored_borderless_text_material = 0x7f040002; public static final int abc_btn_colored_text_material = 0x7f040003; public static final int abc_color_highlight_material = 0x7f040004; public static final int abc_hint_foreground_material_dark = 0x7f040005; public static final int abc_hint_foreground_material_light = 0x7f040006; public static final int abc_input_method_navigation_guard = 0x7f040007; public static final int abc_primary_text_disable_only_material_dark = 0x7f040008; public static final int abc_primary_text_disable_only_material_light = 0x7f040009; public static final int abc_primary_text_material_dark = 0x7f04000a; public static final int abc_primary_text_material_light = 0x7f04000b; public static final int abc_search_url_text = 0x7f04000c; public static final int abc_search_url_text_normal = 0x7f04000d; public static final int abc_search_url_text_pressed = 0x7f04000e; public static final int abc_search_url_text_selected = 0x7f04000f; public static final int abc_secondary_text_material_dark = 0x7f040010; public static final int abc_secondary_text_material_light = 0x7f040011; public static final int abc_tint_btn_checkable = 0x7f040012; public static final int abc_tint_default = 0x7f040013; public static final int abc_tint_edittext = 0x7f040014; public static final int abc_tint_seek_thumb = 0x7f040015; public static final int abc_tint_spinner = 0x7f040016; public static final int abc_tint_switch_track = 0x7f040017; public static final int accent_material_dark = 0x7f040018; public static final int accent_material_light = 0x7f040019; public static final int background_floating_material_dark = 0x7f04001a; public static final int background_floating_material_light = 0x7f04001b; public static final int background_material_dark = 0x7f04001c; public static final int background_material_light = 0x7f04001d; public static final int bright_foreground_disabled_material_dark = 0x7f04001e; public static final int bright_foreground_disabled_material_light = 0x7f04001f; public static final int bright_foreground_inverse_material_dark = 0x7f040020; public static final int bright_foreground_inverse_material_light = 0x7f040021; public static final int bright_foreground_material_dark = 0x7f040022; public static final int bright_foreground_material_light = 0x7f040023; public static final int button_material_dark = 0x7f040024; public static final int button_material_light = 0x7f040025; public static final int catalyst_redbox_background = 0x7f040026; public static final int dim_foreground_disabled_material_dark = 0x7f040027; public static final int dim_foreground_disabled_material_light = 0x7f040028; public static final int dim_foreground_material_dark = 0x7f040029; public static final int dim_foreground_material_light = 0x7f04002a; public static final int error_color_material_dark = 0x7f04002b; public static final int error_color_material_light = 0x7f04002c; public static final int foreground_material_dark = 0x7f04002d; public static final int foreground_material_light = 0x7f04002e; public static final int highlighted_text_material_dark = 0x7f04002f; public static final int highlighted_text_material_light = 0x7f040030; public static final int material_blue_grey_800 = 0x7f040031; public static final int material_blue_grey_900 = 0x7f040032; public static final int material_blue_grey_950 = 0x7f040033; public static final int material_deep_teal_200 = 0x7f040034; public static final int material_deep_teal_500 = 0x7f040035; public static final int material_grey_100 = 0x7f040036; public static final int material_grey_300 = 0x7f040037; public static final int material_grey_50 = 0x7f040038; public static final int material_grey_600 = 0x7f040039; public static final int material_grey_800 = 0x7f04003a; public static final int material_grey_850 = 0x7f04003b; public static final int material_grey_900 = 0x7f04003c; public static final int notification_action_color_filter = 0x7f04003d; public static final int notification_icon_bg_color = 0x7f04003e; public static final int primary_dark_material_dark = 0x7f04003f; public static final int primary_dark_material_light = 0x7f040040; public static final int primary_material_dark = 0x7f040041; public static final int primary_material_light = 0x7f040042; public static final int primary_text_default_material_dark = 0x7f040043; public static final int primary_text_default_material_light = 0x7f040044; public static final int primary_text_disabled_material_dark = 0x7f040045; public static final int primary_text_disabled_material_light = 0x7f040046; public static final int ripple_material_dark = 0x7f040047; public static final int ripple_material_light = 0x7f040048; public static final int secondary_text_default_material_dark = 0x7f040049; public static final int secondary_text_default_material_light = 0x7f04004a; public static final int secondary_text_disabled_material_dark = 0x7f04004b; public static final int secondary_text_disabled_material_light = 0x7f04004c; public static final int switch_thumb_disabled_material_dark = 0x7f04004d; public static final int switch_thumb_disabled_material_light = 0x7f04004e; public static final int switch_thumb_material_dark = 0x7f04004f; public static final int switch_thumb_material_light = 0x7f040050; public static final int switch_thumb_normal_material_dark = 0x7f040051; public static final int switch_thumb_normal_material_light = 0x7f040052; public static final int tooltip_background_dark = 0x7f040053; public static final int tooltip_background_light = 0x7f040054; } public static final class dimen { private dimen() {} public static final int abc_action_bar_content_inset_material = 0x7f050000; public static final int abc_action_bar_content_inset_with_nav = 0x7f050001; public static final int abc_action_bar_default_height_material = 0x7f050002; public static final int abc_action_bar_default_padding_end_material = 0x7f050003; public static final int abc_action_bar_default_padding_start_material = 0x7f050004; public static final int abc_action_bar_elevation_material = 0x7f050005; public static final int abc_action_bar_icon_vertical_padding_material = 0x7f050006; public static final int abc_action_bar_overflow_padding_end_material = 0x7f050007; public static final int abc_action_bar_overflow_padding_start_material = 0x7f050008; public static final int abc_action_bar_stacked_max_height = 0x7f050009; public static final int abc_action_bar_stacked_tab_max_width = 0x7f05000a; public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f05000b; public static final int abc_action_bar_subtitle_top_margin_material = 0x7f05000c; public static final int abc_action_button_min_height_material = 0x7f05000d; public static final int abc_action_button_min_width_material = 0x7f05000e; public static final int abc_action_button_min_width_overflow_material = 0x7f05000f; public static final int abc_alert_dialog_button_bar_height = 0x7f050010; public static final int abc_alert_dialog_button_dimen = 0x7f050011; public static final int abc_button_inset_horizontal_material = 0x7f050012; public static final int abc_button_inset_vertical_material = 0x7f050013; public static final int abc_button_padding_horizontal_material = 0x7f050014; public static final int abc_button_padding_vertical_material = 0x7f050015; public static final int abc_cascading_menus_min_smallest_width = 0x7f050016; public static final int abc_config_prefDialogWidth = 0x7f050017; public static final int abc_control_corner_material = 0x7f050018; public static final int abc_control_inset_material = 0x7f050019; public static final int abc_control_padding_material = 0x7f05001a; public static final int abc_dialog_corner_radius_material = 0x7f05001b; public static final int abc_dialog_fixed_height_major = 0x7f05001c; public static final int abc_dialog_fixed_height_minor = 0x7f05001d; public static final int abc_dialog_fixed_width_major = 0x7f05001e; public static final int abc_dialog_fixed_width_minor = 0x7f05001f; public static final int abc_dialog_list_padding_bottom_no_buttons = 0x7f050020; public static final int abc_dialog_list_padding_top_no_title = 0x7f050021; public static final int abc_dialog_min_width_major = 0x7f050022; public static final int abc_dialog_min_width_minor = 0x7f050023; public static final int abc_dialog_padding_material = 0x7f050024; public static final int abc_dialog_padding_top_material = 0x7f050025; public static final int abc_dialog_title_divider_material = 0x7f050026; public static final int abc_disabled_alpha_material_dark = 0x7f050027; public static final int abc_disabled_alpha_material_light = 0x7f050028; public static final int abc_dropdownitem_icon_width = 0x7f050029; public static final int abc_dropdownitem_text_padding_left = 0x7f05002a; public static final int abc_dropdownitem_text_padding_right = 0x7f05002b; public static final int abc_edit_text_inset_bottom_material = 0x7f05002c; public static final int abc_edit_text_inset_horizontal_material = 0x7f05002d; public static final int abc_edit_text_inset_top_material = 0x7f05002e; public static final int abc_floating_window_z = 0x7f05002f; public static final int abc_list_item_padding_horizontal_material = 0x7f050030; public static final int abc_panel_menu_list_width = 0x7f050031; public static final int abc_progress_bar_height_material = 0x7f050032; public static final int abc_search_view_preferred_height = 0x7f050033; public static final int abc_search_view_preferred_width = 0x7f050034; public static final int abc_seekbar_track_background_height_material = 0x7f050035; public static final int abc_seekbar_track_progress_height_material = 0x7f050036; public static final int abc_select_dialog_padding_start_material = 0x7f050037; public static final int abc_switch_padding = 0x7f050038; public static final int abc_text_size_body_1_material = 0x7f050039; public static final int abc_text_size_body_2_material = 0x7f05003a; public static final int abc_text_size_button_material = 0x7f05003b; public static final int abc_text_size_caption_material = 0x7f05003c; public static final int abc_text_size_display_1_material = 0x7f05003d; public static final int abc_text_size_display_2_material = 0x7f05003e; public static final int abc_text_size_display_3_material = 0x7f05003f; public static final int abc_text_size_display_4_material = 0x7f050040; public static final int abc_text_size_headline_material = 0x7f050041; public static final int abc_text_size_large_material = 0x7f050042; public static final int abc_text_size_medium_material = 0x7f050043; public static final int abc_text_size_menu_header_material = 0x7f050044; public static final int abc_text_size_menu_material = 0x7f050045; public static final int abc_text_size_small_material = 0x7f050046; public static final int abc_text_size_subhead_material = 0x7f050047; public static final int abc_text_size_subtitle_material_toolbar = 0x7f050048; public static final int abc_text_size_title_material = 0x7f050049; public static final int abc_text_size_title_material_toolbar = 0x7f05004a; public static final int compat_button_inset_horizontal_material = 0x7f05004b; public static final int compat_button_inset_vertical_material = 0x7f05004c; public static final int compat_button_padding_horizontal_material = 0x7f05004d; public static final int compat_button_padding_vertical_material = 0x7f05004e; public static final int compat_control_corner_material = 0x7f05004f; public static final int compat_notification_large_icon_max_height = 0x7f050050; public static final int compat_notification_large_icon_max_width = 0x7f050051; public static final int disabled_alpha_material_dark = 0x7f050052; public static final int disabled_alpha_material_light = 0x7f050053; public static final int highlight_alpha_material_colored = 0x7f050054; public static final int highlight_alpha_material_dark = 0x7f050055; public static final int highlight_alpha_material_light = 0x7f050056; public static final int hint_alpha_material_dark = 0x7f050057; public static final int hint_alpha_material_light = 0x7f050058; public static final int hint_pressed_alpha_material_dark = 0x7f050059; public static final int hint_pressed_alpha_material_light = 0x7f05005a; public static final int notification_action_icon_size = 0x7f05005b; public static final int notification_action_text_size = 0x7f05005c; public static final int notification_big_circle_margin = 0x7f05005d; public static final int notification_content_margin_start = 0x7f05005e; public static final int notification_large_icon_height = 0x7f05005f; public static final int notification_large_icon_width = 0x7f050060; public static final int notification_main_column_padding_top = 0x7f050061; public static final int notification_media_narrow_margin = 0x7f050062; public static final int notification_right_icon_size = 0x7f050063; public static final int notification_right_side_padding_top = 0x7f050064; public static final int notification_small_icon_background_padding = 0x7f050065; public static final int notification_small_icon_size_as_large = 0x7f050066; public static final int notification_subtext_size = 0x7f050067; public static final int notification_top_pad = 0x7f050068; public static final int notification_top_pad_large_text = 0x7f050069; public static final int tooltip_corner_radius = 0x7f05006a; public static final int tooltip_horizontal_padding = 0x7f05006b; public static final int tooltip_margin = 0x7f05006c; public static final int tooltip_precise_anchor_extra_offset = 0x7f05006d; public static final int tooltip_precise_anchor_threshold = 0x7f05006e; public static final int tooltip_vertical_padding = 0x7f05006f; public static final int tooltip_y_offset_non_touch = 0x7f050070; public static final int tooltip_y_offset_touch = 0x7f050071; } public static final class drawable { private drawable() {} public static final int abc_ab_share_pack_mtrl_alpha = 0x7f060000; public static final int abc_action_bar_item_background_material = 0x7f060001; public static final int abc_btn_borderless_material = 0x7f060002; public static final int abc_btn_check_material = 0x7f060003; public static final int abc_btn_check_to_on_mtrl_000 = 0x7f060004; public static final int abc_btn_check_to_on_mtrl_015 = 0x7f060005; public static final int abc_btn_colored_material = 0x7f060006; public static final int abc_btn_default_mtrl_shape = 0x7f060007; public static final int abc_btn_radio_material = 0x7f060008; public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f060009; public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f06000a; public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f06000b; public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f06000c; public static final int abc_cab_background_internal_bg = 0x7f06000d; public static final int abc_cab_background_top_material = 0x7f06000e; public static final int abc_cab_background_top_mtrl_alpha = 0x7f06000f; public static final int abc_control_background_material = 0x7f060010; public static final int abc_dialog_material_background = 0x7f060011; public static final int abc_edit_text_material = 0x7f060012; public static final int abc_ic_ab_back_material = 0x7f060013; public static final int abc_ic_arrow_drop_right_black_24dp = 0x7f060014; public static final int abc_ic_clear_material = 0x7f060015; public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f060016; public static final int abc_ic_go_search_api_material = 0x7f060017; public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f060018; public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f060019; public static final int abc_ic_menu_overflow_material = 0x7f06001a; public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f06001b; public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f06001c; public static final int abc_ic_menu_share_mtrl_alpha = 0x7f06001d; public static final int abc_ic_search_api_material = 0x7f06001e; public static final int abc_ic_star_black_16dp = 0x7f06001f; public static final int abc_ic_star_black_36dp = 0x7f060020; public static final int abc_ic_star_black_48dp = 0x7f060021; public static final int abc_ic_star_half_black_16dp = 0x7f060022; public static final int abc_ic_star_half_black_36dp = 0x7f060023; public static final int abc_ic_star_half_black_48dp = 0x7f060024; public static final int abc_ic_voice_search_api_material = 0x7f060025; public static final int abc_item_background_holo_dark = 0x7f060026; public static final int abc_item_background_holo_light = 0x7f060027; public static final int abc_list_divider_material = 0x7f060028; public static final int abc_list_divider_mtrl_alpha = 0x7f060029; public static final int abc_list_focused_holo = 0x7f06002a; public static final int abc_list_longpressed_holo = 0x7f06002b; public static final int abc_list_pressed_holo_dark = 0x7f06002c; public static final int abc_list_pressed_holo_light = 0x7f06002d; public static final int abc_list_selector_background_transition_holo_dark = 0x7f06002e; public static final int abc_list_selector_background_transition_holo_light = 0x7f06002f; public static final int abc_list_selector_disabled_holo_dark = 0x7f060030; public static final int abc_list_selector_disabled_holo_light = 0x7f060031; public static final int abc_list_selector_holo_dark = 0x7f060032; public static final int abc_list_selector_holo_light = 0x7f060033; public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f060034; public static final int abc_popup_background_mtrl_mult = 0x7f060035; public static final int abc_ratingbar_indicator_material = 0x7f060036; public static final int abc_ratingbar_material = 0x7f060037; public static final int abc_ratingbar_small_material = 0x7f060038; public static final int abc_scrubber_control_off_mtrl_alpha = 0x7f060039; public static final int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f06003a; public static final int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f06003b; public static final int abc_scrubber_primary_mtrl_alpha = 0x7f06003c; public static final int abc_scrubber_track_mtrl_alpha = 0x7f06003d; public static final int abc_seekbar_thumb_material = 0x7f06003e; public static final int abc_seekbar_tick_mark_material = 0x7f06003f; public static final int abc_seekbar_track_material = 0x7f060040; public static final int abc_spinner_mtrl_am_alpha = 0x7f060041; public static final int abc_spinner_textfield_background_material = 0x7f060042; public static final int abc_switch_thumb_material = 0x7f060043; public static final int abc_switch_track_mtrl_alpha = 0x7f060044; public static final int abc_tab_indicator_material = 0x7f060045; public static final int abc_tab_indicator_mtrl_alpha = 0x7f060046; public static final int abc_text_cursor_material = 0x7f060047; public static final int abc_text_select_handle_left_mtrl_dark = 0x7f060048; public static final int abc_text_select_handle_left_mtrl_light = 0x7f060049; public static final int abc_text_select_handle_middle_mtrl_dark = 0x7f06004a; public static final int abc_text_select_handle_middle_mtrl_light = 0x7f06004b; public static final int abc_text_select_handle_right_mtrl_dark = 0x7f06004c; public static final int abc_text_select_handle_right_mtrl_light = 0x7f06004d; public static final int abc_textfield_activated_mtrl_alpha = 0x7f06004e; public static final int abc_textfield_default_mtrl_alpha = 0x7f06004f; public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f060050; public static final int abc_textfield_search_default_mtrl_alpha = 0x7f060051; public static final int abc_textfield_search_material = 0x7f060052; public static final int abc_vector_test = 0x7f060053; public static final int notification_action_background = 0x7f060054; public static final int notification_bg = 0x7f060055; public static final int notification_bg_low = 0x7f060056; public static final int notification_bg_low_normal = 0x7f060057; public static final int notification_bg_low_pressed = 0x7f060058; public static final int notification_bg_normal = 0x7f060059; public static final int notification_bg_normal_pressed = 0x7f06005a; public static final int notification_icon_background = 0x7f06005b; public static final int notification_template_icon_bg = 0x7f06005c; public static final int notification_template_icon_low_bg = 0x7f06005d; public static final int notification_tile_bg = 0x7f06005e; public static final int notify_panel_notification_icon_bg = 0x7f06005f; public static final int redbox_top_border_background = 0x7f060060; public static final int tooltip_frame_dark = 0x7f060061; public static final int tooltip_frame_light = 0x7f060062; } public static final class id { private id() {} public static final int accessibility_actions = 0x7f070006; public static final int accessibility_hint = 0x7f070007; public static final int accessibility_label = 0x7f070008; public static final int accessibility_role = 0x7f070009; public static final int accessibility_state = 0x7f07000a; public static final int accessibility_states = 0x7f07000b; public static final int action_bar = 0x7f07000c; public static final int action_bar_activity_content = 0x7f07000d; public static final int action_bar_container = 0x7f07000e; public static final int action_bar_root = 0x7f07000f; public static final int action_bar_spinner = 0x7f070010; public static final int action_bar_subtitle = 0x7f070011; public static final int action_bar_title = 0x7f070012; public static final int action_container = 0x7f070013; public static final int action_context_bar = 0x7f070014; public static final int action_divider = 0x7f070015; public static final int action_image = 0x7f070016; public static final int action_menu_divider = 0x7f070017; public static final int action_menu_presenter = 0x7f070018; public static final int action_mode_bar = 0x7f070019; public static final int action_mode_bar_stub = 0x7f07001a; public static final int action_mode_close_button = 0x7f07001b; public static final int action_text = 0x7f07001c; public static final int actions = 0x7f07001d; public static final int activity_chooser_view_content = 0x7f07001e; public static final int add = 0x7f07001f; public static final int alertTitle = 0x7f070020; public static final int async = 0x7f070023; public static final int blocking = 0x7f070025; public static final int bottom = 0x7f070026; public static final int buttonPanel = 0x7f070027; public static final int catalyst_redbox_title = 0x7f070028; public static final int center = 0x7f070029; public static final int centerCrop = 0x7f07002a; public static final int centerInside = 0x7f07002b; public static final int checkbox = 0x7f07002e; public static final int chronometer = 0x7f07002f; public static final int content = 0x7f070033; public static final int contentPanel = 0x7f070034; public static final int custom = 0x7f070035; public static final int customPanel = 0x7f070036; public static final int decor_content_parent = 0x7f070037; public static final int default_activity_button = 0x7f070038; public static final int edit_query = 0x7f07003a; public static final int end = 0x7f07003b; public static final int expand_activities_button = 0x7f07003c; public static final int expanded_menu = 0x7f07003d; public static final int fitBottomStart = 0x7f070041; public static final int fitCenter = 0x7f070042; public static final int fitEnd = 0x7f070043; public static final int fitStart = 0x7f070044; public static final int fitXY = 0x7f070045; public static final int focusCrop = 0x7f070046; public static final int forever = 0x7f070047; public static final int fps_text = 0x7f070048; public static final int group_divider = 0x7f070049; public static final int home = 0x7f07004a; public static final int icon = 0x7f07004c; public static final int icon_group = 0x7f07004d; public static final int image = 0x7f07004f; public static final int info = 0x7f070050; public static final int italic = 0x7f070051; public static final int left = 0x7f070052; public static final int line1 = 0x7f070053; public static final int line3 = 0x7f070054; public static final int listMode = 0x7f070055; public static final int list_item = 0x7f070056; public static final int message = 0x7f070057; public static final int multiply = 0x7f070059; public static final int none = 0x7f07005b; public static final int normal = 0x7f07005c; public static final int notification_background = 0x7f07005d; public static final int notification_main_column = 0x7f07005e; public static final int notification_main_column_container = 0x7f07005f; public static final int parentPanel = 0x7f070060; public static final int progress_circular = 0x7f070061; public static final int progress_horizontal = 0x7f070062; public static final int radio = 0x7f070063; public static final int react_test_id = 0x7f070064; public static final int right = 0x7f070065; public static final int right_icon = 0x7f070066; public static final int right_side = 0x7f070067; public static final int rn_frame_file = 0x7f070068; public static final int rn_frame_method = 0x7f070069; public static final int rn_redbox_dismiss_button = 0x7f07006a; public static final int rn_redbox_line_separator = 0x7f07006b; public static final int rn_redbox_loading_indicator = 0x7f07006c; public static final int rn_redbox_reload_button = 0x7f07006d; public static final int rn_redbox_report_button = 0x7f07006e; public static final int rn_redbox_report_label = 0x7f07006f; public static final int rn_redbox_stack = 0x7f070070; public static final int screen = 0x7f070071; public static final int scrollIndicatorDown = 0x7f070072; public static final int scrollIndicatorUp = 0x7f070073; public static final int scrollView = 0x7f070074; public static final int search_badge = 0x7f070075; public static final int search_bar = 0x7f070076; public static final int search_button = 0x7f070077; public static final int search_close_btn = 0x7f070078; public static final int search_edit_frame = 0x7f070079; public static final int search_go_btn = 0x7f07007a; public static final int search_mag_icon = 0x7f07007b; public static final int search_plate = 0x7f07007c; public static final int search_src_text = 0x7f07007d; public static final int search_voice_btn = 0x7f07007e; public static final int select_dialog_listview = 0x7f07007f; public static final int shortcut = 0x7f070080; public static final int spacer = 0x7f070084; public static final int split_action_bar = 0x7f070085; public static final int src_atop = 0x7f070086; public static final int src_in = 0x7f070087; public static final int src_over = 0x7f070088; public static final int start = 0x7f070089; public static final int submenuarrow = 0x7f07008a; public static final int submit_area = 0x7f07008b; public static final int tabMode = 0x7f07008c; public static final int tag_transition_group = 0x7f07008d; public static final int tag_unhandled_key_event_manager = 0x7f07008e; public static final int tag_unhandled_key_listeners = 0x7f07008f; public static final int text = 0x7f070090; public static final int text2 = 0x7f070091; public static final int textSpacerNoButtons = 0x7f070092; public static final int textSpacerNoTitle = 0x7f070093; public static final int time = 0x7f070094; public static final int title = 0x7f070095; public static final int titleDividerNoCustom = 0x7f070096; public static final int title_template = 0x7f070097; public static final int top = 0x7f070098; public static final int topPanel = 0x7f070099; public static final int uniform = 0x7f07009a; public static final int up = 0x7f07009b; public static final int view_tag_instance_handle = 0x7f07009d; public static final int view_tag_native_id = 0x7f07009e; public static final int wrap_content = 0x7f0700a0; } public static final class integer { private integer() {} public static final int abc_config_activityDefaultDur = 0x7f080000; public static final int abc_config_activityShortDur = 0x7f080001; public static final int cancel_button_image_alpha = 0x7f080002; public static final int config_tooltipAnimTime = 0x7f080003; public static final int react_native_dev_server_port = 0x7f080004; public static final int react_native_inspector_proxy_port = 0x7f080005; public static final int status_bar_notification_info_maxnum = 0x7f080006; } public static final class layout { private layout() {} public static final int abc_action_bar_title_item = 0x7f090000; public static final int abc_action_bar_up_container = 0x7f090001; public static final int abc_action_menu_item_layout = 0x7f090002; public static final int abc_action_menu_layout = 0x7f090003; public static final int abc_action_mode_bar = 0x7f090004; public static final int abc_action_mode_close_item_material = 0x7f090005; public static final int abc_activity_chooser_view = 0x7f090006; public static final int abc_activity_chooser_view_list_item = 0x7f090007; public static final int abc_alert_dialog_button_bar_material = 0x7f090008; public static final int abc_alert_dialog_material = 0x7f090009; public static final int abc_alert_dialog_title_material = 0x7f09000a; public static final int abc_cascading_menu_item_layout = 0x7f09000b; public static final int abc_dialog_title_material = 0x7f09000c; public static final int abc_expanded_menu_layout = 0x7f09000d; public static final int abc_list_menu_item_checkbox = 0x7f09000e; public static final int abc_list_menu_item_icon = 0x7f09000f; public static final int abc_list_menu_item_layout = 0x7f090010; public static final int abc_list_menu_item_radio = 0x7f090011; public static final int abc_popup_menu_header_item_layout = 0x7f090012; public static final int abc_popup_menu_item_layout = 0x7f090013; public static final int abc_screen_content_include = 0x7f090014; public static final int abc_screen_simple = 0x7f090015; public static final int abc_screen_simple_overlay_action_mode = 0x7f090016; public static final int abc_screen_toolbar = 0x7f090017; public static final int abc_search_dropdown_item_icons_2line = 0x7f090018; public static final int abc_search_view = 0x7f090019; public static final int abc_select_dialog_material = 0x7f09001a; public static final int abc_tooltip = 0x7f09001b; public static final int dev_loading_view = 0x7f09001c; public static final int fps_view = 0x7f09001d; public static final int notification_action = 0x7f09001e; public static final int notification_action_tombstone = 0x7f09001f; public static final int notification_template_custom_big = 0x7f090020; public static final int notification_template_icon_group = 0x7f090021; public static final int notification_template_part_chronometer = 0x7f090022; public static final int notification_template_part_time = 0x7f090023; public static final int redbox_item_frame = 0x7f090024; public static final int redbox_item_title = 0x7f090025; public static final int redbox_view = 0x7f090026; public static final int select_dialog_item_material = 0x7f090027; public static final int select_dialog_multichoice_material = 0x7f090028; public static final int select_dialog_singlechoice_material = 0x7f090029; public static final int support_simple_spinner_dropdown_item = 0x7f09002a; } public static final class string { private string() {} public static final int abc_action_bar_home_description = 0x7f0b0000; public static final int abc_action_bar_up_description = 0x7f0b0001; public static final int abc_action_menu_overflow_description = 0x7f0b0002; public static final int abc_action_mode_done = 0x7f0b0003; public static final int abc_activity_chooser_view_see_all = 0x7f0b0004; public static final int abc_activitychooserview_choose_application = 0x7f0b0005; public static final int abc_capital_off = 0x7f0b0006; public static final int abc_capital_on = 0x7f0b0007; public static final int abc_font_family_body_1_material = 0x7f0b0008; public static final int abc_font_family_body_2_material = 0x7f0b0009; public static final int abc_font_family_button_material = 0x7f0b000a; public static final int abc_font_family_caption_material = 0x7f0b000b; public static final int abc_font_family_display_1_material = 0x7f0b000c; public static final int abc_font_family_display_2_material = 0x7f0b000d; public static final int abc_font_family_display_3_material = 0x7f0b000e; public static final int abc_font_family_display_4_material = 0x7f0b000f; public static final int abc_font_family_headline_material = 0x7f0b0010; public static final int abc_font_family_menu_material = 0x7f0b0011; public static final int abc_font_family_subhead_material = 0x7f0b0012; public static final int abc_font_family_title_material = 0x7f0b0013; public static final int abc_menu_alt_shortcut_label = 0x7f0b0014; public static final int abc_menu_ctrl_shortcut_label = 0x7f0b0015; public static final int abc_menu_delete_shortcut_label = 0x7f0b0016; public static final int abc_menu_enter_shortcut_label = 0x7f0b0017; public static final int abc_menu_function_shortcut_label = 0x7f0b0018; public static final int abc_menu_meta_shortcut_label = 0x7f0b0019; public static final int abc_menu_shift_shortcut_label = 0x7f0b001a; public static final int abc_menu_space_shortcut_label = 0x7f0b001b; public static final int abc_menu_sym_shortcut_label = 0x7f0b001c; public static final int abc_prepend_shortcut_label = 0x7f0b001d; public static final int abc_search_hint = 0x7f0b001e; public static final int abc_searchview_description_clear = 0x7f0b001f; public static final int abc_searchview_description_query = 0x7f0b0020; public static final int abc_searchview_description_search = 0x7f0b0021; public static final int abc_searchview_description_submit = 0x7f0b0022; public static final int abc_searchview_description_voice = 0x7f0b0023; public static final int abc_shareactionprovider_share_with = 0x7f0b0024; public static final int abc_shareactionprovider_share_with_application = 0x7f0b0025; public static final int abc_toolbar_collapse_description = 0x7f0b0026; public static final int alert_description = 0x7f0b0027; public static final int catalyst_change_bundle_location = 0x7f0b0029; public static final int catalyst_copy_button = 0x7f0b002a; public static final int catalyst_debug = 0x7f0b002b; public static final int catalyst_debug_chrome = 0x7f0b002c; public static final int catalyst_debug_chrome_stop = 0x7f0b002d; public static final int catalyst_debug_connecting = 0x7f0b002e; public static final int catalyst_debug_error = 0x7f0b002f; public static final int catalyst_debug_nuclide = 0x7f0b0030; public static final int catalyst_debug_nuclide_error = 0x7f0b0031; public static final int catalyst_debug_stop = 0x7f0b0032; public static final int catalyst_dismiss_button = 0x7f0b0033; public static final int catalyst_heap_capture = 0x7f0b0034; public static final int catalyst_hot_reloading = 0x7f0b0035; public static final int catalyst_hot_reloading_auto_disable = 0x7f0b0036; public static final int catalyst_hot_reloading_auto_enable = 0x7f0b0037; public static final int catalyst_hot_reloading_stop = 0x7f0b0038; public static final int catalyst_inspector = 0x7f0b0039; public static final int catalyst_loading_from_url = 0x7f0b003a; public static final int catalyst_perf_monitor = 0x7f0b003b; public static final int catalyst_perf_monitor_stop = 0x7f0b003c; public static final int catalyst_reload = 0x7f0b003d; public static final int catalyst_reload_button = 0x7f0b003e; public static final int catalyst_reload_error = 0x7f0b003f; public static final int catalyst_report_button = 0x7f0b0040; public static final int catalyst_sample_profiler_disable = 0x7f0b0041; public static final int catalyst_sample_profiler_enable = 0x7f0b0042; public static final int catalyst_settings = 0x7f0b0043; public static final int catalyst_settings_title = 0x7f0b0044; public static final int combobox_description = 0x7f0b0045; public static final int header_description = 0x7f0b0046; public static final int image_description = 0x7f0b0047; public static final int imagebutton_description = 0x7f0b0048; public static final int link_description = 0x7f0b0049; public static final int menu_description = 0x7f0b004a; public static final int menubar_description = 0x7f0b004b; public static final int menuitem_description = 0x7f0b004c; public static final int progressbar_description = 0x7f0b004d; public static final int radiogroup_description = 0x7f0b004e; public static final int rn_tab_description = 0x7f0b004f; public static final int scrollbar_description = 0x7f0b0050; public static final int search_description = 0x7f0b0051; public static final int search_menu_title = 0x7f0b0052; public static final int spinbutton_description = 0x7f0b0053; public static final int state_busy_description = 0x7f0b0054; public static final int state_collapsed_description = 0x7f0b0055; public static final int state_expanded_description = 0x7f0b0056; public static final int state_mixed_description = 0x7f0b0057; public static final int state_off_description = 0x7f0b0058; public static final int state_on_description = 0x7f0b0059; public static final int status_bar_notification_info_overflow = 0x7f0b005a; public static final int summary_description = 0x7f0b005b; public static final int tablist_description = 0x7f0b005c; public static final int timer_description = 0x7f0b005d; public static final int toolbar_description = 0x7f0b005e; } public static final class style { private style() {} public static final int AlertDialog_AppCompat = 0x7f0c0000; public static final int AlertDialog_AppCompat_Light = 0x7f0c0001; public static final int Animation_AppCompat_Dialog = 0x7f0c0002; public static final int Animation_AppCompat_DropDownUp = 0x7f0c0003; public static final int Animation_AppCompat_Tooltip = 0x7f0c0004; public static final int Animation_Catalyst_RedBox = 0x7f0c0005; public static final int Base_AlertDialog_AppCompat = 0x7f0c0007; public static final int Base_AlertDialog_AppCompat_Light = 0x7f0c0008; public static final int Base_Animation_AppCompat_Dialog = 0x7f0c0009; public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0c000a; public static final int Base_Animation_AppCompat_Tooltip = 0x7f0c000b; public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0c000d; public static final int Base_DialogWindowTitle_AppCompat = 0x7f0c000c; public static final int Base_TextAppearance_AppCompat = 0x7f0c000e; public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0c000f; public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0c0010; public static final int Base_TextAppearance_AppCompat_Button = 0x7f0c0011; public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0c0012; public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0c0013; public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0c0014; public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0c0015; public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0c0016; public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0c0017; public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0c0018; public static final int Base_TextAppearance_AppCompat_Large = 0x7f0c0019; public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0c001a; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c001b; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c001c; public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0c001d; public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0c001e; public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0c001f; public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0c0020; public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c0021; public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0c0022; public static final int Base_TextAppearance_AppCompat_Small = 0x7f0c0023; public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0c0024; public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0c0025; public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c0026; public static final int Base_TextAppearance_AppCompat_Title = 0x7f0c0027; public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0c0028; public static final int Base_TextAppearance_AppCompat_Tooltip = 0x7f0c0029; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c002a; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c002b; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c002c; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c002d; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c002e; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c002f; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c0030; public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0c0031; public static final int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0c0032; public static final int Base_TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0c0033; public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c0034; public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c0035; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0c0036; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c0037; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c0038; public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0c0039; public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c003a; public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c003b; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c003c; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c003d; public static final int Base_ThemeOverlay_AppCompat = 0x7f0c004c; public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0c004d; public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0c004e; public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c004f; public static final int Base_ThemeOverlay_AppCompat_Dialog = 0x7f0c0050; public static final int Base_ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0c0051; public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0c0052; public static final int Base_Theme_AppCompat = 0x7f0c003e; public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0c003f; public static final int Base_Theme_AppCompat_Dialog = 0x7f0c0040; public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0c0044; public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0c0041; public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0c0042; public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0c0043; public static final int Base_Theme_AppCompat_Light = 0x7f0c0045; public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0c0046; public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0c0047; public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c004b; public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0c0048; public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0c0049; public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c004a; public static final int Base_V21_ThemeOverlay_AppCompat_Dialog = 0x7f0c0057; public static final int Base_V21_Theme_AppCompat = 0x7f0c0053; public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0c0054; public static final int Base_V21_Theme_AppCompat_Light = 0x7f0c0055; public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0c0056; public static final int Base_V22_Theme_AppCompat = 0x7f0c0058; public static final int Base_V22_Theme_AppCompat_Light = 0x7f0c0059; public static final int Base_V23_Theme_AppCompat = 0x7f0c005a; public static final int Base_V23_Theme_AppCompat_Light = 0x7f0c005b; public static final int Base_V26_Theme_AppCompat = 0x7f0c005c; public static final int Base_V26_Theme_AppCompat_Light = 0x7f0c005d; public static final int Base_V26_Widget_AppCompat_Toolbar = 0x7f0c005e; public static final int Base_V28_Theme_AppCompat = 0x7f0c005f; public static final int Base_V28_Theme_AppCompat_Light = 0x7f0c0060; public static final int Base_V7_ThemeOverlay_AppCompat_Dialog = 0x7f0c0065; public static final int Base_V7_Theme_AppCompat = 0x7f0c0061; public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0c0062; public static final int Base_V7_Theme_AppCompat_Light = 0x7f0c0063; public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0c0064; public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0c0066; public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0c0067; public static final int Base_V7_Widget_AppCompat_Toolbar = 0x7f0c0068; public static final int Base_Widget_AppCompat_ActionBar = 0x7f0c0069; public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0c006a; public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0c006b; public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0c006c; public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0c006d; public static final int Base_Widget_AppCompat_ActionButton = 0x7f0c006e; public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0c006f; public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0c0070; public static final int Base_Widget_AppCompat_ActionMode = 0x7f0c0071; public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0c0072; public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0c0073; public static final int Base_Widget_AppCompat_Button = 0x7f0c0074; public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0c007a; public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c007b; public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0c0075; public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0c0076; public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c0077; public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0c0078; public static final int Base_Widget_AppCompat_Button_Small = 0x7f0c0079; public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c007c; public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c007d; public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0c007e; public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0c007f; public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0c0080; public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0c0081; public static final int Base_Widget_AppCompat_EditText = 0x7f0c0082; public static final int Base_Widget_AppCompat_ImageButton = 0x7f0c0083; public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0c0084; public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c0085; public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c0086; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c0087; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c0088; public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c0089; public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0c008a; public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c008b; public static final int Base_Widget_AppCompat_ListMenuView = 0x7f0c008c; public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0c008d; public static final int Base_Widget_AppCompat_ListView = 0x7f0c008e; public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0c008f; public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0c0090; public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0c0091; public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0c0092; public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0c0093; public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0c0094; public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c0095; public static final int Base_Widget_AppCompat_RatingBar = 0x7f0c0096; public static final int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f0c0097; public static final int Base_Widget_AppCompat_RatingBar_Small = 0x7f0c0098; public static final int Base_Widget_AppCompat_SearchView = 0x7f0c0099; public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0c009a; public static final int Base_Widget_AppCompat_SeekBar = 0x7f0c009b; public static final int Base_Widget_AppCompat_SeekBar_Discrete = 0x7f0c009c; public static final int Base_Widget_AppCompat_Spinner = 0x7f0c009d; public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0c009e; public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0c009f; public static final int Base_Widget_AppCompat_Toolbar = 0x7f0c00a0; public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c00a1; public static final int CalendarDatePickerDialog = 0x7f0c00a2; public static final int CalendarDatePickerStyle = 0x7f0c00a3; public static final int ClockTimePickerDialog = 0x7f0c00a4; public static final int ClockTimePickerStyle = 0x7f0c00a5; public static final int DialogAnimationFade = 0x7f0c00a6; public static final int DialogAnimationSlide = 0x7f0c00a7; public static final int Platform_AppCompat = 0x7f0c00a8; public static final int Platform_AppCompat_Light = 0x7f0c00a9; public static final int Platform_ThemeOverlay_AppCompat = 0x7f0c00aa; public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0c00ab; public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0c00ac; public static final int Platform_V21_AppCompat = 0x7f0c00ad; public static final int Platform_V21_AppCompat_Light = 0x7f0c00ae; public static final int Platform_V25_AppCompat = 0x7f0c00af; public static final int Platform_V25_AppCompat_Light = 0x7f0c00b0; public static final int Platform_Widget_AppCompat_Spinner = 0x7f0c00b1; public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0c00b2; public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0c00b3; public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0c00b4; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0c00b5; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0c00b6; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Shortcut = 0x7f0c00b7; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_SubmenuArrow = 0x7f0c00b8; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0c00b9; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Title = 0x7f0c00ba; public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0c00c0; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0c00bb; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0c00bc; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0c00bd; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0c00be; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0c00bf; public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f0c00c1; public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0c00c2; public static final int SpinnerDatePickerDialog = 0x7f0c00c3; public static final int SpinnerDatePickerStyle = 0x7f0c00c4; public static final int SpinnerTimePickerDialog = 0x7f0c00c5; public static final int SpinnerTimePickerStyle = 0x7f0c00c6; public static final int TextAppearance_AppCompat = 0x7f0c00c7; public static final int TextAppearance_AppCompat_Body1 = 0x7f0c00c8; public static final int TextAppearance_AppCompat_Body2 = 0x7f0c00c9; public static final int TextAppearance_AppCompat_Button = 0x7f0c00ca; public static final int TextAppearance_AppCompat_Caption = 0x7f0c00cb; public static final int TextAppearance_AppCompat_Display1 = 0x7f0c00cc; public static final int TextAppearance_AppCompat_Display2 = 0x7f0c00cd; public static final int TextAppearance_AppCompat_Display3 = 0x7f0c00ce; public static final int TextAppearance_AppCompat_Display4 = 0x7f0c00cf; public static final int TextAppearance_AppCompat_Headline = 0x7f0c00d0; public static final int TextAppearance_AppCompat_Inverse = 0x7f0c00d1; public static final int TextAppearance_AppCompat_Large = 0x7f0c00d2; public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0c00d3; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0c00d4; public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0c00d5; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c00d6; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c00d7; public static final int TextAppearance_AppCompat_Medium = 0x7f0c00d8; public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0c00d9; public static final int TextAppearance_AppCompat_Menu = 0x7f0c00da; public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c00db; public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0c00dc; public static final int TextAppearance_AppCompat_Small = 0x7f0c00dd; public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0c00de; public static final int TextAppearance_AppCompat_Subhead = 0x7f0c00df; public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c00e0; public static final int TextAppearance_AppCompat_Title = 0x7f0c00e1; public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0c00e2; public static final int TextAppearance_AppCompat_Tooltip = 0x7f0c00e3; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c00e4; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c00e5; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c00e6; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c00e7; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c00e8; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c00e9; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0c00ea; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c00eb; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0c00ec; public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0c00ed; public static final int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0c00ee; public static final int TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0c00ef; public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c00f0; public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c00f1; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0c00f2; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c00f3; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c00f4; public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0c00f5; public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c00f6; public static final int TextAppearance_Compat_Notification = 0x7f0c00f7; public static final int TextAppearance_Compat_Notification_Info = 0x7f0c00f8; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0c00f9; public static final int TextAppearance_Compat_Notification_Time = 0x7f0c00fa; public static final int TextAppearance_Compat_Notification_Title = 0x7f0c00fb; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c00fc; public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c00fd; public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c00fe; public static final int Theme = 0x7f0c00ff; public static final int ThemeOverlay_AppCompat = 0x7f0c011c; public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0c011d; public static final int ThemeOverlay_AppCompat_Dark = 0x7f0c011e; public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c011f; public static final int ThemeOverlay_AppCompat_Dialog = 0x7f0c0120; public static final int ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0c0121; public static final int ThemeOverlay_AppCompat_Light = 0x7f0c0122; public static final int Theme_AppCompat = 0x7f0c0100; public static final int Theme_AppCompat_CompactMenu = 0x7f0c0101; public static final int Theme_AppCompat_DayNight = 0x7f0c0102; public static final int Theme_AppCompat_DayNight_DarkActionBar = 0x7f0c0103; public static final int Theme_AppCompat_DayNight_Dialog = 0x7f0c0104; public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f0c0107; public static final int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f0c0105; public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f0c0106; public static final int Theme_AppCompat_DayNight_NoActionBar = 0x7f0c0108; public static final int Theme_AppCompat_Dialog = 0x7f0c0109; public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0c010c; public static final int Theme_AppCompat_Dialog_Alert = 0x7f0c010a; public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0c010b; public static final int Theme_AppCompat_Light = 0x7f0c010d; public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0c010e; public static final int Theme_AppCompat_Light_Dialog = 0x7f0c010f; public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c0112; public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0c0110; public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c0111; public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0c0113; public static final int Theme_AppCompat_NoActionBar = 0x7f0c0114; public static final int Theme_Catalyst = 0x7f0c0115; public static final int Theme_Catalyst_RedBox = 0x7f0c0116; public static final int Theme_FullScreenDialog = 0x7f0c0117; public static final int Theme_FullScreenDialogAnimatedFade = 0x7f0c0118; public static final int Theme_FullScreenDialogAnimatedSlide = 0x7f0c0119; public static final int Theme_ReactNative_AppCompat_Light = 0x7f0c011a; public static final int Theme_ReactNative_AppCompat_Light_NoActionBar_FullScreen = 0x7f0c011b; public static final int Widget_AppCompat_ActionBar = 0x7f0c0123; public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0c0124; public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0c0125; public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0c0126; public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0c0127; public static final int Widget_AppCompat_ActionButton = 0x7f0c0128; public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0c0129; public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0c012a; public static final int Widget_AppCompat_ActionMode = 0x7f0c012b; public static final int Widget_AppCompat_ActivityChooserView = 0x7f0c012c; public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0c012d; public static final int Widget_AppCompat_Button = 0x7f0c012e; public static final int Widget_AppCompat_ButtonBar = 0x7f0c0134; public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c0135; public static final int Widget_AppCompat_Button_Borderless = 0x7f0c012f; public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0c0130; public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c0131; public static final int Widget_AppCompat_Button_Colored = 0x7f0c0132; public static final int Widget_AppCompat_Button_Small = 0x7f0c0133; public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c0136; public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c0137; public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0c0138; public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0c0139; public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0c013a; public static final int Widget_AppCompat_EditText = 0x7f0c013b; public static final int Widget_AppCompat_ImageButton = 0x7f0c013c; public static final int Widget_AppCompat_Light_ActionBar = 0x7f0c013d; public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c013e; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0c013f; public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c0140; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0c0141; public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c0142; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c0143; public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c0144; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0c0145; public static final int Widget_AppCompat_Light_ActionButton = 0x7f0c0146; public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0c0147; public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0c0148; public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0c0149; public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0c014a; public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0c014b; public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0c014c; public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0c014d; public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0c014e; public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0c014f; public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c0150; public static final int Widget_AppCompat_Light_SearchView = 0x7f0c0151; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0c0152; public static final int Widget_AppCompat_ListMenuView = 0x7f0c0153; public static final int Widget_AppCompat_ListPopupWindow = 0x7f0c0154; public static final int Widget_AppCompat_ListView = 0x7f0c0155; public static final int Widget_AppCompat_ListView_DropDown = 0x7f0c0156; public static final int Widget_AppCompat_ListView_Menu = 0x7f0c0157; public static final int Widget_AppCompat_PopupMenu = 0x7f0c0158; public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0c0159; public static final int Widget_AppCompat_PopupWindow = 0x7f0c015a; public static final int Widget_AppCompat_ProgressBar = 0x7f0c015b; public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c015c; public static final int Widget_AppCompat_RatingBar = 0x7f0c015d; public static final int Widget_AppCompat_RatingBar_Indicator = 0x7f0c015e; public static final int Widget_AppCompat_RatingBar_Small = 0x7f0c015f; public static final int Widget_AppCompat_SearchView = 0x7f0c0160; public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0c0161; public static final int Widget_AppCompat_SeekBar = 0x7f0c0162; public static final int Widget_AppCompat_SeekBar_Discrete = 0x7f0c0163; public static final int Widget_AppCompat_Spinner = 0x7f0c0164; public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0c0165; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0c0166; public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0c0167; public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0c0168; public static final int Widget_AppCompat_Toolbar = 0x7f0c0169; public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c016a; public static final int Widget_Compat_NotificationActionContainer = 0x7f0c016b; public static final int Widget_Compat_NotificationActionText = 0x7f0c016c; public static final int Widget_Support_CoordinatorLayout = 0x7f0c016d; public static final int redboxButton = 0x7f0c016e; } public static final class styleable { private styleable() {} public static final int[] ActionBar = { 0x7f020034, 0x7f020036, 0x7f020037, 0x7f02005b, 0x7f02005c, 0x7f02005d, 0x7f02005e, 0x7f02005f, 0x7f020060, 0x7f020063, 0x7f020068, 0x7f020069, 0x7f020074, 0x7f020087, 0x7f020088, 0x7f020089, 0x7f02008a, 0x7f02008b, 0x7f020090, 0x7f020093, 0x7f0200a9, 0x7f0200b0, 0x7f0200be, 0x7f0200c5, 0x7f0200c6, 0x7f0200f1, 0x7f0200f4, 0x7f02010f, 0x7f020118 }; public static final int ActionBar_background = 0; public static final int ActionBar_backgroundSplit = 1; public static final int ActionBar_backgroundStacked = 2; public static final int ActionBar_contentInsetEnd = 3; public static final int ActionBar_contentInsetEndWithActions = 4; public static final int ActionBar_contentInsetLeft = 5; public static final int ActionBar_contentInsetRight = 6; public static final int ActionBar_contentInsetStart = 7; public static final int ActionBar_contentInsetStartWithNavigation = 8; public static final int ActionBar_customNavigationLayout = 9; public static final int ActionBar_displayOptions = 10; public static final int ActionBar_divider = 11; public static final int ActionBar_elevation = 12; public static final int ActionBar_height = 13; public static final int ActionBar_hideOnContentScroll = 14; public static final int ActionBar_homeAsUpIndicator = 15; public static final int ActionBar_homeLayout = 16; public static final int ActionBar_icon = 17; public static final int ActionBar_indeterminateProgressStyle = 18; public static final int ActionBar_itemPadding = 19; public static final int ActionBar_logo = 20; public static final int ActionBar_navigationMode = 21; public static final int ActionBar_popupTheme = 22; public static final int ActionBar_progressBarPadding = 23; public static final int ActionBar_progressBarStyle = 24; public static final int ActionBar_subtitle = 25; public static final int ActionBar_subtitleTextStyle = 26; public static final int ActionBar_title = 27; public static final int ActionBar_titleTextStyle = 28; public static final int[] ActionBarLayout = { 0x10100b3 }; public static final int ActionBarLayout_android_layout_gravity = 0; public static final int[] ActionMenuItemView = { 0x101013f }; public static final int ActionMenuItemView_android_minWidth = 0; public static final int[] ActionMenuView = { }; public static final int[] ActionMode = { 0x7f020034, 0x7f020036, 0x7f02004b, 0x7f020087, 0x7f0200f4, 0x7f020118 }; public static final int ActionMode_background = 0; public static final int ActionMode_backgroundSplit = 1; public static final int ActionMode_closeItemLayout = 2; public static final int ActionMode_height = 3; public static final int ActionMode_subtitleTextStyle = 4; public static final int ActionMode_titleTextStyle = 5; public static final int[] ActivityChooserView = { 0x7f020075, 0x7f020091 }; public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0; public static final int ActivityChooserView_initialActivityCount = 1; public static final int[] AlertDialog = { 0x10100f2, 0x7f020042, 0x7f020043, 0x7f0200a0, 0x7f0200a1, 0x7f0200ad, 0x7f0200e6, 0x7f0200e7 }; public static final int AlertDialog_android_layout = 0; public static final int AlertDialog_buttonIconDimen = 1; public static final int AlertDialog_buttonPanelSideLayout = 2; public static final int AlertDialog_listItemLayout = 3; public static final int AlertDialog_listLayout = 4; public static final int AlertDialog_multiChoiceItemLayout = 5; public static final int AlertDialog_showTitle = 6; public static final int AlertDialog_singleChoiceItemLayout = 7; public static final int[] AnimatedStateListDrawableCompat = { 0x101011c, 0x1010194, 0x1010195, 0x1010196, 0x101030c, 0x101030d }; public static final int AnimatedStateListDrawableCompat_android_dither = 0; public static final int AnimatedStateListDrawableCompat_android_visible = 1; public static final int AnimatedStateListDrawableCompat_android_variablePadding = 2; public static final int AnimatedStateListDrawableCompat_android_constantSize = 3; public static final int AnimatedStateListDrawableCompat_android_enterFadeDuration = 4; public static final int AnimatedStateListDrawableCompat_android_exitFadeDuration = 5; public static final int[] AnimatedStateListDrawableItem = { 0x10100d0, 0x1010199 }; public static final int AnimatedStateListDrawableItem_android_id = 0; public static final int AnimatedStateListDrawableItem_android_drawable = 1; public static final int[] AnimatedStateListDrawableTransition = { 0x1010199, 0x1010449, 0x101044a, 0x101044b }; public static final int AnimatedStateListDrawableTransition_android_drawable = 0; public static final int AnimatedStateListDrawableTransition_android_toId = 1; public static final int AnimatedStateListDrawableTransition_android_fromId = 2; public static final int AnimatedStateListDrawableTransition_android_reversible = 3; public static final int[] AppCompatImageView = { 0x1010119, 0x7f0200ec, 0x7f02010d, 0x7f02010e }; public static final int AppCompatImageView_android_src = 0; public static final int AppCompatImageView_srcCompat = 1; public static final int AppCompatImageView_tint = 2; public static final int AppCompatImageView_tintMode = 3; public static final int[] AppCompatSeekBar = { 0x1010142, 0x7f02010a, 0x7f02010b, 0x7f02010c }; public static final int AppCompatSeekBar_android_thumb = 0; public static final int AppCompatSeekBar_tickMark = 1; public static final int AppCompatSeekBar_tickMarkTint = 2; public static final int AppCompatSeekBar_tickMarkTintMode = 3; public static final int[] AppCompatTextHelper = { 0x1010034, 0x101016d, 0x101016e, 0x101016f, 0x1010170, 0x1010392, 0x1010393 }; public static final int AppCompatTextHelper_android_textAppearance = 0; public static final int AppCompatTextHelper_android_drawableTop = 1; public static final int AppCompatTextHelper_android_drawableBottom = 2; public static final int AppCompatTextHelper_android_drawableLeft = 3; public static final int AppCompatTextHelper_android_drawableRight = 4; public static final int AppCompatTextHelper_android_drawableStart = 5; public static final int AppCompatTextHelper_android_drawableEnd = 6; public static final int[] AppCompatTextView = { 0x1010034, 0x7f02002f, 0x7f020030, 0x7f020031, 0x7f020032, 0x7f020033, 0x7f020079, 0x7f02007b, 0x7f020095, 0x7f02009d, 0x7f0200fa }; public static final int AppCompatTextView_android_textAppearance = 0; public static final int AppCompatTextView_autoSizeMaxTextSize = 1; public static final int AppCompatTextView_autoSizeMinTextSize = 2; public static final int AppCompatTextView_autoSizePresetSizes = 3; public static final int AppCompatTextView_autoSizeStepGranularity = 4; public static final int AppCompatTextView_autoSizeTextType = 5; public static final int AppCompatTextView_firstBaselineToTopHeight = 6; public static final int AppCompatTextView_fontFamily = 7; public static final int AppCompatTextView_lastBaselineToBottomHeight = 8; public static final int AppCompatTextView_lineHeight = 9; public static final int AppCompatTextView_textAllCaps = 10; public static final int[] AppCompatTheme = { 0x1010057, 0x10100ae, 0x7f020000, 0x7f020001, 0x7f020002, 0x7f020003, 0x7f020004, 0x7f020005, 0x7f020006, 0x7f020007, 0x7f020008, 0x7f020009, 0x7f02000a, 0x7f02000b, 0x7f02000c, 0x7f02000e, 0x7f02000f, 0x7f020010, 0x7f020011, 0x7f020012, 0x7f020013, 0x7f020014, 0x7f020015, 0x7f020016, 0x7f020017, 0x7f020018, 0x7f020019, 0x7f02001a, 0x7f02001b, 0x7f02001c, 0x7f02001d, 0x7f02001e, 0x7f020021, 0x7f020025, 0x7f020026, 0x7f020027, 0x7f020028, 0x7f02002e, 0x7f02003b, 0x7f02003c, 0x7f02003d, 0x7f02003e, 0x7f02003f, 0x7f020040, 0x7f020044, 0x7f020045, 0x7f020048, 0x7f020049, 0x7f02004f, 0x7f020050, 0x7f020051, 0x7f020052, 0x7f020053, 0x7f020054, 0x7f020055, 0x7f020056, 0x7f020057, 0x7f020058, 0x7f020061, 0x7f020065, 0x7f020066, 0x7f020067, 0x7f02006a, 0x7f02006c, 0x7f02006f, 0x7f020070, 0x7f020071, 0x7f020072, 0x7f020073, 0x7f020089, 0x7f02008f, 0x7f02009e, 0x7f02009f, 0x7f0200a2, 0x7f0200a3, 0x7f0200a4, 0x7f0200a5, 0x7f0200a6, 0x7f0200a7, 0x7f0200a8, 0x7f0200b8, 0x7f0200b9, 0x7f0200ba, 0x7f0200bd, 0x7f0200bf, 0x7f0200c9, 0x7f0200ca, 0x7f0200cb, 0x7f0200cc, 0x7f0200df, 0x7f0200e0, 0x7f0200e1, 0x7f0200e2, 0x7f0200e9, 0x7f0200ea, 0x7f0200f8, 0x7f0200fb, 0x7f0200fc, 0x7f0200fd, 0x7f0200fe, 0x7f0200ff, 0x7f020100, 0x7f020101, 0x7f020102, 0x7f020103, 0x7f020104, 0x7f020119, 0x7f02011a, 0x7f02011b, 0x7f02011c, 0x7f020123, 0x7f020125, 0x7f020126, 0x7f020127, 0x7f020128, 0x7f020129, 0x7f02012a, 0x7f02012b, 0x7f02012c, 0x7f02012d, 0x7f02012e }; public static final int AppCompatTheme_android_windowIsFloating = 0; public static final int AppCompatTheme_android_windowAnimationStyle = 1; public static final int AppCompatTheme_actionBarDivider = 2; public static final int AppCompatTheme_actionBarItemBackground = 3; public static final int AppCompatTheme_actionBarPopupTheme = 4; public static final int AppCompatTheme_actionBarSize = 5; public static final int AppCompatTheme_actionBarSplitStyle = 6; public static final int AppCompatTheme_actionBarStyle = 7; public static final int AppCompatTheme_actionBarTabBarStyle = 8; public static final int AppCompatTheme_actionBarTabStyle = 9; public static final int AppCompatTheme_actionBarTabTextStyle = 10; public static final int AppCompatTheme_actionBarTheme = 11; public static final int AppCompatTheme_actionBarWidgetTheme = 12; public static final int AppCompatTheme_actionButtonStyle = 13; public static final int AppCompatTheme_actionDropDownStyle = 14; public static final int AppCompatTheme_actionMenuTextAppearance = 15; public static final int AppCompatTheme_actionMenuTextColor = 16; public static final int AppCompatTheme_actionModeBackground = 17; public static final int AppCompatTheme_actionModeCloseButtonStyle = 18; public static final int AppCompatTheme_actionModeCloseDrawable = 19; public static final int AppCompatTheme_actionModeCopyDrawable = 20; public static final int AppCompatTheme_actionModeCutDrawable = 21; public static final int AppCompatTheme_actionModeFindDrawable = 22; public static final int AppCompatTheme_actionModePasteDrawable = 23; public static final int AppCompatTheme_actionModePopupWindowStyle = 24; public static final int AppCompatTheme_actionModeSelectAllDrawable = 25; public static final int AppCompatTheme_actionModeShareDrawable = 26; public static final int AppCompatTheme_actionModeSplitBackground = 27; public static final int AppCompatTheme_actionModeStyle = 28; public static final int AppCompatTheme_actionModeWebSearchDrawable = 29; public static final int AppCompatTheme_actionOverflowButtonStyle = 30; public static final int AppCompatTheme_actionOverflowMenuStyle = 31; public static final int AppCompatTheme_activityChooserViewStyle = 32; public static final int AppCompatTheme_alertDialogButtonGroupStyle = 33; public static final int AppCompatTheme_alertDialogCenterButtons = 34; public static final int AppCompatTheme_alertDialogStyle = 35; public static final int AppCompatTheme_alertDialogTheme = 36; public static final int AppCompatTheme_autoCompleteTextViewStyle = 37; public static final int AppCompatTheme_borderlessButtonStyle = 38; public static final int AppCompatTheme_buttonBarButtonStyle = 39; public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 40; public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 41; public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 42; public static final int AppCompatTheme_buttonBarStyle = 43; public static final int AppCompatTheme_buttonStyle = 44; public static final int AppCompatTheme_buttonStyleSmall = 45; public static final int AppCompatTheme_checkboxStyle = 46; public static final int AppCompatTheme_checkedTextViewStyle = 47; public static final int AppCompatTheme_colorAccent = 48; public static final int AppCompatTheme_colorBackgroundFloating = 49; public static final int AppCompatTheme_colorButtonNormal = 50; public static final int AppCompatTheme_colorControlActivated = 51; public static final int AppCompatTheme_colorControlHighlight = 52; public static final int AppCompatTheme_colorControlNormal = 53; public static final int AppCompatTheme_colorError = 54; public static final int AppCompatTheme_colorPrimary = 55; public static final int AppCompatTheme_colorPrimaryDark = 56; public static final int AppCompatTheme_colorSwitchThumbNormal = 57; public static final int AppCompatTheme_controlBackground = 58; public static final int AppCompatTheme_dialogCornerRadius = 59; public static final int AppCompatTheme_dialogPreferredPadding = 60; public static final int AppCompatTheme_dialogTheme = 61; public static final int AppCompatTheme_dividerHorizontal = 62; public static final int AppCompatTheme_dividerVertical = 63; public static final int AppCompatTheme_dropDownListViewStyle = 64; public static final int AppCompatTheme_dropdownListPreferredItemHeight = 65; public static final int AppCompatTheme_editTextBackground = 66; public static final int AppCompatTheme_editTextColor = 67; public static final int AppCompatTheme_editTextStyle = 68; public static final int AppCompatTheme_homeAsUpIndicator = 69; public static final int AppCompatTheme_imageButtonStyle = 70; public static final int AppCompatTheme_listChoiceBackgroundIndicator = 71; public static final int AppCompatTheme_listDividerAlertDialog = 72; public static final int AppCompatTheme_listMenuViewStyle = 73; public static final int AppCompatTheme_listPopupWindowStyle = 74; public static final int AppCompatTheme_listPreferredItemHeight = 75; public static final int AppCompatTheme_listPreferredItemHeightLarge = 76; public static final int AppCompatTheme_listPreferredItemHeightSmall = 77; public static final int AppCompatTheme_listPreferredItemPaddingLeft = 78; public static final int AppCompatTheme_listPreferredItemPaddingRight = 79; public static final int AppCompatTheme_panelBackground = 80; public static final int AppCompatTheme_panelMenuListTheme = 81; public static final int AppCompatTheme_panelMenuListWidth = 82; public static final int AppCompatTheme_popupMenuStyle = 83; public static final int AppCompatTheme_popupWindowStyle = 84; public static final int AppCompatTheme_radioButtonStyle = 85; public static final int AppCompatTheme_ratingBarStyle = 86; public static final int AppCompatTheme_ratingBarStyleIndicator = 87; public static final int AppCompatTheme_ratingBarStyleSmall = 88; public static final int AppCompatTheme_searchViewStyle = 89; public static final int AppCompatTheme_seekBarStyle = 90; public static final int AppCompatTheme_selectableItemBackground = 91; public static final int AppCompatTheme_selectableItemBackgroundBorderless = 92; public static final int AppCompatTheme_spinnerDropDownItemStyle = 93; public static final int AppCompatTheme_spinnerStyle = 94; public static final int AppCompatTheme_switchStyle = 95; public static final int AppCompatTheme_textAppearanceLargePopupMenu = 96; public static final int AppCompatTheme_textAppearanceListItem = 97; public static final int AppCompatTheme_textAppearanceListItemSecondary = 98; public static final int AppCompatTheme_textAppearanceListItemSmall = 99; public static final int AppCompatTheme_textAppearancePopupMenuHeader = 100; public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 101; public static final int AppCompatTheme_textAppearanceSearchResultTitle = 102; public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 103; public static final int AppCompatTheme_textColorAlertDialogListItem = 104; public static final int AppCompatTheme_textColorSearchUrl = 105; public static final int AppCompatTheme_toolbarNavigationButtonStyle = 106; public static final int AppCompatTheme_toolbarStyle = 107; public static final int AppCompatTheme_tooltipForegroundColor = 108; public static final int AppCompatTheme_tooltipFrameBackground = 109; public static final int AppCompatTheme_viewInflaterClass = 110; public static final int AppCompatTheme_windowActionBar = 111; public static final int AppCompatTheme_windowActionBarOverlay = 112; public static final int AppCompatTheme_windowActionModeOverlay = 113; public static final int AppCompatTheme_windowFixedHeightMajor = 114; public static final int AppCompatTheme_windowFixedHeightMinor = 115; public static final int AppCompatTheme_windowFixedWidthMajor = 116; public static final int AppCompatTheme_windowFixedWidthMinor = 117; public static final int AppCompatTheme_windowMinWidthMajor = 118; public static final int AppCompatTheme_windowMinWidthMinor = 119; public static final int AppCompatTheme_windowNoTitle = 120; public static final int[] ButtonBarLayout = { 0x7f020029 }; public static final int ButtonBarLayout_allowStacking = 0; public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f02002a }; public static final int ColorStateListItem_android_color = 0; public static final int ColorStateListItem_android_alpha = 1; public static final int ColorStateListItem_alpha = 2; public static final int[] CompoundButton = { 0x1010107, 0x7f020046, 0x7f020047 }; public static final int CompoundButton_android_button = 0; public static final int CompoundButton_buttonTint = 1; public static final int CompoundButton_buttonTintMode = 2; public static final int[] CoordinatorLayout = { 0x7f020094, 0x7f0200ee }; public static final int CoordinatorLayout_keylines = 0; public static final int CoordinatorLayout_statusBarBackground = 1; public static final int[] CoordinatorLayout_Layout = { 0x10100b3, 0x7f020097, 0x7f020098, 0x7f020099, 0x7f02009a, 0x7f02009b, 0x7f02009c }; public static final int CoordinatorLayout_Layout_android_layout_gravity = 0; public static final int CoordinatorLayout_Layout_layout_anchor = 1; public static final int CoordinatorLayout_Layout_layout_anchorGravity = 2; public static final int CoordinatorLayout_Layout_layout_behavior = 3; public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4; public static final int CoordinatorLayout_Layout_layout_insetEdge = 5; public static final int CoordinatorLayout_Layout_layout_keyline = 6; public static final int[] DrawerArrowToggle = { 0x7f02002c, 0x7f02002d, 0x7f02003a, 0x7f02004e, 0x7f02006d, 0x7f020085, 0x7f0200e8, 0x7f020106 }; public static final int DrawerArrowToggle_arrowHeadLength = 0; public static final int DrawerArrowToggle_arrowShaftLength = 1; public static final int DrawerArrowToggle_barLength = 2; public static final int DrawerArrowToggle_color = 3; public static final int DrawerArrowToggle_drawableSize = 4; public static final int DrawerArrowToggle_gapBetweenBars = 5; public static final int DrawerArrowToggle_spinBars = 6; public static final int DrawerArrowToggle_thickness = 7; public static final int[] FontFamily = { 0x7f02007c, 0x7f02007d, 0x7f02007e, 0x7f02007f, 0x7f020080, 0x7f020081 }; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 1; public static final int FontFamily_fontProviderFetchStrategy = 2; public static final int FontFamily_fontProviderFetchTimeout = 3; public static final int FontFamily_fontProviderPackage = 4; public static final int FontFamily_fontProviderQuery = 5; public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f02007a, 0x7f020082, 0x7f020083, 0x7f020084, 0x7f020121 }; public static final int FontFamilyFont_android_font = 0; public static final int FontFamilyFont_android_fontWeight = 1; public static final int FontFamilyFont_android_fontStyle = 2; public static final int FontFamilyFont_android_ttcIndex = 3; public static final int FontFamilyFont_android_fontVariationSettings = 4; public static final int FontFamilyFont_font = 5; public static final int FontFamilyFont_fontStyle = 6; public static final int FontFamilyFont_fontVariationSettings = 7; public static final int FontFamilyFont_fontWeight = 8; public static final int FontFamilyFont_ttcIndex = 9; public static final int[] GenericDraweeHierarchy = { 0x7f020023, 0x7f020035, 0x7f020076, 0x7f020077, 0x7f020078, 0x7f0200b3, 0x7f0200bb, 0x7f0200bc, 0x7f0200c1, 0x7f0200c2, 0x7f0200c3, 0x7f0200c4, 0x7f0200cd, 0x7f0200ce, 0x7f0200cf, 0x7f0200d0, 0x7f0200d1, 0x7f0200d2, 0x7f0200d3, 0x7f0200d4, 0x7f0200d5, 0x7f0200d6, 0x7f0200d7, 0x7f0200d8, 0x7f0200d9, 0x7f0200da, 0x7f0200db, 0x7f0200dc, 0x7f020122 }; public static final int GenericDraweeHierarchy_actualImageScaleType = 0; public static final int GenericDraweeHierarchy_backgroundImage = 1; public static final int GenericDraweeHierarchy_fadeDuration = 2; public static final int GenericDraweeHierarchy_failureImage = 3; public static final int GenericDraweeHierarchy_failureImageScaleType = 4; public static final int GenericDraweeHierarchy_overlayImage = 5; public static final int GenericDraweeHierarchy_placeholderImage = 6; public static final int GenericDraweeHierarchy_placeholderImageScaleType = 7; public static final int GenericDraweeHierarchy_pressedStateOverlayImage = 8; public static final int GenericDraweeHierarchy_progressBarAutoRotateInterval = 9; public static final int GenericDraweeHierarchy_progressBarImage = 10; public static final int GenericDraweeHierarchy_progressBarImageScaleType = 11; public static final int GenericDraweeHierarchy_retryImage = 12; public static final int GenericDraweeHierarchy_retryImageScaleType = 13; public static final int GenericDraweeHierarchy_roundAsCircle = 14; public static final int GenericDraweeHierarchy_roundBottomEnd = 15; public static final int GenericDraweeHierarchy_roundBottomLeft = 16; public static final int GenericDraweeHierarchy_roundBottomRight = 17; public static final int GenericDraweeHierarchy_roundBottomStart = 18; public static final int GenericDraweeHierarchy_roundTopEnd = 19; public static final int GenericDraweeHierarchy_roundTopLeft = 20; public static final int GenericDraweeHierarchy_roundTopRight = 21; public static final int GenericDraweeHierarchy_roundTopStart = 22; public static final int GenericDraweeHierarchy_roundWithOverlayColor = 23; public static final int GenericDraweeHierarchy_roundedCornerRadius = 24; public static final int GenericDraweeHierarchy_roundingBorderColor = 25; public static final int GenericDraweeHierarchy_roundingBorderPadding = 26; public static final int GenericDraweeHierarchy_roundingBorderWidth = 27; public static final int GenericDraweeHierarchy_viewAspectRatio = 28; public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 }; public static final int GradientColor_android_startColor = 0; public static final int GradientColor_android_endColor = 1; public static final int GradientColor_android_type = 2; public static final int GradientColor_android_centerX = 3; public static final int GradientColor_android_centerY = 4; public static final int GradientColor_android_gradientRadius = 5; public static final int GradientColor_android_tileMode = 6; public static final int GradientColor_android_centerColor = 7; public static final int GradientColor_android_startX = 8; public static final int GradientColor_android_startY = 9; public static final int GradientColor_android_endX = 10; public static final int GradientColor_android_endY = 11; public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 }; public static final int GradientColorItem_android_color = 0; public static final int GradientColorItem_android_offset = 1; public static final int[] LinearLayoutCompat = { 0x10100af, 0x10100c4, 0x1010126, 0x1010127, 0x1010128, 0x7f020069, 0x7f02006b, 0x7f0200ac, 0x7f0200e4 }; public static final int LinearLayoutCompat_android_gravity = 0; public static final int LinearLayoutCompat_android_orientation = 1; public static final int LinearLayoutCompat_android_baselineAligned = 2; public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3; public static final int LinearLayoutCompat_android_weightSum = 4; public static final int LinearLayoutCompat_divider = 5; public static final int LinearLayoutCompat_dividerPadding = 6; public static final int LinearLayoutCompat_measureWithLargestChild = 7; public static final int LinearLayoutCompat_showDividers = 8; public static final int[] LinearLayoutCompat_Layout = { 0x10100b3, 0x10100f4, 0x10100f5, 0x1010181 }; public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0; public static final int LinearLayoutCompat_Layout_android_layout_width = 1; public static final int LinearLayoutCompat_Layout_android_layout_height = 2; public static final int LinearLayoutCompat_Layout_android_layout_weight = 3; public static final int[] ListPopupWindow = { 0x10102ac, 0x10102ad }; public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0; public static final int ListPopupWindow_android_dropDownVerticalOffset = 1; public static final int[] MenuGroup = { 0x101000e, 0x10100d0, 0x1010194, 0x10101de, 0x10101df, 0x10101e0 }; public static final int MenuGroup_android_enabled = 0; public static final int MenuGroup_android_id = 1; public static final int MenuGroup_android_visible = 2; public static final int MenuGroup_android_menuCategory = 3; public static final int MenuGroup_android_orderInCategory = 4; public static final int MenuGroup_android_checkableBehavior = 5; public static final int[] MenuItem = { 0x1010002, 0x101000e, 0x10100d0, 0x1010106, 0x1010194, 0x10101de, 0x10101df, 0x10101e1, 0x10101e2, 0x10101e3, 0x10101e4, 0x10101e5, 0x101026f, 0x7f02000d, 0x7f02001f, 0x7f020020, 0x7f02002b, 0x7f02005a, 0x7f02008c, 0x7f02008d, 0x7f0200b1, 0x7f0200e3, 0x7f02011d }; public static final int MenuItem_android_icon = 0; public static final int MenuItem_android_enabled = 1; public static final int MenuItem_android_id = 2; public static final int MenuItem_android_checked = 3; public static final int MenuItem_android_visible = 4; public static final int MenuItem_android_menuCategory = 5; public static final int MenuItem_android_orderInCategory = 6; public static final int MenuItem_android_title = 7; public static final int MenuItem_android_titleCondensed = 8; public static final int MenuItem_android_alphabeticShortcut = 9; public static final int MenuItem_android_numericShortcut = 10; public static final int MenuItem_android_checkable = 11; public static final int MenuItem_android_onClick = 12; public static final int MenuItem_actionLayout = 13; public static final int MenuItem_actionProviderClass = 14; public static final int MenuItem_actionViewClass = 15; public static final int MenuItem_alphabeticModifiers = 16; public static final int MenuItem_contentDescription = 17; public static final int MenuItem_iconTint = 18; public static final int MenuItem_iconTintMode = 19; public static final int MenuItem_numericModifiers = 20; public static final int MenuItem_showAsAction = 21; public static final int MenuItem_tooltipText = 22; public static final int[] MenuView = { 0x10100ae, 0x101012c, 0x101012d, 0x101012e, 0x101012f, 0x1010130, 0x1010131, 0x7f0200c0, 0x7f0200ef }; public static final int MenuView_android_windowAnimationStyle = 0; public static final int MenuView_android_itemTextAppearance = 1; public static final int MenuView_android_horizontalDivider = 2; public static final int MenuView_android_verticalDivider = 3; public static final int MenuView_android_headerBackground = 4; public static final int MenuView_android_itemBackground = 5; public static final int MenuView_android_itemIconDisabledAlpha = 6; public static final int MenuView_preserveIconSpacing = 7; public static final int MenuView_subMenuArrow = 8; public static final int[] PopupWindow = { 0x1010176, 0x10102c9, 0x7f0200b2 }; public static final int PopupWindow_android_popupBackground = 0; public static final int PopupWindow_android_popupAnimationStyle = 1; public static final int PopupWindow_overlapAnchor = 2; public static final int[] PopupWindowBackgroundState = { 0x7f0200ed }; public static final int PopupWindowBackgroundState_state_above_anchor = 0; public static final int[] RecycleListView = { 0x7f0200b4, 0x7f0200b7 }; public static final int RecycleListView_paddingBottomNoButtons = 0; public static final int RecycleListView_paddingTopNoTitle = 1; public static final int[] SearchView = { 0x10100da, 0x101011f, 0x1010220, 0x1010264, 0x7f02004a, 0x7f020059, 0x7f020064, 0x7f020086, 0x7f02008e, 0x7f020096, 0x7f0200c7, 0x7f0200c8, 0x7f0200dd, 0x7f0200de, 0x7f0200f0, 0x7f0200f5, 0x7f020124 }; public static final int SearchView_android_focusable = 0; public static final int SearchView_android_maxWidth = 1; public static final int SearchView_android_inputType = 2; public static final int SearchView_android_imeOptions = 3; public static final int SearchView_closeIcon = 4; public static final int SearchView_commitIcon = 5; public static final int SearchView_defaultQueryHint = 6; public static final int SearchView_goIcon = 7; public static final int SearchView_iconifiedByDefault = 8; public static final int SearchView_layout = 9; public static final int SearchView_queryBackground = 10; public static final int SearchView_queryHint = 11; public static final int SearchView_searchHintIcon = 12; public static final int SearchView_searchIcon = 13; public static final int SearchView_submitBackground = 14; public static final int SearchView_suggestionRowLayout = 15; public static final int SearchView_voiceIcon = 16; public static final int[] SimpleDraweeView = { 0x7f020022, 0x7f020023, 0x7f020024, 0x7f020035, 0x7f020076, 0x7f020077, 0x7f020078, 0x7f0200b3, 0x7f0200bb, 0x7f0200bc, 0x7f0200c1, 0x7f0200c2, 0x7f0200c3, 0x7f0200c4, 0x7f0200cd, 0x7f0200ce, 0x7f0200cf, 0x7f0200d0, 0x7f0200d1, 0x7f0200d2, 0x7f0200d3, 0x7f0200d4, 0x7f0200d5, 0x7f0200d6, 0x7f0200d7, 0x7f0200d8, 0x7f0200d9, 0x7f0200da, 0x7f0200db, 0x7f0200dc, 0x7f020122 }; public static final int SimpleDraweeView_actualImageResource = 0; public static final int SimpleDraweeView_actualImageScaleType = 1; public static final int SimpleDraweeView_actualImageUri = 2; public static final int SimpleDraweeView_backgroundImage = 3; public static final int SimpleDraweeView_fadeDuration = 4; public static final int SimpleDraweeView_failureImage = 5; public static final int SimpleDraweeView_failureImageScaleType = 6; public static final int SimpleDraweeView_overlayImage = 7; public static final int SimpleDraweeView_placeholderImage = 8; public static final int SimpleDraweeView_placeholderImageScaleType = 9; public static final int SimpleDraweeView_pressedStateOverlayImage = 10; public static final int SimpleDraweeView_progressBarAutoRotateInterval = 11; public static final int SimpleDraweeView_progressBarImage = 12; public static final int SimpleDraweeView_progressBarImageScaleType = 13; public static final int SimpleDraweeView_retryImage = 14; public static final int SimpleDraweeView_retryImageScaleType = 15; public static final int SimpleDraweeView_roundAsCircle = 16; public static final int SimpleDraweeView_roundBottomEnd = 17; public static final int SimpleDraweeView_roundBottomLeft = 18; public static final int SimpleDraweeView_roundBottomRight = 19; public static final int SimpleDraweeView_roundBottomStart = 20; public static final int SimpleDraweeView_roundTopEnd = 21; public static final int SimpleDraweeView_roundTopLeft = 22; public static final int SimpleDraweeView_roundTopRight = 23; public static final int SimpleDraweeView_roundTopStart = 24; public static final int SimpleDraweeView_roundWithOverlayColor = 25; public static final int SimpleDraweeView_roundedCornerRadius = 26; public static final int SimpleDraweeView_roundingBorderColor = 27; public static final int SimpleDraweeView_roundingBorderPadding = 28; public static final int SimpleDraweeView_roundingBorderWidth = 29; public static final int SimpleDraweeView_viewAspectRatio = 30; public static final int[] Spinner = { 0x10100b2, 0x1010176, 0x101017b, 0x1010262, 0x7f0200be }; public static final int Spinner_android_entries = 0; public static final int Spinner_android_popupBackground = 1; public static final int Spinner_android_prompt = 2; public static final int Spinner_android_dropDownWidth = 3; public static final int Spinner_popupTheme = 4; public static final int[] StateListDrawable = { 0x101011c, 0x1010194, 0x1010195, 0x1010196, 0x101030c, 0x101030d }; public static final int StateListDrawable_android_dither = 0; public static final int StateListDrawable_android_visible = 1; public static final int StateListDrawable_android_variablePadding = 2; public static final int StateListDrawable_android_constantSize = 3; public static final int StateListDrawable_android_enterFadeDuration = 4; public static final int StateListDrawable_android_exitFadeDuration = 5; public static final int[] StateListDrawableItem = { 0x1010199 }; public static final int StateListDrawableItem_android_drawable = 0; public static final int[] SwitchCompat = { 0x1010124, 0x1010125, 0x1010142, 0x7f0200e5, 0x7f0200eb, 0x7f0200f6, 0x7f0200f7, 0x7f0200f9, 0x7f020107, 0x7f020108, 0x7f020109, 0x7f02011e, 0x7f02011f, 0x7f020120 }; public static final int SwitchCompat_android_textOn = 0; public static final int SwitchCompat_android_textOff = 1; public static final int SwitchCompat_android_thumb = 2; public static final int SwitchCompat_showText = 3; public static final int SwitchCompat_splitTrack = 4; public static final int SwitchCompat_switchMinWidth = 5; public static final int SwitchCompat_switchPadding = 6; public static final int SwitchCompat_switchTextAppearance = 7; public static final int SwitchCompat_thumbTextPadding = 8; public static final int SwitchCompat_thumbTint = 9; public static final int SwitchCompat_thumbTintMode = 10; public static final int SwitchCompat_track = 11; public static final int SwitchCompat_trackTint = 12; public static final int SwitchCompat_trackTintMode = 13; public static final int[] TextAppearance = { 0x1010095, 0x1010096, 0x1010097, 0x1010098, 0x101009a, 0x101009b, 0x1010161, 0x1010162, 0x1010163, 0x1010164, 0x10103ac, 0x7f02007b, 0x7f0200fa }; public static final int TextAppearance_android_textSize = 0; public static final int TextAppearance_android_typeface = 1; public static final int TextAppearance_android_textStyle = 2; public static final int TextAppearance_android_textColor = 3; public static final int TextAppearance_android_textColorHint = 4; public static final int TextAppearance_android_textColorLink = 5; public static final int TextAppearance_android_shadowColor = 6; public static final int TextAppearance_android_shadowDx = 7; public static final int TextAppearance_android_shadowDy = 8; public static final int TextAppearance_android_shadowRadius = 9; public static final int TextAppearance_android_fontFamily = 10; public static final int TextAppearance_fontFamily = 11; public static final int TextAppearance_textAllCaps = 12; public static final int[] Toolbar = { 0x10100af, 0x1010140, 0x7f020041, 0x7f02004c, 0x7f02004d, 0x7f02005b, 0x7f02005c, 0x7f02005d, 0x7f02005e, 0x7f02005f, 0x7f020060, 0x7f0200a9, 0x7f0200aa, 0x7f0200ab, 0x7f0200ae, 0x7f0200af, 0x7f0200be, 0x7f0200f1, 0x7f0200f2, 0x7f0200f3, 0x7f02010f, 0x7f020110, 0x7f020111, 0x7f020112, 0x7f020113, 0x7f020114, 0x7f020115, 0x7f020116, 0x7f020117 }; public static final int Toolbar_android_gravity = 0; public static final int Toolbar_android_minHeight = 1; public static final int Toolbar_buttonGravity = 2; public static final int Toolbar_collapseContentDescription = 3; public static final int Toolbar_collapseIcon = 4; public static final int Toolbar_contentInsetEnd = 5; public static final int Toolbar_contentInsetEndWithActions = 6; public static final int Toolbar_contentInsetLeft = 7; public static final int Toolbar_contentInsetRight = 8; public static final int Toolbar_contentInsetStart = 9; public static final int Toolbar_contentInsetStartWithNavigation = 10; public static final int Toolbar_logo = 11; public static final int Toolbar_logoDescription = 12; public static final int Toolbar_maxButtonHeight = 13; public static final int Toolbar_navigationContentDescription = 14; public static final int Toolbar_navigationIcon = 15; public static final int Toolbar_popupTheme = 16; public static final int Toolbar_subtitle = 17; public static final int Toolbar_subtitleTextAppearance = 18; public static final int Toolbar_subtitleTextColor = 19; public static final int Toolbar_title = 20; public static final int Toolbar_titleMargin = 21; public static final int Toolbar_titleMarginBottom = 22; public static final int Toolbar_titleMarginEnd = 23; public static final int Toolbar_titleMarginStart = 24; public static final int Toolbar_titleMarginTop = 25; public static final int Toolbar_titleMargins = 26; public static final int Toolbar_titleTextAppearance = 27; public static final int Toolbar_titleTextColor = 28; public static final int[] View = { 0x1010000, 0x10100da, 0x7f0200b5, 0x7f0200b6, 0x7f020105 }; public static final int View_android_theme = 0; public static final int View_android_focusable = 1; public static final int View_paddingEnd = 2; public static final int View_paddingStart = 3; public static final int View_theme = 4; public static final int[] ViewBackgroundHelper = { 0x10100d4, 0x7f020038, 0x7f020039 }; public static final int ViewBackgroundHelper_android_background = 0; public static final int ViewBackgroundHelper_backgroundTint = 1; public static final int ViewBackgroundHelper_backgroundTintMode = 2; public static final int[] ViewStubCompat = { 0x10100d0, 0x10100f2, 0x10100f3 }; public static final int ViewStubCompat_android_id = 0; public static final int ViewStubCompat_android_layout = 1; public static final int ViewStubCompat_android_inflatedId = 2; } public static final class xml { private xml() {} public static final int rn_dev_preferences = 0x7f0e0000; } }
1528d732bc1bfc124f861b720dc7681fed535807
36e2316e4f39a48cab5def7aa4bf53551fabcd79
/设计模式/src/com/dp/composite/example2/Client.java
8957e4afed4b4d802e896d7df95abdf69c7ff18b
[]
no_license
PlumpMath/DesignPattern-327
b47f935638541367214812a5d1cafe45af5d543e
aee4c13e94d04279792c5c34dd58ce068f2e9a8d
refs/heads/master
2021-01-20T09:36:48.199768
2015-09-25T00:57:52
2015-09-25T00:57:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
739
java
package com.dp.composite.example2; /** * @desc 请用一句话描述此文件 * @creator caozhiqing * @data 2015/8/12 */ public class Client { public static void main(String[] arg){ Component root = new Composite("服装"); Component man = new Composite("男装"); Component wom = new Composite("女装"); root.addChild(man); root.addChild(wom); Component leaf1 = new Leaf("夹克"); Component leaf2 = new Leaf("寸衫"); man.addChild(leaf1); man.addChild(leaf2); Component leaf3 = new Leaf("短裙"); Component leaf4 = new Leaf("Browse"); wom.addChild(leaf3); wom.addChild(leaf4); root.operation(""); } }
1772f7f4a3d5baf2d0a87f7353568029ca029b33
852eaef4704a814cc60917102559d1f772582666
/src/main/java/com/zhb/manager/LockManager.java
953830704301f2f8ba053d78269dff6c5d9c5099
[]
no_license
RobinZhouAu/audit
71747c96f068a3938c73c5f7f1da95aeaf88fed9
f072c64d4842ddf92c01535d2e55f0199b1f275e
refs/heads/master
2021-06-13T18:50:15.612663
2017-03-17T06:07:01
2017-03-17T06:07:01
76,326,679
0
0
null
null
null
null
UTF-8
Java
false
false
3,577
java
package com.zhb.manager; import org.apache.log4j.Logger; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** * Created by zhouhaibin on 2016/11/30. * 资源锁的管理 */ public class LockManager { static Logger logger = Logger.getLogger(LockManager.class); static Map<String, ResourceLock> locks = new HashMap<>(); public static Map<String, ResourceLock> getLocks() { return locks; } //添加资源锁 public static boolean addLock(String resourceId, int resourceType, String userId, String sessionId) { ResourceLock resourceLock = locks.get(resourceId); if (resourceLock != null) { if (resourceLock.getUserId().equals(userId)) { resourceLock.update(); logger.debug(String.format("update resource lock[%s][%s]", resourceId, userId)); return true; } return false; } resourceLock = new ResourceLock(resourceId, resourceType, userId); resourceLock.setSessionId(sessionId); locks.put(resourceLock.getResourceId(), resourceLock); logger.debug(String.format("add resource lock[%s][%s]", resourceId, userId)); return true; } //释放资源锁 public static boolean releaseLock(String resourceId, String userId) { ResourceLock resourceLock = locks.get(resourceId); if (resourceLock == null) return true; if (!resourceLock.getUserId().equals(userId)) return false; locks.remove(resourceId); logger.debug(String.format("release resource lock[%s][%s]", resourceId, userId)); return true; } //释放某个用户的所有资源锁 public static void releaseUserAllLocks(String userId) { logger.debug(String.format("release all user's resource lock[%s]", userId)); for (Iterator iterator = locks.keySet().iterator(); iterator.hasNext(); ) { String resourceId = (String)iterator.next(); ResourceLock resourceLock = locks.get(resourceId); if (resourceLock.getUserId().equals(userId)) { locks.remove(resourceId); logger.debug(String.format("release user's resource lock[%s]", resourceId)); } } } //释放某个Session所有资源锁 public static void releaseSessionAllLocks(String sessionId) { logger.debug(String.format("release all session's resource lock[%s]", sessionId)); for (Iterator iterator = locks.keySet().iterator(); iterator.hasNext(); ) { String resourceId = (String)iterator.next(); ResourceLock resourceLock = locks.get(resourceId); if (resourceLock.getSessionId().equals(sessionId)) { locks.remove(resourceId); logger.debug(String.format("release session's resource lock[%s]", resourceId)); } } } //获得锁定某个资源的用户Id public static String getResourceLocker(String resourceId) { ResourceLock resourceLock = locks.get(resourceId); if (resourceLock != null) { return resourceLock.getUserId(); } return null; } //管理员解锁 public static boolean releaseByAdmin(String resourceId) { ResourceLock resourceLock = locks.get(resourceId); if (resourceLock == null) return true; locks.remove(resourceId); logger.debug(String.format("release resource lock by admin [%s]", resourceId)); return true; } }
d31aa00485538f4983bef5bcaed464673984f1b4
02e639d4242eb6f67b579ffee936809563462384
/src/faltas/Tela_Cadastro.java
536cdd98b74274a3ff0fe5a3f08b07490ce19db9
[]
no_license
MarcosSoares10/Tarefa_Controle_Alunos
f80ad8c7a1b1f5d4670d69349b3de7aa41ac930b
a1dcded1f67e514c6192b44d2dfb78e88e977263
refs/heads/master
2020-03-24T19:34:02.899668
2018-07-30T22:26:54
2018-07-30T22:26:54
142,934,170
0
0
null
null
null
null
UTF-8
Java
false
false
25,949
java
package faltas; import java.util.ArrayList; import java.util.List; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ public class Tela_Cadastro extends javax.swing.JFrame { public List<Aluno> lista_alunos = new ArrayList<>(); public int contador = 0; /** * Creates new form Frame */ public Tela_Cadastro() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); camponomealuno = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); campodisciplina = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); campomatricula = new javax.swing.JTextField(); btnsalvar = new javax.swing.JButton(); bimestral3 = new javax.swing.JTextField(); btnlimpar = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); bimestral1 = new javax.swing.JTextField(); bimestral2 = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); bimestral4 = new javax.swing.JTextField(); campocurso = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); tabela = new javax.swing.JTable(); btncarregar = new javax.swing.JButton(); btnexcluir = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Alunos"); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Cadastro")); jLabel1.setText("Nome do Aluno:"); camponomealuno.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { camponomealunoActionPerformed(evt); } }); jLabel2.setText("Bimestral 1:"); jLabel3.setText("Disciplina:"); campodisciplina.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { campodisciplinaKeyReleased(evt); } }); jLabel5.setText("Bimestral 3:"); jLabel6.setText("Matricula:"); btnsalvar.setText("Salvar/Alterar"); btnsalvar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnsalvarActionPerformed(evt); } }); bimestral3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bimestral3ActionPerformed(evt); } }); btnlimpar.setText("Limpar Campos"); btnlimpar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnlimparActionPerformed(evt); } }); jLabel7.setText("Bimestral 2:"); bimestral1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { bimestral1KeyReleased(evt); } }); bimestral2.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { bimestral2KeyReleased(evt); } }); jLabel8.setText("Bimestral 4:"); bimestral4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bimestral4ActionPerformed(evt); } }); campocurso.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { campocursoKeyReleased(evt); } }); jLabel4.setText("Curso:"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(campomatricula, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel2)) .addComponent(btnsalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(66, 276, Short.MAX_VALUE) .addComponent(btnlimpar, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(4, 4, 4) .addComponent(bimestral1, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(bimestral2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(bimestral3, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel8)))) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(camponomealuno, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jLabel3) .addGap(10, 10, 10) .addComponent(campodisciplina, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel4))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(bimestral4, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(campocurso, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(campocurso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(camponomealuno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3) .addComponent(campodisciplina, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(campomatricula, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2) .addComponent(bimestral1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7) .addComponent(bimestral2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(bimestral3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(bimestral4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel8))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnsalvar) .addComponent(btnlimpar)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Alunos")); tabela.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); tabela.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tabelaMouseClicked(evt); } }); jScrollPane1.setViewportView(tabela); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE) ); btncarregar.setText("Exibir Situação do Alunos"); btncarregar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btncarregarActionPerformed(evt); } }); btnexcluir.setText("Excluir Selecionado"); btnexcluir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnexcluirActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(105, 105, 105) .addComponent(btncarregar, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(108, 108, 108) .addComponent(btnexcluir, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btncarregar) .addComponent(btnexcluir)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel3.getAccessibleContext().setAccessibleName("Alunos"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents private void camponomealunoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_camponomealunoActionPerformed // TODO add your handling code here: }//GEN-LAST:event_camponomealunoActionPerformed private void bimestral3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bimestral3ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_bimestral3ActionPerformed private void btnsalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnsalvarActionPerformed // TODO add your handling code here: if((!camponomealuno.getText().isEmpty())&&(!campodisciplina.getText().isEmpty()) &&(!campomatricula.getText().isEmpty())&&(!camponomealuno.getText().isEmpty()) &&(!bimestral1.getText().isEmpty())&&(!bimestral2.getText().isEmpty()) &&(!bimestral3.getText().isEmpty())&&(!bimestral4.getText().isEmpty())){ Aluno cmp = new Aluno(); //Instancia do Objeto Aluno Alunoctrl alunoctrl = new Alunoctrl(); //Controle de Métodos e Conexões cmp.setAluno(camponomealuno.getText()); cmp.setBimestral1(Long.parseLong(bimestral1.getText())); cmp.setBimestral2(Long.parseLong(bimestral2.getText())); cmp.setBimestral3(Long.parseLong(bimestral3.getText())); cmp.setBimestral4(Long.parseLong(bimestral4.getText())); cmp.setCurso(campocurso.getText()); cmp.setDisciplina(campodisciplina.getText()); cmp.setMatricula(Integer.parseInt(campomatricula.getText())); alunoctrl.salvarAluno(cmp); //adicionar o objeto aluno ao método de controle salvar aluno campocurso.setText(""); campomatricula.setText(""); camponomealuno.setText(""); campodisciplina.setText(""); bimestral1.setText(""); bimestral2.setText(""); bimestral3.setText(""); bimestral4.setText(""); }else{System.out.print("Algo Vazio");} }//GEN-LAST:event_btnsalvarActionPerformed private void campodisciplinaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campodisciplinaKeyReleased // TODO add your handling code here: }//GEN-LAST:event_campodisciplinaKeyReleased private void btnexcluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnexcluirActionPerformed // TODO add your handling code here: Tabelamodelo model = (Tabelamodelo) tabela.getModel(); Alunoctrl alunoctrl = new Alunoctrl(); Aluno cmp = model.getAlunos(tabela.getSelectedRow()); alunoctrl.deletaAluno(cmp); campomatricula.setText(""); camponomealuno.setText(""); campocurso.setText(""); bimestral1.setText(""); bimestral2.setText(""); campodisciplina.setText(""); bimestral3.setText(""); bimestral4.setText(""); carregatabela(); btnsalvar.setEnabled(true); }//GEN-LAST:event_btnexcluirActionPerformed private void tabelaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabelaMouseClicked // TODO add your handling code here: if (evt.getClickCount() == 1) { Tabelamodelo model = (Tabelamodelo) tabela.getModel(); Aluno cmp = model.getAlunos(tabela.getSelectedRow()); campomatricula.setText(String.valueOf(cmp.getMatricula())); camponomealuno.setText(cmp.getAluno()); campodisciplina.setText(cmp.getDisciplina()); campocurso.setText(cmp.getCurso()); bimestral1.setText(String.valueOf(cmp.getBimestral1())); bimestral2.setText(String.valueOf(cmp.getBimestral2())); bimestral3.setText(String.valueOf(cmp.getBimestral3())); bimestral4.setText(String.valueOf(cmp.getBimestral4())); } }//GEN-LAST:event_tabelaMouseClicked private void btnlimparActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnlimparActionPerformed // TODO add your handling code here: campomatricula.setText(""); campocurso.setText(""); bimestral1.setText(""); bimestral2.setText(""); bimestral3.setText(""); bimestral4.setText(""); camponomealuno.setText(""); campodisciplina.setText(""); }//GEN-LAST:event_btnlimparActionPerformed private void carregatabela() { Alunoctrl alunoctrl = new Alunoctrl(); List<Aluno> alunos; alunos = alunoctrl.listarAluno(); Tabelamodelo tabelamodelo = new Tabelamodelo(alunos); tabela.setModel(tabelamodelo); } private void bimestral1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_bimestral1KeyReleased // TODO add your handling code here: }//GEN-LAST:event_bimestral1KeyReleased private void bimestral2KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_bimestral2KeyReleased // TODO add your handling code here: }//GEN-LAST:event_bimestral2KeyReleased private void bimestral4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bimestral4ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_bimestral4ActionPerformed private void campocursoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campocursoKeyReleased // TODO add your handling code here: }//GEN-LAST:event_campocursoKeyReleased private void btncarregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btncarregarActionPerformed // TODO add your handling code here: carregatabela(); }//GEN-LAST:event_btncarregarActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Tela_Cadastro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Tela_Cadastro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Tela_Cadastro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Tela_Cadastro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Tela_Cadastro().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField bimestral1; private javax.swing.JTextField bimestral2; private javax.swing.JTextField bimestral3; private javax.swing.JTextField bimestral4; private javax.swing.JButton btncarregar; private javax.swing.JButton btnexcluir; private javax.swing.JButton btnlimpar; private javax.swing.JButton btnsalvar; private javax.swing.JTextField campocurso; private javax.swing.JTextField campodisciplina; private javax.swing.JTextField campomatricula; private javax.swing.JTextField camponomealuno; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel3; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable tabela; // End of variables declaration//GEN-END:variables }
fcc48101bfd6d284441564ca9ebbd57008cd71f4
da1e71dfeb40ed3ab83b45f1c9039e5d53740beb
/MLSListingApp.java
a68bdf67303c6ecdcfafb39d0cf07217c5489e4f
[]
no_license
bhenriquez8/MLSListing
25437dcc3b226a065e81f90bc673761abf3b2a11
807c78b7ee50e7246ff222f9565020890f5a831f
refs/heads/master
2020-06-29T13:35:51.549721
2019-08-04T23:37:42
2019-08-04T23:37:42
200,552,096
0
0
null
null
null
null
UTF-8
Java
false
false
796
java
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.nio.*; import java.nio.file.*; import java.nio.file.AccessMode.*; import java.io.*; public class MLSListingApp { public static void main(String[] args) { PropertyList listOfProperties = new PropertyList(); listOfProperties.initialize(); EventQueue.invokeLater(new Runnable() { public void run() { MLSListingView mlsView = new MLSListingView(); mlsView.setProperties(listOfProperties); mlsView.setVisible(true); mlsView.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } }); } }
f07750d4b083d9efbd78bfb3c1b09624e54822d4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_741371e196dfc73d68ddfdfefd08966b8dab8f8a/JSIncluder/5_741371e196dfc73d68ddfdfefd08966b8dab8f8a_JSIncluder_s.java
02e310dd02e2cc49a6e33f917090409c4fd0f990
[]
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
8,629
java
/** * Copyright (C) 2012 JBoss 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 org.jboss.dashboard.ui.components.js; import org.jboss.dashboard.Application; import org.jboss.dashboard.annotation.config.Config; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; import javax.annotation.PostConstruct; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; import java.io.*; @ApplicationScoped public class JSIncluder { private static transient org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(JSIncluder.class.getName()); public static final String HEAD = "head"; public static final String BOTTOM = "bottom"; @Inject @Config("/javascript/Head.js") private String headScriptFile; @Inject @Config("/javascript/Bottom.js") private String bottomScriptFile; @Inject @Config("false") private boolean existHead; @Inject @Config("false") private boolean existBottom; @Inject @Config("/components/bam/displayer/chart/gauge/raphael.2.1.0.min.js," + "/components/bam/displayer/chart/gauge/justgage.1.0.1.min.js," + "/components/bam/displayer/chart/nvd3/lib/d3.v2.min.js," + "/components/bam/displayer/chart/nvd3/nv.d3.min.js," + "/components/bam/displayer/chart/nvd3/src/tooltip.js," + "/components/bam/displayer/chart/nvd3/src/utils.js," + "/components/bam/displayer/chart/nvd3/src/models/axis.js," + "/components/bam/displayer/chart/nvd3/src/models/discreteBar.js," + "/components/bam/displayer/chart/nvd3/src/models/discreteBarChart.js," + "/components/bam/displayer/chart/nvd3/src/models/legend.js," + "/components/bam/displayer/chart/nvd3/src/models/scatter.js," + "/components/bam/displayer/chart/nvd3/src/models/line.js," + "/components/bam/displayer/chart/nvd3/src/models/lineChart.js," + "/components/bam/displayer/chart/nvd3/src/models/pie.js," + "/components/bam/displayer/chart/nvd3/src/models/pieChart.js," + "/js/lib/scriptaculous-js-1.9.0/prototype.js," + "/js/lib/scriptaculous-js-1.9.0/scriptaculous.js," + "/js/lib/scriptaculous-js-1.9.0/effects.js," + "/js/lib/scriptaculous-js-1.9.0/dragdrop.js," + "/common/rs/popup.js," + "/fckeditor/fckeditor.js") private String[] pagesToIncludeInHeader; @Inject @Config("/components/colorpicker/js/colorPicker.jsp") private String[] jspPagesToIncludeInHeader; @Inject @Config("") private String[] jspPagesToIncludeInBottom; @Inject @Config("") private String[] pagesToIncludeInBottom; @PostConstruct public void start() throws Exception { setExists(HEAD, deployJS(HEAD)); setExists(BOTTOM, deployJS(BOTTOM)); } public String getJSFileURL(String position) { return getJSFilePath(position); } public String getJSFilePath(String position) { if (HEAD.equals(position)) return headScriptFile; else if (BOTTOM.equals(position)) return bottomScriptFile; return null; } public String[] getJSPFilesPath(String position) { if (HEAD.equals(position)) return jspPagesToIncludeInHeader; else if (BOTTOM.equals(position)) return jspPagesToIncludeInBottom; return null; } public boolean checkAndDeploy(String position) { if (!getExists(position)) return setExists(position, deployJS(position)); return true; } protected boolean getExists(String position) { if (HEAD.equals(position)) return existHead; else if (BOTTOM.equals(position)) return existBottom; return false; } protected boolean setExists(String position, boolean value) { if (HEAD.equals(position)) existHead = value; else if (BOTTOM.equals(position)) existBottom = value; return value; } public boolean deployJS(String position) { if (HEAD.equals(position)) return deployJS(headScriptFile, pagesToIncludeInHeader); else if (BOTTOM.equals(position)) return deployJS(bottomScriptFile, pagesToIncludeInBottom); log.warn("Unable to deploy JS option '" + position +"'"); return false; } protected boolean deployJS(String scriptFile, String[] pagesToInclude) { if (StringUtils.isEmpty(scriptFile) || ArrayUtils.isEmpty(pagesToInclude)) return false; BufferedWriter out = null; try { File destFile = getScriptFile(scriptFile); out = new BufferedWriter(new FileWriter(destFile)); for (String pageToInclude : pagesToInclude) { BufferedReader in = new BufferedReader(new FileReader(Application.lookup().getBaseAppDirectory() + pageToInclude)); try { String l; while ((l = in.readLine()) != null) { out.write(l.trim()); out.newLine(); } } catch (Exception e) { log.error("Error writting JS file '" + pageToInclude + "': ", e); } finally { try {in.close();} catch (Exception ex) {} } } return true; } catch (Exception e) { log.error("Error writting JS file: ", e); } finally { if (out != null) try {out.close();} catch (Exception ex){} } return false; } private File getScriptFile(String scriptFile) throws Exception { File destFile = new File(Application.lookup().getBaseAppDirectory() + scriptFile); if (destFile.exists()) destFile.delete(); if (!destFile.getParentFile().exists()) destFile.getParentFile().mkdirs(); destFile.createNewFile(); return destFile; } public String[] getPagesToIncludeInHeader() { return pagesToIncludeInHeader; } public void setPagesToIncludeInHeader(String[] pagesToIncludeInHeader) { this.pagesToIncludeInHeader = pagesToIncludeInHeader; } public String[] getPagesToIncludeInBottom() { return pagesToIncludeInBottom; } public void setPagesToIncludeInBottom(String[] pagesToIncludeInBottom) { this.pagesToIncludeInBottom = pagesToIncludeInBottom; } public String[] getJspPagesToIncludeInHeader() { return jspPagesToIncludeInHeader; } public void setJspPagesToIncludeInHeader(String[] jspPagesToIncludeInHeader) { this.jspPagesToIncludeInHeader = jspPagesToIncludeInHeader; } public String[] getJspPagesToIncludeInBottom() { return jspPagesToIncludeInBottom; } public void setJspPagesToIncludeInBottom(String[] jspPagesToIncludeInBottom) { this.jspPagesToIncludeInBottom = jspPagesToIncludeInBottom; } public String getHeadScriptFile() { return headScriptFile; } public void setHeadScriptFile(String headScriptFile) { this.headScriptFile = headScriptFile; } public String getBottomScriptFile() { return bottomScriptFile; } public void setBottomScriptFile(String bottomScriptFile) { this.bottomScriptFile = bottomScriptFile; } public boolean isExistHead() { return existHead; } public void setExistHead(boolean existHead) { this.existHead = existHead; } public boolean isExistBottom() { return existBottom; } public void setExistBottom(boolean existBottom) { this.existBottom = existBottom; } }
72ad246fcff2741fcd5a3eaf6e49db2d31ef4632
dd6e8bae4a5b66d527e01d221674039143665ce9
/文件/src/scanner.java
9a4ff0e08322b5a20fb2da7addf339d33c08a815
[]
no_license
Consini/JavaSE
51ee5c9c45db10702ad84587e6e68667bec45412
b457df85fe408d2bcba7f78b2e421b964ad44e7a
refs/heads/master
2021-07-09T09:39:21.502806
2020-08-21T04:00:51
2020-08-21T04:00:51
183,192,975
0
0
null
null
null
null
UTF-8
Java
false
false
753
java
import java.io.File; import java.io.PrintStream; /** * @Description TODO * @Author K * @Date 2019/12/1 11:26 **/ public class scanner { public static void scannerDirectory(TreeNode node){ File[] files = node.file.listFiles(); if(files == null){ return; } for(File file : files){ TreeNode child = new TreeNode(); child.file = file; if(file.isDirectory()){ scannerDirectory(child); }else{ child.totalLength = file.length(); } node.totalLength += child.totalLength; node.children.add(child); } } public static void main(String[] args) { PrintStream out; } }
b948a263a1b8c00e1a4745f60b9c3e066996e8d9
473fc28d466ddbe9758ca49c7d4fb42e7d82586e
/app/src/main/java/com/syd/source/aosp/external/droiddriver/src/io/appium/droiddriver/duo/DuoDriver.java
0ad84bf7420c2b217d248990972550cf88c4edbb
[ "Apache-2.0" ]
permissive
lz-purple/Source
a7788070623f2965a8caa3264778f48d17372bab
e2745b756317aac3c7a27a4c10bdfe0921a82a1c
refs/heads/master
2020-12-23T17:03:12.412572
2020-01-31T01:54:37
2020-01-31T01:54:37
237,205,127
4
2
null
null
null
null
UTF-8
Java
false
false
2,233
java
/* * Copyright (C) 2016 DroidDriver committers * * 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 io.appium.droiddriver.duo; import android.annotation.TargetApi; import android.app.Activity; import android.app.Instrumentation; import io.appium.droiddriver.base.AbstractDroidDriver; import io.appium.droiddriver.base.CompositeDroidDriver; import io.appium.droiddriver.instrumentation.InstrumentationDriver; import io.appium.droiddriver.uiautomation.UiAutomationDriver; import io.appium.droiddriver.util.ActivityUtils; import io.appium.droiddriver.util.InstrumentationUtils; /** * Implementation of DroidDriver that attempts to use the best driver for the current activity. * If the activity is part of the application under instrumentation, the InstrumentationDriver is * used. Otherwise, the UiAutomationDriver is used. */ @TargetApi(18) public class DuoDriver extends CompositeDroidDriver { private final String targetApkPackage; private final UiAutomationDriver uiAutomationDriver; private final InstrumentationDriver instrumentationDriver; public DuoDriver() { Instrumentation instrumentation = InstrumentationUtils.getInstrumentation(); targetApkPackage = InstrumentationUtils.getTargetContext().getPackageName(); uiAutomationDriver = new UiAutomationDriver(instrumentation); instrumentationDriver = new InstrumentationDriver(instrumentation); } @Override protected AbstractDroidDriver getApplicableDriver() { Activity activity = ActivityUtils.getRunningActivity(); if (activity != null && targetApkPackage.equals( activity.getApplicationContext().getPackageName())) { return instrumentationDriver; } return uiAutomationDriver; } }
6f0e5881379b4c657b4c2966c51b7cbd8e66f00a
2c92c73da2a0d899ba4ee894ae0abe8cd5d07909
/src/com/fiveinarow/Main.java
2ee30d774b4194ffb9d339df1e1e8cf9e15c1b5d
[]
no_license
TurcsanyAdam/FiveInaRow
5b0985312430fe1263c6a42854fc734ed49b0ab9
9f7b004d8988b833c7fa21e295b9322ec4546c34
refs/heads/master
2022-11-13T02:53:16.901413
2020-06-23T09:30:29
2020-06-23T09:30:29
274,364,874
0
0
null
null
null
null
UTF-8
Java
false
false
124
java
package com.fiveinarow; public class Main { public static void main(String[] args) { Game game = new Game(); } }
a0e2ce16c6888b87df6a5a66f5030a2e14049b8c
28ae90f474f0e4c82b4c4e46e9469a51fb93cd9f
/app/src/main/java/com/jekz/stepitup/data/request/LoginRequest.java
9430184a70513f19cb6f2548728667314e327e7d
[]
no_license
ZAhmed95/Jekz_Step_It_Up
dcc123e5b36c8cbbf8555a0dc9af4a16d90cfb33
599412ac3c240235bf87f167ff5d1d77d32560b6
refs/heads/master
2020-04-02T03:23:25.889482
2018-01-11T00:05:03
2018-01-11T00:05:03
153,962,650
1
0
null
2018-10-21T01:19:09
2018-10-21T01:19:09
null
UTF-8
Java
false
false
5,399
java
package com.jekz.stepitup.data.request; import android.os.AsyncTask; import android.util.Log; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.URL; import java.security.cert.Certificate; import javax.net.ssl.HttpsURLConnection; /** * Created by evanalmonte on 12/12/17. */ public class LoginRequest extends AsyncTask<String, Integer, String> { private static final String TAG = LoginRequest.class.getName(); private String cookie; private String username; private String password; private LoginRequest.LoginRequestCallback callback; public LoginRequest(String username, String password, String cookie, LoginRequestCallback callback) { this.username = username; this.password = password; this.cookie = cookie; this.callback = callback; } @Override protected String doInBackground(String... params) { try { URL url = new URL(params[0]); if (RequestString.isLocal()) { HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setDoOutput(true); urlConnection.setDoInput(true); urlConnection.setRequestMethod("POST"); urlConnection.setRequestProperty("Content-Type", "application/json; charset=UTF-8"); urlConnection.setRequestProperty("Cookie", cookie); //printHttpsCert(urlConnection); OutputStreamWriter out = new OutputStreamWriter(urlConnection.getOutputStream()); JSONObject data = new JSONObject(); data.put("username", username); data.put("password", password); out.write(data.toString()); out.flush(); out.close(); StringBuilder builder = new StringBuilder(); InputStream is; is = new BufferedInputStream(urlConnection.getInputStream()); BufferedReader br = new BufferedReader(new InputStreamReader(is)); String inputLine; while ((inputLine = br.readLine()) != null) { builder.append(inputLine).append("\n"); } return builder.toString(); } else { HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection(); urlConnection.setDoOutput(true); urlConnection.setDoInput(true); urlConnection.setRequestMethod("POST"); urlConnection.setRequestProperty("Content-Type", "application/json; charset=UTF-8"); urlConnection.setRequestProperty("Cookie", cookie); //printHttpsCert(urlConnection); OutputStreamWriter out = new OutputStreamWriter(urlConnection.getOutputStream()); JSONObject data = new JSONObject(); data.put("username", username); data.put("password", password); out.write(data.toString()); out.flush(); out.close(); StringBuilder builder = new StringBuilder(); InputStream is; is = new BufferedInputStream(urlConnection.getInputStream()); BufferedReader br = new BufferedReader(new InputStreamReader(is)); String inputLine; while ((inputLine = br.readLine()) != null) { builder.append(inputLine).append("\n"); } return builder.toString(); } } catch (IOException | JSONException e) { e.printStackTrace(); } return "ERROR"; } @Override protected void onPostExecute(String result) { Log.d(TAG, result); if (result.contains(username.toLowerCase() + "'s Home Page")) { callback.onProcessLogin(cookie, username); } else if (result.contains("ERROR")) { callback.networkError(); } else { callback.invalidCredentials(); } } private void printHttpsCert(HttpsURLConnection con) { if (con != null) try { Log.d(TAG, "Response Code : " + con.getResponseCode()); Log.d(TAG, "Cipher Suite : " + con.getCipherSuite()); Log.d(TAG, "\n"); Certificate[] certs = con.getServerCertificates(); for (Certificate cert : certs) { Log.d(TAG, "Cert Type : " + cert.getType()); Log.d(TAG, "Cert Hash Code : " + cert.hashCode()); Log.d(TAG, "Cert Public Key Algorithm : " + cert.getPublicKey().getAlgorithm()); Log.d(TAG, "Cert Public Key Format : " + cert.getPublicKey().getFormat()); Log.d(TAG, "\n"); } } catch (IOException e) { e.printStackTrace(); } } public interface LoginRequestCallback { void onProcessLogin(String cookie, String username); void invalidCredentials(); void networkError(); } }
959bbbe55cd0be76f8c080ea876c58676f188ca6
db33c79c573d537fe2af991913c313d14ec8a815
/src/main/java/com/dataworker/udf/text/mark/GenericUDFMaskShowFirstN.java
e10dfadbfba6c7d6f9a197fe4584b809c5d68088
[]
no_license
zhanglei/dataworker-udf
b8c822f86c11994e2183a2fd7a3f20e73024b792
fc26a68f1bff06432ab9f8241422a01c3b372815
refs/heads/master
2023-07-09T14:54:48.983840
2021-08-12T09:02:39
2021-08-12T09:02:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,426
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 com.dataworker.udf.text.mark; import org.apache.hadoop.hive.ql.exec.Description; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @Description(name = "mask_show_first_n", value = "masks all but first n characters of the value", extended = "Examples:\n " + " mask_show_first_n(ccn, 8)\n " + " mask_show_first_n(ccn, 8, 'x', 'x', 'x')\n " + "Arguments:\n " + " mask_show_first_n(value, charCount, upperChar, lowerChar, digitChar, otherChar, numberChar)\n " + " value - value to mask. Supported types: TINYINT, SMALLINT, INT, BIGINT, STRING, VARCHAR, CHAR\n " + " charCount - number of characters. Default value: 4\n " + " upperChar - character to replace upper-case characters with. Specify -1 to retain original character. Default value: 'X'\n " + " lowerChar - character to replace lower-case characters with. Specify -1 to retain original character. Default value: 'x'\n " + " digitChar - character to replace digit characters with. Specify -1 to retain original character. Default value: 'n'\n " + " otherChar - character to replace all other characters with. Specify -1 to retain original character. Default value: -1\n " + " numberChar - character to replace digits in a number with. Valid values: 0-9. Default value: '1'\n " ) public class GenericUDFMaskShowFirstN extends BaseMaskUDF { public static final String UDF_NAME = "mask_show_first_n"; public GenericUDFMaskShowFirstN() { super(new MaskShowFirstNTransformer(), UDF_NAME); } } class MaskShowFirstNTransformer extends MaskTransformer { int charCount = 4; public MaskShowFirstNTransformer() { super(); } @Override public void init(ObjectInspector[] arguments, int argsStartIdx) { super.init(arguments, argsStartIdx + 1); // first argument is charCount, which is consumed here charCount = getIntArg(arguments, argsStartIdx, 4); if(charCount < 0) { charCount = 0; } } @Override String transform(final String value) { if(value.length() <= charCount) { return value; } final StringBuilder ret = new StringBuilder(value.length()); for(int i = 0; i < charCount; i++) { ret.appendCodePoint(value.charAt(i)); } for(int i = charCount; i < value.length(); i++) { ret.appendCodePoint(transformChar(value.charAt(i))); } return ret.toString(); } @Override Byte transform(final Byte value) { byte val = value; if(value < 0) { val *= -1; } // count number of digits in the value int digitCount = 0; for(byte v = val; v != 0; v /= 10) { digitCount++; } // number of digits to mask from the end final int maskCount = digitCount - charCount; if(maskCount <= 0) { return value; } byte ret = 0; int pos = 1; for(int i = 0; val != 0; i++) { if(i < maskCount) { // mask this digit ret += (maskedNumber * pos); } else { //retain this digit ret += ((val % 10) * pos); } val /= 10; pos *= 10; } if(value < 0) { ret *= -1; } return ret; } @Override Short transform(final Short value) { short val = value; if(value < 0) { val *= -1; } // count number of digits in the value int digitCount = 0; for(short v = val; v != 0; v /= 10) { digitCount++; } // number of digits to mask from the end final int maskCount = digitCount - charCount; if(maskCount <= 0) { return value; } short ret = 0; int pos = 1; for(int i = 0; val != 0; i++) { if(i < maskCount) { // mask this digit ret += (maskedNumber * pos); } else { // retain this digit ret += ((val % 10) * pos); } val /= 10; pos *= 10; } if(value < 0) { ret *= -1; } return ret; } @Override Integer transform(final Integer value) { int val = value; if(value < 0) { val *= -1; } // count number of digits in the value int digitCount = 0; for(int v = val; v != 0; v /= 10) { digitCount++; } // number of digits to mask from the end final int maskCount = digitCount - charCount; if(maskCount <= 0) { return value; } int ret = 0; int pos = 1; for(int i = 0; val != 0; i++) { if(i < maskCount) { // mask this digit ret += maskedNumber * pos; } else { // retain this digit ret += ((val % 10) * pos); } val /= 10; pos *= 10; } if(value < 0) { ret *= -1; } return ret; } @Override Long transform(final Long value) { long val = value; if(value < 0) { val *= -1; } // count number of digits in the value int digitCount = 0; for(long v = val; v != 0; v /= 10) { digitCount++; } // number of digits to mask from the end final int maskCount = digitCount - charCount; if(maskCount <= 0) { return value; } long ret = 0; long pos = 1; for(int i = 0; val != 0; i++) { if(i < maskCount) { // mask this digit ret += (maskedNumber * pos); } else { // retain this digit ret += ((val % 10) * pos); } val /= 10; pos *= 10; } if(value < 0) { ret *= -1; } return ret; } }
4450879acbe18fffba1328d4b909e4bb688b1195
06185eae44f8d78474077593013fce33b5a32c29
/src/com/example/dsa/linkedlist/intersection/Node.java
97c536e8205fabf3d679f6cfcc2f680f001fe882
[]
no_license
shshankar1/DataStructureNAlgo
752a1963d0694db7e5838b4a31d3af48b0181f18
1ccb2721e7723195a0a3692edb929e5db00c8eb0
refs/heads/master
2020-04-06T05:48:45.338703
2017-06-26T09:14:59
2017-06-26T09:14:59
95,429,079
0
2
null
null
null
null
UTF-8
Java
false
false
329
java
package com.example.dsa.linkedlist.intersection; public class Node<T> { private T value; private Node<T> next; public T getValue() { return value; } public void setValue(T value) { this.value = value; } public Node<T> getNext() { return next; } public void setNext(Node<T> next) { this.next = next; } }
6ac949339520f7a6a1a1238c40db0270be2ff9ce
ae821b3c478428339a919678ce6ba683c387308d
/src/builderpattern/Pepsi.java
e6f2b4e0db53f2500ebd134413b44f1a99ed8583
[]
no_license
Jiazhiwei/DesignMode
61360c9e564d49aa0e697feda1f4a4e64769e63a
d5e50a747cf95ad8fa67361ffecc677040430045
refs/heads/master
2023-01-19T13:51:10.777097
2020-11-19T15:21:08
2020-11-19T15:21:08
306,205,752
0
0
null
null
null
null
UTF-8
Java
false
false
278
java
package builderpattern; /** * * @author jzw * @date 2020-11-18 23:13 * @since cloud2.0 */ public class Pepsi extends ColdDrink { @Override public float price() { return 35.0f; } @Override public String name() { return "Pepsi"; } }
168e14ccd77192adac5b60c7fea4a7d4dfa09637
4adbe93e02634b0c363a19827a54d3407557c90f
/End_Module3/src/main/java/com/example/End_Module3/controller/ProductServlet.java
e3b10b08a79dee963419b3b190259c3a978b90b1
[]
no_license
Huy-Le2002/MODULE_3
8d17b08c9b54b4a993d16fb5f020f55090ee116e
38eb713c44a53f04be5fcdffc9649f91ff4615aa
refs/heads/master
2023-05-15T00:14:37.299338
2021-06-08T09:18:17
2021-06-08T09:18:17
373,039,941
0
0
null
null
null
null
UTF-8
Java
false
false
6,440
java
package com.example.End_Module3.controller; import com.example.End_Module3.dao.ProductDAO; import com.example.End_Module3.model.Category; import com.example.End_Module3.model.Product; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.annotation.*; import java.io.IOException; import java.sql.SQLException; import java.util.Calendar; import java.util.List; @WebServlet(name = "ProductServlet", value = "/product") public class ProductServlet extends HttpServlet { ProductDAO productDAO = new ProductDAO(); @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); if (action == null) { action = ""; } switch (action) { case "create": showInsertProduct(request,response); break; case "edit": showEditProduct(request,response); break; case "delete": try { deleteProduct(request,response); } catch (SQLException throwables) { throwables.printStackTrace(); } case "find": findProduct(request,response); break; default: listAllProduct(request,response); break; } } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); String action = request.getParameter("action"); if (action == null) { action = ""; } switch (action) { case "create": try { insertProduct(request,response); } catch (SQLException throwables) { throwables.printStackTrace(); } break; case "edit": try { editProduct(request,response); } catch (SQLException throwables) { throwables.printStackTrace(); } break; } } private void findProduct(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String key = request.getParameter("key"); List<Product> list = productDAO.findData(key); request.setAttribute("list",list); RequestDispatcher requestDispatcher = request.getRequestDispatcher("product/find.jsp"); requestDispatcher.forward(request,response); } private void editProduct(HttpServletRequest request, HttpServletResponse response) throws SQLException, ServletException, IOException { int id = Integer.parseInt(request.getParameter("id")); String name = request.getParameter("name"); float price = Float.parseFloat(request.getParameter("price")); int quantity = Integer.parseInt(request.getParameter("quantity")); String color = request.getParameter("color"); String des = request.getParameter("des"); int category = Integer.parseInt(request.getParameter("category")); Product product = new Product(id,name,price,quantity,color,des,category); productDAO.updateProduct(product); request.setAttribute("message","Update success"); RequestDispatcher requestDispatcher = request.getRequestDispatcher("product/edit.jsp"); requestDispatcher.forward(request,response); } private void deleteProduct(HttpServletRequest request, HttpServletResponse response) throws SQLException, IOException, ServletException { try{ int id = Integer.parseInt(request.getParameter("id")); productDAO.deleteProduct(id); List<Product> list = productDAO.selectAllProduct(); request.setAttribute("list",list); RequestDispatcher requestDispatcher = request.getRequestDispatcher("product/list.jsp"); requestDispatcher.forward(request,response); }catch (Exception e){ System.out.println(e.getMessage()); } } private void showEditProduct(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int id = Integer.parseInt(request.getParameter("id")); Product product = productDAO.selectProduct(id); List<Category> list = productDAO.selectAllCategory(); request.setAttribute("data_category",list); request.setAttribute("data_product",product); RequestDispatcher requestDispatcher = request.getRequestDispatcher("product/edit.jsp"); requestDispatcher.forward(request,response); } private void insertProduct(HttpServletRequest request, HttpServletResponse response) throws SQLException, ServletException, IOException { String name = request.getParameter("name"); float price = Float.parseFloat(request.getParameter("price")); int quantity = Integer.parseInt(request.getParameter("quantity")); String color = request.getParameter("color"); int category = Integer.parseInt(request.getParameter("category")); Product product = new Product(name,price,quantity,color,category); productDAO.insertProduct(product); RequestDispatcher requestDispatcher = request.getRequestDispatcher("product/create.jsp"); request.setAttribute("message","Add thành công"); requestDispatcher.forward(request,response); } private void listAllProduct(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Product> list = productDAO.selectAllProduct(); request.setAttribute("list",list); RequestDispatcher requestDispatcher = request.getRequestDispatcher("product/list.jsp"); requestDispatcher.forward(request,response); } private void showInsertProduct(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Category> categoryList = productDAO.selectAllCategory(); request.setAttribute("data",categoryList); RequestDispatcher requestDispatcher = request.getRequestDispatcher("product/create.jsp"); requestDispatcher.forward(request,response); } }
0cd320584f540734744147371bda096e5b912bb1
531419143e516f38e1d210660d7c8f523f89fe5a
/projects/Java/src/com/chronoxor/test/fbe/FinalModelEnumEmpty.java
ca86e7df9fd929500823d6c286502fbc4c130c74
[ "MIT" ]
permissive
rizalgowandy/FastBinaryEncoding
e4d9cde5183054e476d17447bdf6c9fb1a7b6632
413acbf08567585a0a44b656236d174d46b202de
refs/heads/master
2023-02-25T22:12:03.245908
2021-12-18T21:31:14
2021-12-18T21:31:14
190,369,220
0
0
MIT
2021-12-19T23:08:22
2019-06-05T09:47:52
C++
UTF-8
Java
false
false
1,591
java
// Automatically generated by the Fast Binary Encoding compiler, do not modify! // https://github.com/chronoxor/FastBinaryEncoding // Source: test.fbe // Version: 1.7.0.0 package com.chronoxor.test.fbe; // Fast Binary Encoding EnumEmpty final model public final class FinalModelEnumEmpty extends com.chronoxor.fbe.FinalModel { public FinalModelEnumEmpty(com.chronoxor.fbe.Buffer buffer, long offset) { super(buffer, offset); } // Get the allocation size public long fbeAllocationSize(com.chronoxor.test.EnumEmpty value) { return fbeSize(); } // Get the final size @Override public long fbeSize() { return 4; } // Check if the value is valid @Override public long verify() { if ((_buffer.getOffset() + fbeOffset() + fbeSize()) > _buffer.getSize()) return Long.MAX_VALUE; return fbeSize(); } // Get the value public com.chronoxor.test.EnumEmpty get(com.chronoxor.fbe.Size size) { if ((_buffer.getOffset() + fbeOffset() + fbeSize()) > _buffer.getSize()) return new com.chronoxor.test.EnumEmpty(); size.value = fbeSize(); return new com.chronoxor.test.EnumEmpty(readInt32(fbeOffset())); } // Set the value public long set(com.chronoxor.test.EnumEmpty value) { assert ((_buffer.getOffset() + fbeOffset() + fbeSize()) <= _buffer.getSize()) : "Model is broken!"; if ((_buffer.getOffset() + fbeOffset() + fbeSize()) > _buffer.getSize()) return 0; write(fbeOffset(), value.getRaw()); return fbeSize(); } }
4914cba0c5fd8521c72fc93f99a4f7bf2aa60e4b
3c7eb828084af8e6bf708f8f60308cde1de2b62a
/SMART_FARM (WT MINI PRO)/source_code/swe/entry.java
b1cc35c75a7279df2c869e1edc09a5eb82072315
[]
no_license
swethasureshs/smart_farm_project
5719a9e7ab12e4135fce0656b565acda21d0cafa
826a7b7cf3efb66b749fede57b7779f38fcc325a
refs/heads/master
2022-07-01T11:41:50.414032
2020-04-29T16:13:03
2020-04-29T16:13:03
259,969,902
0
0
null
null
null
null
UTF-8
Java
false
false
2,156
java
package swe; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.JButton; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JLabel; import java.awt.Font; public class entry extends JFrame { private JPanel contentPane; public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { entry frame = new entry(); } catch (Exception e) { e.printStackTrace(); } } }); } public entry() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setPreferredSize(new Dimension(1300, 650)); pack(); setLocationRelativeTo(null); setTitle("SMART FARM"); setVisible(true); //setBounds(100, 100, 450, 300); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); contentPane.setBackground(Color.BLACK); JButton b1 = new JButton("LOGIN"); b1.setFont(new Font("Tahoma", Font.PLAIN, 18)); b1.setBounds(532,255,148,44); b1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { try { login l= new login(); l.setVisible(true); } catch(Exception en) {} } } }); contentPane.add(b1); JButton b2 = new JButton("SIGNUP"); b2.setFont(new Font("Tahoma", Font.PLAIN, 18)); b2.setBounds(532, 336, 148, 44); b2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e1) { if(e1.getSource()==b2) { try { signup s= new signup(); s.setVisible(true); } catch(Exception emn) {} } } }); contentPane.add(b2); JLabel lblNewLabel = new JLabel("SMART FARM"); lblNewLabel.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 27)); lblNewLabel.setForeground(new Color(255, 255, 255)); lblNewLabel.setBounds(507, 143, 202, 30); contentPane.add(lblNewLabel); } }
f8b491448f39bdc042c60e4a570024fe63c4d69c
7a53bcc441dddf1de30e3d8bcb4090a1ea7fe6ce
/src/org/neusoft/action/TeacherAction.java
9eec0302f0dc4e4837329815222111b81784cdc5
[]
no_license
drduan/neusoftsms
726ec3f611c77c83d22aea4db5ad230e66e623b4
805146a58b14c87060157a3b8ec843a776a1945c
refs/heads/master
2021-01-20T18:34:04.703047
2016-08-02T13:51:08
2016-08-02T13:51:08
60,894,670
0
0
null
null
null
null
UTF-8
Java
false
false
1,998
java
package org.neusoft.action; import java.io.Serializable; import java.util.List; import java.util.Map; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Namespace; import org.apache.struts2.convention.annotation.ParentPackage; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; import org.neusoft.hb.entites.Classinfo; import org.neusoft.hb.entites.Student; import org.neusoft.hb.entites.Teacher; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Controller; import com.opensymphony.xwork2.ActionContext; @Namespace(value = "/neusoft/crol/teacheraction") @Results(value = { @Result(name = "infoes", location = "/WEB-INF/infoes/info_teacher.jsp"), @Result(name = "insert_or_update", location = "/WEB-INF/update/insert_teacher.jsp") }) public class TeacherAction extends BaseAction { private Teacher teacher; private List<Teacher> batch_list; public void setBatch_list(List<Teacher> batch_list) { this.batch_list = batch_list; } public Teacher getTeacher() { return teacher; } public void setTeacher(Teacher teacher) { this.teacher = teacher; } @Override public String getKey() { // TODO Auto-generated method stub return getService().TEACHER; } @Override public List getBatch_list() { // TODO Auto-generated method stub return batch_list; } public Serializable getEntity() { // TODO Auto-generated method stub return this.teacher; } @Action(value = "toInsertOrUpdate") public String toInsertOrUpdate() { if (teacher != null && teacher.getTid() != null) { this.teacher = (Teacher) getService().getInfoByID(getKey(), teacher.getTid()); } List<Teacher> infoes = this.getService().getAll( getService().TEACHER); Map<String, Object> mp = (Map<String, Object>) ActionContext .getContext().get("request"); mp.put("infoes", infoes); return "insert_or_update"; } }
7a0f45821399232adb3a41f706b5e2bdf9468747
5eafb2576c8eadcdc5694561d22ccae05c83c384
/java/tips/src/com/company/数组.java
79bbd88114111418e1a197b6ffcf705dd3bde447
[]
no_license
lijianmin01/2019SummerHolidays
20accf1c4448709673ac2f14a57319d9673e750e
c8279f2e917fded6fdafc5b88ad43480815319ec
refs/heads/master
2020-06-16T17:52:10.756076
2019-09-05T00:08:20
2019-09-05T00:08:20
195,656,230
1
1
null
null
null
null
UTF-8
Java
false
false
3,289
java
package com.company; import java.util.Scanner; public class 数组 { public static void main(String[] args) { //投票统计 /*写一个程序,输入数量不确定的[0,9]范围内的整数,统计每一种 数字出现的次数,输入-1表示结束 * */ // int x; // Scanner in =new Scanner(System.in); // int[] nums=new int[10]; // x=in.nextInt(); // for(int j=0;j<nums.length;j++) // { // System.out.println(nums[j]); // } // while(x!=-1) // { // if(x>=0&&x<10) // { // nums[x]++; // } // x=in.nextInt(); // } // //System.out.println(nums.length); // for(int i=0;i<nums.length;i++) // { // System.out.println(i+":"+nums[i]); // } //直接初始化数组 /*new 创建数组会得到默认的0值 * int[] scores={87,98,67,54,65,76,87,99}; * 直接用大括号给出数组的所有元素的初始值 * 不需要给出数组大小,编译器替你数数~length * */ // int[] scores={87,98,67,54,65,76,87,99}; // System.out.println(scores.length); // for(int i=0;i<scores.length;i++) // { // System.out.print(scores[i]+" "); // } //数组名只是管理者,Java可以有多个管理者 //数组名比较是否共同管理同一个数组 //仅判断一个数是否在数组中 // boolean found=false; // int[] nums={1,11,111,1111,11111,111111}; // Scanner in=new Scanner(System.in); // int x=in.nextInt(); // while(x!=-1) // { // for(int k:nums) // { // if(k==x) // { // found=true; // break; // } // } // if(found==true) // { // System.out.println(x+"存在数组中"); // }else{ // System.out.println(x+"不存在存在数组中"); // } // found=false; // x=in.nextInt(); // } //判断一个数是否是素数~无需到x-1,到sqrt(x)就够了 // boolean isPrime=true; //// Scanner in=new Scanner(System.in); //// int x=in.nextInt(); //// for(int i=3;i<Math.sqrt(x);i+=2) //// { //// if(x%i==0) //// { //// isPrime=false; //// brea; //// } //// } //二维数组 /* * int[] a=new int[3][5]; * 通常理解为a为一个3行5列的矩阵 * 二维数组的初始化 * int[][] a={{1,2,3,4},{1,2,3},}; * *编译器来数数 * *每行一个{},逗号分隔 * *最后的逗号可以存在,有古老的传统 * *如果省略,表示补零 * */ } } /*定义数组变量 <类型>[] <名字>=new <类型>[元素个数] int[] grades=new int[100]; double[] averages=new double[20]; *元素个数必须是整数 *元素个数必须给出 *元素个数可以是变量 length 每个数组有一个内部成员length,会告诉你它的元素数量——名字.length * */
33e0c8fc4a6219767fce34093da1649ff0370750
f87cc002778fb8f42c4c60c2329de4dabb9a034f
/Chapter14/src/Exercises/Ex_14_22.java
827e3e3fa35604ccca62c440cb29b7eec1e82e49
[]
no_license
ademerdzhiev/JavaBookExercises
3873aad352ff209678005c3eb16e10d114a3fa6c
ec2e5e8d195ad17f46daa8662e7311e17e19af65
refs/heads/master
2020-05-31T13:58:10.441969
2019-07-03T15:27:48
2019-07-03T15:27:48
190,317,680
0
0
null
null
null
null
UTF-8
Java
false
false
2,348
java
package Exercises; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.scene.shape.Line; import javafx.scene.text.Text; import javafx.stage.Stage; public class Ex_14_22 extends Application { @Override public void start(Stage stage) throws Exception { Pane pane = new Pane(); Scene scene = new Scene(pane,450, 450); double paneWidth = scene.getWidth() - 15; double paneHeight = scene.getHeight() - 15; double centerX1 = Math.random()*paneWidth; double centerY1 = Math.random()*paneHeight; double centerX2 = Math.random()*paneWidth; double centerY2 = Math.random()*paneHeight; conncectCircles(centerX1, centerY1, centerX2, centerY2, pane); stage.setScene(scene); stage.setTitle("CONNECT MY CIRCLES"); stage.show(); } public static void main(String[] args) { launch(); } private static void conncectCircles(double centerX1, double centerY1, double centerX2, double centerY2, Pane pane) { double radius = 15; Circle circle1 = new Circle(centerX1, centerY1, radius); circle1.setFill(Color.WHITE); circle1.setStroke(Color.BLACK); Circle circle2 = new Circle(centerX2, centerY2, radius); circle2.setFill(Color.WHITE); circle2.setStroke(Color.BLACK); double slope = (centerY1 - centerY2)/(centerX1 - centerX2); double arctan = Math.atan(slope); double startX = centerX1 + Math.cos(arctan)*radius; double startY = centerY1 + Math.sin(arctan)*radius; double endX = centerX2 - Math.cos(arctan)*radius; double endY = centerY2 - Math.sin(arctan)*radius; if (centerX1 > centerX2) { startX = centerX1 - Math.cos(arctan)*radius; startY = centerY1 - Math.sin(arctan)*radius; endX = centerX2 + Math.cos(arctan)*radius; endY = centerY2 + Math.sin(arctan)*radius; } Text text1 = new Text(centerX1, centerY1, "1"); Text text2 = new Text(centerX2, centerY2, "2"); Line line = new Line(startX, startY, endX, endY); pane.getChildren().addAll(circle1, circle2, line, text1, text2); } }
aa998ce3ed6379e61531db7ae1defa6a128188ff
6c7445f4cb06e3f11ca0e3b62cd294596d43bc1b
/docroot/WEB-INF/src/net/sareweb/txotx/service/persistence/JarraipenPersistenceImpl.java
75feb4faba4d38a9b6d534d2c47088a1ac662418
[]
no_license
aritzg/Txotx-portlet
ec915c7d1e9caf288c1b19fab240a0816d9a12fe
4e22a2084368b54a242a4cdd8ea0d2bda51c5e18
refs/heads/master
2016-08-06T02:04:04.620786
2014-03-13T06:45:45
2014-03-13T06:45:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
51,854
java
/** * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package net.sareweb.txotx.service.persistence; import com.liferay.portal.NoSuchModelException; import com.liferay.portal.kernel.bean.BeanReference; import com.liferay.portal.kernel.cache.CacheRegistryUtil; import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; import com.liferay.portal.kernel.dao.orm.FinderPath; import com.liferay.portal.kernel.dao.orm.Query; import com.liferay.portal.kernel.dao.orm.QueryPos; import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.GetterUtil; import com.liferay.portal.kernel.util.InstanceFactory; import com.liferay.portal.kernel.util.OrderByComparator; import com.liferay.portal.kernel.util.PropsKeys; import com.liferay.portal.kernel.util.PropsUtil; import com.liferay.portal.kernel.util.StringBundler; import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.model.CacheModel; import com.liferay.portal.model.ModelListener; import com.liferay.portal.service.persistence.BatchSessionUtil; import com.liferay.portal.service.persistence.ResourcePersistence; import com.liferay.portal.service.persistence.UserPersistence; import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; import net.sareweb.txotx.NoSuchJarraipenException; import net.sareweb.txotx.model.Jarraipen; import net.sareweb.txotx.model.impl.JarraipenImpl; import net.sareweb.txotx.model.impl.JarraipenModelImpl; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * The persistence implementation for the jarraipen service. * * <p> * Caching information and settings can be found in <code>portal.properties</code> * </p> * * @author A.Galdos * @see JarraipenPersistence * @see JarraipenUtil * @generated */ public class JarraipenPersistenceImpl extends BasePersistenceImpl<Jarraipen> implements JarraipenPersistence { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. Always use {@link JarraipenUtil} to access the jarraipen persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. */ public static final String FINDER_CLASS_NAME_ENTITY = JarraipenImpl.class.getName(); public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + ".List1"; public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + ".List2"; public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_JARRAITZAILEUSERID = new FinderPath(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenModelImpl.FINDER_CACHE_ENABLED, JarraipenImpl.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByJarraitzaileUserId", new String[] { Long.class.getName(), "java.lang.Integer", "java.lang.Integer", "com.liferay.portal.kernel.util.OrderByComparator" }); public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITZAILEUSERID = new FinderPath(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenModelImpl.FINDER_CACHE_ENABLED, JarraipenImpl.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByJarraitzaileUserId", new String[] { Long.class.getName() }, JarraipenModelImpl.JARRAITZAILEUSERID_COLUMN_BITMASK); public static final FinderPath FINDER_PATH_COUNT_BY_JARRAITZAILEUSERID = new FinderPath(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenModelImpl.FINDER_CACHE_ENABLED, Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByJarraitzaileUserId", new String[] { Long.class.getName() }); public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_JARRAITUAID = new FinderPath(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenModelImpl.FINDER_CACHE_ENABLED, JarraipenImpl.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByJarraituaId", new String[] { Long.class.getName(), "java.lang.Integer", "java.lang.Integer", "com.liferay.portal.kernel.util.OrderByComparator" }); public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITUAID = new FinderPath(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenModelImpl.FINDER_CACHE_ENABLED, JarraipenImpl.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByJarraituaId", new String[] { Long.class.getName() }, JarraipenModelImpl.JARRAITUAID_COLUMN_BITMASK); public static final FinderPath FINDER_PATH_COUNT_BY_JARRAITUAID = new FinderPath(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenModelImpl.FINDER_CACHE_ENABLED, Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByJarraituaId", new String[] { Long.class.getName() }); public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenModelImpl.FINDER_CACHE_ENABLED, JarraipenImpl.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenModelImpl.FINDER_CACHE_ENABLED, JarraipenImpl.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenModelImpl.FINDER_CACHE_ENABLED, Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); /** * Caches the jarraipen in the entity cache if it is enabled. * * @param jarraipen the jarraipen */ public void cacheResult(Jarraipen jarraipen) { EntityCacheUtil.putResult(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenImpl.class, jarraipen.getPrimaryKey(), jarraipen); jarraipen.resetOriginalValues(); } /** * Caches the jarraipens in the entity cache if it is enabled. * * @param jarraipens the jarraipens */ public void cacheResult(List<Jarraipen> jarraipens) { for (Jarraipen jarraipen : jarraipens) { if (EntityCacheUtil.getResult( JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenImpl.class, jarraipen.getPrimaryKey()) == null) { cacheResult(jarraipen); } else { jarraipen.resetOriginalValues(); } } } /** * Clears the cache for all jarraipens. * * <p> * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. * </p> */ @Override public void clearCache() { if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { CacheRegistryUtil.clear(JarraipenImpl.class.getName()); } EntityCacheUtil.clearCache(JarraipenImpl.class.getName()); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); } /** * Clears the cache for the jarraipen. * * <p> * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. * </p> */ @Override public void clearCache(Jarraipen jarraipen) { EntityCacheUtil.removeResult(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenImpl.class, jarraipen.getPrimaryKey()); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); } @Override public void clearCache(List<Jarraipen> jarraipens) { FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); for (Jarraipen jarraipen : jarraipens) { EntityCacheUtil.removeResult(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenImpl.class, jarraipen.getPrimaryKey()); } } /** * Creates a new jarraipen with the primary key. Does not add the jarraipen to the database. * * @param jarraipenId the primary key for the new jarraipen * @return the new jarraipen */ public Jarraipen create(long jarraipenId) { Jarraipen jarraipen = new JarraipenImpl(); jarraipen.setNew(true); jarraipen.setPrimaryKey(jarraipenId); return jarraipen; } /** * Removes the jarraipen with the primary key from the database. Also notifies the appropriate model listeners. * * @param jarraipenId the primary key of the jarraipen * @return the jarraipen that was removed * @throws net.sareweb.txotx.NoSuchJarraipenException if a jarraipen with the primary key could not be found * @throws SystemException if a system exception occurred */ public Jarraipen remove(long jarraipenId) throws NoSuchJarraipenException, SystemException { return remove(Long.valueOf(jarraipenId)); } /** * Removes the jarraipen with the primary key from the database. Also notifies the appropriate model listeners. * * @param primaryKey the primary key of the jarraipen * @return the jarraipen that was removed * @throws net.sareweb.txotx.NoSuchJarraipenException if a jarraipen with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Jarraipen remove(Serializable primaryKey) throws NoSuchJarraipenException, SystemException { Session session = null; try { session = openSession(); Jarraipen jarraipen = (Jarraipen)session.get(JarraipenImpl.class, primaryKey); if (jarraipen == null) { if (_log.isWarnEnabled()) { _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); } throw new NoSuchJarraipenException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); } return remove(jarraipen); } catch (NoSuchJarraipenException nsee) { throw nsee; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } @Override protected Jarraipen removeImpl(Jarraipen jarraipen) throws SystemException { jarraipen = toUnwrappedModel(jarraipen); Session session = null; try { session = openSession(); BatchSessionUtil.delete(session, jarraipen); } catch (Exception e) { throw processException(e); } finally { closeSession(session); } clearCache(jarraipen); return jarraipen; } @Override public Jarraipen updateImpl(net.sareweb.txotx.model.Jarraipen jarraipen, boolean merge) throws SystemException { jarraipen = toUnwrappedModel(jarraipen); boolean isNew = jarraipen.isNew(); JarraipenModelImpl jarraipenModelImpl = (JarraipenModelImpl)jarraipen; Session session = null; try { session = openSession(); BatchSessionUtil.update(session, jarraipen, merge); jarraipen.setNew(false); } catch (Exception e) { throw processException(e); } finally { closeSession(session); } FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); if (isNew || !JarraipenModelImpl.COLUMN_BITMASK_ENABLED) { FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); } else { if ((jarraipenModelImpl.getColumnBitmask() & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITZAILEUSERID.getColumnBitmask()) != 0) { Object[] args = new Object[] { Long.valueOf(jarraipenModelImpl.getOriginalJarraitzaileUserId()) }; FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_JARRAITZAILEUSERID, args); FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITZAILEUSERID, args); args = new Object[] { Long.valueOf(jarraipenModelImpl.getJarraitzaileUserId()) }; FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_JARRAITZAILEUSERID, args); FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITZAILEUSERID, args); } if ((jarraipenModelImpl.getColumnBitmask() & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITUAID.getColumnBitmask()) != 0) { Object[] args = new Object[] { Long.valueOf(jarraipenModelImpl.getOriginalJarraituaId()) }; FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_JARRAITUAID, args); FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITUAID, args); args = new Object[] { Long.valueOf(jarraipenModelImpl.getJarraituaId()) }; FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_JARRAITUAID, args); FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITUAID, args); } } EntityCacheUtil.putResult(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenImpl.class, jarraipen.getPrimaryKey(), jarraipen); return jarraipen; } protected Jarraipen toUnwrappedModel(Jarraipen jarraipen) { if (jarraipen instanceof JarraipenImpl) { return jarraipen; } JarraipenImpl jarraipenImpl = new JarraipenImpl(); jarraipenImpl.setNew(jarraipen.isNew()); jarraipenImpl.setPrimaryKey(jarraipen.getPrimaryKey()); jarraipenImpl.setJarraipenId(jarraipen.getJarraipenId()); jarraipenImpl.setJarraitzaileUserId(jarraipen.getJarraitzaileUserId()); jarraipenImpl.setJarraituaId(jarraipen.getJarraituaId()); jarraipenImpl.setJarraipenMota(jarraipen.getJarraipenMota()); jarraipenImpl.setCreateDate(jarraipen.getCreateDate()); return jarraipenImpl; } /** * Returns the jarraipen with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found. * * @param primaryKey the primary key of the jarraipen * @return the jarraipen * @throws com.liferay.portal.NoSuchModelException if a jarraipen with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Jarraipen findByPrimaryKey(Serializable primaryKey) throws NoSuchModelException, SystemException { return findByPrimaryKey(((Long)primaryKey).longValue()); } /** * Returns the jarraipen with the primary key or throws a {@link net.sareweb.txotx.NoSuchJarraipenException} if it could not be found. * * @param jarraipenId the primary key of the jarraipen * @return the jarraipen * @throws net.sareweb.txotx.NoSuchJarraipenException if a jarraipen with the primary key could not be found * @throws SystemException if a system exception occurred */ public Jarraipen findByPrimaryKey(long jarraipenId) throws NoSuchJarraipenException, SystemException { Jarraipen jarraipen = fetchByPrimaryKey(jarraipenId); if (jarraipen == null) { if (_log.isWarnEnabled()) { _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + jarraipenId); } throw new NoSuchJarraipenException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + jarraipenId); } return jarraipen; } /** * Returns the jarraipen with the primary key or returns <code>null</code> if it could not be found. * * @param primaryKey the primary key of the jarraipen * @return the jarraipen, or <code>null</code> if a jarraipen with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Jarraipen fetchByPrimaryKey(Serializable primaryKey) throws SystemException { return fetchByPrimaryKey(((Long)primaryKey).longValue()); } /** * Returns the jarraipen with the primary key or returns <code>null</code> if it could not be found. * * @param jarraipenId the primary key of the jarraipen * @return the jarraipen, or <code>null</code> if a jarraipen with the primary key could not be found * @throws SystemException if a system exception occurred */ public Jarraipen fetchByPrimaryKey(long jarraipenId) throws SystemException { Jarraipen jarraipen = (Jarraipen)EntityCacheUtil.getResult(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenImpl.class, jarraipenId); if (jarraipen == _nullJarraipen) { return null; } if (jarraipen == null) { Session session = null; boolean hasException = false; try { session = openSession(); jarraipen = (Jarraipen)session.get(JarraipenImpl.class, Long.valueOf(jarraipenId)); } catch (Exception e) { hasException = true; throw processException(e); } finally { if (jarraipen != null) { cacheResult(jarraipen); } else if (!hasException) { EntityCacheUtil.putResult(JarraipenModelImpl.ENTITY_CACHE_ENABLED, JarraipenImpl.class, jarraipenId, _nullJarraipen); } closeSession(session); } } return jarraipen; } /** * Returns all the jarraipens where jarraitzaileUserId = &#63;. * * @param jarraitzaileUserId the jarraitzaile user ID * @return the matching jarraipens * @throws SystemException if a system exception occurred */ public List<Jarraipen> findByJarraitzaileUserId(long jarraitzaileUserId) throws SystemException { return findByJarraitzaileUserId(jarraitzaileUserId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } /** * Returns a range of all the jarraipens where jarraitzaileUserId = &#63;. * * <p> * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. * </p> * * @param jarraitzaileUserId the jarraitzaile user ID * @param start the lower bound of the range of jarraipens * @param end the upper bound of the range of jarraipens (not inclusive) * @return the range of matching jarraipens * @throws SystemException if a system exception occurred */ public List<Jarraipen> findByJarraitzaileUserId(long jarraitzaileUserId, int start, int end) throws SystemException { return findByJarraitzaileUserId(jarraitzaileUserId, start, end, null); } /** * Returns an ordered range of all the jarraipens where jarraitzaileUserId = &#63;. * * <p> * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. * </p> * * @param jarraitzaileUserId the jarraitzaile user ID * @param start the lower bound of the range of jarraipens * @param end the upper bound of the range of jarraipens (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching jarraipens * @throws SystemException if a system exception occurred */ public List<Jarraipen> findByJarraitzaileUserId(long jarraitzaileUserId, int start, int end, OrderByComparator orderByComparator) throws SystemException { FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITZAILEUSERID; finderArgs = new Object[] { jarraitzaileUserId }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_JARRAITZAILEUSERID; finderArgs = new Object[] { jarraitzaileUserId, start, end, orderByComparator }; } List<Jarraipen> list = (List<Jarraipen>)FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Jarraipen jarraipen : list) { if ((jarraitzaileUserId != jarraipen.getJarraitzaileUserId())) { list = null; break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(3 + (orderByComparator.getOrderByFields().length * 3)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_JARRAIPEN_WHERE); query.append(_FINDER_COLUMN_JARRAITZAILEUSERID_JARRAITZAILEUSERID_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else { query.append(JarraipenModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(jarraitzaileUserId); list = (List<Jarraipen>)QueryUtil.list(q, getDialect(), start, end); } catch (Exception e) { throw processException(e); } finally { if (list == null) { FinderCacheUtil.removeResult(finderPath, finderArgs); } else { cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } closeSession(session); } } return list; } /** * Returns the first jarraipen in the ordered set where jarraitzaileUserId = &#63;. * * @param jarraitzaileUserId the jarraitzaile user ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching jarraipen * @throws net.sareweb.txotx.NoSuchJarraipenException if a matching jarraipen could not be found * @throws SystemException if a system exception occurred */ public Jarraipen findByJarraitzaileUserId_First(long jarraitzaileUserId, OrderByComparator orderByComparator) throws NoSuchJarraipenException, SystemException { Jarraipen jarraipen = fetchByJarraitzaileUserId_First(jarraitzaileUserId, orderByComparator); if (jarraipen != null) { return jarraipen; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("jarraitzaileUserId="); msg.append(jarraitzaileUserId); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchJarraipenException(msg.toString()); } /** * Returns the first jarraipen in the ordered set where jarraitzaileUserId = &#63;. * * @param jarraitzaileUserId the jarraitzaile user ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching jarraipen, or <code>null</code> if a matching jarraipen could not be found * @throws SystemException if a system exception occurred */ public Jarraipen fetchByJarraitzaileUserId_First(long jarraitzaileUserId, OrderByComparator orderByComparator) throws SystemException { List<Jarraipen> list = findByJarraitzaileUserId(jarraitzaileUserId, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last jarraipen in the ordered set where jarraitzaileUserId = &#63;. * * @param jarraitzaileUserId the jarraitzaile user ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching jarraipen * @throws net.sareweb.txotx.NoSuchJarraipenException if a matching jarraipen could not be found * @throws SystemException if a system exception occurred */ public Jarraipen findByJarraitzaileUserId_Last(long jarraitzaileUserId, OrderByComparator orderByComparator) throws NoSuchJarraipenException, SystemException { Jarraipen jarraipen = fetchByJarraitzaileUserId_Last(jarraitzaileUserId, orderByComparator); if (jarraipen != null) { return jarraipen; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("jarraitzaileUserId="); msg.append(jarraitzaileUserId); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchJarraipenException(msg.toString()); } /** * Returns the last jarraipen in the ordered set where jarraitzaileUserId = &#63;. * * @param jarraitzaileUserId the jarraitzaile user ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching jarraipen, or <code>null</code> if a matching jarraipen could not be found * @throws SystemException if a system exception occurred */ public Jarraipen fetchByJarraitzaileUserId_Last(long jarraitzaileUserId, OrderByComparator orderByComparator) throws SystemException { int count = countByJarraitzaileUserId(jarraitzaileUserId); List<Jarraipen> list = findByJarraitzaileUserId(jarraitzaileUserId, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the jarraipens before and after the current jarraipen in the ordered set where jarraitzaileUserId = &#63;. * * @param jarraipenId the primary key of the current jarraipen * @param jarraitzaileUserId the jarraitzaile user ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next jarraipen * @throws net.sareweb.txotx.NoSuchJarraipenException if a jarraipen with the primary key could not be found * @throws SystemException if a system exception occurred */ public Jarraipen[] findByJarraitzaileUserId_PrevAndNext(long jarraipenId, long jarraitzaileUserId, OrderByComparator orderByComparator) throws NoSuchJarraipenException, SystemException { Jarraipen jarraipen = findByPrimaryKey(jarraipenId); Session session = null; try { session = openSession(); Jarraipen[] array = new JarraipenImpl[3]; array[0] = getByJarraitzaileUserId_PrevAndNext(session, jarraipen, jarraitzaileUserId, orderByComparator, true); array[1] = jarraipen; array[2] = getByJarraitzaileUserId_PrevAndNext(session, jarraipen, jarraitzaileUserId, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Jarraipen getByJarraitzaileUserId_PrevAndNext(Session session, Jarraipen jarraipen, long jarraitzaileUserId, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_JARRAIPEN_WHERE); query.append(_FINDER_COLUMN_JARRAITZAILEUSERID_JARRAITZAILEUSERID_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(JarraipenModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(jarraitzaileUserId); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(jarraipen); for (Object value : values) { qPos.add(value); } } List<Jarraipen> list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } /** * Returns all the jarraipens where jarraituaId = &#63;. * * @param jarraituaId the jarraitua ID * @return the matching jarraipens * @throws SystemException if a system exception occurred */ public List<Jarraipen> findByJarraituaId(long jarraituaId) throws SystemException { return findByJarraituaId(jarraituaId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } /** * Returns a range of all the jarraipens where jarraituaId = &#63;. * * <p> * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. * </p> * * @param jarraituaId the jarraitua ID * @param start the lower bound of the range of jarraipens * @param end the upper bound of the range of jarraipens (not inclusive) * @return the range of matching jarraipens * @throws SystemException if a system exception occurred */ public List<Jarraipen> findByJarraituaId(long jarraituaId, int start, int end) throws SystemException { return findByJarraituaId(jarraituaId, start, end, null); } /** * Returns an ordered range of all the jarraipens where jarraituaId = &#63;. * * <p> * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. * </p> * * @param jarraituaId the jarraitua ID * @param start the lower bound of the range of jarraipens * @param end the upper bound of the range of jarraipens (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching jarraipens * @throws SystemException if a system exception occurred */ public List<Jarraipen> findByJarraituaId(long jarraituaId, int start, int end, OrderByComparator orderByComparator) throws SystemException { FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JARRAITUAID; finderArgs = new Object[] { jarraituaId }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_JARRAITUAID; finderArgs = new Object[] { jarraituaId, start, end, orderByComparator }; } List<Jarraipen> list = (List<Jarraipen>)FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Jarraipen jarraipen : list) { if ((jarraituaId != jarraipen.getJarraituaId())) { list = null; break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(3 + (orderByComparator.getOrderByFields().length * 3)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_JARRAIPEN_WHERE); query.append(_FINDER_COLUMN_JARRAITUAID_JARRAITUAID_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else { query.append(JarraipenModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(jarraituaId); list = (List<Jarraipen>)QueryUtil.list(q, getDialect(), start, end); } catch (Exception e) { throw processException(e); } finally { if (list == null) { FinderCacheUtil.removeResult(finderPath, finderArgs); } else { cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } closeSession(session); } } return list; } /** * Returns the first jarraipen in the ordered set where jarraituaId = &#63;. * * @param jarraituaId the jarraitua ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching jarraipen * @throws net.sareweb.txotx.NoSuchJarraipenException if a matching jarraipen could not be found * @throws SystemException if a system exception occurred */ public Jarraipen findByJarraituaId_First(long jarraituaId, OrderByComparator orderByComparator) throws NoSuchJarraipenException, SystemException { Jarraipen jarraipen = fetchByJarraituaId_First(jarraituaId, orderByComparator); if (jarraipen != null) { return jarraipen; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("jarraituaId="); msg.append(jarraituaId); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchJarraipenException(msg.toString()); } /** * Returns the first jarraipen in the ordered set where jarraituaId = &#63;. * * @param jarraituaId the jarraitua ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching jarraipen, or <code>null</code> if a matching jarraipen could not be found * @throws SystemException if a system exception occurred */ public Jarraipen fetchByJarraituaId_First(long jarraituaId, OrderByComparator orderByComparator) throws SystemException { List<Jarraipen> list = findByJarraituaId(jarraituaId, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last jarraipen in the ordered set where jarraituaId = &#63;. * * @param jarraituaId the jarraitua ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching jarraipen * @throws net.sareweb.txotx.NoSuchJarraipenException if a matching jarraipen could not be found * @throws SystemException if a system exception occurred */ public Jarraipen findByJarraituaId_Last(long jarraituaId, OrderByComparator orderByComparator) throws NoSuchJarraipenException, SystemException { Jarraipen jarraipen = fetchByJarraituaId_Last(jarraituaId, orderByComparator); if (jarraipen != null) { return jarraipen; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("jarraituaId="); msg.append(jarraituaId); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchJarraipenException(msg.toString()); } /** * Returns the last jarraipen in the ordered set where jarraituaId = &#63;. * * @param jarraituaId the jarraitua ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching jarraipen, or <code>null</code> if a matching jarraipen could not be found * @throws SystemException if a system exception occurred */ public Jarraipen fetchByJarraituaId_Last(long jarraituaId, OrderByComparator orderByComparator) throws SystemException { int count = countByJarraituaId(jarraituaId); List<Jarraipen> list = findByJarraituaId(jarraituaId, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the jarraipens before and after the current jarraipen in the ordered set where jarraituaId = &#63;. * * @param jarraipenId the primary key of the current jarraipen * @param jarraituaId the jarraitua ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next jarraipen * @throws net.sareweb.txotx.NoSuchJarraipenException if a jarraipen with the primary key could not be found * @throws SystemException if a system exception occurred */ public Jarraipen[] findByJarraituaId_PrevAndNext(long jarraipenId, long jarraituaId, OrderByComparator orderByComparator) throws NoSuchJarraipenException, SystemException { Jarraipen jarraipen = findByPrimaryKey(jarraipenId); Session session = null; try { session = openSession(); Jarraipen[] array = new JarraipenImpl[3]; array[0] = getByJarraituaId_PrevAndNext(session, jarraipen, jarraituaId, orderByComparator, true); array[1] = jarraipen; array[2] = getByJarraituaId_PrevAndNext(session, jarraipen, jarraituaId, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Jarraipen getByJarraituaId_PrevAndNext(Session session, Jarraipen jarraipen, long jarraituaId, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_JARRAIPEN_WHERE); query.append(_FINDER_COLUMN_JARRAITUAID_JARRAITUAID_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(JarraipenModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(jarraituaId); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(jarraipen); for (Object value : values) { qPos.add(value); } } List<Jarraipen> list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } /** * Returns all the jarraipens. * * @return the jarraipens * @throws SystemException if a system exception occurred */ public List<Jarraipen> findAll() throws SystemException { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } /** * Returns a range of all the jarraipens. * * <p> * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. * </p> * * @param start the lower bound of the range of jarraipens * @param end the upper bound of the range of jarraipens (not inclusive) * @return the range of jarraipens * @throws SystemException if a system exception occurred */ public List<Jarraipen> findAll(int start, int end) throws SystemException { return findAll(start, end, null); } /** * Returns an ordered range of all the jarraipens. * * <p> * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. * </p> * * @param start the lower bound of the range of jarraipens * @param end the upper bound of the range of jarraipens (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of jarraipens * @throws SystemException if a system exception occurred */ public List<Jarraipen> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException { FinderPath finderPath = null; Object[] finderArgs = new Object[] { start, end, orderByComparator }; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; finderArgs = FINDER_ARGS_EMPTY; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; finderArgs = new Object[] { start, end, orderByComparator }; } List<Jarraipen> list = (List<Jarraipen>)FinderCacheUtil.getResult(finderPath, finderArgs, this); if (list == null) { StringBundler query = null; String sql = null; if (orderByComparator != null) { query = new StringBundler(2 + (orderByComparator.getOrderByFields().length * 3)); query.append(_SQL_SELECT_JARRAIPEN); appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); sql = query.toString(); } else { sql = _SQL_SELECT_JARRAIPEN.concat(JarraipenModelImpl.ORDER_BY_JPQL); } Session session = null; try { session = openSession(); Query q = session.createQuery(sql); if (orderByComparator == null) { list = (List<Jarraipen>)QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); } else { list = (List<Jarraipen>)QueryUtil.list(q, getDialect(), start, end); } } catch (Exception e) { throw processException(e); } finally { if (list == null) { FinderCacheUtil.removeResult(finderPath, finderArgs); } else { cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } closeSession(session); } } return list; } /** * Removes all the jarraipens where jarraitzaileUserId = &#63; from the database. * * @param jarraitzaileUserId the jarraitzaile user ID * @throws SystemException if a system exception occurred */ public void removeByJarraitzaileUserId(long jarraitzaileUserId) throws SystemException { for (Jarraipen jarraipen : findByJarraitzaileUserId(jarraitzaileUserId)) { remove(jarraipen); } } /** * Removes all the jarraipens where jarraituaId = &#63; from the database. * * @param jarraituaId the jarraitua ID * @throws SystemException if a system exception occurred */ public void removeByJarraituaId(long jarraituaId) throws SystemException { for (Jarraipen jarraipen : findByJarraituaId(jarraituaId)) { remove(jarraipen); } } /** * Removes all the jarraipens from the database. * * @throws SystemException if a system exception occurred */ public void removeAll() throws SystemException { for (Jarraipen jarraipen : findAll()) { remove(jarraipen); } } /** * Returns the number of jarraipens where jarraitzaileUserId = &#63;. * * @param jarraitzaileUserId the jarraitzaile user ID * @return the number of matching jarraipens * @throws SystemException if a system exception occurred */ public int countByJarraitzaileUserId(long jarraitzaileUserId) throws SystemException { Object[] finderArgs = new Object[] { jarraitzaileUserId }; Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_JARRAITZAILEUSERID, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(2); query.append(_SQL_COUNT_JARRAIPEN_WHERE); query.append(_FINDER_COLUMN_JARRAITZAILEUSERID_JARRAITZAILEUSERID_2); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(jarraitzaileUserId); count = (Long)q.uniqueResult(); } catch (Exception e) { throw processException(e); } finally { if (count == null) { count = Long.valueOf(0); } FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_JARRAITZAILEUSERID, finderArgs, count); closeSession(session); } } return count.intValue(); } /** * Returns the number of jarraipens where jarraituaId = &#63;. * * @param jarraituaId the jarraitua ID * @return the number of matching jarraipens * @throws SystemException if a system exception occurred */ public int countByJarraituaId(long jarraituaId) throws SystemException { Object[] finderArgs = new Object[] { jarraituaId }; Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_JARRAITUAID, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(2); query.append(_SQL_COUNT_JARRAIPEN_WHERE); query.append(_FINDER_COLUMN_JARRAITUAID_JARRAITUAID_2); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(jarraituaId); count = (Long)q.uniqueResult(); } catch (Exception e) { throw processException(e); } finally { if (count == null) { count = Long.valueOf(0); } FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_JARRAITUAID, finderArgs, count); closeSession(session); } } return count.intValue(); } /** * Returns the number of jarraipens. * * @return the number of jarraipens * @throws SystemException if a system exception occurred */ public int countAll() throws SystemException { Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY, this); if (count == null) { Session session = null; try { session = openSession(); Query q = session.createQuery(_SQL_COUNT_JARRAIPEN); count = (Long)q.uniqueResult(); } catch (Exception e) { throw processException(e); } finally { if (count == null) { count = Long.valueOf(0); } FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY, count); closeSession(session); } } return count.intValue(); } /** * Initializes the jarraipen persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.net.sareweb.txotx.model.Jarraipen"))); if (listenerClassNames.length > 0) { try { List<ModelListener<Jarraipen>> listenersList = new ArrayList<ModelListener<Jarraipen>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<Jarraipen>)InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } } public void destroy() { EntityCacheUtil.removeCache(JarraipenImpl.class.getName()); FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY); FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); } @BeanReference(type = APKVersionPersistence.class) protected APKVersionPersistence apkVersionPersistence; @BeanReference(type = GertaeraPersistence.class) protected GertaeraPersistence gertaeraPersistence; @BeanReference(type = GoogleDevicePersistence.class) protected GoogleDevicePersistence googleDevicePersistence; @BeanReference(type = JarraipenPersistence.class) protected JarraipenPersistence jarraipenPersistence; @BeanReference(type = OharraPersistence.class) protected OharraPersistence oharraPersistence; @BeanReference(type = SagardoEgunPersistence.class) protected SagardoEgunPersistence sagardoEgunPersistence; @BeanReference(type = SagardotegiPersistence.class) protected SagardotegiPersistence sagardotegiPersistence; @BeanReference(type = SailkapenaPersistence.class) protected SailkapenaPersistence sailkapenaPersistence; @BeanReference(type = ResourcePersistence.class) protected ResourcePersistence resourcePersistence; @BeanReference(type = UserPersistence.class) protected UserPersistence userPersistence; private static final String _SQL_SELECT_JARRAIPEN = "SELECT jarraipen FROM Jarraipen jarraipen"; private static final String _SQL_SELECT_JARRAIPEN_WHERE = "SELECT jarraipen FROM Jarraipen jarraipen WHERE "; private static final String _SQL_COUNT_JARRAIPEN = "SELECT COUNT(jarraipen) FROM Jarraipen jarraipen"; private static final String _SQL_COUNT_JARRAIPEN_WHERE = "SELECT COUNT(jarraipen) FROM Jarraipen jarraipen WHERE "; private static final String _FINDER_COLUMN_JARRAITZAILEUSERID_JARRAITZAILEUSERID_2 = "jarraipen.jarraitzaileUserId = ?"; private static final String _FINDER_COLUMN_JARRAITUAID_JARRAITUAID_2 = "jarraipen.jarraituaId = ?"; private static final String _ORDER_BY_ENTITY_ALIAS = "jarraipen."; private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Jarraipen exists with the primary key "; private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Jarraipen exists with the key {"; private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get( PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE)); private static Log _log = LogFactoryUtil.getLog(JarraipenPersistenceImpl.class); private static Jarraipen _nullJarraipen = new JarraipenImpl() { @Override public Object clone() { return this; } @Override public CacheModel<Jarraipen> toCacheModel() { return _nullJarraipenCacheModel; } }; private static CacheModel<Jarraipen> _nullJarraipenCacheModel = new CacheModel<Jarraipen>() { public Jarraipen toEntityModel() { return _nullJarraipen; } }; }
d7c62275c8cfc900b7648954a4318a49fbf07076
152fa4c9564a920844cc062f6af8d979f577a9be
/3-5-management_system/src/com/duben/springmvc/entity/CommonResultList.java
b3e5373e42429537702568cdc3b357ec85192522
[]
no_license
SWXY33/JS-CSS-HTML-java
38a91aa24bdb3a008df389a3d1064c7b1bdb7e2e
244e76d7d8e42f4ffde92bdd1a832613fb6a7fd2
refs/heads/master
2022-11-14T18:01:07.845532
2020-07-10T09:07:07
2020-07-10T09:07:07
268,398,760
1
1
null
2020-07-10T09:14:35
2020-06-01T01:40:30
Python
UTF-8
Java
false
false
468
java
package com.duben.springmvc.entity; public class CommonResultList<T> { private long status; private String msg; private T data ; public long getStatus() { return status; } public void setStatus(long status) { this.status = status; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public T getData() { return data; } public void setData(T data) { this.data = data; } }
5363f5aef6bcec28a4f9b3ab9030493ccc362152
c8682f670d46a897d42bc14be978dea9487371c3
/jhaws/swing/src/test/java/org/swingeasy/DateTimeDemo.java
776c6599664dc8c65c37e60e25a734502fb8ca1a
[ "MIT" ]
permissive
jurgendl/jhaws
04322a1d7073b6e3509040ef2ddcaa587e5d365a
871af0de8a23f618bfd0d47b879a0e8de35b785d
refs/heads/master
2023-08-09T03:03:09.106795
2023-07-29T10:51:08
2023-07-29T10:51:08
32,465,714
4
0
MIT
2023-08-27T15:43:08
2015-03-18T15:03:58
JavaScript
UTF-8
Java
false
false
1,914
java
package org.swingeasy; import java.awt.BorderLayout; import java.awt.Container; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.WindowConstants; /** * @author Jurgen */ public class DateTimeDemo { private static void addComponents(Container container) { container.setLayout(new GridLayout(-1, 1)); final EDateEditor ede0 = new EDateEditor(); final EDateTimeEditor edte0 = new EDateTimeEditor(); final ETimeEditor edt0 = new ETimeEditor(); { container.add(ede0, BorderLayout.NORTH); container.add(edte0, BorderLayout.CENTER); container.add(edt0, BorderLayout.SOUTH); } final EDateEditor ede = new EDateEditor(); final EDateTimeEditor edte = new EDateTimeEditor(); final ETimeEditor edt = new ETimeEditor(); { ede.setDate(null); container.add(ede, BorderLayout.NORTH); edte.setDate(null); container.add(edte, BorderLayout.CENTER); edt.setDate(null); container.add(edt, BorderLayout.SOUTH); } JButton log = new JButton("log"); log.addActionListener(e -> { System.out.println(ede0.getDate()); System.out.println(edte0.getDate()); System.out.println(ede.getDate()); System.out.println(edte.getDate()); }); container.add(log); } public static void main(String[] args) { // SystemSettings.setCurrentLocale(Locale.US); UIUtils.niceLookAndFeel(); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); DateTimeDemo.addComponents(frame.getContentPane()); frame.pack(); frame.setLocationRelativeTo(null); frame.setTitle("DateDemo"); frame.setVisible(true); } }
5772d808a95cc91d4b0765514a318f8a89b7bb45
85b6d0af6102e3ece9464887aab99f0d586650cc
/src/Array/No_888_Fair_Candy_Swap/Solution.java
d0dcee625102e88fbe2450c701fa3f6bd473ecf0
[]
no_license
Edison0716/DailyLeetCode
040c2d0f0a35b92588942c73f0c48d72dcc74712
19432a1a43b1bd276ce04dcc714d6643c1e0c819
refs/heads/master
2020-04-17T03:28:15.775590
2020-03-02T14:46:27
2020-03-02T14:46:27
166,184,552
0
1
null
null
null
null
UTF-8
Java
false
false
2,843
java
package Array.No_888_Fair_Candy_Swap; import java.util.HashSet; /** * FileName: Solution * Author: mac * Date: 2019-01-31 10:38 * Description: Fair Candy Swap * <p> * Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Alice has, and B[j] is the size of the j-th bar of candy that Bob has. * <p> * Since they are friends, they would like to exchange one candy bar each so that after the exchange, they both have the same total amount of candy. (The total amount of candy a person has is the sum of the sizes of candy bars they have.) * <p> * Return an integer array ans where ans[0] is the size of the candy bar that Alice must exchange, and ans[1] is the size of the candy bar that Bob must exchange. * <p> * If there are multiple answers, you may return any one of them. It is guaranteed an answer exists. * <p> * <p> * <p> * Example 1: * <p> * Input: A = [1,1], B = [2,2] * Output: [1,2] * Example 2: * <p> * Input: A = [1,2], B = [2,3] * Output: [1,2] * Example 3: * <p> * Input: A = [2], B = [1,3] * Output: [2,3] * Example 4: * <p> * Input: A = [1,2,5], B = [2,4] * Output: [5,4] */ public class Solution { public int[] fairCandySwap(int[] A, int[] B) { int totalA = 0; int totalB = 0; for (int num : A) { totalA = totalA + num; } for (int num : B) { totalB = totalB + num; } HashSet<Integer> integers = new HashSet<>(); for (int num : B) { integers.add(num); } int avg = (totalA + totalB) / 2; for (int i = 0; i < A.length; i++) { int num = avg - (totalA - A[i]); //平均数 - A总数中不包含当前选中的值 if (integers.contains(num)) { return new int[]{A[i], num}; } } throw null; } //超时 public int[] fairCandySwap1(int[] A, int[] B) { int totalNum = 0; int[] resultArray = new int[2]; for (int i = 0; i < A.length; i++) { totalNum = totalNum + A[i]; } for (int i = 0; i < B.length; i++) { totalNum = totalNum + B[i]; } System.out.println(totalNum); int avgNum = totalNum / 2; for (int i = 0; i < A.length; i++) { int tem; for (int j = 0; j < B.length; j++) { tem = B[j]; B[j] = 0; int total = 0; for (int k = 0; k < B.length; k++) { total = total + B[k]; } if (avgNum == total + A[i]) { resultArray[0] = A[i]; resultArray[1] = tem; } B[j] = tem; } } return resultArray; } }
c5bfa96422eff807618bb48743ef7b615a463b04
f8ca95c96d65f3290fd7a9f74084b6f4b6491cc2
/AlgoStudy/src/Sorting/SelectionSort2.java
95a75b69f080f8df080fdca172d57e5668be669c
[]
no_license
OJieun/AlgoStudy
f929549bad32e61955ea0328978222fba8a5b105
de5b825bd7a548a0bae23bef62b8314be731f09b
refs/heads/master
2020-12-25T18:53:03.973557
2017-07-16T14:45:00
2017-07-16T14:45:00
94,010,163
0
0
null
null
null
null
UTF-8
Java
false
false
1,020
java
package Sorting; import java.util.Scanner; public class SelectionSort2 { public static void main(String[] args) { // TODO Auto-generated method stub String[] strArr; Scanner sc = new Scanner(System.in); String inputStr = sc.nextLine(); System.out.println("input : " + inputStr); strArr = inputStr.split(" "); int[] arr = new int[strArr.length]; for(int i=0; i<strArr.length; i++){ arr[i] = Integer.parseInt(strArr[i]); } System.out.println(); sorting(arr); printing(arr); } public static void sorting(int[] arr){ for(int i=0; i<arr.length; i++){ int minIdx = i; for(int j=i+1; j<arr.length; j++){ if (arr[j]<arr[minIdx]){ minIdx = j; } } int temp = arr[i]; arr[i] = arr[minIdx]; arr[minIdx] = temp; } } public static void printing(int[] arr){ System.out.println("output : "); for(int i=0; i<arr.length; i++){ System.out.print(arr[i] + ", "); } } }
[ "JE@DESKTOP-CNR8OQO" ]
JE@DESKTOP-CNR8OQO
1cb52b252f0adf6f1ccc78615b16814a40d9177a
beba535c8106d05168a53535235b150a8dfe852c
/src/main/java/com/jxau/grain/entity/admin/Menu.java
2a031af21cc875dffb88f093b6f5fda9bce5f243
[]
no_license
DengrenAyane/grain-purchase
6ceaa1c0ccdfb437564640a78342afed556bbb62
a2bbb84aef76c9ff97bb81bca6c1e04b9502405d
refs/heads/master
2023-01-02T03:27:21.561637
2020-10-26T12:53:44
2020-10-26T12:53:44
307,358,700
0
0
null
null
null
null
UTF-8
Java
false
false
2,347
java
package com.jxau.grain.entity.admin; import com.jxau.grain.annotion.ValidateEntity; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistence.*; /** * 后台菜单实体类 * @author Administrator * */ @Entity @Table(name="lssf_menu") @EntityListeners(AuditingEntityListener.class) public class Menu extends BaseEntity{ /** * */ private static final long serialVersionUID = 1L; @ValidateEntity(required=true,requiredLeng=true,minLength=1,maxLength=18,errorRequiredMsg="菜单名称不能为空!",errorMinLengthMsg="菜单名称长度需大于1!",errorMaxLengthMsg="菜单名称长度不能大于18!") @Column(name="name",nullable=false,length=18) private String name;//菜单名称 @ManyToOne @JoinColumn(name="parent_id") private Menu parent;//菜单父分类 @ValidateEntity(required=false) @Column(name="url",length=128) private String url;//菜单url @ValidateEntity(required=false) @Column(name="icon",length=32) private String icon;//菜单图标icon @Column(name="sort",nullable=false,length=4) private Integer sort = 0;//菜单顺序,默认升序排列,默认是0 @Column(name="is_bitton",nullable=false) private boolean isButton = false;//是否是按钮 @Column(name="is_show",nullable=false) private boolean isShow = true;//是否显示 public String getName() { return name; } public void setName(String name) { this.name = name; } public Menu getParent() { return parent; } public void setParent(Menu parent) { this.parent = parent; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public Integer getSort() { return sort; } public void setSort(Integer sort) { this.sort = sort; } public boolean isButton() { return isButton; } public void setButton(boolean isButton) { this.isButton = isButton; } public boolean isShow() { return isShow; } public void setShow(boolean isShow) { this.isShow = isShow; } @Override public String toString() { return "Menu [name=" + name + ", parent=" + parent + ", url=" + url + ", icon=" + icon + ", sort=" + sort + ", isButton=" + isButton + ", isShow=" + isShow + "]"; } }
96b964be9ea336b75d39e9ec138f773dfa9355f4
7925703a2d10ccb23578e08b2c0ed0c83e288c0c
/Etap_8/mmo_mybatis/src/main/java/pl/psk/to/mmo/mmo_mybatis/model/Country.java
a8dd0212fd5dcc8ebc7d01fe1ec3d5c5e17a9fc2
[]
no_license
cherro0125/technologie-obiektowe
d6459b1a7c7d7da94205a04cc2712ae2fce6cfa5
a580f645aac5dd847d8e54847c4fd47476af5630
refs/heads/master
2023-06-06T01:24:40.006465
2021-06-28T15:40:53
2021-06-28T15:40:53
348,785,110
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package pl.psk.to.mmo.mmo_mybatis.model; import lombok.Data; import lombok.EqualsAndHashCode; import pl.psk.to.mmo.mmo_mybatis.model.base.Auditable; @EqualsAndHashCode(callSuper = true) @Data public class Country extends Auditable { private Long id; private String code; private String name; }
bcee702480fb0e7379b508eb98ad82191450cb95
816e53ced1f741006ed5dd568365aba0ec03f0cf
/TeamBattle/temp/src/minecraft/net/minecraft/network/NetHandlerPlayServer.java
c917e0b63209064312f4c6e5eba193c8b4f2743a
[]
no_license
TeamBattleClient/TeamBattleRemake
ad4eb8379ebc673ef1e58d0f2c1a34e900bd85fe
859afd1ff2cd7527abedfbfe0b3d1dae09d5cbbc
refs/heads/master
2021-03-12T19:41:51.521287
2015-03-08T21:34:32
2015-03-08T21:34:32
31,624,440
3
0
null
null
null
null
UTF-8
Java
false
false
46,859
java
package net.minecraft.network; import com.google.common.base.Charsets; import com.google.common.collect.Lists; import io.netty.buffer.Unpooled; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.Random; import java.util.concurrent.Callable; import net.minecraft.block.material.Material; import net.minecraft.command.server.CommandBlockLogic; import net.minecraft.crash.CrashReport; import net.minecraft.crash.CrashReportCategory; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityMinecartCommandBlock; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; import net.minecraft.inventory.Container; import net.minecraft.inventory.ContainerBeacon; import net.minecraft.inventory.ContainerMerchant; import net.minecraft.inventory.ContainerRepair; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemEditableBook; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemWritableBook; import net.minecraft.nbt.NBTTagString; import net.minecraft.network.EnumConnectionState; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.INetHandlerPlayServer; import net.minecraft.network.play.client.C00PacketKeepAlive; import net.minecraft.network.play.client.C01PacketChatMessage; import net.minecraft.network.play.client.C02PacketUseEntity; import net.minecraft.network.play.client.C03PacketPlayer; import net.minecraft.network.play.client.C07PacketPlayerDigging; import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement; import net.minecraft.network.play.client.C09PacketHeldItemChange; import net.minecraft.network.play.client.C0APacketAnimation; import net.minecraft.network.play.client.C0BPacketEntityAction; import net.minecraft.network.play.client.C0CPacketInput; import net.minecraft.network.play.client.C0DPacketCloseWindow; import net.minecraft.network.play.client.C0EPacketClickWindow; import net.minecraft.network.play.client.C0FPacketConfirmTransaction; import net.minecraft.network.play.client.C10PacketCreativeInventoryAction; import net.minecraft.network.play.client.C11PacketEnchantItem; import net.minecraft.network.play.client.C12PacketUpdateSign; import net.minecraft.network.play.client.C13PacketPlayerAbilities; import net.minecraft.network.play.client.C14PacketTabComplete; import net.minecraft.network.play.client.C15PacketClientSettings; import net.minecraft.network.play.client.C16PacketClientStatus; import net.minecraft.network.play.client.C17PacketCustomPayload; import net.minecraft.network.play.server.S00PacketKeepAlive; import net.minecraft.network.play.server.S02PacketChat; import net.minecraft.network.play.server.S08PacketPlayerPosLook; import net.minecraft.network.play.server.S23PacketBlockChange; import net.minecraft.network.play.server.S2FPacketSetSlot; import net.minecraft.network.play.server.S32PacketConfirmTransaction; import net.minecraft.network.play.server.S3APacketTabComplete; import net.minecraft.network.play.server.S40PacketDisconnect; import net.minecraft.server.MinecraftServer; import net.minecraft.server.management.UserListBansEntry; import net.minecraft.stats.AchievementList; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityBeacon; import net.minecraft.tileentity.TileEntityCommandBlock; import net.minecraft.tileentity.TileEntitySign; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.ChatAllowedCharacters; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraft.util.IntHashMap; import net.minecraft.util.ReportedException; import net.minecraft.world.WorldServer; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class NetHandlerPlayServer implements INetHandlerPlayServer { private static final Logger field_147370_c = LogManager.getLogger(); public final NetworkManager field_147371_a; private final MinecraftServer field_147367_d; public EntityPlayerMP field_147369_b; private int field_147368_e; private int field_147365_f; private boolean field_147366_g; private int field_147378_h; private long field_147379_i; private static Random field_147376_j = new Random(); private long field_147377_k; private int field_147374_l; private int field_147375_m; private IntHashMap field_147372_n = new IntHashMap(); private double field_147373_o; private double field_147382_p; private double field_147381_q; private boolean field_147380_r = true; private static final String __OBFID = "CL_00001452"; public NetHandlerPlayServer(MinecraftServer p_i1530_1_, NetworkManager p_i1530_2_, EntityPlayerMP p_i1530_3_) { this.field_147367_d = p_i1530_1_; this.field_147371_a = p_i1530_2_; p_i1530_2_.func_150719_a(this); this.field_147369_b = p_i1530_3_; p_i1530_3_.field_71135_a = this; } public void func_147233_a() { this.field_147366_g = false; ++this.field_147368_e; this.field_147367_d.field_71304_b.func_76320_a("keepAlive"); if((long)this.field_147368_e - this.field_147377_k > 40L) { this.field_147377_k = (long)this.field_147368_e; this.field_147379_i = this.func_147363_d(); this.field_147378_h = (int)this.field_147379_i; this.func_147359_a(new S00PacketKeepAlive(this.field_147378_h)); } if(this.field_147374_l > 0) { --this.field_147374_l; } if(this.field_147375_m > 0) { --this.field_147375_m; } if(this.field_147369_b.func_154331_x() > 0L && this.field_147367_d.func_143007_ar() > 0 && MinecraftServer.func_130071_aq() - this.field_147369_b.func_154331_x() > (long)(this.field_147367_d.func_143007_ar() * 1000 * 60)) { this.func_147360_c("You have been idle for too long!"); } } public NetworkManager func_147362_b() { return this.field_147371_a; } public void func_147360_c(String p_147360_1_) { final ChatComponentText var2 = new ChatComponentText(p_147360_1_); this.field_147371_a.func_150725_a(new S40PacketDisconnect(var2), new GenericFutureListener[]{new GenericFutureListener() { private static final String __OBFID = "CL_00001453"; public void operationComplete(Future p_operationComplete_1_) { NetHandlerPlayServer.this.field_147371_a.func_150718_a(var2); } }}); this.field_147371_a.func_150721_g(); } public void func_147358_a(C0CPacketInput p_147358_1_) { this.field_147369_b.func_110430_a(p_147358_1_.func_149620_c(), p_147358_1_.func_149616_d(), p_147358_1_.func_149618_e(), p_147358_1_.func_149617_f()); } public void func_147347_a(C03PacketPlayer p_147347_1_) { WorldServer var2 = this.field_147367_d.func_71218_a(this.field_147369_b.field_71093_bK); this.field_147366_g = true; if(!this.field_147369_b.field_71136_j) { double var3; if(!this.field_147380_r) { var3 = p_147347_1_.func_149467_d() - this.field_147382_p; if(p_147347_1_.func_149464_c() == this.field_147373_o && var3 * var3 < 0.01D && p_147347_1_.func_149472_e() == this.field_147381_q) { this.field_147380_r = true; } } if(this.field_147380_r) { double var5; double var7; double var9; if(this.field_147369_b.field_70154_o != null) { float var34 = this.field_147369_b.field_70177_z; float var4 = this.field_147369_b.field_70125_A; this.field_147369_b.field_70154_o.func_70043_V(); var5 = this.field_147369_b.field_70165_t; var7 = this.field_147369_b.field_70163_u; var9 = this.field_147369_b.field_70161_v; if(p_147347_1_.func_149463_k()) { var34 = p_147347_1_.func_149462_g(); var4 = p_147347_1_.func_149470_h(); } this.field_147369_b.field_70122_E = p_147347_1_.func_149465_i(); this.field_147369_b.func_71127_g(); this.field_147369_b.field_70139_V = 0.0F; this.field_147369_b.func_70080_a(var5, var7, var9, var34, var4); if(this.field_147369_b.field_70154_o != null) { this.field_147369_b.field_70154_o.func_70043_V(); } this.field_147367_d.func_71203_ab().func_72358_d(this.field_147369_b); if(this.field_147380_r) { this.field_147373_o = this.field_147369_b.field_70165_t; this.field_147382_p = this.field_147369_b.field_70163_u; this.field_147381_q = this.field_147369_b.field_70161_v; } var2.func_72870_g(this.field_147369_b); return; } if(this.field_147369_b.func_70608_bn()) { this.field_147369_b.func_71127_g(); this.field_147369_b.func_70080_a(this.field_147373_o, this.field_147382_p, this.field_147381_q, this.field_147369_b.field_70177_z, this.field_147369_b.field_70125_A); var2.func_72870_g(this.field_147369_b); return; } var3 = this.field_147369_b.field_70163_u; this.field_147373_o = this.field_147369_b.field_70165_t; this.field_147382_p = this.field_147369_b.field_70163_u; this.field_147381_q = this.field_147369_b.field_70161_v; var5 = this.field_147369_b.field_70165_t; var7 = this.field_147369_b.field_70163_u; var9 = this.field_147369_b.field_70161_v; float var11 = this.field_147369_b.field_70177_z; float var12 = this.field_147369_b.field_70125_A; if(p_147347_1_.func_149466_j() && p_147347_1_.func_149467_d() == -999.0D && p_147347_1_.func_149471_f() == -999.0D) { p_147347_1_.func_149469_a(false); } double var13; if(p_147347_1_.func_149466_j()) { var5 = p_147347_1_.func_149464_c(); var7 = p_147347_1_.func_149467_d(); var9 = p_147347_1_.func_149472_e(); var13 = p_147347_1_.func_149471_f() - p_147347_1_.func_149467_d(); if(!this.field_147369_b.func_70608_bn() && (var13 > 1.65D || var13 < 0.1D)) { this.func_147360_c("Illegal stance"); field_147370_c.warn(this.field_147369_b.func_70005_c_() + " had an illegal stance: " + var13); return; } if(Math.abs(p_147347_1_.func_149464_c()) > 3.2E7D || Math.abs(p_147347_1_.func_149472_e()) > 3.2E7D) { this.func_147360_c("Illegal position"); return; } } if(p_147347_1_.func_149463_k()) { var11 = p_147347_1_.func_149462_g(); var12 = p_147347_1_.func_149470_h(); } this.field_147369_b.func_71127_g(); this.field_147369_b.field_70139_V = 0.0F; this.field_147369_b.func_70080_a(this.field_147373_o, this.field_147382_p, this.field_147381_q, var11, var12); if(!this.field_147380_r) { return; } var13 = var5 - this.field_147369_b.field_70165_t; double var15 = var7 - this.field_147369_b.field_70163_u; double var17 = var9 - this.field_147369_b.field_70161_v; double var19 = Math.min(Math.abs(var13), Math.abs(this.field_147369_b.field_70159_w)); double var21 = Math.min(Math.abs(var15), Math.abs(this.field_147369_b.field_70181_x)); double var23 = Math.min(Math.abs(var17), Math.abs(this.field_147369_b.field_70179_y)); double var25 = var19 * var19 + var21 * var21 + var23 * var23; if(var25 > 100.0D && (!this.field_147367_d.func_71264_H() || !this.field_147367_d.func_71214_G().equals(this.field_147369_b.func_70005_c_()))) { field_147370_c.warn(this.field_147369_b.func_70005_c_() + " moved too quickly! " + var13 + "," + var15 + "," + var17 + " (" + var19 + ", " + var21 + ", " + var23 + ")"); this.func_147364_a(this.field_147373_o, this.field_147382_p, this.field_147381_q, this.field_147369_b.field_70177_z, this.field_147369_b.field_70125_A); return; } float var27 = 0.0625F; boolean var28 = var2.func_72945_a(this.field_147369_b, this.field_147369_b.field_70121_D.func_72329_c().func_72331_e((double)var27, (double)var27, (double)var27)).isEmpty(); if(this.field_147369_b.field_70122_E && !p_147347_1_.func_149465_i() && var15 > 0.0D) { this.field_147369_b.func_70664_aZ(); } this.field_147369_b.func_70091_d(var13, var15, var17); this.field_147369_b.field_70122_E = p_147347_1_.func_149465_i(); this.field_147369_b.func_71000_j(var13, var15, var17); double var29 = var15; var13 = var5 - this.field_147369_b.field_70165_t; var15 = var7 - this.field_147369_b.field_70163_u; if(var15 > -0.5D || var15 < 0.5D) { var15 = 0.0D; } var17 = var9 - this.field_147369_b.field_70161_v; var25 = var13 * var13 + var15 * var15 + var17 * var17; boolean var31 = false; if(var25 > 0.0625D && !this.field_147369_b.func_70608_bn() && !this.field_147369_b.field_71134_c.func_73083_d()) { var31 = true; field_147370_c.warn(this.field_147369_b.func_70005_c_() + " moved wrongly!"); } this.field_147369_b.func_70080_a(var5, var7, var9, var11, var12); boolean var32 = var2.func_72945_a(this.field_147369_b, this.field_147369_b.field_70121_D.func_72329_c().func_72331_e((double)var27, (double)var27, (double)var27)).isEmpty(); if(var28 && (var31 || !var32) && !this.field_147369_b.func_70608_bn()) { this.func_147364_a(this.field_147373_o, this.field_147382_p, this.field_147381_q, var11, var12); return; } AxisAlignedBB var33 = this.field_147369_b.field_70121_D.func_72329_c().func_72314_b((double)var27, (double)var27, (double)var27).func_72321_a(0.0D, -0.55D, 0.0D); if(!this.field_147367_d.func_71231_X() && !this.field_147369_b.field_71134_c.func_73083_d() && !var2.func_72829_c(var33)) { if(var29 >= -0.03125D) { ++this.field_147365_f; if(this.field_147365_f > 80) { field_147370_c.warn(this.field_147369_b.func_70005_c_() + " was kicked for floating too long!"); this.func_147360_c("Flying is not enabled on this server"); return; } } } else { this.field_147365_f = 0; } this.field_147369_b.field_70122_E = p_147347_1_.func_149465_i(); this.field_147367_d.func_71203_ab().func_72358_d(this.field_147369_b); this.field_147369_b.func_71122_b(this.field_147369_b.field_70163_u - var3, p_147347_1_.func_149465_i()); } else if(this.field_147368_e % 20 == 0) { this.func_147364_a(this.field_147373_o, this.field_147382_p, this.field_147381_q, this.field_147369_b.field_70177_z, this.field_147369_b.field_70125_A); } } } public void func_147364_a(double p_147364_1_, double p_147364_3_, double p_147364_5_, float p_147364_7_, float p_147364_8_) { this.field_147380_r = false; this.field_147373_o = p_147364_1_; this.field_147382_p = p_147364_3_; this.field_147381_q = p_147364_5_; this.field_147369_b.func_70080_a(p_147364_1_, p_147364_3_, p_147364_5_, p_147364_7_, p_147364_8_); this.field_147369_b.field_71135_a.func_147359_a(new S08PacketPlayerPosLook(p_147364_1_, p_147364_3_ + 1.6200000047683716D, p_147364_5_, p_147364_7_, p_147364_8_, false)); } public void func_147345_a(C07PacketPlayerDigging p_147345_1_) { WorldServer var2 = this.field_147367_d.func_71218_a(this.field_147369_b.field_71093_bK); this.field_147369_b.func_143004_u(); if(p_147345_1_.func_149506_g() == 4) { this.field_147369_b.func_71040_bB(false); } else if(p_147345_1_.func_149506_g() == 3) { this.field_147369_b.func_71040_bB(true); } else if(p_147345_1_.func_149506_g() == 5) { this.field_147369_b.func_71034_by(); } else { boolean var3 = false; if(p_147345_1_.func_149506_g() == 0) { var3 = true; } if(p_147345_1_.func_149506_g() == 1) { var3 = true; } if(p_147345_1_.func_149506_g() == 2) { var3 = true; } int var4 = p_147345_1_.func_149505_c(); int var5 = p_147345_1_.func_149503_d(); int var6 = p_147345_1_.func_149502_e(); if(var3) { double var7 = this.field_147369_b.field_70165_t - ((double)var4 + 0.5D); double var9 = this.field_147369_b.field_70163_u - ((double)var5 + 0.5D) + 1.5D; double var11 = this.field_147369_b.field_70161_v - ((double)var6 + 0.5D); double var13 = var7 * var7 + var9 * var9 + var11 * var11; if(var13 > 36.0D) { return; } if(var5 >= this.field_147367_d.func_71207_Z()) { return; } } if(p_147345_1_.func_149506_g() == 0) { if(!this.field_147367_d.func_96290_a(var2, var4, var5, var6, this.field_147369_b)) { this.field_147369_b.field_71134_c.func_73074_a(var4, var5, var6, p_147345_1_.func_149501_f()); } else { this.field_147369_b.field_71135_a.func_147359_a(new S23PacketBlockChange(var4, var5, var6, var2)); } } else if(p_147345_1_.func_149506_g() == 2) { this.field_147369_b.field_71134_c.func_73082_a(var4, var5, var6); if(var2.func_147439_a(var4, var5, var6).func_149688_o() != Material.field_151579_a) { this.field_147369_b.field_71135_a.func_147359_a(new S23PacketBlockChange(var4, var5, var6, var2)); } } else if(p_147345_1_.func_149506_g() == 1) { this.field_147369_b.field_71134_c.func_73073_c(var4, var5, var6); if(var2.func_147439_a(var4, var5, var6).func_149688_o() != Material.field_151579_a) { this.field_147369_b.field_71135_a.func_147359_a(new S23PacketBlockChange(var4, var5, var6, var2)); } } } } public void func_147346_a(C08PacketPlayerBlockPlacement p_147346_1_) { WorldServer var2 = this.field_147367_d.func_71218_a(this.field_147369_b.field_71093_bK); ItemStack var3 = this.field_147369_b.field_71071_by.func_70448_g(); boolean var4 = false; int var5 = p_147346_1_.func_149576_c(); int var6 = p_147346_1_.func_149571_d(); int var7 = p_147346_1_.func_149570_e(); int var8 = p_147346_1_.func_149568_f(); this.field_147369_b.func_143004_u(); if(p_147346_1_.func_149568_f() == 255) { if(var3 == null) { return; } this.field_147369_b.field_71134_c.func_73085_a(this.field_147369_b, var2, var3); } else if(p_147346_1_.func_149571_d() >= this.field_147367_d.func_71207_Z() - 1 && (p_147346_1_.func_149568_f() == 1 || p_147346_1_.func_149571_d() >= this.field_147367_d.func_71207_Z())) { ChatComponentTranslation var9 = new ChatComponentTranslation("build.tooHigh", new Object[]{Integer.valueOf(this.field_147367_d.func_71207_Z())}); var9.func_150256_b().func_150238_a(EnumChatFormatting.RED); this.field_147369_b.field_71135_a.func_147359_a(new S02PacketChat(var9)); var4 = true; } else { if(this.field_147380_r && this.field_147369_b.func_70092_e((double)var5 + 0.5D, (double)var6 + 0.5D, (double)var7 + 0.5D) < 64.0D && !this.field_147367_d.func_96290_a(var2, var5, var6, var7, this.field_147369_b)) { this.field_147369_b.field_71134_c.func_73078_a(this.field_147369_b, var2, var3, var5, var6, var7, var8, p_147346_1_.func_149573_h(), p_147346_1_.func_149569_i(), p_147346_1_.func_149575_j()); } var4 = true; } if(var4) { this.field_147369_b.field_71135_a.func_147359_a(new S23PacketBlockChange(var5, var6, var7, var2)); if(var8 == 0) { --var6; } if(var8 == 1) { ++var6; } if(var8 == 2) { --var7; } if(var8 == 3) { ++var7; } if(var8 == 4) { --var5; } if(var8 == 5) { ++var5; } this.field_147369_b.field_71135_a.func_147359_a(new S23PacketBlockChange(var5, var6, var7, var2)); } var3 = this.field_147369_b.field_71071_by.func_70448_g(); if(var3 != null && var3.field_77994_a == 0) { this.field_147369_b.field_71071_by.field_70462_a[this.field_147369_b.field_71071_by.field_70461_c] = null; var3 = null; } if(var3 == null || var3.func_77988_m() == 0) { this.field_147369_b.field_71137_h = true; this.field_147369_b.field_71071_by.field_70462_a[this.field_147369_b.field_71071_by.field_70461_c] = ItemStack.func_77944_b(this.field_147369_b.field_71071_by.field_70462_a[this.field_147369_b.field_71071_by.field_70461_c]); Slot var10 = this.field_147369_b.field_71070_bA.func_75147_a(this.field_147369_b.field_71071_by, this.field_147369_b.field_71071_by.field_70461_c); this.field_147369_b.field_71070_bA.func_75142_b(); this.field_147369_b.field_71137_h = false; if(!ItemStack.func_77989_b(this.field_147369_b.field_71071_by.func_70448_g(), p_147346_1_.func_149574_g())) { this.func_147359_a(new S2FPacketSetSlot(this.field_147369_b.field_71070_bA.field_75152_c, var10.field_75222_d, this.field_147369_b.field_71071_by.func_70448_g())); } } } public void func_147231_a(IChatComponent p_147231_1_) { field_147370_c.info(this.field_147369_b.func_70005_c_() + " lost connection: " + p_147231_1_); this.field_147367_d.func_147132_au(); ChatComponentTranslation var2 = new ChatComponentTranslation("multiplayer.player.left", new Object[]{this.field_147369_b.func_145748_c_()}); var2.func_150256_b().func_150238_a(EnumChatFormatting.YELLOW); this.field_147367_d.func_71203_ab().func_148539_a(var2); this.field_147369_b.func_71123_m(); this.field_147367_d.func_71203_ab().func_72367_e(this.field_147369_b); if(this.field_147367_d.func_71264_H() && this.field_147369_b.func_70005_c_().equals(this.field_147367_d.func_71214_G())) { field_147370_c.info("Stopping singleplayer server as player logged out"); this.field_147367_d.func_71263_m(); } } public void func_147359_a(final Packet p_147359_1_) { if(p_147359_1_ instanceof S02PacketChat) { S02PacketChat var2 = (S02PacketChat)p_147359_1_; EntityPlayer.EnumChatVisibility var3 = this.field_147369_b.func_147096_v(); if(var3 == EntityPlayer.EnumChatVisibility.HIDDEN) { return; } if(var3 == EntityPlayer.EnumChatVisibility.SYSTEM && !var2.func_148916_d()) { return; } } try { this.field_147371_a.func_150725_a(p_147359_1_, new GenericFutureListener[0]); } catch (Throwable var5) { CrashReport var6 = CrashReport.func_85055_a(var5, "Sending packet"); CrashReportCategory var4 = var6.func_85058_a("Packet being sent"); var4.func_71500_a("Packet class", new Callable() { private static final String __OBFID = "CL_00001454"; public String call() { return p_147359_1_.getClass().getCanonicalName(); } // $FF: synthetic method public Object call() { return this.call(); } }); throw new ReportedException(var6); } } public void func_147355_a(C09PacketHeldItemChange p_147355_1_) { if(p_147355_1_.func_149614_c() >= 0 && p_147355_1_.func_149614_c() < InventoryPlayer.func_70451_h()) { this.field_147369_b.field_71071_by.field_70461_c = p_147355_1_.func_149614_c(); this.field_147369_b.func_143004_u(); } else { field_147370_c.warn(this.field_147369_b.func_70005_c_() + " tried to set an invalid carried item"); } } public void func_147354_a(C01PacketChatMessage p_147354_1_) { if(this.field_147369_b.func_147096_v() == EntityPlayer.EnumChatVisibility.HIDDEN) { ChatComponentTranslation var4 = new ChatComponentTranslation("chat.cannotSend", new Object[0]); var4.func_150256_b().func_150238_a(EnumChatFormatting.RED); this.func_147359_a(new S02PacketChat(var4)); } else { this.field_147369_b.func_143004_u(); String var2 = p_147354_1_.func_149439_c(); var2 = StringUtils.normalizeSpace(var2); for(int var3 = 0; var3 < var2.length(); ++var3) { if(!ChatAllowedCharacters.func_71566_a(var2.charAt(var3))) { this.func_147360_c("Illegal characters in chat"); return; } } if(var2.startsWith("/")) { this.func_147361_d(var2); } else { ChatComponentTranslation var5 = new ChatComponentTranslation("chat.type.text", new Object[]{this.field_147369_b.func_145748_c_(), var2}); this.field_147367_d.func_71203_ab().func_148544_a(var5, false); } this.field_147374_l += 20; if(this.field_147374_l > 200 && !this.field_147367_d.func_71203_ab().func_152596_g(this.field_147369_b.func_146103_bH())) { this.func_147360_c("disconnect.spam"); } } } private void func_147361_d(String p_147361_1_) { this.field_147367_d.func_71187_D().func_71556_a(this.field_147369_b, p_147361_1_); } public void func_147350_a(C0APacketAnimation p_147350_1_) { this.field_147369_b.func_143004_u(); if(p_147350_1_.func_149421_d() == 1) { this.field_147369_b.func_71038_i(); } } public void func_147357_a(C0BPacketEntityAction p_147357_1_) { this.field_147369_b.func_143004_u(); if(p_147357_1_.func_149513_d() == 1) { this.field_147369_b.func_70095_a(true); } else if(p_147357_1_.func_149513_d() == 2) { this.field_147369_b.func_70095_a(false); } else if(p_147357_1_.func_149513_d() == 4) { this.field_147369_b.func_70031_b(true); } else if(p_147357_1_.func_149513_d() == 5) { this.field_147369_b.func_70031_b(false); } else if(p_147357_1_.func_149513_d() == 3) { this.field_147369_b.func_70999_a(false, true, true); this.field_147380_r = false; } else if(p_147357_1_.func_149513_d() == 6) { if(this.field_147369_b.field_70154_o != null && this.field_147369_b.field_70154_o instanceof EntityHorse) { ((EntityHorse)this.field_147369_b.field_70154_o).func_110206_u(p_147357_1_.func_149512_e()); } } else if(p_147357_1_.func_149513_d() == 7 && this.field_147369_b.field_70154_o != null && this.field_147369_b.field_70154_o instanceof EntityHorse) { ((EntityHorse)this.field_147369_b.field_70154_o).func_110199_f(this.field_147369_b); } } public void func_147340_a(C02PacketUseEntity p_147340_1_) { WorldServer var2 = this.field_147367_d.func_71218_a(this.field_147369_b.field_71093_bK); Entity var3 = p_147340_1_.func_149564_a(var2); this.field_147369_b.func_143004_u(); if(var3 != null) { boolean var4 = this.field_147369_b.func_70685_l(var3); double var5 = 36.0D; if(!var4) { var5 = 9.0D; } if(this.field_147369_b.func_70068_e(var3) < var5) { if(p_147340_1_.func_149565_c() == C02PacketUseEntity.Action.INTERACT) { this.field_147369_b.func_70998_m(var3); } else if(p_147340_1_.func_149565_c() == C02PacketUseEntity.Action.ATTACK) { if(var3 instanceof EntityItem || var3 instanceof EntityXPOrb || var3 instanceof EntityArrow || var3 == this.field_147369_b) { this.func_147360_c("Attempting to attack an invalid entity"); this.field_147367_d.func_71236_h("Player " + this.field_147369_b.func_70005_c_() + " tried to attack an invalid entity"); return; } this.field_147369_b.func_71059_n(var3); } } } } public void func_147342_a(C16PacketClientStatus p_147342_1_) { this.field_147369_b.func_143004_u(); C16PacketClientStatus.EnumState var2 = p_147342_1_.func_149435_c(); switch(NetHandlerPlayServer.SwitchEnumState.field_151290_a[var2.ordinal()]) { case 1: if(this.field_147369_b.field_71136_j) { this.field_147369_b = this.field_147367_d.func_71203_ab().func_72368_a(this.field_147369_b, 0, true); } else if(this.field_147369_b.func_71121_q().func_72912_H().func_76093_s()) { if(this.field_147367_d.func_71264_H() && this.field_147369_b.func_70005_c_().equals(this.field_147367_d.func_71214_G())) { this.field_147369_b.field_71135_a.func_147360_c("You have died. Game over, man, it\'s game over!"); this.field_147367_d.func_71272_O(); } else { UserListBansEntry var3 = new UserListBansEntry(this.field_147369_b.func_146103_bH(), (Date)null, "(You just lost the game)", (Date)null, "Death in Hardcore"); this.field_147367_d.func_71203_ab().func_152608_h().func_152687_a(var3); this.field_147369_b.field_71135_a.func_147360_c("You have died. Game over, man, it\'s game over!"); } } else { if(this.field_147369_b.func_110143_aJ() > 0.0F) { return; } this.field_147369_b = this.field_147367_d.func_71203_ab().func_72368_a(this.field_147369_b, 0, false); } break; case 2: this.field_147369_b.func_147099_x().func_150876_a(this.field_147369_b); break; case 3: this.field_147369_b.func_71029_a(AchievementList.field_76004_f); } } public void func_147356_a(C0DPacketCloseWindow p_147356_1_) { this.field_147369_b.func_71128_l(); } public void func_147351_a(C0EPacketClickWindow p_147351_1_) { this.field_147369_b.func_143004_u(); if(this.field_147369_b.field_71070_bA.field_75152_c == p_147351_1_.func_149548_c() && this.field_147369_b.field_71070_bA.func_75129_b(this.field_147369_b)) { ItemStack var2 = this.field_147369_b.field_71070_bA.func_75144_a(p_147351_1_.func_149544_d(), p_147351_1_.func_149543_e(), p_147351_1_.func_149542_h(), this.field_147369_b); if(ItemStack.func_77989_b(p_147351_1_.func_149546_g(), var2)) { this.field_147369_b.field_71135_a.func_147359_a(new S32PacketConfirmTransaction(p_147351_1_.func_149548_c(), p_147351_1_.func_149547_f(), true)); this.field_147369_b.field_71137_h = true; this.field_147369_b.field_71070_bA.func_75142_b(); this.field_147369_b.func_71113_k(); this.field_147369_b.field_71137_h = false; } else { this.field_147372_n.func_76038_a(this.field_147369_b.field_71070_bA.field_75152_c, Short.valueOf(p_147351_1_.func_149547_f())); this.field_147369_b.field_71135_a.func_147359_a(new S32PacketConfirmTransaction(p_147351_1_.func_149548_c(), p_147351_1_.func_149547_f(), false)); this.field_147369_b.field_71070_bA.func_75128_a(this.field_147369_b, false); ArrayList var3 = new ArrayList(); for(int var4 = 0; var4 < this.field_147369_b.field_71070_bA.field_75151_b.size(); ++var4) { var3.add(((Slot)this.field_147369_b.field_71070_bA.field_75151_b.get(var4)).func_75211_c()); } this.field_147369_b.func_71110_a(this.field_147369_b.field_71070_bA, var3); } } } public void func_147338_a(C11PacketEnchantItem p_147338_1_) { this.field_147369_b.func_143004_u(); if(this.field_147369_b.field_71070_bA.field_75152_c == p_147338_1_.func_149539_c() && this.field_147369_b.field_71070_bA.func_75129_b(this.field_147369_b)) { this.field_147369_b.field_71070_bA.func_75140_a(this.field_147369_b, p_147338_1_.func_149537_d()); this.field_147369_b.field_71070_bA.func_75142_b(); } } public void func_147344_a(C10PacketCreativeInventoryAction p_147344_1_) { if(this.field_147369_b.field_71134_c.func_73083_d()) { boolean var2 = p_147344_1_.func_149627_c() < 0; ItemStack var3 = p_147344_1_.func_149625_d(); boolean var4 = p_147344_1_.func_149627_c() >= 1 && p_147344_1_.func_149627_c() < 36 + InventoryPlayer.func_70451_h(); boolean var5 = var3 == null || var3.func_77973_b() != null; boolean var6 = var3 == null || var3.func_77960_j() >= 0 && var3.field_77994_a <= 64 && var3.field_77994_a > 0; if(var4 && var5 && var6) { if(var3 == null) { this.field_147369_b.field_71069_bz.func_75141_a(p_147344_1_.func_149627_c(), (ItemStack)null); } else { this.field_147369_b.field_71069_bz.func_75141_a(p_147344_1_.func_149627_c(), var3); } this.field_147369_b.field_71069_bz.func_75128_a(this.field_147369_b, true); } else if(var2 && var5 && var6 && this.field_147375_m < 200) { this.field_147375_m += 20; EntityItem var7 = this.field_147369_b.func_71019_a(var3, true); if(var7 != null) { var7.func_70288_d(); } } } } public void func_147339_a(C0FPacketConfirmTransaction p_147339_1_) { Short var2 = (Short)this.field_147372_n.func_76041_a(this.field_147369_b.field_71070_bA.field_75152_c); if(var2 != null && p_147339_1_.func_149533_d() == var2.shortValue() && this.field_147369_b.field_71070_bA.field_75152_c == p_147339_1_.func_149532_c() && !this.field_147369_b.field_71070_bA.func_75129_b(this.field_147369_b)) { this.field_147369_b.field_71070_bA.func_75128_a(this.field_147369_b, true); } } public void func_147343_a(C12PacketUpdateSign p_147343_1_) { this.field_147369_b.func_143004_u(); WorldServer var2 = this.field_147367_d.func_71218_a(this.field_147369_b.field_71093_bK); if(var2.func_72899_e(p_147343_1_.func_149588_c(), p_147343_1_.func_149586_d(), p_147343_1_.func_149585_e())) { TileEntity var3 = var2.func_147438_o(p_147343_1_.func_149588_c(), p_147343_1_.func_149586_d(), p_147343_1_.func_149585_e()); if(var3 instanceof TileEntitySign) { TileEntitySign var4 = (TileEntitySign)var3; if(!var4.func_145914_a() || var4.func_145911_b() != this.field_147369_b) { this.field_147367_d.func_71236_h("Player " + this.field_147369_b.func_70005_c_() + " just tried to change non-editable sign"); return; } } int var6; int var8; for(var8 = 0; var8 < 4; ++var8) { boolean var5 = true; if(p_147343_1_.func_149589_f()[var8].length() > 15) { var5 = false; } else { for(var6 = 0; var6 < p_147343_1_.func_149589_f()[var8].length(); ++var6) { if(!ChatAllowedCharacters.func_71566_a(p_147343_1_.func_149589_f()[var8].charAt(var6))) { var5 = false; } } } if(!var5) { p_147343_1_.func_149589_f()[var8] = "!?"; } } if(var3 instanceof TileEntitySign) { var8 = p_147343_1_.func_149588_c(); int var9 = p_147343_1_.func_149586_d(); var6 = p_147343_1_.func_149585_e(); TileEntitySign var7 = (TileEntitySign)var3; System.arraycopy(p_147343_1_.func_149589_f(), 0, var7.field_145915_a, 0, 4); var7.func_70296_d(); var2.func_147471_g(var8, var9, var6); } } } public void func_147353_a(C00PacketKeepAlive p_147353_1_) { if(p_147353_1_.func_149460_c() == this.field_147378_h) { int var2 = (int)(this.func_147363_d() - this.field_147379_i); this.field_147369_b.field_71138_i = (this.field_147369_b.field_71138_i * 3 + var2) / 4; } } private long func_147363_d() { return System.nanoTime() / 1000000L; } public void func_147348_a(C13PacketPlayerAbilities p_147348_1_) { this.field_147369_b.field_71075_bZ.field_75100_b = p_147348_1_.func_149488_d() && this.field_147369_b.field_71075_bZ.field_75101_c; } public void func_147341_a(C14PacketTabComplete p_147341_1_) { ArrayList var2 = Lists.newArrayList(); Iterator var3 = this.field_147367_d.func_71248_a(this.field_147369_b, p_147341_1_.func_149419_c()).iterator(); while(var3.hasNext()) { String var4 = (String)var3.next(); var2.add(var4); } this.field_147369_b.field_71135_a.func_147359_a(new S3APacketTabComplete((String[])var2.toArray(new String[var2.size()]))); } public void func_147352_a(C15PacketClientSettings p_147352_1_) { this.field_147369_b.func_147100_a(p_147352_1_); } public void func_147349_a(C17PacketCustomPayload p_147349_1_) { PacketBuffer var2; ItemStack var3; ItemStack var4; if("MC|BEdit".equals(p_147349_1_.func_149559_c())) { var2 = new PacketBuffer(Unpooled.wrappedBuffer(p_147349_1_.func_149558_e())); try { var3 = var2.func_150791_c(); if(var3 == null) { return; } if(!ItemWritableBook.func_150930_a(var3.func_77978_p())) { throw new IOException("Invalid book tag!"); } var4 = this.field_147369_b.field_71071_by.func_70448_g(); if(var4 != null) { if(var3.func_77973_b() == Items.field_151099_bA && var3.func_77973_b() == var4.func_77973_b()) { var4.func_77983_a("pages", var3.func_77978_p().func_150295_c("pages", 8)); } return; } } catch (Exception var38) { field_147370_c.error("Couldn\'t handle book info", var38); return; } finally { var2.release(); } return; } else if("MC|BSign".equals(p_147349_1_.func_149559_c())) { var2 = new PacketBuffer(Unpooled.wrappedBuffer(p_147349_1_.func_149558_e())); try { var3 = var2.func_150791_c(); if(var3 == null) { return; } if(!ItemEditableBook.func_77828_a(var3.func_77978_p())) { throw new IOException("Invalid book tag!"); } var4 = this.field_147369_b.field_71071_by.func_70448_g(); if(var4 != null) { if(var3.func_77973_b() == Items.field_151164_bB && var4.func_77973_b() == Items.field_151099_bA) { var4.func_77983_a("author", new NBTTagString(this.field_147369_b.func_70005_c_())); var4.func_77983_a("title", new NBTTagString(var3.func_77978_p().func_74779_i("title"))); var4.func_77983_a("pages", var3.func_77978_p().func_150295_c("pages", 8)); var4.func_150996_a(Items.field_151164_bB); } return; } } catch (Exception var36) { field_147370_c.error("Couldn\'t sign book", var36); return; } finally { var2.release(); } return; } else { DataInputStream var40; int var42; if("MC|TrSel".equals(p_147349_1_.func_149559_c())) { try { var40 = new DataInputStream(new ByteArrayInputStream(p_147349_1_.func_149558_e())); var42 = var40.readInt(); Container var45 = this.field_147369_b.field_71070_bA; if(var45 instanceof ContainerMerchant) { ((ContainerMerchant)var45).func_75175_c(var42); } } catch (Exception var35) { field_147370_c.error("Couldn\'t select trade", var35); } } else if("MC|AdvCdm".equals(p_147349_1_.func_149559_c())) { if(!this.field_147367_d.func_82356_Z()) { this.field_147369_b.func_145747_a(new ChatComponentTranslation("advMode.notEnabled", new Object[0])); } else if(this.field_147369_b.func_70003_b(2, "") && this.field_147369_b.field_71075_bZ.field_75098_d) { var2 = new PacketBuffer(Unpooled.wrappedBuffer(p_147349_1_.func_149558_e())); try { byte var43 = var2.readByte(); CommandBlockLogic var46 = null; if(var43 == 0) { TileEntity var5 = this.field_147369_b.field_70170_p.func_147438_o(var2.readInt(), var2.readInt(), var2.readInt()); if(var5 instanceof TileEntityCommandBlock) { var46 = ((TileEntityCommandBlock)var5).func_145993_a(); } } else if(var43 == 1) { Entity var48 = this.field_147369_b.field_70170_p.func_73045_a(var2.readInt()); if(var48 instanceof EntityMinecartCommandBlock) { var46 = ((EntityMinecartCommandBlock)var48).func_145822_e(); } } String var49 = var2.func_150789_c(var2.readableBytes()); if(var46 != null) { var46.func_145752_a(var49); var46.func_145756_e(); this.field_147369_b.func_145747_a(new ChatComponentTranslation("advMode.setCommand.success", new Object[]{var49})); } } catch (Exception var33) { field_147370_c.error("Couldn\'t set command block", var33); } finally { var2.release(); } } else { this.field_147369_b.func_145747_a(new ChatComponentTranslation("advMode.notAllowed", new Object[0])); } } else if("MC|Beacon".equals(p_147349_1_.func_149559_c())) { if(this.field_147369_b.field_71070_bA instanceof ContainerBeacon) { try { var40 = new DataInputStream(new ByteArrayInputStream(p_147349_1_.func_149558_e())); var42 = var40.readInt(); int var47 = var40.readInt(); ContainerBeacon var50 = (ContainerBeacon)this.field_147369_b.field_71070_bA; Slot var6 = var50.func_75139_a(0); if(var6.func_75216_d()) { var6.func_75209_a(1); TileEntityBeacon var7 = var50.func_148327_e(); var7.func_146001_d(var42); var7.func_146004_e(var47); var7.func_70296_d(); } } catch (Exception var32) { field_147370_c.error("Couldn\'t set beacon", var32); } } } else if("MC|ItemName".equals(p_147349_1_.func_149559_c()) && this.field_147369_b.field_71070_bA instanceof ContainerRepair) { ContainerRepair var41 = (ContainerRepair)this.field_147369_b.field_71070_bA; if(p_147349_1_.func_149558_e() != null && p_147349_1_.func_149558_e().length >= 1) { String var44 = ChatAllowedCharacters.func_71565_a(new String(p_147349_1_.func_149558_e(), Charsets.UTF_8)); if(var44.length() <= 30) { var41.func_82850_a(var44); } } else { var41.func_82850_a(""); } } } } public void func_147232_a(EnumConnectionState p_147232_1_, EnumConnectionState p_147232_2_) { if(p_147232_2_ != EnumConnectionState.PLAY) { throw new IllegalStateException("Unexpected change in protocol!"); } } // $FF: synthetic class static final class SwitchEnumState { // $FF: synthetic field static final int[] field_151290_a = new int[C16PacketClientStatus.EnumState.values().length]; private static final String __OBFID = "CL_00001455"; static { try { field_151290_a[C16PacketClientStatus.EnumState.PERFORM_RESPAWN.ordinal()] = 1; } catch (NoSuchFieldError var3) { ; } try { field_151290_a[C16PacketClientStatus.EnumState.REQUEST_STATS.ordinal()] = 2; } catch (NoSuchFieldError var2) { ; } try { field_151290_a[C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT.ordinal()] = 3; } catch (NoSuchFieldError var1) { ; } } } }
e95d04699005f1a984fff2fc32ef994536ed5a8c
b89d6fdfca0fbd67ec966adb96fa424a46d6281e
/src/creational_patterns/factory_method_pattern/calculator/factory/OperationMulFactory.java
5fa0ddc0aa9a9946cd93e2b401637b79ca21e6dc
[]
no_license
GeniusDSY/DesignPatterns
6dbd0a9dcb6aa3d76038f33e7425a419f8b4efda
679de181200d9de9a00a27ecb34c846276e9f417
refs/heads/master
2020-04-29T23:03:44.597880
2019-04-10T15:00:05
2019-04-10T15:00:05
176,466,068
0
0
null
null
null
null
UTF-8
Java
false
false
523
java
package creational_patterns.factory_method_pattern.calculator.factory; import creational_patterns.factory_method_pattern.calculator.production.OperationMulProduction; import creational_patterns.factory_method_pattern.calculator.production.OperationProduction; /** * @author :DengSiYuan * @date :2019/3/19 21:21 * @desc :乘法工厂 */ public class OperationMulFactory implements OperationFactory { @Override public OperationProduction createOperation() { return new OperationMulProduction(); } }
d88e2cbf875e1373f78a4ef19788ce12aa20a926
5e1f119efe8a8a3fa2be2db12665f240cb8d6a29
/1.JavaSyntax/src/com/javarush/task/task07/task0728/Solution.java
8c038eb3d09aababfc6bac7277c989072973cc0a
[]
no_license
VilFenoX/JavaRushTasks
194a80351502d34fecf597ff2e1756425a7f775b
e009c7808f583d0758bbadb670723c374c3541d6
refs/heads/master
2023-08-14T04:00:43.881190
2021-10-03T17:29:03
2021-10-03T17:29:03
400,264,278
1
0
null
null
null
null
UTF-8
Java
false
false
947
java
package com.javarush.task.task07.task0728; import java.io.BufferedReader; import java.io.InputStreamReader; /* В убывающем порядке */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int[] array = new int[20]; for (int i = 0; i < 20; i++) { array[i] = Integer.parseInt(reader.readLine()); } sort(array); for (int x : array) { System.out.println(x); } } public static void sort(int[] array) { for (int i = array.length-1; i>0; i--){ for (int j=0; j<i;j++){ if(array[j]<array[j+1]){ int temp = array[j]; array[j] = array[j+1]; array[j+1] = temp; } } }//напишите тут ваш код } }
0aff2499ba4e186d93f662acddb7ada4940a2792
ec537e378965588e65b3e329960e15c801de786d
/src/main/java/com/brightsdiamonds/domain/StaticImage.java
3b62be56df7cae77fa4820caffa956f275f6544a
[]
no_license
dhoang132/brightsdiamonds
98f5da8e18088b867f6ae6b9013520a975373aa7
4525b28e833782e8ef9db25c14691f8f6b003bfe
refs/heads/master
2022-12-21T20:29:26.657735
2019-08-26T01:22:40
2019-08-26T01:22:40
144,410,068
0
0
null
2022-12-16T11:31:03
2018-08-11T18:41:46
Java
UTF-8
Java
false
false
832
java
package com.brightsdiamonds.domain; public class StaticImage { private int id; private byte[] imageData; private String fileName; public int getId() { return id; } public StaticImage() { super(); } public StaticImage(int id, byte[] imageData, String fileName) { super(); this.id = id; this.imageData = imageData; this.fileName = fileName; } public void setId(int id) { this.id = id; } public byte[] getImageData() { return imageData; } public void setImageData(byte[] imageData) { this.imageData = imageData; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } @Override public String toString() { return "ProductImage [id=" + id + ", imageData=" + imageData + ", fileName=" + fileName + "]"; } }
cea1cf370f68cb6d0a82e3c14bbed641b27ded66
6cfcae621353075f528bc8efce4038b4da0ecfca
/Hospital_Fixed_Asset_Management_System/src/main/java/domain/T_Depreciationmethod.java
fc6a5284c16e6af08e64625bc3d78512cc538cf4
[]
no_license
yuanguojie/new1
83da3fbc1a0188b2398213b1fd178c8110150ecc
05d22d0275d4c459c906de8a67e47827f863f63f
refs/heads/master
2022-12-23T19:33:19.128059
2020-04-06T13:16:13
2020-04-06T13:16:13
135,657,848
0
0
null
2022-12-16T04:23:58
2018-06-01T02:29:23
CSS
UTF-8
Java
false
false
739
java
package domain; public class T_Depreciationmethod { private Integer id; private String name; private String func; private String operation; 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 == null ? null : name.trim(); } public String getFunc() { return func; } public void setFunc(String func) { this.func = func == null ? null : func.trim(); } public String getOperation() { return operation; } public void setOperation(String operation) { this.operation = operation; } }
4c0134a49eb29ab0aa06e1bb310b98a51d4a003e
b1c05df156f3d5ecdb73425d980ed1065c3c2b29
/Lab_works/Lab_Work_9/DataBaseObserver.java
c6af57058bb71b4d25ae12b3e8391869c419a370
[]
no_license
Aznorb-Team/OOP
86c82d7b64c7f95d1ae526c77714df236d40cf41
2183dd3a4938ad3417223d7bf4b8322636477cb1
refs/heads/main
2023-09-02T23:10:02.861055
2021-11-12T07:06:29
2021-11-12T07:06:29
427,260,027
1
0
null
null
null
null
UTF-8
Java
false
false
724
java
package com.company; import java.sql.SQLException; import java.util.Date; public class DataBaseObserver implements Observer{ private String name; public Date date; public DataBaseObserver(String name) { this.name = name; } @Override public void update(String news, String date, String typeNews) { //date = new Date(); System.out.println(name + " получил информацию: " + news + "; " + date + "; " + typeNews + ';'); System.out.println(); try { DataBaseManager.WriteDB(news, date, typeNews, String.valueOf(new Date())); } catch (SQLException e) { e.printStackTrace(); } } }
57603d27fb6adf69fb659648a8bf23ae9274368e
5d49684e21696e1c7fc2832be6ddf56a0e808e84
/src/main/java/com/cytmxk/test/picture/PictureUtils.java
0b54ed2ff4c3a20fb290ed10c5c5b543bd139881
[]
no_license
forevercy/test
2284a879357ef4b593ef209c272f9333b35b6ee4
2a8b29dc1e3b75ffbab62cc02673a673a07fef09
refs/heads/master
2021-04-29T00:22:20.194867
2017-04-02T06:18:06
2017-04-02T06:18:06
77,706,834
0
0
null
null
null
null
UTF-8
Java
false
false
27,642
java
package com.cytmxk.test.picture; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import android.annotation.TargetApi; import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.LinearGradient; import android.graphics.Matrix; import android.graphics.Bitmap.CompressFormat; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Shader.TileMode; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.Build; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.ScriptIntrinsicBlur; import android.view.Display; import android.widget.ImageView; public class PictureUtils { @SuppressWarnings("deprecation") public static BitmapDrawable getScaledDrawable(Activity activity, String path) { Display display = activity.getWindowManager().getDefaultDisplay(); float destWidth = display.getWidth(); float destHeight = display.getHeight(); BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(path, options); float srcWidth = options.outWidth; float srcHeight = options.outHeight; int inSampleSize = 1; if (srcWidth > destWidth || srcHeight > destHeight) { if (srcWidth > srcHeight) { inSampleSize = Math.round(srcHeight / destHeight); } else { inSampleSize = Math.round(srcWidth / destWidth); } } options = new BitmapFactory.Options(); options.inSampleSize = inSampleSize; Bitmap bitmap = BitmapFactory.decodeFile(path, options); return new BitmapDrawable(activity.getResources(), bitmap); } public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) { // 源图片的高度和宽度 final int height = options.outHeight; final int width = options.outWidth; int inSampleSize = 1; if (height > reqHeight || width > reqWidth) { // 计算出实际宽高和目标宽高的比率 final int heightRatio = Math.round((float) height / (float) reqHeight); final int widthRatio = Math.round((float) width / (float) reqWidth); // 选择宽和高中最小的比率作为inSampleSize的值,这样可以保证最终图片的宽和高 // 一定都会大于等于目标的宽和高。 inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio; } return inSampleSize; } public static Bitmap decodeSampledBitmapFromBytes(byte[] bytes, int reqWidth, int reqHeight) { // 第一次解析将inJustDecodeBounds设置为true,来获取图片大小 final BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); // 调用上面定义的方法计算inSampleSize值 options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight); // 使用获取到的inSampleSize值再次解析图片 options.inJustDecodeBounds = false; return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); } public static byte[] rotatePicture(byte[] data, float degrees) { Matrix m = new Matrix(); m.postRotate(degrees); Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length); bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), m, true); ByteArrayOutputStream out = new ByteArrayOutputStream(); bitmap.compress(CompressFormat.JPEG, 100, out); return out.toByteArray(); } public static void cleanImageView(ImageView iamgeview) { if (!(iamgeview.getDrawable() instanceof BitmapDrawable)) { return; } BitmapDrawable bitmapDrawable = (BitmapDrawable) iamgeview .getDrawable(); bitmapDrawable.getBitmap().recycle(); iamgeview.setImageDrawable(null); } /** * Bitmap → byte[] * * @param bitmap * @return */ public static byte[] bitmapToBytes(Bitmap bitmap) { ByteArrayOutputStream output = new ByteArrayOutputStream(); boolean isSuccess = bitmap.compress(CompressFormat.JPEG, 100, output); byte[] bs = null; if (isSuccess) { bs = output.toByteArray(); } try { output.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return bs; } /** * byte[] → Bitmap * * @param b * @return */ public Bitmap Bytes2Bimap(byte[] b) { if (b.length != 0) { return BitmapFactory.decodeByteArray(b, 0, b.length); } else { return null; } } /** * Bitmap缩放 * * @param bitmap * @param width * @param height * @return */ public static Bitmap zoomBitmap(Bitmap bitmap, int width, int height) { int w = bitmap.getWidth(); int h = bitmap.getHeight(); Matrix matrix = new Matrix(); float scaleWidth = ((float) width / w); float scaleHeight = ((float) height / h); matrix.postScale(scaleWidth, scaleHeight); Bitmap newbmp = Bitmap.createBitmap(bitmap, 0, 0, w, h, matrix, true); return newbmp; } /** * 通过给出的bitmap进行质量压缩 * * @param bitmap * @param percentage * 1-100 * @return */ public static Bitmap compressBitmap(Bitmap bitmap, int percentage) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); // 通过这里改变压缩类型,其有不同的结果 bitmap.compress(CompressFormat.JPEG, percentage, bos); ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); return BitmapFactory.decodeStream(bis); } /** * 获取图片的byte数 * * @param bitmap * @return */ @TargetApi(Build.VERSION_CODES.KITKAT) public static int getBitmapSize(Bitmap bitmap) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { // API 19 return bitmap.getAllocationByteCount(); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) { // API12 return bitmap.getByteCount(); } return bitmap.getRowBytes() * bitmap.getHeight(); // earlier version } /** * 将Drawable转化为Bitmap * * @param drawable * @return */ public static Bitmap drawableToBitmap(Drawable drawable) { // 取 drawable 的长宽 int w = drawable.getIntrinsicWidth(); int h = drawable.getIntrinsicHeight(); // 取 drawable 的颜色格式 Config config = drawable.getOpacity() != PixelFormat.OPAQUE ? Config.ARGB_8888 : Config.RGB_565; // 建立对应 bitmap Bitmap bitmap = Bitmap.createBitmap(w, h, config); // 建立对应 bitmap 的画布 Canvas canvas = new Canvas(bitmap); drawable.setBounds(0, 0, w, h); // 把 drawable 内容画到画布中 drawable.draw(canvas); return bitmap; } /** * 获得圆角图片 * * @param bitmap * @param roundPx * @return */ public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, float roundPx) { int w = bitmap.getWidth(); int h = bitmap.getHeight(); Bitmap output = Bitmap.createBitmap(w, h, Config.ARGB_8888); Canvas canvas = new Canvas(output); final int color = 0xff424242; final Paint paint = new Paint(); final Rect rect = new Rect(0, 0, w, h); final RectF rectF = new RectF(rect); paint.setAntiAlias(true); canvas.drawARGB(0, 0, 0, 0); paint.setColor(color); canvas.drawRoundRect(rectF, roundPx, roundPx, paint); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN)); canvas.drawBitmap(bitmap, rect, rect, paint); return output; } /** * 获得带倒影的图片 * * @param bitmap * @return */ public static Bitmap createReflectionImageWithOrigin(Bitmap bitmap) { final int reflectionGap = 4; int w = bitmap.getWidth(); int h = bitmap.getHeight(); Matrix matrix = new Matrix(); matrix.preScale(1, -1); Bitmap reflectionImage = Bitmap.createBitmap(bitmap, 0, h / 2, w, h / 2, matrix, false); Bitmap bitmapWithReflection = Bitmap.createBitmap(w, (h + h / 2), Config.ARGB_8888); Canvas canvas = new Canvas(bitmapWithReflection); canvas.drawBitmap(bitmap, 0, 0, null); Paint deafalutPaint = new Paint(); canvas.drawRect(0, h, w, h + reflectionGap, deafalutPaint); canvas.drawBitmap(reflectionImage, 0, h + reflectionGap, null); Paint paint = new Paint(); LinearGradient shader = new LinearGradient(0, bitmap.getHeight(), 0, bitmapWithReflection.getHeight() + reflectionGap, 0x70ffffff, 0x00ffffff, TileMode.CLAMP); paint.setShader(shader); // Set the Transfer mode to be porter duff and destination in paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN)); // Draw a rectangle using the paint with our linear gradient canvas.drawRect(0, h, w, bitmapWithReflection.getHeight() + reflectionGap, paint); return bitmapWithReflection; } /** * 将图片first和second由左向右合并 * * @param first * @param second * @return */ public static Bitmap mergeBitmapLtr(Bitmap first, Bitmap second) { int mergeWidth = first.getWidth() + second.getWidth(); int mergeHeight = first.getHeight() >= second.getHeight() ? first .getHeight() : second.getHeight(); // 创建空得背景bitmap // 生成画布图像 Bitmap resultBitmap = Bitmap.createBitmap(mergeWidth, mergeHeight, first.getConfig()); Canvas canvas = new Canvas(resultBitmap);// 使用空白图片生成canvas // 将bmp1绘制在画布上 Rect srcRect = new Rect(0, 0, first.getWidth(), first.getHeight());// 截取bmp1中的矩形区域 Rect dstRect = new Rect(0, 0, first.getWidth(), first.getHeight());// bmp1在目标画布中的位置 canvas.drawBitmap(first, srcRect, dstRect, null); // 将bmp2绘制在画布上 srcRect = new Rect(0, 0, second.getWidth(), second.getHeight());// 截取bmp1中的矩形区域 dstRect = new Rect(first.getWidth(), 0, mergeWidth, second.getHeight());// bmp2在目标画布中的位置 canvas.drawBitmap(second, srcRect, dstRect, null); // 将bmp1,bmp2合并显示 return resultBitmap; } /** * 将图片first和second从上到下合并 * * @param first * @param second * @return */ public static Bitmap mergeBitmapTtb(Bitmap first, Bitmap second) { int mergeWidth = first.getWidth() >= second.getWidth() ? first .getWidth() : second.getWidth(); int mergeHeight = first.getHeight() + second.getHeight(); // 创建空得背景bitmap // 生成画布图像 Bitmap resultBitmap = Bitmap.createBitmap(mergeWidth, mergeHeight, first.getConfig()); Canvas canvas = new Canvas(resultBitmap);// 使用空白图片生成canvas // 将bmp1绘制在画布上 Rect srcRect = new Rect(0, 0, first.getWidth(), first.getHeight());// 截取bmp1中的矩形区域 Rect dstRect = new Rect(0, 0, first.getWidth(), first.getHeight());// bmp1在目标画布中的位置 canvas.drawBitmap(first, srcRect, dstRect, null); // 将bmp2绘制在画布上 srcRect = new Rect(0, 0, second.getWidth(), second.getHeight());// 截取bmp1中的矩形区域 dstRect = new Rect(0, first.getHeight(), second.getWidth(), mergeHeight);// bmp2在目标画布中的位置 canvas.drawBitmap(second, srcRect, dstRect, null); // 将bmp1,bmp2合并显示 return resultBitmap; } /** * 创建纯白色位图 * * @param width * @param height * @param config * @return */ public static Bitmap creatWhiteBitmap(int width, int height, Config config) { Bitmap bitmap = Bitmap.createBitmap(width, height, config); int[] pix = new int[width * height]; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { int index = y * width + x; int r = ((pix[index] >> 16) & 0xff) | 0xff; int g = ((pix[index] >> 8) & 0xff) | 0xff; int b = (pix[index] & 0xff) | 0xff; pix[index] = 0xff000000 | (r << 16) | (g << 8) | b; } } bitmap.setPixels(pix, 0, width, 0, 0, width, height); return bitmap; } /** * 创建纯黑色位图 * * @param width * @param height * @param config * @return */ public static Bitmap createBlackBitmap(int width, int height, Config config) { Bitmap bitmap = Bitmap.createBitmap(width, height, config); int[] pix = new int[width * height]; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { int index = y * width + x; pix[index] = 0xff000000; } } bitmap.setPixels(pix, 0, width, 0, 0, width, height); return bitmap; } /** * 保存图片到应用的外部缓存 * * @param context * @param bitmap * @param bitName * @param format */ public static void saveBitmap(Context context, Bitmap bitmap, String bitName, CompressFormat format) { // 获取图片存储路径 File cacheDir = FileUtils.getDiskCacheDir(context, "picture"); if (!cacheDir.exists()) { cacheDir.mkdirs(); } switch (format) { case JPEG: bitName += ".jpg"; break; case PNG: bitName += ".png"; break; case WEBP: bitName += ".webp"; break; default: break; } File file = new File(cacheDir, bitName); if (file.exists()) { file.delete(); } FileOutputStream out = null; try { out = new FileOutputStream(file); if (bitmap.compress(format, 100, out)) { out.flush(); out.close(); } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } private static long sRSElapsedTime = 0; public static long getRSElapsedTimeBlur() { return sRSElapsedTime; } public static void clearRSElapsedTimeBlur() { sRSElapsedTime = 0; } @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) public static Bitmap RSBlurBitmap(Context context, Bitmap bitmap) { long startMs = System.currentTimeMillis(); // Let's create an empty bitmap with the same size of the bitmap we want // to blur Bitmap outBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Config.ARGB_8888); // Instantiate a new Renderscript RenderScript rs = RenderScript.create(context); // Create an Intrinsic Blur Script using the Renderscript ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); // Create the Allocations (in/out) with the Renderscript and the in/out // bitmaps Allocation allIn = Allocation.createFromBitmap(rs, bitmap); Allocation allOut = Allocation.createFromBitmap(rs, outBitmap); // Set the radius of the blur blurScript.setRadius(25.f); // Perform the Renderscript blurScript.setInput(allIn); blurScript.forEach(allOut); // Copy the final bitmap created by the out Allocation to the outBitmap allOut.copyTo(outBitmap); // recycle the original bitmap bitmap.recycle(); // After finishing everything, we destroy the Renderscript. rs.destroy(); sRSElapsedTime = System.currentTimeMillis() - startMs; return outBitmap; } //相对于上面的blurBitmap方法,可以去掉对Renderscript的依赖(还有最低API版本的限制)。 //但是可恶的是,理模糊操作竟然花费了147ms!这还不是最慢的SW模糊算法,我都不敢用高斯模糊了 private static long sFastElapsedTime = 0; public static long getFastElapsedTimeBlur() { return sFastElapsedTime; } public static void clearFastElapsedTimeBlur() { sFastElapsedTime = 0; } public static Bitmap fastBlur(Bitmap bitmap) { long startMs = System.currentTimeMillis(); Bitmap overlay = Bitmap.createBitmap((int) (bitmap.getWidth()), (int) (bitmap.getHeight()), Config.ARGB_8888); Canvas canvas = new Canvas(overlay); canvas.drawBitmap(bitmap, 0, 0, null); overlay = fastBlur(overlay, 25, true); sFastElapsedTime = System.currentTimeMillis() - startMs; return overlay; } private static Bitmap fastBlur(Bitmap sentBitmap, int radius, boolean canReuseInBitmap) { // Stack Blur v1.0 from // http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html // // Java Author: Mario Klingemann <mario at quasimondo.com> // http://incubator.quasimondo.com // created Feburary 29, 2004 // Android port : Yahel Bouaziz <yahel at kayenko.com> // http://www.kayenko.com // ported april 5th, 2012 // This is a compromise between Gaussian Blur and Box blur // It creates much better looking blurs than Box Blur, but is // 7x faster than my Gaussian Blur implementation. // // I called it Stack Blur because this describes best how this // filter works internally: it creates a kind of moving stack // of colors whilst scanning through the image. Thereby it // just has to add one new block of color to the right side // of the stack and remove the leftmost color. The remaining // colors on the topmost layer of the stack are either added on // or reduced by one, depending on if they are on the right or // on the left side of the stack. // // If you are using this algorithm in your code please add // the following line: // // Stack Blur Algorithm by Mario Klingemann <[email protected]> Bitmap bitmap; if (canReuseInBitmap) { bitmap = sentBitmap; } else { bitmap = sentBitmap.copy(sentBitmap.getConfig(), true); } if (radius < 1) { return (null); } int w = bitmap.getWidth(); int h = bitmap.getHeight(); int[] pix = new int[w * h]; bitmap.getPixels(pix, 0, w, 0, 0, w, h); int wm = w - 1; int hm = h - 1; int wh = w * h; int div = radius + radius + 1; int r[] = new int[wh]; int g[] = new int[wh]; int b[] = new int[wh]; int rsum, gsum, bsum, x, y, i, p, yp, yi, yw; int vmin[] = new int[Math.max(w, h)]; int divsum = (div + 1) >> 1; divsum *= divsum; int dv[] = new int[256 * divsum]; for (i = 0; i < 256 * divsum; i++) { dv[i] = (i / divsum); } yw = yi = 0; int[][] stack = new int[div][3]; int stackpointer; int stackstart; int[] sir; int rbs; int r1 = radius + 1; int routsum, goutsum, boutsum; int rinsum, ginsum, binsum; for (y = 0; y < h; y++) { rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0; for (i = -radius; i <= radius; i++) { p = pix[yi + Math.min(wm, Math.max(i, 0))]; sir = stack[i + radius]; sir[0] = (p & 0xff0000) >> 16; sir[1] = (p & 0x00ff00) >> 8; sir[2] = (p & 0x0000ff); rbs = r1 - Math.abs(i); rsum += sir[0] * rbs; gsum += sir[1] * rbs; bsum += sir[2] * rbs; if (i > 0) { rinsum += sir[0]; ginsum += sir[1]; binsum += sir[2]; } else { routsum += sir[0]; goutsum += sir[1]; boutsum += sir[2]; } } stackpointer = radius; for (x = 0; x < w; x++) { r[yi] = dv[rsum]; g[yi] = dv[gsum]; b[yi] = dv[bsum]; rsum -= routsum; gsum -= goutsum; bsum -= boutsum; stackstart = stackpointer - radius + div; sir = stack[stackstart % div]; routsum -= sir[0]; goutsum -= sir[1]; boutsum -= sir[2]; if (y == 0) { vmin[x] = Math.min(x + radius + 1, wm); } p = pix[yw + vmin[x]]; sir[0] = (p & 0xff0000) >> 16; sir[1] = (p & 0x00ff00) >> 8; sir[2] = (p & 0x0000ff); rinsum += sir[0]; ginsum += sir[1]; binsum += sir[2]; rsum += rinsum; gsum += ginsum; bsum += binsum; stackpointer = (stackpointer + 1) % div; sir = stack[(stackpointer) % div]; routsum += sir[0]; goutsum += sir[1]; boutsum += sir[2]; rinsum -= sir[0]; ginsum -= sir[1]; binsum -= sir[2]; yi++; } yw += w; } for (x = 0; x < w; x++) { rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0; yp = -radius * w; for (i = -radius; i <= radius; i++) { yi = Math.max(0, yp) + x; sir = stack[i + radius]; sir[0] = r[yi]; sir[1] = g[yi]; sir[2] = b[yi]; rbs = r1 - Math.abs(i); rsum += r[yi] * rbs; gsum += g[yi] * rbs; bsum += b[yi] * rbs; if (i > 0) { rinsum += sir[0]; ginsum += sir[1]; binsum += sir[2]; } else { routsum += sir[0]; goutsum += sir[1]; boutsum += sir[2]; } if (i < hm) { yp += w; } } yi = x; stackpointer = radius; for (y = 0; y < h; y++) { // Preserve alpha channel: ( 0xff000000 & pix[yi] ) pix[yi] = (0xff000000 & pix[yi]) | (dv[rsum] << 16) | (dv[gsum] << 8) | dv[bsum]; rsum -= routsum; gsum -= goutsum; bsum -= boutsum; stackstart = stackpointer - radius + div; sir = stack[stackstart % div]; routsum -= sir[0]; goutsum -= sir[1]; boutsum -= sir[2]; if (x == 0) { vmin[y] = Math.min(y + r1, hm) * w; } p = x + vmin[y]; sir[0] = r[p]; sir[1] = g[p]; sir[2] = b[p]; rinsum += sir[0]; ginsum += sir[1]; binsum += sir[2]; rsum += rinsum; gsum += ginsum; bsum += binsum; stackpointer = (stackpointer + 1) % div; sir = stack[stackpointer]; routsum += sir[0]; goutsum += sir[1]; boutsum += sir[2]; rinsum -= sir[0]; ginsum -= sir[1]; binsum -= sir[2]; yi += w; } } bitmap.setPixels(pix, 0, w, 0, 0, w, h); return (bitmap); } /** * 获取裁剪后的圆形图片 * @param radius半径 */ public static Bitmap getCircleBitmap(Resources res, Bitmap bmp, int radius) { Bitmap squareBitmap; Bitmap scaledSquareBmp; int diameter = radius * 2; // 为了防止宽高不相等,造成圆形图片变形,因此截取长方形中处于中间位置最大的正方形图片 int bmpWidth = bmp.getWidth(); int bmpHeight = bmp.getHeight(); if (bmpHeight > bmpWidth) {// 高大于宽 squareBitmap = Bitmap.createBitmap(bmp, 0, (bmpHeight - bmpWidth) / 2, bmpWidth, bmpWidth); } else if (bmpHeight < bmpWidth) {// 宽大于高 squareBitmap = Bitmap.createBitmap(bmp, (bmpWidth - bmpHeight) / 2, 0, bmpHeight,bmpHeight); } else { squareBitmap = bmp; } if (squareBitmap.getWidth() != diameter) { scaledSquareBmp = Bitmap.createScaledBitmap(squareBitmap, diameter,diameter, true); } else { scaledSquareBmp = squareBitmap; } int mScaledSquareBmpLength = scaledSquareBmp.getWidth(); int mBorderThickness = mScaledSquareBmpLength / 18;//圆环宽度 Bitmap output = Bitmap.createBitmap(mScaledSquareBmpLength + mBorderThickness*2, mScaledSquareBmpLength + mBorderThickness*2, Config.ARGB_8888); Canvas canvas = new Canvas(output); Paint paint = new Paint(); Rect srcRect = new Rect(0, 0, mScaledSquareBmpLength,mScaledSquareBmpLength); Rect dstRect = new Rect(mBorderThickness, mBorderThickness, mScaledSquareBmpLength + mBorderThickness,mScaledSquareBmpLength + mBorderThickness); paint.setAntiAlias(true); paint.setFilterBitmap(true); paint.setDither(true); canvas.drawARGB(0, 0, 0, 0); canvas.drawCircle(mScaledSquareBmpLength / 2 + mBorderThickness, mScaledSquareBmpLength / 2 + mBorderThickness, mScaledSquareBmpLength / 2, paint); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN)); canvas.drawBitmap(scaledSquareBmp, srcRect, dstRect, paint); //overlapBitmap(res, canvas, R.drawable.ic_people_border, mScaledSquareBmpLength + mBorderThickness*2, mScaledSquareBmpLength + mBorderThickness*2); drawCircleBorder(canvas, mScaledSquareBmpLength / 2 + mBorderThickness, mBorderThickness, 0xaa0000ff); bmp = null; squareBitmap = null; scaledSquareBmp = null; return output; } /** * 画边缘圆环 */ public static void drawCircleBorder(Canvas canvas, int radius,int borderThickness, int color) { Paint paint = new Paint(); paint.setAntiAlias(true); //去锯齿 paint.setFilterBitmap(true); //对位图进行滤波处理 paint.setDither(true); ////防抖动 paint.setColor(color); /* 设置paint的 style 为STROKE:空心 */ paint.setStyle(Paint.Style.STROKE); /* 设置paint的外框宽度 */ paint.setStrokeWidth(borderThickness); canvas.drawCircle(radius, radius, radius - borderThickness / 2, paint); } /** * 在画布上重叠画上一张图片 * * @param canvas * @param top * @param x * @param y * @return */ public static void overlapBitmap(Resources res, Canvas canvas, int resid, int width, int height) { Bitmap scaledBmp; Bitmap top = BitmapFactory.decodeResource(res, resid); if ((top.getWidth() != width) || (top.getHeight() != height)) { scaledBmp = Bitmap.createScaledBitmap(top, width, height, true); } else { scaledBmp = top; } canvas.drawBitmap(scaledBmp, 0, 0, null); // x、y为top写入点的x、y坐标 } /** * 将图片first和second重叠 * * @param first * @param second * @param x * @param y * @return */ public static Bitmap overlapBitmap(Bitmap first, Bitmap second, float x, float y) { Bitmap bitmap3 = Bitmap.createBitmap(first.getWidth(), first.getHeight(), first.getConfig()); Canvas canvas = new Canvas(bitmap3); canvas.drawBitmap(first, new Matrix(), null); canvas.drawBitmap(second, x, y, null); // x、y为bitmap2写入点的x、y坐标 return bitmap3; } }
a10299b8abc25a5fd09e0c8e1e015828bc688fe6
98726e588ee57deb371154be66cffc956f54ca53
/service/service_cmn/src/main/java/com/syt/yygh/cmn/config/CmnConfig.java
9d5f045c44e9489901a237e3a5d5b9e5f6543dde
[]
no_license
wangd1/yygh_parent
08ef29b12fb87095ee676ae136eb32b2235f7287
4005a7e86a5dbb0001012d9d538fd27ff83db7c2
refs/heads/master
2023-04-05T10:41:10.211529
2021-04-17T08:06:36
2021-04-17T08:06:36
346,733,426
1
0
null
null
null
null
UTF-8
Java
false
false
518
java
package com.syt.yygh.cmn.config; import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * @Author: wangdi * @Date: 2021/3/11 */ @Configuration @MapperScan("com.syt.yygh.cmn.mapper") public class CmnConfig { @Bean public PaginationInterceptor paginationInterceptor(){ return new PaginationInterceptor(); } }
589c059b90c644bddde9362f30644a2301ff5cdf
47127cddd954336a49c881d7abf591c53f18e12f
/src/com/_520/spring/createBean/factoryBean/Cat4.java
608d472419e39db862e2f43222385aef6175bf34
[]
no_license
Werdio66/spring-hello1
2f9bf65cad1fb9fedf89d53774c6898947dbe43e
538b21114f908a5a6dfa9c3dbb1db96f5c10050a
refs/heads/master
2022-12-22T19:36:13.248104
2019-10-21T09:39:22
2019-10-21T09:39:22
216,531,514
0
0
null
2022-12-16T04:40:20
2019-10-21T09:39:13
Java
UTF-8
Java
false
false
75
java
package com._520.spring.createBean.factoryBean; public class Cat4 { }
fe1c14436248bd1f2b7dda9b480c706197259ae3
53f03930656a675ad689e5538f14b2bbba8c03b7
/src/main/java/com/ycit/manage/security/AppUserFilter.java
c56b4df93d6376940d35b6a79689d985fc013487
[]
no_license
ycit/manage
09b9b384afd007c679c8fa789d44a6da106d567a
063fc75d74e00fc3c7d637449f6a36382222d891
refs/heads/master
2020-03-14T02:11:33.247165
2018-05-18T09:41:56
2018-05-18T09:41:56
131,394,300
0
0
null
null
null
null
UTF-8
Java
false
false
736
java
package com.ycit.manage.security; import org.apache.shiro.web.filter.authc.UserFilter; import org.apache.shiro.web.util.WebUtils; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletResponse; /** * 应用 用户 未认证处理 * * @author xlch * @Date 2018-03-21 12:36 */ public class AppUserFilter extends UserFilter { private static final String ERROR_JSON = "{\"code\":401,\"url\":\"%s\"}"; @Override protected boolean onAccessDenied(ServletRequest req, ServletResponse response) throws Exception { HttpServletResponse httpResponse = WebUtils.toHttp(response); httpResponse.sendRedirect("/back/login"); return false; } }
7f0572396e4626278cb5ffa358629052a55548b1
49359f499b7ed1a82a2c8ffca5e4531ff99b4448
/app/src/main/java/pro/games_box/weatherviewer/api/ApiError.java
1de9e70fe3eb5414097a2a4fbf637614e84cbc7a
[]
no_license
Jokaerro/WeatherViewer
a590653c7564396933fa0c1543a0e5efea2b0b1b
cc80eb029d9cde98bbf6aecaef9c525472b819d5
refs/heads/master
2021-01-19T06:22:11.983633
2017-04-20T12:02:06
2017-04-20T12:02:06
87,457,145
0
0
null
2017-04-13T20:39:15
2017-04-06T17:35:16
Java
UTF-8
Java
false
false
407
java
package pro.games_box.weatherviewer.api; import com.google.gson.annotations.Expose; /** * Created by TESLA on 06.04.2017. */ public class ApiError { @Expose private String message; @Expose private String description; public ApiError() { } public String getMessage() { return message; } public String getDescription(){ return description; } }
ea9c8523674aeadb457a2855a7619405f1ad00ad
f4284127785246fb45e07a34dcf27b81659391a2
/src/mesSources/interfaceGraphique/Marqueur.java
5c63260b18305ffa1da7b8be92daacfd0a689bfc
[]
no_license
tsnobip/ProjetBanc
0c2937d0757e7f16381f97110b05a8d3a899b201
146639fe42476bd0a26a0a2fd5fc3a9a8570e5fc
refs/heads/master
2021-01-19T07:42:42.792753
2012-11-04T15:27:31
2012-11-04T15:27:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,118
java
package mesSources.interfaceGraphique; import java.awt.Component; import java.awt.Graphics; import java.awt.Image; //import astro import javax.swing.ImageIcon; import javax.swing.JDesktopPane; import javax.swing.JInternalFrame; import com.bbn.openmap.app.Main; import mesSources.model.Circle; import mesSources.model.Point; public class Marqueur extends ImageIcon{ private final static String ICON_NORMAL_PATH="green"; private final static String ICON_CLICKED_PATH="green-dot"; private final String ICON_SHADOW_PATH="shadow"; private boolean SHADOWED=false; //X-Y Coordinates visually pointed by he marker private int X; private int Y; // X-Y Coordinates of the upper-left corner of the marker private int X_CORNER; private int Y_CORNER; // Lat-Lon Coordinates visually pointed by the marker private int X_GEO; private int Y_GEO; private PopUp_Frame pop; public enum state{NORMAL,CLICKED} public Marqueur(int X_GEO,int Y_GEO){ super(MainLoader.class.getResource("/"+ICON_NORMAL_PATH+".png")); // new Image(MainLoader.class.getResource("/"+ICON_NORMAL_PATH+".png") this.setImage(new ImageIcon(MainLoader.class.getResource("/"+ICON_NORMAL_PATH+".png")).getImage()); this.X_GEO=X_GEO; this.Y_GEO=Y_GEO; // La on met ta fonction de calcul this.X=this.X_GEO; this.Y=this.Y_GEO; X_CORNER= X-(this.getIconWidth()/2); Y_CORNER=Y-this.getIconHeight(); } public void setPopUp(boolean display, JDesktopPane desk){ if (display) { pop = new PopUp_Frame(X,Y); pop.pack(); pop.setFrameIcon(null); // JInternalFrame // pop.putClientProperty("JInternalFrame.isPalette", true); desk.add(pop,JDesktopPane.PALETTE_LAYER); pop.setVisible(true); } else { pop.setVisible(false); } } public boolean isSHADOWED() { return SHADOWED; } public void setSHADOWED(boolean sHADOWED) { SHADOWED = sHADOWED; } public void setState(state state){ switch (state){ case CLICKED:this.setImage(new ImageIcon(MainLoader.class.getResource("/"+ICON_CLICKED_PATH+".png")).getImage()); SHADOWED=true; break; case NORMAL:this.setImage(new ImageIcon(MainLoader.class.getResource("/"+ICON_NORMAL_PATH+".png")).getImage()); SHADOWED=false; break; } } public void paintIcon(Component c, Graphics g) { if(SHADOWED){ new ImageIcon(MainLoader.class.getResource("/"+ICON_SHADOW_PATH+".png")).paintIcon(c, g, X_CORNER, Y_CORNER); } paintIcon(c, g, X_CORNER, Y_CORNER); } public boolean isClickIn(int x_click,int y_click){ Circle cir=new Circle(new Point(X, Y-(23*(this.getIconHeight()/32))), (this.getIconWidth()/2)-6); return cir.contains(new Point(x_click, y_click)); } public int getY() { return Y; } public int getX() { return X; } public void setY(int y) { Y = y; } public int getX_CORNER() { X_CORNER= X-(this.getIconWidth()/2); return X_CORNER; } public int getY_CORNER() { Y_CORNER=Y-this.getIconHeight(); return Y_CORNER; } public void setX(int x) { X = x; } }
[ "Ulysse PRYGIEL@pc-ulybu" ]
Ulysse PRYGIEL@pc-ulybu
508c687784fa4f92e84194849c9e3683fd9f2a61
14b389df8efcde6eb5c043bd9afec6c9772d03dd
/src/day21/test10/MyAnno2.java
de56471be19a17d5fcd84faebd57772f9b353131
[]
no_license
if123456/work
3ea03fd5722e2ed125c31f875aa0023848addbec
26258d5563135cee402bef2fd68f98183ac2f498
refs/heads/master
2020-12-11T08:24:24.900033
2020-01-18T09:28:18
2020-01-18T09:28:18
233,799,873
0
0
null
null
null
null
UTF-8
Java
false
false
312
java
package day21.test10; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface MyAnno2 { String type() default "java"; }
[ "l" ]
l
4ec79f13fc84cdc7541368f0ffa8c12ff1d59453
c55a8144442ce1ed9f7929be7d6293ebf276f51e
/Game3/src/sui/event/MouseAdapter.java
4e3352519a4de87c39b74857e07353d5bb3cd6f5
[]
no_license
EricEidel/Game3
fcb13c46bdfe778ddfd397ad7251a008f1190be4
399175d86ffd4c8b8d17ed6f73087c47d9dbefd8
refs/heads/master
2021-01-10T19:39:04.121899
2013-07-27T05:15:25
2013-07-27T05:15:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,556
java
package sui.event; /** * A convenience class for MouseListener which receives * mouse events. Implementation of these methods are optional. * * * @author davedes * @since b.0.2 */ public class MouseAdapter implements MouseListener { /** * Notification that the mouse has moved. * * @param e the event associated with this listener */ public void mouseMoved(MouseEvent e) {} /** * Notification that the mouse has been dragged. * Dragging the mouse will not call a mouseMoved * event, and will instead call mouseDragged. * * @param e the event associated with this listener */ public void mouseDragged(MouseEvent e) {} /** * Notification that the mouse has been pressed. * * @param e the event associated with this listener */ public void mousePressed(MouseEvent e) {} /** * Notification that the mouse has been released. * * @param e the event associated with this listener */ public void mouseReleased(MouseEvent e) {} /** * Notification that the mouse has entered the bounds * of the component. * * @param e the event associated with this listener */ public void mouseEntered(MouseEvent e) {} /** * Notification that the mouse has exited the bounds * of the component. * * @param e the event associated with this listener */ public void mouseExited(MouseEvent e) {} }
[ "Eric Big Pc" ]
Eric Big Pc
f2754aa3a913d818490dbcc16c2b30083fd82b0a
a3f980d6fdbf77522879cf367362781c2c22a723
/app/src/main/java/com/example/tugasakhir/Simpleton.java
0364615cb82477b3b9300a69f865adacbed3a66c
[]
no_license
metatoda42/Quotes_Kelompok-9
73581e909abaf401ff6d39a2bf94fb14d2d9f4e4
23b1dca71461948564ba6eff14f17c6e150cae9c
refs/heads/master
2023-06-02T15:58:32.750266
2021-06-23T15:47:53
2021-06-23T15:47:53
376,688,379
0
0
null
null
null
null
UTF-8
Java
false
false
1,191
java
package com.example.tugasakhir; import android.content.Context; import android.graphics.Bitmap; import android.util.LruCache; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.toolbox.ImageLoader; import com.android.volley.toolbox.Volley; public class Simpleton { private static Simpleton instance; private RequestQueue requestQueue; private static Context ctx; private Simpleton(Context context) { ctx = context; requestQueue = getRequestQueue(); } public static synchronized Simpleton getInstance(Context context) { if (instance == null) { instance = new Simpleton(context); } return instance; } public RequestQueue getRequestQueue() { if (requestQueue == null) { // getApplicationContext() is key, it keeps you from leaking the // Activity or BroadcastReceiver if someone passes one in. requestQueue = Volley.newRequestQueue(ctx.getApplicationContext()); } return requestQueue; } public <T> void addToRequestQueue(Request<T> req) { getRequestQueue().add(req); } }
0af94cac68072310e1b567dff39dd16cf806983f
af97d7f325abe423dccbf7bf0f491dce5ad67cd9
/PscmWeb/src/main/java/com/banry/pscm/web/mvc/pscm/labour/LaborInOutController.java
8da296ec47dc70e15dedd7baae47ebe30fb0643a
[]
no_license
csycxc/Pscm
016ea02b4ceffd116a0dd6be07525ee8df617632
e2045acd8d321f50e5d8a90856c0d990dad27bda
refs/heads/master
2020-04-09T22:54:38.348631
2018-12-06T08:20:28
2018-12-06T08:20:28
160,642,202
0
1
null
null
null
null
UTF-8
Java
false
false
10,127
java
package com.banry.pscm.web.mvc.pscm.labour; import com.alibaba.fastjson.JSON; import com.banry.pscm.service.contract.ContractService; import com.banry.pscm.service.labour.LaborInOut; import com.banry.pscm.service.labour.LaborInOutService; import com.banry.pscm.service.labour.LaborInOutWithBLOBs; import com.banry.pscm.service.util.ContractAtt; import com.banry.pscm.service.util.ContractAttService; import com.banry.pscm.service.util.UtilException; import com.banry.pscm.web.mvc.model.DataTableModel; import com.banry.pscm.web.utils.SystemConstants; import net.sf.json.JSONArray; import net.sf.json.JSONObject; 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.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import java.io.File; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; @Controller @RequestMapping("/laborInOut") public class LaborInOutController { @Autowired private LaborInOutService laborInOutService; @Autowired private ContractService contractService; @Autowired private SystemConstants constants; @Autowired private ContractAttService contractAttService; private static Logger log = LoggerFactory.getLogger(LaborInOutController.class); @RequestMapping(value = "/deleteLaborInOut", method = RequestMethod.POST) @ResponseBody public int deleteLaborInOutByInId(HttpServletRequest request, String inId,String inIdPhoto) { //附件不为空时先删除附件 if(inIdPhoto != null && !"".equals(inIdPhoto)){ deleteContractAtt(inIdPhoto); } return laborInOutService.deleteLaborInOutByInId(inId); } @RequestMapping(value = "/selectLaborInOutsByTrainCode", method = RequestMethod.GET) @ResponseBody public Object selectLaborsByTrainCode(String trainCode) { DataTableModel dt = new DataTableModel(); List<HashMap> list = laborInOutService.selectLaborInOutsByTrainCode(trainCode); dt.setData(list); return dt; } /** * 删除照片 表(contract_att)中的记录,和磁盘上的附件 * @param deleteFileName */ public void deleteContractAtt(String deleteFileName){ String ids[] = deleteFileName.split(","); for (String id : ids) { List<ContractAtt> list = null; try { list = contractAttService.findByFileInNames(id); if(list.size()>0){ String fileName = list.get(0).getFileInName()+list.get(0).getType();//待删除的文件名 String filePath = constants.getUploadDirReal() + constants.getAttach() + fileName; File file = new File(filePath); if(file.exists()){ file.delete(); }else{ log.info("硬盘上该文件不存在,删除失败!"); } } contractAttService.deleteContractAtt(id); } catch (UtilException e) { e.printStackTrace(); } } } @RequestMapping(value = "/getLaborInOutByDownContractCodeOrTrainCode", method = RequestMethod.GET) @ResponseBody public Object getLaborInOutByDownContractCodeOrTrainCode(String downContractCode,String trainCode) { log.info("downContractCode==============="+downContractCode); log.info("trainCode==============="+trainCode); DataTableModel dt = new DataTableModel(); List<HashMap> list = new ArrayList<HashMap>(); if(downContractCode == null || "".equals(downContractCode) || "undefined".equals(downContractCode)){ dt.setData(list); return dt; } if(trainCode == null || "".equals(trainCode) || "undefined".equals(trainCode)) list = laborInOutService.getLaborInOutByDownContractCode(downContractCode); else list = laborInOutService.getLaborInOutByTrainCode(trainCode); dt.setData(list); return dt; } @RequestMapping(value = "/getLaborInOutForWorkAttendance", method = RequestMethod.GET) @ResponseBody public Object getLaborInOutForWorkAttendance(String downContractCode,String trainCode,String inOrOut) { log.info("downContractCode==============="+downContractCode+"trainCode="+trainCode+"inOrOut="+inOrOut); DataTableModel dt = new DataTableModel(); List<HashMap> list = null; if(downContractCode == null || "".equals(downContractCode) || "undefined".equals(downContractCode)){ dt.setData(list); return dt; } if(trainCode == null || "".equals(trainCode) || "undefined".equals(trainCode)) list = laborInOutService.getLaborInOutByDownContractCodeAndInOrOut(downContractCode,inOrOut); else list = laborInOutService.getLaborInOutByTrainCodeAndInOrOut(trainCode,inOrOut); dt.setData(list); return dt; } @RequestMapping(value = "/saveLaborInOutOfReamrk", method = RequestMethod.POST) @ResponseBody public int saveLaborInOutOfReamrk(String inId,String reamrk) { LaborInOutWithBLOBs labor = new LaborInOutWithBLOBs(); labor.setInId(inId); labor.setReamrk(reamrk); return laborInOutService.updateLaborInOutSelective(labor); } @RequestMapping(value = "/saveLaborInOutLetIn", method = RequestMethod.POST) @ResponseBody public int saveLaborInOutLetIn(@RequestBody String jsonData) { log.info("jsonData======"+jsonData); //{'laborInOutList':[{"inId":"1542676429422","examScore":90,"inDate":""},{"inId":"1542763444642","examScore":55,"inDate":""}]} JSONObject jsonObj = JSONObject.fromObject(jsonData); JSONArray jsonArray = (JSONArray) jsonObj.get("laborInOutList"); List<LaborInOutWithBLOBs> list = new ArrayList<LaborInOutWithBLOBs>(); for (int i=0; i < jsonArray.size(); i++) { LaborInOutWithBLOBs laborInOutWithBLOBs = new LaborInOutWithBLOBs(); JSONObject jsonObject = jsonArray.getJSONObject(i); String inDate = jsonObject.getString("inDate"); laborInOutWithBLOBs.setInId(jsonObject.getString("inId")); Double examScore = null; if(jsonObject.getString("examScore") != null && !"".equals(jsonObject.getString("examScore"))){ examScore = Double.parseDouble(jsonObject.getString("examScore")); laborInOutWithBLOBs.setExamScore(examScore); } if((examScore != null && examScore>60)&&(inDate == null || "".equals(inDate))){ list.add(laborInOutWithBLOBs); } } if(list.size()>0){ return laborInOutService.letInLaborInOut(list); }else{ return 0; } } @RequestMapping(value = "/singleLaborInOutForOut", method = RequestMethod.POST) @ResponseBody public Object singleLaborInOutForOut(String inId) { log.info("inId======"+inId); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); LaborInOutWithBLOBs oldLaborInOut = laborInOutService.selectLaborInOutById(inId); if(oldLaborInOut != null && (oldLaborInOut.getOutDate() == null || "".equals(oldLaborInOut.getOutDate()))){ Date date = new Date(); LaborInOutWithBLOBs laborInOut = new LaborInOutWithBLOBs(); laborInOut.setInId(inId); laborInOut.setOutDate(date); laborInOutService.updateLaborInOutSelective(laborInOut); return JSON.parse("{outDate: '"+sdf.format(date)+"'}"); }else{ return JSON.parse("{outDate:''}"); } } @RequestMapping(value = "/singleLaborInOutForIn", method = RequestMethod.POST) @ResponseBody public Object singleLaborInOutForIn(String inId) { log.info("inId======"+inId); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); LaborInOutWithBLOBs oldLaborInOut = laborInOutService.selectLaborInOutById(inId); if( oldLaborInOut != null && (oldLaborInOut.getInDate() == null || "".equals(oldLaborInOut.getInDate())) && (oldLaborInOut.getExamScore() != null && !"".equals(oldLaborInOut.getExamScore())&&oldLaborInOut.getExamScore() > 60) ){ Date date = new Date(); LaborInOutWithBLOBs laborInOut = new LaborInOutWithBLOBs(); laborInOut.setInId(inId); laborInOut.setInDate(date); laborInOutService.updateLaborInOutSelective(laborInOut); return JSON.parse("{inDate: '"+sdf.format(date)+"'}"); }else{ return JSON.parse("{inDate:''}"); } } @RequestMapping(value = "/saveLaborInOutLetOut", method = RequestMethod.POST) @ResponseBody public int saveLaborInOutLetOut(@RequestBody String jsonData) { log.info("jsonData======"+jsonData); JSONObject jsonObj = JSONObject.fromObject(jsonData); JSONArray jsonArray = (JSONArray) jsonObj.get("laborInOutList"); List<LaborInOutWithBLOBs> list = new ArrayList<LaborInOutWithBLOBs>(); for (int i=0; i < jsonArray.size(); i++) { LaborInOutWithBLOBs laborInOutWithBLOBs = new LaborInOutWithBLOBs(); JSONObject jsonObject = jsonArray.getJSONObject(i); String outDate = jsonObject.getString("outDate"); laborInOutWithBLOBs.setInId(jsonObject.getString("inId")); if(outDate == null || "".equals(outDate)){ list.add(laborInOutWithBLOBs); } } if(list.size()>0){ return laborInOutService.letOutLaborInOut(list); }else{ return 0; } } }
6df6384414bd29f3f51ae8b6fbb58ecb3204a135
9100ac076370edee44b778d4d67c22cab4192088
/workspace/day02/src/com/igeek/array/ArrayTest2.java
ebc9010a2bd2d3896943c8f9269908d0744d346e
[]
no_license
easemeng/java
a515514b83da288cda18c74bb2a45c037d263579
dcc5a27b0b60a33ce1e5063b4eb244f2287dcbaa
refs/heads/master
2020-04-09T02:33:28.580362
2018-12-17T13:13:59
2018-12-17T13:13:59
159,945,154
2
0
null
null
null
null
GB18030
Java
false
false
318
java
package com.igeek.array; public class ArrayTest2 { @SuppressWarnings("unused") public static void main(String[] args) { //二维数组 。 动态的创建方式 。 int [][] arrays = new int[2][3]; //里面嵌套N个一维数组 。 {1,2,3} int [][] staticArrays = {{1,2,3},{1,2,3},{1,2,3}}; } }
86e2dc5aedb0c1d746988704cf74bd5e59ce8170
545544a7b0989f5ae399b2a8c043665b14ceda69
/src/Uri/_8_Mearch/PlayingCricket/CricketMain.java
d070b1fa2e5a6b593f1ff447291247b49f9f21b0
[]
no_license
uzzal-mondal/Uri_Problem_Solve
13367367eedd3cb8dfbc5dbe50f475a8566dfddb
3e89a894fb2cd62ee444e5880829e840cd4959ef
refs/heads/main
2023-07-25T08:14:37.265180
2021-06-19T14:18:13
2021-06-19T14:18:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,668
java
package Uri._8_Mearch.PlayingCricket; import java.util.Random; public class CricketMain { public static void main(String[] args) { System.out.println("Mirpur National Stadium"); Player p1 = new Player(); p1.setName("Mash"); p1.setTeam("Bangladesh"); Player p2 = new Player(); p2.setName("David Warner"); p2.setTeam("Australia"); //toss. Random toss = new Random(); int tossValue = toss.nextInt(2); // System.out.println(tossValue); if (tossValue == 1) { System.out.println(p1.getName() + " Won the Toss."); } else { System.out.println(p2.getName() + " Won the Toss."); } //make choose. Random choose = new Random(); int batOrBall = choose.nextInt(2); if (batOrBall == 1) { switch (tossValue) { case 0: System.out.println(p2.getTeam() + " decided to Bat first."); for (int i = 0; i < 6; i++) { p2.over = new int[6]; p2.over[i] = choose.nextInt(7); p2.score = p2.score + p2.over[i]; System.out.println(p2.getName() + " Total score is " + p2.score); } System.out.println(p1.getName() + "need " + " Total score is " + (p2.score + 1) + "runs to win"); for (int i = 0; i < 6; i++) { p1.over = new int[6]; p1.over[i] = choose.nextInt(7); p1.score = p1.score + p1.over[i]; System.out.println(p1.getName() + " Total score is " + p1.score); if (p1.score > p2.score) { System.out.println(p1.getName() + " won the match"); break; } } if (p1.score < p2.score) { System.out.println(p2.getName() + " won the match"); break; } break; default: System.out.println(p1.getTeam() + " decided to Bat first."); for (int i = 0; i < 6; i++) { p1.over = new int[6]; p1.over[i] = choose.nextInt(7); p1.score = p2.score + p2.over[i]; System.out.println(p1.getName() + " Total score is " + p1.score); } System.out.println(p1.getName() + "need " + " Total score is " + (p1.score + 1) + "runs to win"); for (int i = 0; i < 6; i++) { p2.over = new int[6]; p2.over[i] = choose.nextInt(7); p2.score = p1.score + p1.over[i]; System.out.println(p2.getName() + " Total score is " + p2.score); if (p2.score > p1.score) { System.out.println(p2.getName() + " won the match"); break; } } if (p1.score < p2.score) { System.out.println(p1.getName() + " won the match"); break; } break; } } else { switch (tossValue) { case 0: System.out.println(p2.getTeam() + " decided to Bowl first."); for (int i = 0; i < 6; i++) { p1.over = new int[6]; p1.over[i] = choose.nextInt(7); p1.score = p1.score + p1.over[i]; System.out.println(p2.getName() + " Total score is " + p1.score); } System.out.println(p1.getName() + " need " + " Total score is " + (p1.score + 1) + "runs to win"); break; default: System.out.println(p1.getTeam() + " decided to Bowl first."); for (int i = 0; i < 6; i++) { p2.over = new int[6]; p2.over[i] = choose.nextInt(7); p2.score = p2.score + p2.over[i]; System.out.println(p2.getName() + " Total score is " + p2.score); } System.out.println(p2.getName() + " need " + " Total score is " + (p2.score + 1) + "runs to win"); break; } } } }
61245e5d3ab26b2ba3ab68b47bc7e12fb3409f5e
d5d677f8cbdeda52539d3e87c2385dba7cb11d15
/src/meal/menu/topping/Guaccamole.java
588078c41c45bcdf9343a8a4c035fd8817682163
[]
no_license
anhkhoido/RestaurantSimulator
e058ef0bde27ff3990449d1a73eb88c91e2acf30
ebb87926997ceac92049b70395bd6864eba00591
refs/heads/master
2023-02-14T03:31:27.024382
2021-01-15T22:15:55
2021-01-15T22:15:55
329,380,886
0
0
null
2021-01-15T22:15:56
2021-01-13T17:21:30
Java
UTF-8
Java
false
false
521
java
package meal.menu.topping; import meal.Meal; public class Guaccamole extends ToppingDecorator { private Meal meal; public Guaccamole(Meal meal) { this.meal = meal; } public Meal getMeal() { return meal; } public void setMeal(Meal meal) { this.meal = meal; } @Override public String getDescription() { return meal.getDescription() + " Guaccamole,"; } @Override public double getPrice() { return meal.getPrice() + 0.50; } }
58dce08c5c09159bb1694f41fc0dd0af0ec9d0dc
135d248546775a2db1ad132178a92a759086e158
/src/main/java/com/yuen/fight/action/impl/MidRoundAction.java
c3e53cadf4424bf657d8f8c08661dbd37fd34d69
[]
no_license
orangeevan/fight
0def675a0ed68437d7d7ef0da253934071e20570
8c5a7110483f46d82699515b8b6eca42d38efd45
refs/heads/master
2023-04-21T10:02:29.828635
2021-05-06T08:33:41
2021-05-06T08:33:41
362,714,425
0
0
null
null
null
null
UTF-8
Java
false
false
1,250
java
package com.yuen.fight.action.impl; import com.yuen.fight.Creature; import com.yuen.fight.IBoard; import com.yuen.fight.action.IAction; import com.yuen.fight.handler.impl.MwnFightHandler; /** * @author: yuanchengyan * @description: * @since 10:29 2021/4/28 */ public class MidRoundAction extends IAction<MidRoundAction.Board, MwnFightHandler.BoardBox> { @Override public boolean isEnd() { if (box.getDefender().isDead()) { return true; } if (box.getDefender().isDead()) { return true; } return board.round >= 100; } @Override public void circleEnd() { super.circleEnd(); board.round++; } @Override public void end() { System.err.println("MidRoundAction- end -"+board.round); } @Override public void action() { Creature attacker = box.getAttacker(); Creature defender = box.getDefender(); //TODO 战斗逻辑 System.err.println("MidRoundAction- action -"+board.round); } public static class Board implements IBoard<MwnFightHandler.BoardBox> { int round = 0; @Override public void initBoard(MwnFightHandler.BoardBox box) { } } }
2ef52a2e7b078db87d7e0b1e448248e2a4c6925b
652916f3467722148e7bafdcfd965eaae1287308
/LocationLessonOne/app/src/main/java/com/github/filipebezerra/toys/playservices/mylocation/main/LessonOneMainActivity.java
f421fdfdf467104c690a8a33107e9239145e21ba
[ "Apache-2.0" ]
permissive
filipebezerra/GooglePlayServices-Toys
a0fd1a08b8d04b5bc2618d491171863c07263da6
27576ab7d87b8babd88be3e829edb4910a9b4cd8
refs/heads/master
2021-01-14T13:08:25.686218
2015-07-30T06:37:21
2015-07-30T06:37:21
38,254,172
0
0
null
null
null
null
UTF-8
Java
false
false
4,444
java
package com.github.filipebezerra.toys.playservices.mylocation.main; import android.location.Location; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.widget.TextView; import butterknife.Bind; import butterknife.ButterKnife; import butterknife.OnClick; import com.github.filipebezerra.toys.playservices.mylocation.R; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks; import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener; import com.google.android.gms.location.LocationServices; import java.text.SimpleDateFormat; import java.util.Calendar; import timber.log.Timber; public class LessonOneMainActivity extends AppCompatActivity implements ConnectionCallbacks, OnConnectionFailedListener { private static final String TAG = LessonOneMainActivity.class.getName(); private static final String KEY_LAST_LOCATION = TAG + ".KEY_LAST_LOCATION"; private static final String KEY_LAST_UPDATE_TIME = TAG + ".KEY_LAST_UPDATE_TIME"; private GoogleApiClient mGoogleApiClient; private Location mLastLocation; private Calendar mLastUpdate; @Bind(R.id.toolbar) protected Toolbar mToolbar; @Bind(R.id.latitude_value_text_view) protected TextView mLatitudeTextView; @Bind(R.id.longitude_value_text_view) protected TextView mLongitudeTextView; @Bind(R.id.last_update_text_view) protected TextView mLastUpdateTextView; @Override protected void onCreate(Bundle inState) { super.onCreate(inState); setContentView(R.layout.activity_lesson_one_main); ButterKnife.bind(this); Timber.tag(TAG); setSupportActionBar(mToolbar); buildGoogleApiClient(); if (inState != null && inState.containsKey(KEY_LAST_LOCATION)) { mLastLocation = inState.getParcelable(KEY_LAST_LOCATION); mLastUpdate.setTimeInMillis(inState.getLong(KEY_LAST_UPDATE_TIME)); updateUiLocationIfHasLocation(); } setTitle(getString(R.string.title_lesson_two_main_activity)); } private synchronized void buildGoogleApiClient() { mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); } @Override protected void onStart() { super.onStart(); mGoogleApiClient.connect(); } @Override protected void onStop() { if (mGoogleApiClient.isConnected()) { mGoogleApiClient.disconnect(); } super.onStop(); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mLastLocation != null) { outState.putParcelable(KEY_LAST_LOCATION, mLastLocation); outState.putLong(KEY_LAST_UPDATE_TIME, mLastUpdate.getTimeInMillis()); } } @Override public void onConnected(Bundle bundle) { Timber.d("Connected to Google Play Services"); retrieveLastLocation(); updateUiLocationIfHasLocation(); } @Override public void onConnectionSuspended(int cause) { Timber.d("Connection with Google Play Services suspended"); } @Override public void onConnectionFailed(ConnectionResult connectionResult) { Timber.d("Connection with Google Play Services failed"); } @OnClick(R.id.my_location_fab) public void requestMyLocation() { retrieveLastLocation(); updateUiLocationIfHasLocation(); } private void updateUiLocationIfHasLocation() { if (mLastLocation != null) { mLatitudeTextView.setText(String.valueOf(mLastLocation.getLatitude())); mLongitudeTextView.setText(String.valueOf(mLastLocation.getLongitude())); mLastUpdateTextView.setText(SimpleDateFormat.getDateTimeInstance() .format(mLastUpdate.getTime())); } } private void retrieveLastLocation() { mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient); if (mLastLocation != null) { mLastUpdate = Calendar.getInstance(); } } }
ddb39621ce5ee345834c44948a5e0e85914e59fe
348f57df60fd8ff6bb5c6dd9349814540ec35f9d
/buycar/Project code/CarsManager_MainUI/src/com/cars/manager/db/afinal/annotation/view/Select.java
cd4063b202d85ec9334922773bcce5a31f22649d
[]
no_license
biao0102/car
19a74319c2fe0402a019b9243a1795ca2944b4ec
bb6613777da524318f5d1f8e93bdd8a7d7821033
refs/heads/master
2021-01-17T05:53:52.900381
2015-07-17T06:45:52
2015-07-17T06:45:52
39,239,188
0
0
null
null
null
null
UTF-8
Java
false
false
1,047
java
/** * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.cars.manager.db.afinal.annotation.view; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface Select { public String selected(); public String noSelected() default ""; }
368bbb3af6e2a79824844547198becab490672c0
a0afd519f94b7dcfa95eff4b1af9d07d7593ba36
/backend/rent-flicks/src/test/java/com/rentflicks/service/TestMovieService.java
29543590a665632473207888ff1e49178674787f
[]
no_license
AniruddhaSAtre/rent-flicks
1c73aab3b05b173724c2538726847cf34e4cbb2c
d64fb784eb0f1f4d8a46ff95e5ab3b51f7540ed4
refs/heads/master
2021-01-13T00:52:42.957748
2015-11-28T17:17:43
2015-11-28T17:17:43
45,072,230
0
0
null
null
null
null
UTF-8
Java
false
false
3,466
java
package com.rentflicks.service; import static org.junit.Assert.assertTrue; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.rentflicks.RentFlicksApplication; import com.rentflicks.model.Movie; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = RentFlicksApplication.class) public class TestMovieService { @Autowired private MovieService movieService; // Add WebApplicationContext field here. // The setUp() method is omitted. public boolean compareMovies(Movie first, Movie second) { boolean movieCheck = first.getMovieId().equals(second.getMovieId()); boolean actorCheck = first.getActor().equals(second.getActor()); boolean titleCheck = first.getTitle().equals(second.getTitle()); boolean plotCheck = first.getPlot().equals(second.getPlot()); boolean yearCheck = first.getYear().equals(second.getYear()); boolean directorCheck = first.getDirector().equals(second.getDirector()); boolean criticRatingCheck = first.getCriticRating().equals(second.getCriticRating()); boolean imageCheck = first.getImage().equals(second.getImage()); if (movieCheck && actorCheck && titleCheck && plotCheck && yearCheck && directorCheck && criticRatingCheck && imageCheck) return true; return false; } @Test public void testGetMovies() throws Exception { boolean condition = false; List<Movie> movies = movieService.getMovies(); Movie m = movies.get(1); Movie resp = movieService.findOne(m.getMovieId()); if (compareMovies(m, resp)) condition = true; assertTrue(condition); } @Test public void testValidAddMovie() throws Exception { boolean condition = false; Movie movie = new Movie(); movie.setActor("test"); movie.setCriticRating((float) 3.5); movie.setDirector("test"); movie.setImage("test"); movie.setPlot("test"); movie.setTitle("test"); movie.setYear(2013); Movie response = movieService.addMovie(movie); List<Movie> movies = movieService.getMovies(); for (Movie m : movies) { if (m.getMovieId() == response.getMovieId()) condition = true; } assertTrue(condition); } @Test public void testInvalidAddMovie() throws Exception { boolean condition = false; Movie movie = new Movie(); try { movieService.addMovie(movie); } catch (Exception e) { condition = true; } assertTrue(condition); } @Test public void testValidFindOne() throws Exception { boolean condition = false; Movie r = movieService.findOne(2); if (r.getMovieId() == 2) condition = true; assertTrue(condition); } @Test public void testInvalidFindOne() throws Exception { boolean condition = false; if (movieService.findOne(0) == null) condition = true; assertTrue(condition); } @Test public void testValidGetMoviesByTitle() throws Exception { boolean condition = false; Movie movie = movieService.getMovies().get(0); if (compareMovies(movieService.getMoviesByTitle(movie.getTitle()).get(0), movie)) condition = true; assertTrue(condition); } @Test public void testInvalidGetMoviesByTitle() throws Exception { boolean condition = false; List<Movie> m = movieService.getMoviesByTitle("invalid title"); if (m.size() == 0) condition = true; assertTrue(condition); } }
062a0dddba15b33f04f3121fbc8fb7160d30a8c0
d7101799b482e51b9460962220db8826550a1488
/app/src/main/java/com/doransoft/np/homeservice/modules/main/fragments/serviceDetails/di/ServiceDetailModule.java
025b8241c8be81c285d19b5dd3331670db1255f1
[]
no_license
puja110/Home-service-application-mvp-apis
dca2221a8fc369e2beba3b6e61ba469aba4309c2
b83b63445475c55cf4138023942724101996e6d0
refs/heads/master
2020-04-09T12:12:04.520956
2018-12-06T07:56:34
2018-12-06T07:56:34
160,339,571
2
0
null
null
null
null
UTF-8
Java
false
false
1,679
java
package com.doransoft.np.homeservice.modules.main.fragments.serviceDetails.di; import android.support.v7.app.AppCompatActivity; import com.doransoft.np.homeservice.application.network.AppNetwork; import com.doransoft.np.homeservice.helper.PreferencesManager; import com.doransoft.np.homeservice.helper.SchedulerProvider; import com.doransoft.np.homeservice.modules.main.fragments.service.di.ServiceScope; import com.doransoft.np.homeservice.modules.main.fragments.serviceDetails.mvp.ServiceDetailInteractor; import com.doransoft.np.homeservice.modules.main.fragments.serviceDetails.mvp.ServiceDetailPresenter; import com.doransoft.np.homeservice.modules.main.fragments.serviceDetails.mvp.ServiceDetailView; import dagger.Module; import dagger.Provides; @Module public class ServiceDetailModule { public final AppCompatActivity activity; public ServiceDetailModule(AppCompatActivity activity) { this.activity = activity; } @ServiceDetailScope @Provides ServiceDetailView provideServiceDetailView() { return new ServiceDetailView(activity); } @Provides @ServiceDetailScope ServiceDetailPresenter provideServiceDetailPresenter(SchedulerProvider schedulerProvider, ServiceDetailView serviceDetailView, ServiceDetailInteractor serviceDetailInteractor){ return new ServiceDetailPresenter(activity,schedulerProvider,serviceDetailView,serviceDetailInteractor); } @Provides @ServiceDetailScope ServiceDetailInteractor provideServiceDetailInteractor(PreferencesManager preferencesManager, AppNetwork appNetwork){ return new ServiceDetailInteractor(preferencesManager,appNetwork); } }
bac964cfa73a82c19b61c19726173f75577f3dc3
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_05727e20282af37bdd3a776e169861ba7e05b6fd/ContactMessageList/3_05727e20282af37bdd3a776e169861ba7e05b6fd_ContactMessageList_s.java
60f7d7b2fdda7ef78fd9b1f7e78b66d398f7ffc3
[]
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
23,615
java
/* * ContactMessageList.java * * Created on 19.02.2005, 23:54 * Copyright (c) 2005-2008, Eugene Stahov (evgs), http://bombus-im.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * You can also redistribute and/or modify this program under the * terms of the Psi License, specified in the accompanied COPYING * file, as published by the Psi Project; either dated January 1st, * 2005, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package Client; //#ifndef WMUC import Conference.MucContact; //#endif //#ifdef HISTORY //# import History.HistoryAppend; //#ifdef LAST_MESSAGES //# import History.HistoryStorage; //#endif //#ifdef HISTORY_READER //# import History.HistoryReader; //#endif //#endif import Menu.RosterItemActions; import Messages.MessageList; import locale.SR; import ui.MainBar; import java.util.*; import Menu.MenuCommand; //#ifdef CLIPBOARD //# import util.ClipBoard; //#endif //#ifdef ARCHIVE import Archive.MessageArchive; //#endif import Menu.JuickThingsMenu; import Messages.MessageItem; import images.RosterIcons; import ui.VirtualList; //#ifdef FILE_TRANSFER import io.file.transfer.TransferAcceptFile; import io.file.transfer.TransferDispatcher; //#endif import ui.VirtualCanvas; import ui.VirtualElement; public class ContactMessageList extends MessageList { public Contact contact; MenuCommand cmdSubscribe=new MenuCommand(SR.MS_SUBSCRIBE, MenuCommand.SCREEN, 1, RosterIcons.ICON_ACCEPTAUTH); MenuCommand cmdDecline = new MenuCommand(SR.MS_DECLINE, MenuCommand.SCREEN, 2, RosterIcons.ICON_DECLINEAUTH); MenuCommand cmdAcceptFile = new MenuCommand("Accept", MenuCommand.SCREEN, 1, RosterIcons.ICON_ACCEPTFILE); MenuCommand cmdDeclineFile = new MenuCommand(SR.MS_DECLINE, MenuCommand.SCREEN, 2, RosterIcons.ICON_DECLINEFILE); MenuCommand cmdMessage=new MenuCommand(SR.MS_NEW_MESSAGE,MenuCommand.SCREEN,3, RosterIcons.ICON_NEW); MenuCommand cmdResume=new MenuCommand(SR.MS_RESUME,MenuCommand.SCREEN,1, RosterIcons.ICON_RESUME); MenuCommand cmdReply=new MenuCommand(SR.MS_REPLY,MenuCommand.SCREEN,4, RosterIcons.ICON_REPLY); MenuCommand cmdQuote=new MenuCommand(SR.MS_QUOTE,MenuCommand.SCREEN,5, RosterIcons.ICON_QUOTE); //#ifdef ARCHIVE MenuCommand cmdArch=new MenuCommand(SR.MS_ADD_ARCHIVE,MenuCommand.SCREEN,6, RosterIcons.ICON_CHATARCHIVE); //#endif MenuCommand cmdPurge=new MenuCommand(SR.MS_CLEAR_LIST, MenuCommand.SCREEN, 7, RosterIcons.ICON_CLEAR); MenuCommand cmdSelect=new MenuCommand(SR.MS_SELECT, MenuCommand.SCREEN, 8, RosterIcons.ICON_SELECT); MenuCommand cmdActions=new MenuCommand(SR.MS_CONTACT,MenuCommand.SCREEN,9, RosterIcons.ICON_CONTACT); MenuCommand cmdActive=new MenuCommand(SR.MS_ACTIVE_CONTACTS,MenuCommand.SCREEN,10, RosterIcons.ICON_ACTIVECONTACTS); //#if TEMPLATES //# MenuCommand cmdTemplate=new MenuCommand(SR.MS_SAVE_TEMPLATE,MenuCommand.SCREEN,11, RosterIcons.ICON_TEMPLATES); //#endif //#ifdef FILE_IO MenuCommand cmdSaveChat=new MenuCommand(SR.MS_SAVE_CHAT, MenuCommand.SCREEN, 12, RosterIcons.ICON_SAVECHAT); //#endif //#ifdef HISTORY //#ifdef HISTORY_READER //# MenuCommand cmdReadHistory=new MenuCommand(SR.MS_HISTORY, MenuCommand.SCREEN, 13, RosterIcons.ICON_HISTORY); //#endif //# // if (cf.lastMessages && !contact.isHistoryLoaded()) loadRecentList(); //#endif //#ifdef CLIPBOARD //# MenuCommand cmdSendBuffer=new MenuCommand(SR.MS_SEND_BUFFER, MenuCommand.SCREEN, 14, RosterIcons.ICON_SENDBUF); //#endif //#ifdef CLIPBOARD //# private ClipBoard clipboard=ClipBoard.getInstance(); //#endif private boolean on_end; private boolean composing=true; private boolean startSelection; /** Creates a new instance of MessageList * @param c */ public ContactMessageList(Contact c) { super(c.msgs); this.contact = c; sd.roster.activeContact=contact; MainBar mb=new MainBar(contact); setMainBarItem(mb); on_end = false; contact.setIncoming(0); //#ifdef FILE_TRANSFER contact.fileQuery=false; //#endif //#ifdef HISTORY //#ifdef LAST_MESSAGES //# if (cf.lastMessages && !contact.isHistoryLoaded()) loadRecentList(); //#endif //#endif if (contact.msgs.size()>0) moveCursorTo(firstUnread()); show(); } public final int firstUnread(){ int unreadIndex=0; for (Enumeration e=contact.msgs.elements(); e.hasMoreElements();) { Msg msg = ((MessageItem)e.nextElement()).msg; if (msg.unread) break; if (contact.mark == unreadIndex) break; unreadIndex++; } return unreadIndex; } public final void commandState() { menuName = contact.toString(); menuCommands.removeAllElements(); if (startSelection) addMenuCommand(cmdSelect); if (contact.msgSuspended!=null) addMenuCommand(cmdResume); Msg msg = null; if (!contact.msgs.isEmpty()) { msg = ((MessageItem) contact.msgs.elementAt(cursor)).msg; } if (msg != null) { if (msg.messageType == Msg.MESSAGE_TYPE_AUTH) { addMenuCommand(cmdSubscribe); addMenuCommand(cmdDecline); } } //#ifdef FILE_TRANSFER if (msg != null) { if (msg.messageType == Msg.MESSAGE_TYPE_FILE_REQ) { addMenuCommand(cmdAcceptFile); addMenuCommand(cmdDeclineFile); } } //#endif addMenuCommand(cmdMessage); if (msg != null) { //#ifndef WMUC if (contact instanceof MucContact && contact.origin==Contact.ORIGIN_GROUPCHAT) { addMenuCommand(cmdReply); } //#endif addMenuCommand(cmdQuote); addMenuCommand(cmdPurge); if (!startSelection) addMenuCommand(cmdSelect); } super.commandState(); if (contact.origin!=Contact.ORIGIN_GROUPCHAT) addMenuCommand(cmdActions); addMenuCommand(cmdActive); if (msg != null) { //#ifdef ARCHIVE //#ifdef PLUGINS //# if (sd.Archive) //#endif addMenuCommand(cmdArch); //#endif //#if TEMPLATES //#ifdef PLUGINS //# if (sd.Archive) //#endif //# addMenuCommand(cmdTemplate); //#endif } //#ifdef CLIPBOARD //# if (cf.useClipBoard && !clipboard.isEmpty()) { //# addMenuCommand(cmdSendBuffer); //# } //#endif //#ifdef HISTORY //# if (cf.saveHistory) //# if (cf.msgPath!=null) //# if (cf.msgPath.length() != 0) //# if (contact.msgs.size()>0) //# addMenuCommand(cmdSaveChat); //#ifdef HISTORY_READER //# if (cf.saveHistory) // && cf.lastMessages) //# addMenuCommand(cmdReadHistory); //#endif //#endif //#ifdef JUICK //#ifdef PLUGINS //# if(sd.Juick) { //#endif //# // http://code.google.com/p/bm2/issues/detail?id=94 //# if (msg != null && msg.isJuickMsg) //# Juick.commandState(this); //#ifdef PLUGINS //# } //#endif //#endif addMenuCommand(cmdBack); } public void forceScrolling() { //by voffk if (contact != null) if (contact.moveToLatest) { contact.moveToLatest = false; if (on_end) moveCursorEnd(); } } protected void beginPaint() { if (contact != null) sd.roster.activeContact = contact; markRead(cursor); forceScrolling(); on_end = (cursor==(getItemCount() - 1)); } public void markRead(int msgIndex) { if (msgIndex>getItemCount()) return; // if (msgIndex<contact.lastUnread) return; sd.roster.countNewMsgs(); //#ifdef LOGROTATE //# getRedraw(contact.redraw); //#endif } //#ifdef LOGROTATE //# //# private void getRedraw(boolean redraw) { //# if (!redraw) { //# return; //# } //# //# if (contact != null) //# contact.redraw = false; //# // messages.removeAllElements(); //# redraw(); //# } //#endif public int getItemCount(){ return (contact == null || contact.msgs == null)? 0 :contact.msgs.size(); } public VirtualElement getItemRef(int index) { MessageItem mi = (MessageItem) messages.elementAt(index); mi.setEven( (index & 1) == 0); if (mi.msg.unread) { if (contact != null) contact.resetNewMsgCnt(); } mi.msg.unread = false; return mi; } public Msg getMessage(int index) { if (index >= getItemCount()) { return null; } Msg msg = ((MessageItem) contact.msgs.elementAt(index)).msg; if (msg.unread) { contact.resetNewMsgCnt(); } msg.unread = false; return msg; } public void focusedItem(int index){ markRead(index); } public void menuAction(MenuCommand c, VirtualList d) { commandState(); super.menuAction(c,d); /** login-insensitive commands */ //#ifdef ARCHIVE if (c==cmdArch) { try { MessageArchive.store(getMessage(cursor),1); } catch (Exception e) {/*no messages*/} } //#endif //#if TEMPLATES //# if (c==cmdTemplate) { //# try { //# MessageArchive.store(getMessage(cursor),2); //# } catch (Exception e) {/*no messages*/} //# } //#endif if (c==cmdPurge) { //if (messages.isEmpty()) return; if (startSelection) { for (Enumeration select=contact.msgs.elements(); select.hasMoreElements(); ) { Msg mess = ((MessageItem) select.nextElement()).msg; if (mess.selected) { contact.msgs.removeElement(mess); } } startSelection = false; messages.removeAllElements(); } else { clearReadedMessageList(); } } if (c==cmdSelect) { startSelection=true; Msg mess=((MessageItem) contact.msgs.elementAt(cursor)).msg; mess.selected = !mess.selected; mess.oldHighlite = mess.highlite; mess.highlite = mess.selected; //redraw(); return; } //#ifdef HISTORY //#ifdef HISTORY_READER //# if (c==cmdReadHistory) { //# new HistoryReader(contact); //# return; //# } //#endif //#endif //#if (FILE_IO && HISTORY) //# if (c==cmdSaveChat) saveMessages(); //#endif //#ifdef FILE_TRANSFER if (c == cmdAcceptFile) new TransferAcceptFile(TransferDispatcher.getInstance().getTransferByJid(contact.jid.getJid())); if (c == cmdDeclineFile) TransferDispatcher.getInstance().getTransferByJid(contact.jid.getJid()).cancel(); //#endif /** login-critical section */ if (!sd.roster.isLoggedIn()) return; if (c==cmdMessage) { contact.msgSuspended = null; messageEditResume(); } if (c==cmdResume) messageEditResume(); if (c==cmdQuote) Quote(); if (c==cmdReply) Reply(); if (c==cmdActions) { new RosterItemActions(contact); } if (c==cmdActive) { savePosition(); new ActiveContacts(contact); } if (c == cmdSubscribe) { sd.roster.doSubscribe(contact); contact.addMessage(new Msg(Msg.MESSAGE_TYPE_SYSTEM, contact.bareJid, null, "Subscribed")); } if (c==cmdDecline) { sd.roster.sendPresence(contact.bareJid, "unsubscribed", null, false); contact.addMessage(new Msg(Msg.MESSAGE_TYPE_SYSTEM, contact.bareJid, null, "Unsubscribed")); } //#ifdef CLIPBOARD //# if (c==cmdSendBuffer) { //# String from=sd.account.toString(); //# String body=clipboard.getClipBoard(); //# //String subj=null; //# //# String id=String.valueOf((int) System.currentTimeMillis()); //# Msg msg=new Msg(Msg.MESSAGE_TYPE_OUT,from,null,body); //# msg.id=id; //# msg.itemCollapsed=true; //# //# try { //# if (body!=null && body.length()>0) { //# sd.roster.sendMessage(contact, id, body, null, null); //# if (contact.origin!=Contact.ORIGIN_GROUPCHAT) contact.addMessage(msg); //# } //# } catch (Exception e) { //# contact.addMessage(new Msg(Msg.MESSAGE_TYPE_OUT,from,null,"clipboard NOT sended")); //# } //# redraw(); //# } //#endif //#ifdef JUICK //# Juick.menuAction(c, this); //#endif } public void clearReadedMessageList() { smartPurge(); //messages.removeAllElements(); moveCursorHome(); redraw(); } public void eventLongOk() { super.eventLongOk(); Reply(); } public void messageEditResume() { if (!sd.roster.isLoggedIn()) return; Roster.me = new MessageEdit(this, contact, contact.msgSuspended); Roster.me.show(); contact.msgSuspended = null; } public void Reply() { if (!sd.roster.isLoggedIn()) { return; } Msg msg = getMessage(cursor); //#ifndef WMUC if (contact instanceof MucContact && contact.origin == Contact.ORIGIN_GROUPCHAT) { try { if (msg != null && msg.messageType != Msg.MESSAGE_TYPE_OUT && msg.messageType != Msg.MESSAGE_TYPE_SUBJ) { Roster.me = new MessageEdit(this, contact, msg.from + ":"); Roster.me.show(); return; } } catch (Exception e) { /* no messages */ } } //#endif //#ifdef JUICK //#ifdef PLUGINS //# if (sd.Juick) //#endif //# if (Juick.haveJuickThings(msg)) { //# String target = Juick.getTargetForJuickReply(msg); //# //# if (target.length() == 0) { //# new JuickThingsMenu((VirtualList)this, contact); //# return; //# } //# //# switch (target.charAt(0)) { //# case '#': //# Juick.juickAction(this, "", msg); //# return; //# case '@': //# Juick.juickAction(this, "PM", msg); //# return; //# } //# } //# //#endif messageEditResume(); } public void captionPressed() { savePosition(); sd.roster.searchActiveContact(1); //next contact with messages } public void Quote() { if (!sd.roster.isLoggedIn()) return; try { String msg=new StringBuffer() .append((char)0xbb) // .append(" ") .append(getMessage(cursor).quoteString()) .append("\n") .append(" ") .toString(); Roster.me = new MessageEdit(this, contact, msg); Roster.me.show(); msg = null; } catch (Exception e) {/*no messages*/} } //#ifdef HISTORY //#ifdef LAST_MESSAGES //# public final void loadRecentList() { //# contact.setHistoryLoaded(true); //# HistoryStorage hs = new HistoryStorage(contact.bareJid); //# Vector history=hs.importData(); //# for (Enumeration messages2=history.elements(); messages2.hasMoreElements(); ) { //# Msg message=(Msg) messages2.nextElement(); //# if (!isMsgExists(message)) { //# message.history=true; //# contact.msgs.insertElementAt(new MessageItem(message, cf.smiles), 0); //# } //# message=null; //# } //# history=null; //# } //# //# private boolean isMsgExists(Msg msg) { //# if (msg == null) return true; //# for (Enumeration contactMsgs = contact.msgs.elements(); contactMsgs.hasMoreElements(); ) { //# Msg message=((MessageItem) contactMsgs.nextElement()).msg; //# if (message.body.equals(msg.body)) { //# return true; //# } //# message=null; //# } //# return false; //# } //#endif //# //# private void saveMessages() { //# StringBuffer histRecord=new StringBuffer("chatlog_"); //#ifndef WMUC //# if (contact instanceof MucContact) { //# if (contact.origin>=Contact.ORIGIN_GROUPCHAT) { //# histRecord.append(contact.bareJid); //# } else { //# String nick=contact.getJid(); //# int rp=nick.indexOf('/'); //# histRecord.append(nick.substring(rp+1)).append("_").append(nick.substring(0, rp)); //# nick=null; //# } //# } else { //#endif //# histRecord.append(contact.bareJid); //#ifndef WMUC //# } //#endif //# StringBuffer messageList=new StringBuffer(); //# if (startSelection) { //# for (Enumeration select=contact.msgs.elements(); select.hasMoreElements(); ) { //# Msg mess=((MessageItem) select.nextElement()).msg; //# if (mess.selected) { //# messageList.append(mess.quoteString()).append("\n").append("\n"); //# mess.selected=false; //# mess.highlite = mess.oldHighlite; //# } //# } //# startSelection = false; //# } else { //# for (Enumeration cmessages=contact.msgs.elements(); cmessages.hasMoreElements(); ) { //# Msg message=((MessageItem) cmessages.nextElement()).msg; //# messageList.append(message.quoteString()).append("\n").append("\n"); //# } //# } //# HistoryAppend.getInstance().addMessageList(messageList.toString(), histRecord.toString()); //# messageList=null; //# histRecord=null; //# } //#endif public final void smartPurge() { Vector msgs=contact.msgs; int cur = cursor + 1; moveCursorTo(cur); try { if (msgs.size()>0){ int virtCursor=msgs.size(); boolean delete = false; int i=msgs.size(); while (true) { if (i<0) break; if (i<cur) { if (!delete) { //System.out.println("not found else"); if (((MessageItem)msgs.elementAt(virtCursor)).msg.dateGmt+1000<System.currentTimeMillis()) { //System.out.println("can delete: "+ delPos); msgs.removeElementAt(virtCursor); //delPos--; delete=true; } } else { //System.out.println("delete: "+ delPos); msgs.removeElementAt(virtCursor); //delPos--; } } virtCursor--; i--; } contact.activeMessage = msgs.size() - 1; //drop activeMessage count } } catch (Exception e) { //#ifdef DEBUG //# e.printStackTrace(); //#endif } contact.clearVCard(); contact.lastSendedMessage=null; contact.lastUnread=0; contact.resetNewMsgCnt(); } public void savePosition() { contact.mark = on_end ? -1 : cursor; } public void destroyView(){ /* if (startSelection) { for (Enumeration select=contact.msgs.elements(); select.hasMoreElements(); ) { Msg mess=(Msg) select.nextElement(); mess.selected=false; mess.highlite = mess.oldHighlite; } startSelection = false; } */ savePosition(); sd.roster.activeContact=null; sd.roster.reEnumRoster(); //to reset unread messages icon for this conference in roster parentView = sd.roster; super.destroyView(); } public void userKeyPressed(int keyCode) { switch (keyCode) { case 3: savePosition(); new ActiveContacts(null); return; case 4: if (cf.useTabs) { savePosition(); sd.roster.searchActiveContact(-1); return; } break; case 6: if (cf.useTabs) { savePosition(); sd.roster.searchActiveContact(1); return; } break; case VirtualCanvas._KEY_POUND: Reply(); return; case 9: Quote(); return; } super.userKeyPressed(keyCode); } public void longKey(int key) { switch(key) { case 0: clearReadedMessageList(); return; } super.longKey(key); } public void keyGreen() { if (!sd.roster.isLoggedIn()) { return; } Roster.me = new MessageEdit(this, contact, contact.msgSuspended); Roster.me.show(); contact.msgSuspended = null; } public void keyClear() { if (!messages.isEmpty()) { clearReadedMessageList(); } } // TODO: fix this shit public String touchLeftCommand(){ return (Config.getInstance().swapMenu)?((contact.msgSuspended!=null)?SR.MS_RESUME:SR.MS_NEW):SR.MS_MENU; } public String touchRightCommand(){ return (Config.getInstance().swapMenu)?SR.MS_MENU:SR.MS_BACK; } public void touchRightPressed(){ if (cf.swapMenu) showMenu(); else destroyView(); } public void touchLeftPressed(){ if (cf.swapMenu) messageEditResume(); else showMenu(); } }
d7748990bf9169d30abca267632713dfbbad37c6
69a5692a97e841133206e4817e65b4dc09b56622
/ourdus-spring/src/main/java/ourdus/ourdusspring/dto/product/review/ReviewDTO.java
51ddefd427dd3622ed852ac6db91cc821faadb7f
[]
no_license
Ourdus/OurdusBE
b8016ca73f486a3f5747ca1d0b3fc025d3d93eff
5ecfe58a41b62c915c64d7cfe29be9a2888ce7eb
refs/heads/main
2023-05-07T22:38:01.922305
2021-06-01T01:25:58
2021-06-01T01:25:58
331,016,543
4
1
null
2021-03-17T10:35:38
2021-01-19T15:00:57
Java
UTF-8
Java
false
false
866
java
package ourdus.ourdusspring.dto.product.review; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import ourdus.ourdusspring.domain.product.review.Review; import java.time.LocalDateTime; @Getter @Setter @NoArgsConstructor public class ReviewDTO { private Long id; private String content; private LocalDateTime date; private int rate; private Long productId; private Long orderDetailId; private String userName; public ReviewDTO(Review review) { this.id = review.getId(); this.content = review.getContent(); this.date = review.getDate(); this.rate = review.getRate(); this.productId = review.getProduct().getId(); this.orderDetailId = review.getOrderDetail().getId(); this.userName = review.getOrderDetail().getOrder().getUser().getName(); } }
0799c70e62503820d2d569b4781ba721efe29527
4561279a925dd281a4ed12fa6caa23f655819b11
/ch6_6/src/test/java/com/ch/ch6_6/Ch66ApplicationTests.java
220c7f5bba582056d6dc0b469b4fba717e6da45f
[]
no_license
2001tanzhiwen/springboot_from_entry_to_application-TsinghuaPublisher
8a79c6dc679775c965665df051dd001f9aab40e7
ffb1c16da77aa6cfe02b565a13dec9f833104890
refs/heads/main
2023-03-17T21:24:58.454868
2020-11-20T08:43:29
2020-11-20T08:43:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
327
java
package com.ch.ch6_6; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class Ch66ApplicationTests { @Test public void contextLoads() { } }
84dc56f7d0e7b56705fc622fdfd15e97ed25cc87
c2e1c6958a779729e2a21d0441355b6b0db18351
/Consorcio/src/utils/Dentre.java
3e669d529e458ea93953acf56a22e2f1ee9445b4
[]
no_license
MauroEmiliano/universidad
aae6ab49725cea0b53d9e226e68e6efb1edf8145
e8838b40b62ac07f937ae3b710af71caf929ffc5
refs/heads/master
2021-09-04T09:21:44.152455
2018-01-17T17:25:18
2018-01-17T17:25:18
112,340,869
0
0
null
null
null
null
UTF-8
Java
false
false
1,186
java
package utils; import java.io.*; public class Dentre{ public static String texto(String mensaje) { try { System.out.print(mensaje); String entrada = new BufferedReader( new InputStreamReader( System.in)).readLine(); return entrada; } catch(IOException e) { System.out.print(e); System.exit(1); return e.toString(); } } /* Metodo que permite entrar UN caracter y, como el anterior, se le pasa como argumento el texto para solicitar dicho caracter */ public static char caracter(String mensaje) { String aux = texto( mensaje ); return aux.charAt(0); } public static int entero(String mensaje) { Integer dato = new Integer(texto(mensaje)); return dato.intValue(); } public static long largo(String mensaje) { Long dato = new Long(texto(mensaje)); return dato.longValue(); } public static float flotante(String mensaje) { Float dato = new Float(texto(mensaje)); return dato.floatValue(); } public static double doble(String mensaje) { Double dato = new Double(texto(mensaje)); return dato.doubleValue(); } }
c1de78b5139ffb867089f03ace1a00ec2f6175f6
3c439bc13f6f300c876a808fcc183112a956e957
/minimalcontentprovider/src/main/java/com/example/minimalcontentprovider/MyDbOpenHepler.java
fd4d3f7238360cee9df7cdd31fc56725812b343a
[]
no_license
FrLinXu/Android_Test
4cb06d9ddc1d63e3b7b67181b7c9a6595335fda2
48d85878c91e4463d35459f7c7cfaa87f61b4d39
refs/heads/master
2020-04-06T17:52:57.002120
2018-11-26T10:30:19
2018-11-26T10:30:19
157,676,699
0
0
null
null
null
null
UTF-8
Java
false
false
2,607
java
package com.example.minimalcontentprovider; import android.content.ContentValues; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; /** * Author by Deil, Date on 2018/11/22. * PS: Not easy to write code, please indicate. */ public class MyDbOpenHepler extends SQLiteOpenHelper{ private static final String TAG = "MyDbOpenHepler"; private static final String SQL_CREATE_ENTRIES = "CREATE TABLE words(_ID INTEGER PRIMARY KEY, " + " name VARCHAR(30), " + " frequency integer " + ")"; private static final String SQL_DELETE_ENTRIES = "DROP TABLE IF EXISTS wrods "; public static final int DATABASE_VERSION = 3; public static final String DATABASE_NAME = "words.db"; public MyDbOpenHepler (Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); Log.d(TAG, "MyDbOpenHepler: create....."); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL(SQL_CREATE_ENTRIES); initDb(db); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(SQL_DELETE_ENTRIES); onCreate(db); } private void initDb(SQLiteDatabase db) { ContentValues values = new ContentValues(); values.put("name", "大黄"); values.put("frequency", 0); db.insert("words", null, values); values.clear(); values.put("name", "小明"); values.put("frequency", 0); db.insert("words", null, values); values.clear(); values.put("name", "小牛"); values.put("frequency", 0); db.insert("words", null, values); values.clear(); values.put("name", "大明"); values.put("frequency", 0); db.insert("words", null, values); values.clear(); } public void insert(Word word){ ContentValues contentValues = new ContentValues(); contentValues.put("name",word.getName()); contentValues.put("frequency",word.getFrequency()); this.getReadableDatabase().insert("words",null,contentValues); } public void update(Word word,String id){ ContentValues contentValues = new ContentValues(); contentValues.put("name",word.getName()); contentValues.put("frequency",word.getFrequency()); this.getReadableDatabase().update("words",contentValues,"id = ?",new String[] {id}); } }
48cef50f90fcab088281e63d7087e09d4ee904b6
d87bd48dc142647b9cd51946cf3a00838f65c70d
/StaffRegisterationSystem/src/test/java/com/deloitte/StaffRegisterationSystem/StaffRegisterationSystemApplicationTests.java
397c65c7d56dc1d872c8ae12149fe692f116a3e5
[]
no_license
bhatiakaz/StaffRegisterationSysytem
f368835bd5921516d825d68f3b483d4ffd8a7c94
2f5f1a5f37c3bf857cfa5f0a645144d5eeafbbb6
refs/heads/master
2020-07-03T03:02:03.766677
2019-08-11T12:57:07
2019-08-11T12:57:07
201,764,361
0
0
null
null
null
null
UTF-8
Java
false
false
372
java
package com.deloitte.StaffRegisterationSystem; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class StaffRegisterationSystemApplicationTests { @Test public void contextLoads() { } }
f0a1c4cb155941680f1c23b5ac578d8a5fad2652
f5df70ed16c0963cdd5eabd1ac2d99543d42ea07
/N-java/src/main/java/Njava/concurrent/priority/PriorityRunnable.java
7379956fc7e5994a37253448aee93e24cab071fa
[]
no_license
skaengus2012/N-java
e30129658048c2786fa0accbae36df289051395c
ac5e1a88c0ab062d351c2b4bf363d7483fa875a4
refs/heads/master
2021-01-22T22:20:50.202590
2018-07-14T09:54:35
2018-07-14T09:54:35
85,533,414
8
0
null
null
null
null
UTF-8
Java
false
false
807
java
package Njava.concurrent.priority; import Njava.function.exceptionLambda.IExRunnable; import io.reactivex.annotations.NonNull; /** * Priority runnable. * * Created by Doohyun on 2017. 4. 16.. */ public final class PriorityRunnable extends PrioritySleepTask implements Runnable{ private IExRunnable runnable; /** * Construct * * @param runnable * @param sleepTime * @param priority */ public PriorityRunnable(@NonNull IExRunnable runnable, @NonNull Integer sleepTime, @NonNull Integer priority) { super(sleepTime, priority); this.runnable = runnable; } @Override public void run() { try { sleep(); runnable.run(); } catch (Exception e){ e.printStackTrace(); } } }
a8ea8ce29756e81009b175c567b014ba49b30c91
35dbf93d56cdb3cdd4304c456d4cee3a3a0701c0
/src/main/java/io/huna/patterns/factory/abstractfactory/ingredient/Dough.java
7379cd9b9e64b16686dcc4d947b1def8c673d904
[]
no_license
hun-a/java-tutorials
792c684d227be1193e3af2a8cd33fbbaa142988f
afb7b31f1785d16c7c38a08e43b358a685e12387
refs/heads/master
2022-04-11T07:29:30.215088
2020-03-24T12:22:17
2020-03-24T12:22:17
238,248,353
0
1
null
null
null
null
UTF-8
Java
false
false
89
java
package io.huna.patterns.factory.abstractfactory.ingredient; public interface Dough { }
299e48cb92779ab45cb838930074ed6a31835e7e
18b333781e2efe32ce41578ffa8f4cb0d6340e65
/netflix-zuul-api-gateway/src/test/java/com/exmicroservices/netflixzuulapigateway/NetflixZuulApiGatewayApplicationTests.java
ef3bca46c605051f0d545648b670ffad3a29e0b2
[]
no_license
rahulsudhakar10/Microservices
336405ce00e33b04fa30eb64a0439a56cb5a5139
2b20f67201e9f2b73bdd8d0c60c64b94a8dc95d5
refs/heads/master
2022-04-26T18:57:41.750354
2020-04-27T13:19:02
2020-04-27T13:19:02
259,324,253
0
0
null
null
null
null
UTF-8
Java
false
false
373
java
package com.exmicroservices.netflixzuulapigateway; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class NetflixZuulApiGatewayApplicationTests { @Test public void contextLoads() { } }
6d381f83ee8c2e238ec15885cb0a051187b66c39
c80f25f9c8faa1ea9db5bb1b8e36c3903a80a58b
/laosiji-sources/feng/android/sources/com/meizu/cloud/pushsdk/networking/internal/SynchronousCall.java
4fac84c0756f4631d474edbefcd9259b02d4af51
[]
no_license
wenzhaot/luobo_tool
05c2e009039178c50fd878af91f0347632b0c26d
e9798e5251d3d6ba859bb15a00d13f085bc690a8
refs/heads/master
2020-03-25T23:23:48.171352
2019-09-21T07:09:48
2019-09-21T07:09:48
144,272,972
0
0
null
null
null
null
UTF-8
Java
false
false
5,249
java
package com.meizu.cloud.pushsdk.networking.internal; import com.feng.car.utils.FengConstant; import com.meizu.cloud.pushsdk.networking.common.ANRequest; import com.meizu.cloud.pushsdk.networking.common.ANResponse; import com.meizu.cloud.pushsdk.networking.common.ResponseType; import com.meizu.cloud.pushsdk.networking.error.ANError; import com.meizu.cloud.pushsdk.networking.http.Response; import com.meizu.cloud.pushsdk.networking.utils.SourceCloseUtil; import com.meizu.cloud.pushsdk.networking.utils.Utils; public final class SynchronousCall { private SynchronousCall() { } public static <T> ANResponse<T> execute(ANRequest request) { switch (request.getRequestType()) { case 0: return executeSimpleRequest(request); case 1: return executeDownloadRequest(request); case 2: return executeUploadRequest(request); default: return new ANResponse(new ANError()); } } private static <T> ANResponse<T> executeSimpleRequest(ANRequest request) { ANResponse<T> response; Response okHttpResponse = null; try { okHttpResponse = InternalNetworking.performSimpleRequest(request); if (okHttpResponse == null) { response = new ANResponse(Utils.getErrorForConnection(new ANError())); } else if (request.getResponseAs() == ResponseType.OK_HTTP_RESPONSE) { response = new ANResponse((Object) okHttpResponse); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } else if (okHttpResponse.code() >= FengConstant.SINGLE_IMAGE_MAX_WIDTH) { response = new ANResponse(Utils.getErrorForServerResponse(new ANError(okHttpResponse), request, okHttpResponse.code())); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } else { response = request.parseResponse(okHttpResponse); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } } catch (Throwable se) { response = new ANResponse(Utils.getErrorForConnection(new ANError(se))); } catch (Exception e) { response = new ANResponse(Utils.getErrorForNetworkOnMainThreadOrConnection(e)); } finally { SourceCloseUtil.close(okHttpResponse, request); } return response; } private static <T> ANResponse<T> executeDownloadRequest(ANRequest request) { try { Response okHttpResponse = InternalNetworking.performDownloadRequest(request); if (okHttpResponse == null) { return new ANResponse(Utils.getErrorForConnection(new ANError())); } ANResponse<T> response; if (okHttpResponse.code() >= FengConstant.SINGLE_IMAGE_MAX_WIDTH) { response = new ANResponse(Utils.getErrorForServerResponse(new ANError(okHttpResponse), request, okHttpResponse.code())); response.setOkHttpResponse(okHttpResponse); return response; } response = new ANResponse((Object) "success"); response.setOkHttpResponse(okHttpResponse); return response; } catch (Throwable se) { return new ANResponse(Utils.getErrorForConnection(new ANError(se))); } catch (Exception e) { return new ANResponse(Utils.getErrorForNetworkOnMainThreadOrConnection(e)); } } private static <T> ANResponse<T> executeUploadRequest(ANRequest request) { ANResponse<T> response; Response okHttpResponse = null; try { okHttpResponse = InternalNetworking.performUploadRequest(request); if (okHttpResponse == null) { response = new ANResponse(Utils.getErrorForConnection(new ANError())); } else if (request.getResponseAs() == ResponseType.OK_HTTP_RESPONSE) { response = new ANResponse((Object) okHttpResponse); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } else if (okHttpResponse.code() >= FengConstant.SINGLE_IMAGE_MAX_WIDTH) { response = new ANResponse(Utils.getErrorForServerResponse(new ANError(okHttpResponse), request, okHttpResponse.code())); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } else { response = request.parseResponse(okHttpResponse); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } } catch (ANError se) { response = new ANResponse(Utils.getErrorForConnection(se)); } catch (Exception e) { response = new ANResponse(Utils.getErrorForNetworkOnMainThreadOrConnection(e)); } finally { SourceCloseUtil.close(okHttpResponse, request); } return response; } }
2dc4d2a1f6c60a5d67a9c8fccb4ec1c9bc03a293
6d09a2af96afe5e87b11d7161c474aa6fd745199
/springboot/spring-boot-logging/src/main/java/com/example/springbootlogging/SpringBootLoggerController.java
7b7bd8ff5450a3a16e15f2665844ded8bd0ed4b7
[]
no_license
umeshwale/code-playarea
5228698a4ea93c4656becdf6a90d0fb6ab1fc72a
7de3835d9213ee51f693f55e2a7b11b85c1d542b
refs/heads/master
2023-08-03T18:13:18.460724
2021-09-27T06:21:32
2021-09-27T06:21:32
297,268,862
0
0
null
null
null
null
UTF-8
Java
false
false
664
java
package com.example.springbootlogging; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class SpringBootLoggerController { Logger logger = LoggerFactory.getLogger(SpringBootLoggerController.class); @RequestMapping(value = "/log") public String getLogs() { logger.debug("DEBUG Logs"); logger.trace("TRACE Logs"); logger.info("INFO Logs"); logger.error("ERROR Logs"); logger.warn("WARN Logs"); return "Logs will be displayed on console"; } }
af5a5d73fa72b396ec56d02cadd3ca382b3a8f12
642cb4ce82e92729e69447ea26086d57d0266296
/sdks/java/http_client/v1/src/test/java/org/openapitools/client/model/V1QueueTest.java
b5ec60a3dc3c51a08ff2cef5b71251c95093f391
[ "Apache-2.0" ]
permissive
vamsikavuru/polyaxon
243c91b2a2998260f6b21e864b02347629c4867f
f1695c98f320c2e5c9fdf72e7f7885954df755a9
refs/heads/master
2022-08-24T05:22:04.806006
2020-05-28T14:50:54
2020-05-28T15:04:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,587
java
// Copyright 2018-2020 Polyaxon, 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. /* * Polyaxon SDKs and REST API specification. * Polyaxon SDKs and REST API specification. * * The version of the OpenAPI document: 1.0.92 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.threeten.bp.OffsetDateTime; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for V1Queue */ public class V1QueueTest { private final V1Queue model = new V1Queue(); /** * Model tests for V1Queue */ @Test public void testV1Queue() { // TODO: test V1Queue } /** * Test the property 'uuid' */ @Test public void uuidTest() { // TODO: test uuid } /** * Test the property 'agent' */ @Test public void agentTest() { // TODO: test agent } /** * Test the property 'name' */ @Test public void nameTest() { // TODO: test name } /** * Test the property 'priority' */ @Test public void priorityTest() { // TODO: test priority } /** * Test the property 'concurrency' */ @Test public void concurrencyTest() { // TODO: test concurrency } /** * Test the property 'createdAt' */ @Test public void createdAtTest() { // TODO: test createdAt } /** * Test the property 'updatedAt' */ @Test public void updatedAtTest() { // TODO: test updatedAt } }
5c87f520605b2449b792b8a278f76a15ae9d9c3d
4cf861f36a14e9575703c98a99ee9db150310775
/bankroll-api/src/main/java/com/goldbao/bankroll/model/bankroll/BankrollRuleDay.java
9d2dbe0cf0d315a83e3c5c53daacecc67cf6b692
[]
no_license
qiuxin-qx/bankroll-api
1b0710f639fe101bbbae81a21e97648eef816201
ed3cca0bc836e672f9ce99efe8e558df4e7dc15d
refs/heads/master
2021-01-10T04:52:34.417365
2016-03-25T09:45:38
2016-03-25T09:45:38
54,707,109
1
0
null
null
null
null
UTF-8
Java
false
false
3,714
java
package com.goldbao.bankroll.model.bankroll; import com.goldbao.bankroll.model.Model; import javax.persistence.*; import java.io.Serializable; import java.math.BigDecimal; /** * 配资规则 - 按天 */ @Entity @Table(name = "bk_bankroll_rule_day") @AttributeOverride(name = "id", column = @Column(name = "rule_id")) public class BankrollRuleDay extends Model implements Serializable { /** * */ private static final long serialVersionUID = 7767558094351830445L; private Integer lever; @Column(name = "warning_line") private BigDecimal warningLine; @Column(name = "open_line") private BigDecimal openLine; @Column(name = "min_use_days") private Integer minUseDays; @Column(name = "max_use_days") private Integer maxUseDays; @Column(name = "manage_fee_rate") private BigDecimal manageFeeRate; @Column(name = "max_money") private BigDecimal maxMoney; @ManyToOne(cascade = CascadeType.PERSIST) @JoinColumn(name = "solution_id") private BankrollSolutionDay solution; /** * 杠杆倍率 */ public Integer getLever() { return lever; } /** * 杠杆倍率 */ public void setLever(Integer lever) { this.lever = lever; } /** * 警告线,这里返回比例值,比如配资金额为1000元,警告线比例1.10 * 则警告线为1000*1.10 = 1100<br/> * 最高不能超过2.00 */ public BigDecimal getWarningLine() { return warningLine; } /** * 警告线,这里返回比例值,比如配资金额为1000元,警告线比例1.10 * 则警告线为1000*1.10 = 1100<br/> * 最高不能超过2.00 */ public void setWarningLine(BigDecimal warningLine) { this.warningLine = warningLine; } /** * 平仓线,这里返回比例值,比如配资金额为1000元,平仓线比例1.08<br/> * 则平仓线为1000*1.08 = 1080<br/> * 最高不能超过2.00 */ public BigDecimal getOpenLine() { return openLine; } /** * 平仓线,这里返回比例值,比如配资金额为1000元,平仓线比例1.08<br/> * 则平仓线为1000*1.08 = 1080<br/> * 最高不能超过2.00 */ public void setOpenLine(BigDecimal openLine) { this.openLine = openLine; } /** * 最少使用时间【天】 */ public Integer getMinUseDays() { return minUseDays; } /** * 最少使用时间【天】 */ public void setMinUseDays(Integer minUseDays) { this.minUseDays = minUseDays; } /** * 最多使用时间【天】 */ public Integer getMaxUseDays() { return maxUseDays; } /** * 最多使用时间【天】 */ public void setMaxUseDays(Integer maxUseDays) { this.maxUseDays = maxUseDays; } /** * 管理费率 */ public BigDecimal getManageFeeRate() { return manageFeeRate; } /** * 管理费率 */ public void setManageFeeRate(BigDecimal manageFeeRate) { this.manageFeeRate = manageFeeRate; } /** * 允许最大配资金额 */ public BigDecimal getMaxMoney() { return maxMoney; } /** * 允许最大配资金额 */ public void setMaxMoney(BigDecimal maxMoney) { this.maxMoney = maxMoney; } public BankrollSolutionDay getSolution() { return solution; } public void setSolution(BankrollSolutionDay solution) { this.solution = solution; } }
79548dc4ae00941563c0a8426831b9e803b7ce39
d502ba2480aea84241f3bd98578a887849df9df8
/Arsen Aleksanyan/Design Patterns/FlyweightAndProxy/src/com/synisys/designpatterns/flyweight/naturalproducts/Apple.java
d59e79901e365917fc1d278406867a9611bfb4ea
[]
no_license
synergytrainings/design-patterns
821ba0e4c6c0c09ef892312256f6cdcf7e0736f4
f0fd39de32c3f9f7f6b13377904a0c29589720bc
refs/heads/master
2020-12-25T19:26:01.181499
2015-04-17T05:15:03
2015-04-17T05:15:17
25,835,095
4
3
null
null
null
null
UTF-8
Java
false
false
581
java
package com.synisys.designpatterns.flyweight.naturalproducts; import com.synisys.designpatterns.flyweight.utils.Vitamin; class Apple extends NaturalProduct { Apple(){ vitmainWeights.put(Vitamin.A, 0.003); vitmainWeights.put(Vitamin.B1, 0.017); vitmainWeights.put(Vitamin.B2, 0.026); vitmainWeights.put(Vitamin.B3, 0.091); vitmainWeights.put(Vitamin.B5, 0.061); vitmainWeights.put(Vitamin.B6, 0.041); vitmainWeights.put(Vitamin.B9, 0.003); vitmainWeights.put(Vitamin.C, 4.6); vitmainWeights.put(Vitamin.E, 0.18); vitmainWeights.put(Vitamin.K, 0.0022); } }
361b91ed25d18987a8d9fcc885e1c6ac178b65ae
480bef579483c8cb3a35f995362b6d8f372786a7
/app/src/main/java/com/example/administrator/myapplication/BottomAct.java
a48ec3bb0ea45833cc25f3e905b75cf926b82e96
[]
no_license
xujianhong/Sample
d5a615ef3f4a030899d52841d335d3bd549df6dc
a005f095840a501d9c43fe2154e39d3039451cad
refs/heads/master
2020-12-30T14:12:46.417529
2017-10-11T09:42:33
2017-10-11T09:42:33
91,289,281
0
0
null
null
null
null
UTF-8
Java
false
false
5,517
java
package com.example.administrator.myapplication; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.ImageButton; import android.widget.RadioButton; import android.widget.RelativeLayout; import com.example.administrator.myapplication.Tab.CommonFragmentPagerAdapter; import com.example.administrator.myapplication.Tab.MyViewPager; import com.example.administrator.myapplication.fragment.MainFragment; import java.util.ArrayList; /** * Created by jianhongxu on 2016/12/1. */ public class BottomAct extends AppCompatActivity implements ViewPager.OnPageChangeListener, View.OnClickListener { MyViewPager mp_main; RadioButton rb_menu_main, rb_menu_me; ImageButton ib_classmangement; CommonFragmentPagerAdapter pagerAdapter; Button btn_check,btn_class,btn_homework; RelativeLayout rl_menu; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.act_bottom); initViews(); } private void initViews() { btn_check = (Button)findViewById(R.id.btn_check); btn_check.setOnClickListener(this); btn_class = (Button)findViewById(R.id.btn_class); btn_class.setOnClickListener(this); btn_homework = (Button)findViewById(R.id.btn_homework); btn_homework.setOnClickListener(this); rl_menu =(RelativeLayout)findViewById(R.id.rl_menu); mp_main = (MyViewPager)findViewById(R.id.mp_main); rb_menu_main =(RadioButton)findViewById(R.id.rb_menu_main); rb_menu_me =(RadioButton)findViewById(R.id.rb_menu_me); ib_classmangement = (ImageButton)findViewById(R.id.ib_classmangement); closeMenu(); ib_classmangement.setOnClickListener(this); rb_menu_main.setChecked(true); rb_menu_main.setOnClickListener(this); rb_menu_me.setOnClickListener(this); ArrayList<Fragment> fragments = new ArrayList<>(); fragments.add(new MainFragment()); fragments.add(new MainFragment()); FragmentManager mFragmentManager = getSupportFragmentManager(); pagerAdapter = new CommonFragmentPagerAdapter(mFragmentManager,fragments); mp_main.setAdapter(pagerAdapter); mp_main.setOffscreenPageLimit(2); mp_main.addOnPageChangeListener(this); } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { } @Override public void onPageScrollStateChanged(int state) { //state的状态有三个,0表示什么都没做,1正在滑动,2滑动完毕 if (state == 2) { switch (mp_main.getCurrentItem()) { case 0: if(!rb_menu_main.isChecked()){ rb_menu_main.setChecked(true); } rb_menu_me.setChecked(false); break; case 1: if(!rb_menu_me.isChecked()){ rb_menu_me.setChecked(true); } rb_menu_main.setChecked(false); break; default: break; } } else if(state == 1){ if(isshow) closeMenu(); } } @Override public void onClick(View v) { switch (v.getId()){ case R.id.rb_menu_main: if(!rb_menu_main.isChecked()){ rb_menu_main.setChecked(true); } rb_menu_me.setChecked(false); mp_main.setCurrentItem(0); if(isshow) closeMenu(); break; case R.id.rb_menu_me: if(!rb_menu_me.isChecked()){ rb_menu_me.setChecked(true); } rb_menu_main.setChecked(false); mp_main.setCurrentItem(1); if(isshow) closeMenu(); break; case R.id.ib_classmangement: if(isshow){ closeMenu(); }else openMenu(); break; case R.id.btn_check: Log.e("BottomAct","btn_check"); break; case R.id.btn_class: Log.e("BottomAct","btn_class"); break; case R.id.btn_homework: Log.e("BottomAct","btn_homework"); break; } } boolean isshow = false; /** * 缩放 */ public void closeMenu() { isshow = false; rl_menu.animate().scaleX(0.1f).scaleY(0.1f).translationY(dip2px(40)).setDuration(300).start(); } /** * 放大 */ public void openMenu() { isshow = true; rl_menu.animate().scaleX(1f).scaleY(1f).translationY(0).setDuration(300).start(); } public int dip2px(float dipValue) { final float scale = this.getResources().getDisplayMetrics().density; return (int) (dipValue * scale + 0.5f); } }
05cb66a464bc780291c150302df070b377b0e287
25391e4adb0dd6838c45c60016b22888534ac27d
/src/main/java/com/muhammedtopgul/ch01/greeting02/GreetingProvider.java
032ffa6d922c2cb74049fd6ed4483a9c6d3992f9
[]
no_license
muhammed-topgul/spring-core
6b1b35adb36b7b6c198b28169f57389f7d85ac0f
0242e66d1ff8af84a9c7fb122ada875e9316a9eb
refs/heads/master
2023-06-14T09:11:47.847086
2021-07-14T07:44:39
2021-07-14T07:44:39
380,594,020
0
0
null
null
null
null
UTF-8
Java
false
false
177
java
package com.muhammedtopgul.ch01.greeting02; /* * created by Muhammed Topgul * on 27/06/2021 * at 13:20 */ public interface GreetingProvider { String getGreeting(); }
8f599d6fd3e7156d50c9875fc80cec22843b9852
61829d2c63ae8c8638f6c95db0fc029d0ff05660
/2016_1/Compilador/src/br/com/ceducarneiro/compilador/Token.java
144f8952cb657446bfe81fa2fe9ada7242293043
[]
no_license
edu1910/compiladores
b404d1f493bf436165958ac23cef735519fe5c88
49041b352cb07618d9ab87356432d175fd63633a
refs/heads/master
2021-01-21T04:41:12.502507
2016-06-16T23:42:55
2016-06-16T23:42:55
53,173,044
0
1
null
null
null
null
UTF-8
Java
false
false
841
java
package br.com.ceducarneiro.compilador; public class Token { private String lexema; private TipoToken tipo; public Token(TipoToken tipo) { setTipo(tipo); } public Token(TipoToken tipo, String lexema) { setTipo(tipo); setLexema(lexema); } public String getLexema() { return lexema; } public void setLexema(String lexema) { this.lexema = lexema; } public TipoToken getTipo() { return tipo; } public void setTipo(TipoToken tipo) { this.tipo = tipo; } @Override public String toString() { String str; if (lexema != null) { str = String.format("<%s,'%s'>", tipo.name(), lexema); } else { str = String.format("<%s>", tipo.name()); } return str; } }
0bcb7b380720f27668cb52d868edc36fa4570e4f
54d4b72e4b37cdcec0a0b2b46b83717e15eb0d9c
/app/src/main/java/com/broadchance/entity/serverentity/PreSetImg.java
92459b3a05f33b91bfb61759643c5663d6830a06
[]
no_license
devryan915/wdecgrec_as
6af887efb55908fd515411d238334b841ac79ab7
4b41de5f9fc09cc04a3e93f0a5634119e7fec4f1
refs/heads/master
2020-06-22T19:50:15.544052
2016-12-12T03:45:24
2016-12-12T03:45:24
74,725,426
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package com.broadchance.entity.serverentity; public class PreSetImg extends Object { public PreSetImg(){} private int ID; public int getID() { return ID;} public void setID(int _ID){this.ID = _ID;} private String Url; public String getUrl() { return Url;} public void setUrl(String _Url){this.Url = _Url;} }
4fdc30781cf072b79e987d5d59b04dc3036e95d8
5ffbd75147bd0f2ddb0c520d2a95255d2d8973f1
/drouter/src/main/java/d/drouter/RouterResponse.java
1dc4abc623f6d79cef55eb22855873d2b03afd46
[]
no_license
wu464995183/DRouter
4b4474fda4b311842af9aa654aac2e6b2e7dfab7
f7aeb6acb7499d1da6a8760bffdb0c19dfc5711a
refs/heads/master
2020-03-31T12:48:10.121101
2018-10-16T09:23:58
2018-10-16T09:23:58
152,229,841
0
0
null
null
null
null
UTF-8
Java
false
false
886
java
package d.drouter; public class RouterResponse { private int mErrorCode; private String mErrorMassage; public RouterResponse(Builder builder) { this.mErrorCode = builder.mErrorCode; this.mErrorMassage = builder.mErrorMassage; } public int getErrorCode() { return mErrorCode; } public String getErrorMassage() { return mErrorMassage; } public static class Builder { private int mErrorCode; private String mErrorMassage; public Builder errorCode(int mErrorCode) { this.mErrorCode = mErrorCode; return this; } public Builder errorMassage(String mErrorMassage) { this.mErrorMassage = mErrorMassage; return this; } public RouterResponse build() { return new RouterResponse(this); } } }
544fde0d0a8e6b16298d44c2c5b8babf0886555e
e438bd23bb30ffe7dc2be31550165af56671ae73
/friendsbook-data-boot/src/main/java/com/friendsbook/data/boot/FriendsbookDataApplication.java
0185dbe3285205c3764061ac31bc263e91e847c2
[]
no_license
innoproject/friendsbook-parent
76550535edaff33487ed6f33aaaecca1da80c1e3
98b4f19349efdc2e809d4fb9e79b9bea4a48315d
refs/heads/master
2021-01-20T03:56:46.211552
2017-08-25T14:44:59
2017-08-25T14:44:59
101,378,285
0
0
null
null
null
null
UTF-8
Java
false
false
80
java
package com.friendsbook.data.boot; public class FriendsbookDataApplication { }
230542af5bb426d815e3ab709e5d9abb31a68e22
26da0aea2ab0a2266bbee962d94a96d98a770e5f
/nam/nam-view/src/main/java/nam/model/messaging/MessagingRecord_OverviewsSection.java
d6a178e196550e5ccaf1eebf786c033832cc8c28
[ "Apache-2.0" ]
permissive
tfisher1226/ARIES
1de2bc076cf83488703cf18f7e3f6e3c5ef1b40b
814e3a4b4b48396bcd6d082e78f6519679ccaa01
refs/heads/master
2021-01-10T02:28:07.807313
2015-12-10T20:30:00
2015-12-10T20:30:00
44,076,313
2
0
null
null
null
null
UTF-8
Java
false
false
1,033
java
package nam.model.messaging; import java.io.Serializable; import javax.enterprise.context.SessionScoped; import javax.inject.Named; import org.apache.commons.lang.StringUtils; import org.aries.ui.AbstractWizardPage; import nam.model.Messaging; import nam.model.util.MessagingUtil; @SessionScoped @Named("messagingOverviewsSection") public class MessagingRecord_OverviewsSection extends AbstractWizardPage<Messaging> implements Serializable { private Messaging messaging; public MessagingRecord_OverviewsSection() { setName("Overviews"); setUrl("overviews"); } public Messaging getMessaging() { return messaging; } public void setMessaging(Messaging messaging) { this.messaging = messaging; } @Override public void initialize(Messaging messaging) { setEnabled(true); setBackEnabled(true); setNextEnabled(true); setFinishEnabled(false); setMessaging(messaging); } @Override public void validate() { if (messaging == null) { validator.missing("Messaging"); } else { } } }
56b9355dc48686b8c4b7adbe97c18a97c4566b16
190439b8aeae794f3cb9d4744ebec840f490c47a
/DistributedGraphql-cityService/src/main/java/alros/demo/distributedgraphql/resolver/Query.java
d0c36e1cdbd82c525ad10683836e698251dca686
[]
no_license
skayvanfar/distributed-graphql
f7e7dc4baac8a0a19b289bb3ae986755ff4fa003
f4ee297ea04a1ec25f1490477a52b88bca68955d
refs/heads/main
2023-06-20T02:25:58.372897
2021-07-04T13:51:17
2021-07-04T13:51:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
903
java
package alros.demo.distributedgraphql.resolver; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import alros.demo.distributedgraphql.City; import graphql.kickstart.tools.GraphQLQueryResolver; @Component public class Query implements GraphQLQueryResolver { private static final Logger LOG = LoggerFactory.getLogger(Query.class); @Autowired private CityRepository countryRepository; public List<City> allCities() { LOG.info("allCities"); return countryRepository.getAllCities(); } public City city(String id) { LOG.info("city {}", id); return countryRepository.getCity(id); } public List<City> citiesInCountry(String countryId) { LOG.info("citiesInCountry {}", countryId); return countryRepository.citiesInCountry(countryId); } }
f28db5f0b3ecf8e34d0963a4e52104c5882e6cb8
aff5d04c67d56fd1a97629e76a83c4d65cd8dd7b
/src/main/java/vip/ddm/ddm/dao/FullDownMapper.java
6434529ae5d3f0352f00ea52fa26fd268416c5e7
[]
no_license
haoyuehong/ddm
01575252cdfadfd7aa025b7590348761d7630ead
6b1f0c1c0337bba74ccee1451cbc81c486317cf7
refs/heads/master
2020-03-26T13:55:31.557410
2018-09-12T07:11:51
2018-09-12T07:11:51
144,963,466
0
0
null
null
null
null
UTF-8
Java
false
false
1,902
java
package vip.ddm.ddm.dao; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import vip.ddm.ddm.model.FullDown; import vip.ddm.ddm.vo.FullDownVo; import java.util.List; public interface FullDownMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table full_down * * @mbg.generated */ int deleteByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table full_down * * @mbg.generated */ int insert(FullDown record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table full_down * * @mbg.generated */ int insertSelective(FullDown record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table full_down * * @mbg.generated */ FullDown selectByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table full_down * * @mbg.generated */ int updateByPrimaryKeySelective(FullDown record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table full_down * * @mbg.generated */ int updateByPrimaryKey(FullDown record); List<FullDownVo> findList(@Param("fullDown") FullDown fullDown,@Param("storeIds") List<Integer> storeIds); @Select("select * from full_down where id = #{fullDownId} and status = #{status}") FullDown findByIdAndStatus(@Param("fullDownId") Integer fullDownId, @Param("status") Integer status); @Select("select * from full_down where status = #{status}") List<FullDown> findByStatus(int status); }
89d65a1996a99d705e63001fbef982d5993c6d9c
9d6068d44b186fd4ae1fddd00698a59e6e9d3db0
/app-exe-jsaf/src/main/java/jsaf/util/AbstractEnvironment.java
25f373016623efe34b2522747d2af0ad74f34af9
[]
no_license
akwolf/app-extractor
205497208623bdd1cc12714f8d0bf78c84e0c8b9
ec86be0c9e95d2657fe4228f7542a52ce664b3c3
refs/heads/master
2016-09-06T13:46:38.560331
2013-08-30T03:47:04
2013-08-30T03:47:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,085
java
// Copyright (C) 2012 jOVAL.org. All rights reserved. // This software is licensed under the LGPL 3.0 license available at http://www.gnu.org/licenses/lgpl.txt package jsaf.util; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.Properties; import java.util.regex.Matcher; import jsaf.intf.system.IEnvironment; /** * A base-class for environments. * * @author David A. Solin * @version %I% %G% */ public abstract class AbstractEnvironment implements IEnvironment { protected boolean caseInsensitive; protected Properties props; protected AbstractEnvironment() { this(false); } protected AbstractEnvironment(boolean caseInsensitive) { this.caseInsensitive = caseInsensitive; props = new Properties(); } // Implement IEnvironment public String expand(String data) { if (data.indexOf('%') < 0) { return data; } String originalData = data; Iterator <String>names = props.stringPropertyNames().iterator(); while (names.hasNext()) { String name = names.next(); String pattern = new StringBuffer(caseInsensitive ? "(?i)%" : "%").append(name).append("%").toString(); data = data.replaceAll(pattern, Matcher.quoteReplacement(props.getProperty(name))); } if (data.equals(originalData)) { return data; // Some unexpandable pattern exists in there } else { return expand(data); // Recurse, in case a variable includes another } } public String getenv(String var) { if (caseInsensitive) { for (String key : this) { if (key.equalsIgnoreCase(var)) { return props.getProperty(key); } } return null; } else { return props.getProperty(var); } } public Iterator<String> iterator() { return props.stringPropertyNames().iterator(); } public String[] toArray() { ArrayList<String> list = new ArrayList<String>(); for (String key : this) { list.add(new StringBuffer(key).append("=").append(getenv(key)).toString()); } return list.toArray(new String[list.size()]); } }
1ff78d4b7ecbde50bd6e8819e69796c9808acc89
701980910117b797b5f7ca5a61a7262ccbc3ee7b
/core/src/main/java/com/matthewmitchell/peercoinj/core/PeerEventListener.java
721956ae0f6c29a01dc2fb9b3c1f6e4750b27908
[ "Apache-2.0" ]
permissive
MatthewLM/peercoinj
c76f356e8cfa5b0cdc133a3bc91df867468e9c28
c385a2347dfad73fa8959362c115970b62e0e8de
refs/heads/master
2023-04-06T19:27:20.008332
2023-03-20T16:07:05
2023-03-20T16:07:05
22,102,786
11
30
null
2015-07-27T16:57:10
2014-07-22T12:19:41
Java
UTF-8
Java
false
false
3,864
java
/** * Copyright 2011 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.matthewmitchell.peercoinj.core; import javax.annotation.Nullable; import java.util.List; /** * <p>Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, * they can pre-filter messages before they are procesesed by a {@link Peer} or {@link PeerGroup}, and they can * provide transactions to remote peers when they ask for them.</p> */ public interface PeerEventListener { /** * Called on a Peer thread when a block is received.<p> * * The block may have transactions or may be a header only once getheaders is implemented. * * @param peer the peer receiving the block * @param block the downloaded block * @param blocksLeft the number of blocks left to download */ public void onBlocksDownloaded(Peer peer, Block block, int blocksLeft); /** * Called when a download is started with the initial number of blocks to be downloaded. * * @param peer the peer receiving the block * @param blocksLeft the number of blocks left to download */ public void onChainDownloadStarted(Peer peer, int blocksLeft); /** * Called when a peer is connected. If this listener is registered to a {@link Peer} instead of a {@link PeerGroup}, * peerCount will always be 1. * * @param peer * @param peerCount the total number of connected peers */ public void onPeerConnected(Peer peer, int peerCount); /** * Called when a peer is disconnected. Note that this won't be called if the listener is registered on a * {@link PeerGroup} and the group is in the process of shutting down. If this listener is registered to a * {@link Peer} instead of a {@link PeerGroup}, peerCount will always be 0. * * @param peer * @param peerCount the total number of connected peers */ public void onPeerDisconnected(Peer peer, int peerCount); /** * <p>Called when a message is received by a peer, before the message is processed. The returned message is * processed instead. Returning null will cause the message to be ignored by the Peer returning the same message * object allows you to see the messages received but not change them. The result from one event listeners * callback is passed as "m" to the next, forming a chain.</p> * * <p>Note that this will never be called if registered with any executor other than * {@link com.matthewmitchell.peercoinj.utils.Threading#SAME_THREAD}</p> */ public Message onPreMessageReceived(Peer peer, Message m); /** * Called when a new transaction is broadcast over the network. */ public void onTransaction(Peer peer, Transaction t); /** * <p>Called when a peer receives a getdata message, usually in response to an "inv" being broadcast. Return as many * items as possible which appear in the {@link GetDataMessage}, or null if you're not interested in responding.</p> * * <p>Note that this will never be called if registered with any executor other than * {@link com.matthewmitchell.peercoinj.utils.Threading#SAME_THREAD}</p> */ @Nullable public List<Message> getData(Peer peer, GetDataMessage m); }
919b58768aa889c65513a6d0eefa00e1a804e137
1a2a9ab9755f2abb991a1aa654f7c6348c8db141
/src/main/java/com/jackila/dbdemo/Executor/TaskOne.java
77d1a600386cc52a65a7370d970e5c442e0b262b
[]
no_license
jackila/java-practice
6a377b2d5209d19e6df34a1e8fb8b25afc113453
018ee4d192289665de1b17452c9258e9bc693f1d
refs/heads/master
2020-03-07T14:28:13.752093
2018-03-31T11:50:13
2018-03-31T11:50:13
127,527,287
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
package com.jackila.dbdemo.Executor; /** * create by jackila ON 22/01/2018 */ public class TaskOne implements Runnable { @Override public void run() { System.out.println("Executing Task One"); try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } } }
0f183474525593d9e2863419c8929e9c052307c2
b0eaf03f81e483e8cf7f0863cc6a34f63046d735
/src/inteligenciaartificial_pia/Solucion.java
d066747835c56ad5ef860e45f28e1d00de9f31c1
[]
no_license
salva09/Equipo5_PIA_IA
29c764501618c65f73c9f63d60cbc9b8d20c6e9c
a74213db2b967a7e06bed009e23dc74cb3648bb1
refs/heads/main
2023-04-26T11:10:37.146525
2021-05-22T13:33:46
2021-05-22T13:33:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
17,848
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package inteligenciaartificial_pia; import java.awt.Color; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import java.util.TreeMap; import javax.swing.JLabel; import javax.swing.JSpinner; import javax.swing.SpinnerNumberModel; import javax.swing.text.BadLocationException; import javax.swing.text.Style; import javax.swing.text.StyleConstants; import javax.swing.text.StyledDocument; /** * * @author ASUS */ public class Solucion extends javax.swing.JFrame { ArrayList<JSpinner> heuristicos = new ArrayList(); Map<String, Float> heuristica = new TreeMap<>(); Grafo grafo = EdicionGrafo.auxiliar; /** * Creates new form Solucion */ public Solucion() { initComponents(); hPanel.setVisible(false); hText.setVisible(false); Volver.setVisible(false); resolver.setVisible(false); this.setSize(this.getWidth(), 300); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { nodoText = new javax.swing.JLabel(); nodosPanel = new javax.swing.JPanel(); metaText = new javax.swing.JLabel(); nodoMeta = new javax.swing.JSpinner(); inicialText = new javax.swing.JLabel(); nodoInicial = new javax.swing.JSpinner(); Aceptar = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); hPanel = new javax.swing.JScrollPane(); heuristicaPanel = new javax.swing.JPanel(); hText = new javax.swing.JLabel(); Volver = new javax.swing.JButton(); resolver = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); nodoText.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N nodoText.setText("Nodos"); nodosPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(java.awt.Color.lightGray, java.awt.Color.gray)); metaText.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N metaText.setText("Nodo meta:"); nodoMeta.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N nodoMeta.setModel(new javax.swing.SpinnerNumberModel()); inicialText.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N inicialText.setText("Nodo inicial:"); nodoInicial.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N nodoInicial.setModel(new javax.swing.SpinnerNumberModel()); javax.swing.GroupLayout nodosPanelLayout = new javax.swing.GroupLayout(nodosPanel); nodosPanel.setLayout(nodosPanelLayout); nodosPanelLayout.setHorizontalGroup( nodosPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(nodosPanelLayout.createSequentialGroup() .addGap(117, 117, 117) .addGroup(nodosPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(metaText) .addComponent(inicialText)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(nodosPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(nodoInicial) .addComponent(nodoMeta, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); nodosPanelLayout.setVerticalGroup( nodosPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(nodosPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(nodosPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(inicialText) .addComponent(nodoInicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(nodosPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(metaText) .addComponent(nodoMeta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(20, Short.MAX_VALUE)) ); Aceptar.setText("Aceptar"); Aceptar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AceptarActionPerformed(evt); } }); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Datos de Entrada"); hPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(java.awt.Color.lightGray, java.awt.Color.gray)); heuristicaPanel.setLayout(new java.awt.GridBagLayout()); hPanel.setViewportView(heuristicaPanel); hText.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N hText.setText("Heuristica"); Volver.setText("Volver"); Volver.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { VolverActionPerformed(evt); } }); resolver.setText("Resolver"); resolver.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { resolverActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(nodosPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(nodoText) .addComponent(hText)) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(hPanel)) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(182, Short.MAX_VALUE) .addComponent(Volver) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(resolver) .addGap(162, 162, 162)) .addGroup(layout.createSequentialGroup() .addGap(206, 206, 206) .addComponent(Aceptar) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(29, 29, 29) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(nodoText) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(nodosPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(Aceptar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hText) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Volver) .addComponent(resolver)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void AceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AceptarActionPerformed nodosPanel.setVisible(false); nodoText.setVisible(false); Aceptar.setVisible(false); hPanel.setVisible(true); hText.setVisible(true); Volver.setVisible(true); resolver.setVisible(true); GridBagLayout modeloL = new GridBagLayout(); GridBagConstraints espacio = new GridBagConstraints(); heuristicaPanel.removeAll(); heuristicaPanel.setLayout(modeloL); heuristicos = new ArrayList<>(); int x = 0, y = 0; for (Nodo nodo : grafo.getNodos()) { JLabel num = new JLabel("h(" + String.valueOf(nodo.getNum()) + ") = "); espacio.gridx = x; espacio.gridy = y; espacio.gridwidth = 1; espacio.gridheight = 1; heuristicaPanel.add(num, espacio); JSpinner h = new JSpinner(); Dimension dim = new Dimension(60, 20); h.setPreferredSize(dim); SpinnerNumberModel modeloS = new SpinnerNumberModel(0.0, 0, Float.POSITIVE_INFINITY, 1.0); h.setModel(modeloS); h.setEditor(new JSpinner.NumberEditor(h, "##.####################")); x += 1; espacio.gridx = x; espacio.gridy = y; if (String.valueOf(nodo.getNum()).equals(nodoMeta.getValue().toString())) { h.setEnabled(false); } h.setName(String.valueOf(nodo.getNum())); heuristicos.add(h); heuristicaPanel.add(h, espacio); heuristicaPanel.updateUI(); x = 0; y += 1; } }//GEN-LAST:event_AceptarActionPerformed private void VolverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VolverActionPerformed nodosPanel.setVisible(true); nodoText.setVisible(true); Aceptar.setVisible(true); hPanel.setVisible(false); hText.setVisible(false); Volver.setVisible(false); resolver.setVisible(false); //heuristicaPanel.removeAll(); }//GEN-LAST:event_VolverActionPerformed private void resolverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resolverActionPerformed algoritmoA(nodoInicial.getValue().toString(), nodoMeta.getValue().toString()); EdicionGrafo.ver.setVisible(true); dispose(); }//GEN-LAST:event_resolverActionPerformed public void algoritmoA(String inicial, String meta) { StyledDocument documento = EdicionGrafo.resultado.getStyledDocument(); Style estilo = EdicionGrafo.resultado.addStyle("Estilo", null); obtenerHeuristica(); //String inicial = JOptionPane.showInputDialog("Nodo Inicial: "); //String meta = JOptionPane.showInputDialog("Nodo Meta: "); float costo_acumulado = 0; int pos; int bandera; String nodo_actual = inicial; ArrayList<Nodo> nodos = grafo.getNodos(); ArrayList<String> nodos_visitados = new ArrayList<>(); //Busqueda while (!nodo_actual.equals(meta)) { Map<String, Float> hijos = new TreeMap<>(); System.out.println("Nodo actual: " + nodo_actual); nodos_visitados.add(nodo_actual); bandera = 0; //calculamos el costo del nodo actual, hacia sus hijos for (int i = 0; i < nodos.size(); i++) { if (nodo_actual.equals(String.valueOf(nodos.get(i).getNum()))) { Iterator it = nodos.get(i).getAdyacentes().keySet().iterator(); while (it.hasNext()) { //nombre del nodo adyacente float cant_hijos; String key = it.next().toString(); if (nodos_visitados.contains(key) == false) { cant_hijos = costo_acumulado + nodos.get(i).getAdyacentes().get(key) + heuristica.get(key); System.out.println("AQUIIII " + nodos.get(i).getAdyacentes().get(key)); hijos.put(key, cant_hijos); } } } } Iterator c = hijos.keySet().iterator(); String auxKey = c.next().toString(); float auxCost = hijos.get(auxKey); Iterator b = hijos.keySet().iterator(); while (b.hasNext()) { String key = b.next().toString(); if (hijos.get(key) <= auxCost) { auxKey = ""; auxKey = key; auxCost = hijos.get(key); } } costo_acumulado = hijos.get(auxKey) - heuristica.get(auxKey); nodo_actual = auxKey; System.out.println(" Costo: " + (hijos.get(auxKey) - heuristica.get(auxKey))); } StyleConstants.setForeground(estilo, Color.black); try { documento.insertString(documento.getLength(), "Costo Total: ", estilo); } catch (BadLocationException e) { } StyleConstants.setForeground(estilo, Color.red); try { documento.insertString(documento.getLength(), String.valueOf(costo_acumulado), estilo); } catch (BadLocationException e) { } System.out.println("Costo TOTAL: " + costo_acumulado); nodos_visitados.add(meta); EdicionGrafo.visitados = nodos_visitados; } public void obtenerHeuristica() { heuristica = new TreeMap<>(); for (JSpinner h : heuristicos) { heuristica.put(h.getName(), Float.valueOf(h.getValue().toString())); } System.out.println(heuristica); } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Solucion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Solucion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Solucion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Solucion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Solucion().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton Aceptar; private javax.swing.JButton Volver; private javax.swing.JScrollPane hPanel; private javax.swing.JLabel hText; private javax.swing.JPanel heuristicaPanel; private javax.swing.JLabel inicialText; private javax.swing.JLabel jLabel1; private javax.swing.JLabel metaText; private javax.swing.JSpinner nodoInicial; private javax.swing.JSpinner nodoMeta; private javax.swing.JLabel nodoText; private javax.swing.JPanel nodosPanel; private javax.swing.JButton resolver; // End of variables declaration//GEN-END:variables }
6f83d6c2002ef3dde382a7d8c4f5b3779256db21
1c23fafcc016df84bfb35ef71f9fcece82bb34cd
/TypeVal.java
27a8f29259de4ed2909a34a0f35fb5fa7d2b4f15
[]
no_license
kaustrie/Undergrad
48f005b9b0ab489e7eb2b8cf384cd9382a11ea5f
2714511128996abf1390c8584b8ab6ef7057a44f
refs/heads/master
2021-01-13T01:46:27.357440
2015-08-28T01:14:26
2015-08-28T01:14:26
35,045,012
0
0
null
null
null
null
UTF-8
Java
false
false
1,065
java
public enum TypeVal /* This class is used to record the declared types of functions and their parameters in HashMap<String,TypeVal> funTypeTable HashMap<String,HashMap<String,TypeVal>> paramTypeTable HashMap<String,HashMap<Integer,TypeVal>> paramNumTypeTable which are included in the class "ParserTypeChecker.java". The enumerated values are also returned from typeEval() function. */ { Int, Float, Boolean, Correct, // represents type correctness of a function definition Error; // represents the type error value boolean isNumberType() { return this == Int || this == Float; } public String toString() { switch (this) { case Int: return "int"; case Float: return "float"; case Boolean: return "boolean"; case Correct: return "Correct"; default: return "Error"; } } public static TypeVal toTypeVal(String type) { if ( type.equals("int") ) return Int; else if ( type.equals("float") ) return Float; else if ( type.equals("boolean") ) return Boolean; else return null; } }
af0a22e69fa9ee21f070fc169ae055065638e8a4
f6f857ce9d5995e3370cb3838bec7284f50e6b7a
/src/main/java/com/github/scuwr/snitchvisualizer/handlers/SVTickHandler.java
ef7886e25f70f7c042e9ad561d7f5f54b844ad55
[ "MIT" ]
permissive
ProgrammerDan/Snitch-Visualizer
6e22feeba97e9916e48d42a6045c8f541b195537
81e2bb5b9ff81be5bd8dbdaf17092679b8cc2834
refs/heads/master
2020-12-25T04:17:27.275155
2015-04-14T15:52:07
2015-04-14T15:52:07
32,806,309
0
0
null
2015-04-14T15:52:07
2015-03-24T15:10:54
Java
UTF-8
Java
false
false
1,507
java
package com.github.scuwr.snitchvisualizer.handlers; import java.util.Date; import net.minecraft.client.Minecraft; import net.minecraftforge.event.entity.player.PlayerEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; /** * Tick Handler for Snitch Visualizer * * I was unable to query server-side ticks, so I set the tick value very high to * prevent the player from being kicked due to spamming * * In other words, the game is laggy and thinks you're spamming if it sends out too many * messages in a given amount of time. * * @author Scuwr * */ public class SVTickHandler{ public int playerTicks = 0; public static double waitTime = 4; public static int tickTimeout = 20; public static Date start = new Date(); @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event){ new SVPlayerHandler().onPlayerEvent(event); /*if(playerTicks <= 40) playerTicks++; if(SVChatHandler.updateSnitchList && playerTicks > 40){ Minecraft.getMinecraft().thePlayer.sendChatMessage("/jalist " + SVChatHandler.jalistIndex); playerTicks = 0; SVChatHandler.jalistIndex++; }*/ if(((new Date()).getTime() - (waitTime*1000)) > start.getTime() && SVChatHandler.updateSnitchList){ Minecraft.getMinecraft().thePlayer.sendChatMessage("/jalist " + SVChatHandler.jalistIndex); SVChatHandler.jalistIndex++; start = new Date(); } } }
1ca14f9eb113da64106e644bb8b88245c74b87cc
281dc00e5689c74bb0d5b19a8c43232d94a6fced
/homework3/src/main/java/com/cta/homework3/gateway/filter/HeaderHttpResponseFilter.java
a79d28bc41d2a822e634a419d49936a009c77982
[]
no_license
tigerChen19/javaCourses
9037d73bf0432e150a4566113661f8b19d82237f
607c6a722eca96826f8b8675099748900e9054a6
refs/heads/main
2023-07-03T14:50:27.760945
2021-08-01T08:25:50
2021-08-01T08:25:50
379,829,067
0
0
null
2021-08-01T08:25:50
2021-06-24T06:41:53
Java
UTF-8
Java
false
false
293
java
package com.cta.homework3.gateway.filter; import io.netty.handler.codec.http.FullHttpResponse; public class HeaderHttpResponseFilter implements HttpResponseFilter { @Override public void filter(FullHttpResponse response) { response.headers().set("kk", "java-1-nio"); } }
402b1061d2bfce13d3253f6a3fc26f3e7a89fe33
8f0e091169ae645a6ee8eb0e51c0bfe3368ea984
/app/src/androidTest/java/com/example/taskmanager/ExampleInstrumentedTest.java
568934eea895f653e7c7d7ca0abf2f156c42e0f4
[]
no_license
Rakhshanipr/TaskManager
31a5cca05cb3b25c62ef139e2e81f0039605fe1e
87129fe34837990b962b33b2c1a1799655fb7898
refs/heads/master
2023-03-03T19:42:56.209569
2021-02-03T12:05:34
2021-02-03T12:05:34
329,834,366
2
0
null
null
null
null
UTF-8
Java
false
false
760
java
package com.example.taskmanager; 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("com.example.taskmanager", appContext.getPackageName()); } }
99bc6486a213cc75eae97b8b655983ed9073194c
3ee6d6a1ca3f19b56eab7936a1e2839fc4b29e78
/study/src/com/test0422/Test3.java
6680681729d708c58d15407438d31b48d2d2d5b5
[]
no_license
daegi/study-dg
2764592b0f0914ec64b0a418a0417a1d6091651f
ad9862ecb60aca7265481daf7735d9dfd826e5f6
refs/heads/master
2021-01-19T13:52:59.044839
2014-07-25T03:27:26
2014-07-25T03:27:26
32,976,520
0
0
null
null
null
null
UHC
Java
false
false
1,070
java
package com.test0422; import java.io.File; import java.util.Scanner; public class Test3 { public static void main(String[] args) { Scanner sc= new Scanner(System.in); String pathname; try { System.out.print("파일 도는 폴더명(예: c:\\windows)?"); pathname=sc.next(); File f= new File(pathname); if(! f.exists()){ System.out.println("존재하지 않은 파일 또는 경로입니다"); System.exit(0); } if(f.isFile()){ //파일인 경우 System.out.println(f.getName()+":"+f.length()+"Bytes."); }else if(f.isDirectory()){ //폴더인 경우 //폴더안의 모든 폴더 및 파일 리스트 얻기 File[] fs=f.listFiles(); for(int i=0; i<fs.length;i++){ File ff=fs[i]; if(ff.isFile()){ System.out.println(ff.getName()+":"+ff.length()+"Bytes."); }else if (ff.isDirectory()){ System.out.println("폴더명:"+ff.getName()); } } } } catch (Exception e) { System.out.println(e.toString()); } } }
[ "choyc82@cf0b24a7-709c-1eb7-a6c0-50069b54bc80" ]
choyc82@cf0b24a7-709c-1eb7-a6c0-50069b54bc80
9125a25f1109ac1e587421e222080957cc063ec2
6cdf915922d58e9d806a8231bc0f4a83f5a72aba
/src/main/java/com/cb/minibike/service/LogService.java
c37fcb3f6a1c098bf01e93f528ae231831b5bbce
[]
no_license
cilibili/minibike
6c5b0ec64aed26c71674c37ab232032f6aa1310f
64823cc2116aac53012747c0d150eff2f4df9930
refs/heads/master
2020-06-17T11:23:15.193139
2019-07-09T03:27:09
2019-07-09T03:27:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
104
java
package com.cb.minibike.service; public interface LogService { public void saveLog(String log ); }
6cdcf9b0b1b3af23ca571536b3ff46b1dc5dd477
7bea2dd6272d16cc5e55ee8fe2c646108f69dbd5
/src/com/test/mvc/blog/Blog.java
09b85255bcc7b4874298a15b3d3c6931732f1226
[]
no_license
ChnZhangkai/vip1-bm
f6ff48c99762abc2f029e2c1675a3c9e53c5dcf7
aaf87ab4c75230f677c00c4891392a44eaa2358f
refs/heads/master
2020-05-14T18:01:43.800890
2019-04-17T14:04:28
2019-04-17T14:04:28
181,902,978
0
0
null
null
null
null
UTF-8
Java
false
false
1,616
java
package com.test.mvc.blog; import java.sql.Timestamp; import com.jfinal.log.Log; import com.platform.annotation.Table; import com.platform.mvc.base.BaseModel; /** * 博客表 model * @author 董华健 [email protected] */ @SuppressWarnings("unused") @Table(tableName = "test_blog") public class Blog extends BaseModel<Blog> { private static final long serialVersionUID = 6761767368352810428L; private static final Log log = Log.getLog(Blog.class); public static final Blog dao = new Blog().dao(); /** * 字段描述:标题 * 字段类型:character varying 长度:200 */ public static final String column_title = "title"; /** * 字段描述:内容 * 字段类型:text 长度:null */ public static final String column_content = "content"; /** * 字段描述:创建时间 * 字段类型:timestamp with time zone 长度:null */ public static final String column_createtime = "createtime"; /** * sqlId : test.blog.splitPageFrom * 描述:分页from */ public static final String sqlId_splitPageFrom = "test.blog.splitPageFrom"; private String title; private String content; private String createtime; public void setTitle(String title){ set(column_title, title); } public String getTitle() { return get(column_title); } public void setContent(String content){ set(column_content, content); } public String getContent() { return get(column_content); } public void setCreatetime(Timestamp createtime){ set(column_createtime, createtime); } public Timestamp getCreatetime() { return get(column_createtime); } }
902941c29aded4b422e009d64d521d0e886c8621
689ca185a5cf34dbd79980b329ff116bed6a7e8d
/src/secao3/Snippet6Foo2.java
ae2d5163638c867413dc14852dd73ccb15552e54
[]
no_license
fredericobsb/certificacao_java11
f892a7b40adf3e0ef0181b73cb7e9515b805548c
dcb06d05ed6780c41a87ea9f1b95f57a0e999c00
refs/heads/master
2023-03-29T08:33:40.842972
2021-04-06T11:26:00
2021-04-06T11:26:00
303,218,092
2
0
null
null
null
null
UTF-8
Java
false
false
522
java
package secao3; public class Snippet6Foo2 { public static void main(String[] args) { byte b7 = 0b0000_0001; char c7 = 0x0_07F; short s7 = 011_11; int i7 = 1_000_000; long d7 = 1_000_000L; float f7 = 1_000.000_000f; double l7 = 1.000_0000e10; System.out.println("b7 = " + b7); System.out.println("c7 = " + c7); System.out.println("s7 = " + s7); System.out.println("i7 = " + i7); System.out.println("l7 = " + l7); System.out.println("f7 = " + f7); System.out.println("d7 = " + d7); } }