blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
1eca9c7497d2cc541bc26081365c77214068d76b
1a4d9541ae8ba1c1ee49d17bfcdf5343c7922d57
/src/test/java/com/rishi/SamplePostgreSql/repository/EmployeeRepository.java
fc8ec205210744ecb87bda831254a7d27d1a65c3
[]
no_license
rishikeshvanjare18/Employee-Java-Backend-Postgressql
645c9cc4c36c9be0dc10bd3ebd4da2b833f8e92e
155666bb092aa7e4ff5a52e660c5993813739f21
refs/heads/master
2023-04-29T01:33:55.245073
2021-05-17T05:39:00
2021-05-17T05:39:00
368,064,834
0
0
null
null
null
null
UTF-8
Java
false
false
302
java
package com.rishi.SamplePostgreSql.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.rishi.SamplePostgreSql.model.Employee; @Repository public interface EmployeeRepository extends JpaRepository<Employee, Long>{ }
[ "rishikeshvanjare18pro@gmail.com" ]
rishikeshvanjare18pro@gmail.com
f5f4cc9329c33564d3d2594926a166989360723e
26cb8854b727e300499691fd3389b063389c6615
/Proyectos/ProyectoFinal/Push.java
61415d7fb7e46ef0a3091cc2fd52d2a3fb6c8fa6
[]
no_license
CarlaPerezGavilan/TC2016_A01023033
709b80605bf1ebbebfe33499ffa488828f54cc1f
2ed50900f6e0f4fd52aecbe092c1a80222f5052b
refs/heads/master
2020-03-26T12:13:33.293913
2019-05-17T17:21:46
2019-05-17T17:21:46
144,881,827
0
0
null
null
null
null
UTF-8
Java
false
false
143
java
public class Push{ public Version pushVersion; public void push (Commit c) { pushVersion = c.LastCommit; } }
[ "carlapgavilan@MacBook-Pro-de-Carla.local" ]
carlapgavilan@MacBook-Pro-de-Carla.local
83e02f37227cb87e5c259ec32c6cd8654ddefd2c
e49ddf6e23535806c59ea175b2f7aa4f1fb7b585
/tags/release-2.5/mipav/src/gov/nih/mipav/view/dialogs/JDialogConvertType.java
76bc3791752123bed74882a07ca0cee48cdfc0f5
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
svn2github/mipav
ebf07acb6096dff8c7eb4714cdfb7ba1dcace76f
eb76cf7dc633d10f92a62a595e4ba12a5023d922
refs/heads/master
2023-09-03T12:21:28.568695
2019-01-18T23:13:53
2019-01-18T23:13:53
130,295,718
1
0
null
null
null
null
UTF-8
Java
false
false
66,473
java
package gov.nih.mipav.view.dialogs; import gov.nih.mipav.model.algorithms.*; import gov.nih.mipav.model.algorithms.utilities.*; import gov.nih.mipav.model.file.*; import gov.nih.mipav.model.structures.*; import gov.nih.mipav.view.*; import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; /** * Simple dialog to convert the type of an image. * * @version 1.0 Jan 25, 1999 * @author Matthew J. McAuliffe, Ph.D. */ public class JDialogConvertType extends JDialogBase implements AlgorithmInterface, ScriptableInterface, ItemListener, DialogDefaultsInterface { //~ Static fields/initializers ------------------------------------------------------------------------------------- /** Use serialVersionUID for interoperability. */ private static final long serialVersionUID = -6815107682654273857L; //~ Instance fields ------------------------------------------------------------------------------------------------ /** DOCUMENT ME! */ private JRadioButton bigEnd; /** DOCUMENT ME! */ private AlgorithmChangeType changeTypeAlgo; /** DOCUMENT ME! */ private int dataType; /** DOCUMENT ME! */ private int displayLoc; // Flag indicating if a new image is to be generated /** DOCUMENT ME! */ private boolean endianess; /** DOCUMENT ME! */ private JRadioButton fullRangeRadio; /** DOCUMENT ME! */ private ModelImage image; /** DOCUMENT ME! */ private JLabel inEnd; /** DOCUMENT ME! */ private double inMin, inMax; /** DOCUMENT ME! */ private ButtonGroup inputRangeGroup; /** DOCUMENT ME! */ private JLabel inStart; /** DOCUMENT ME! */ private double inTempMin, inTempMax; /** DOCUMENT ME! */ private double inTempMinDefault, inTempMaxDefault; /** DOCUMENT ME! */ private JRadioButton littleEnd; /** DOCUMENT ME! */ private JRadioButton newImage; /** DOCUMENT ME! */ private JLabel outEnd; /** DOCUMENT ME! */ private double outMin, outMax; /** DOCUMENT ME! */ private JLabel outStart; /** DOCUMENT ME! */ private double outTempMin, outTempMax; /** DOCUMENT ME! */ private double outTempMinDefault, outTempMaxDefault; /** DOCUMENT ME! */ private boolean processIndep = false; // for 2.5D processing each slice independently /** DOCUMENT ME! */ private JCheckBox processIndepBox; /** DOCUMENT ME! */ private JRadioButton radioARGB; /** DOCUMENT ME! */ private JRadioButton radioARGB_FLOAT; /** DOCUMENT ME! */ private JRadioButton radioARGB_USHORT; /** DOCUMENT ME! */ private JRadioButton radioBool; /** DOCUMENT ME! */ private JRadioButton radioByte; /** DOCUMENT ME! */ private JRadioButton radioDouble; /** DOCUMENT ME! */ private JRadioButton radioFloat; /** DOCUMENT ME! */ private JRadioButton radioInt; /** DOCUMENT ME! */ private JRadioButton radioLong; /** DOCUMENT ME! */ private JRadioButton radioShort; /** DOCUMENT ME! */ private JRadioButton radioUByte; /** DOCUMENT ME! */ private JRadioButton radioUInt; /** DOCUMENT ME! */ private JRadioButton radioUShort; /** DOCUMENT ME! */ private JRadioButton replaceImage; /** DOCUMENT ME! */ private ModelImage resultImage = null; // result image /** DOCUMENT ME! */ private JTextField textInEnd; /** DOCUMENT ME! */ private JTextField textInStart; /** DOCUMENT ME! */ private JTextField textOutEnd; /** DOCUMENT ME! */ private JTextField textOutStart; /** DOCUMENT ME! */ private String[] titles; /** DOCUMENT ME! */ private boolean useDefaultRanges = true; // only applies for input ranges /** DOCUMENT ME! */ private ViewUserInterface userInterface; /** DOCUMENT ME! */ private JRadioButton userRangeRadio; //~ Constructors --------------------------------------------------------------------------------------------------- /** * Empty constructor needed for dynamic instantiation (used during scripting). */ public JDialogConvertType() { } // or if the source image is to be replaced /** * Creates new dialog for converting type of image. * * @param theParentFrame Parent frame. * @param _image Source image. */ public JDialogConvertType(Frame theParentFrame, ModelImage _image) { super(theParentFrame, false); image = _image; userInterface = ((ViewJFrameBase) (parentFrame)).getUserInterface(); init(); loadDefaults(); setVisible(true); } /** * Used primarily for the script to store variables and run the algorithm. No actual dialog will appear but the set * up info and result image will be stored here. * * @param UI The user interface, needed to create the image frame. * @param im Source image. */ public JDialogConvertType(ViewUserInterface UI, ModelImage im) { super(false); userInterface = UI; image = im; parentFrame = im.getParentFrame(); } //~ Methods -------------------------------------------------------------------------------------------------------- /** * Closes dialog box when the OK button is pressed and sets the variables. * * @param event Event that triggers this function */ public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); if (command.equals("OK")) { if (setVariables()) { callAlgorithm(); } } else if (command.equals("Cancel")) { cancelFlag = true; dispose(); } else if (command.equals("Help")) { MipavUtil.showHelp("10069"); } else if (command.equals("FullRange")) { // if using full range, then reset the // input values to their defaults // and disable the text fields and labels // for the user defined range. useDefaultRanges = true; this.setDefaultRanges(); inStart.setEnabled(false); inEnd.setEnabled(false); textInStart.setEnabled(false); textInEnd.setEnabled(false); } else if (command.equals("UserRange")) { // set the values to the last settings of the text fields // and enable the user defined labels and text fields useDefaultRanges = false; inStart.setEnabled(true); inEnd.setEnabled(true); textInStart.setEnabled(true); textInEnd.setEnabled(true); String tmpStr = textInStart.getText(); if (testParameter(tmpStr, image.getMin(), image.getMax())) { inTempMin = Double.valueOf(tmpStr).doubleValue(); } else { textInStart.requestFocus(); textInStart.selectAll(); } tmpStr = textInEnd.getText(); if (testParameter(tmpStr, image.getMin(), image.getMax())) { inTempMax = Double.valueOf(tmpStr).doubleValue(); } else { textInEnd.requestFocus(); textInEnd.selectAll(); } } } // end actionPerformed() // ************************************************************************ // ************************** Algorithm Events **************************** // ************************************************************************ /** * This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms when * it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up. * * @param algorithm Algorithm that caused the event. */ public void algorithmPerformed(AlgorithmBase algorithm) { ViewJFrameImage imageFrame = null; if (Preferences.is(Preferences.PREF_SAVE_DEFAULTS) && (this.getOwner() != null) && !isScriptRunning()) { saveDefaults(); } if (algorithm instanceof AlgorithmChangeType) { if ((changeTypeAlgo.isCompleted() == true) && (resultImage != null)) { updateFileInfo(image, resultImage); // The algorithm has completed and produced a new image to be displayed. try { imageFrame = new ViewJFrameImage(resultImage, null, new Dimension(610, 200)); } catch (OutOfMemoryError error) { MipavUtil.displayError("Out of memory: unable to open new frame"); } } else if (resultImage == null) { // These next lines set the titles in all frames where the source image is displayed to // image name so as to indicate that the image is now unlocked! // The image frames are enabled and then registed to the userinterface. Vector imageFrames = image.getImageFrameVector(); for (int i = 0; i < imageFrames.size(); i++) { ((Frame) (imageFrames.elementAt(i))).setTitle(titles[i]); ((Frame) (imageFrames.elementAt(i))).setEnabled(true); if (((Frame) (imageFrames.elementAt(i))) != parentFrame) { userInterface.registerFrame((Frame) (imageFrames.elementAt(i))); } } if (parentFrame != null) { userInterface.registerFrame(parentFrame); } image.notifyImageDisplayListeners(null, true); } else if (resultImage != null) { // algorithm failed but result image still has garbage resultImage.disposeLocal(); // clean up memory resultImage = null; } } insertScriptLine(algorithm); // Update frame // ((ViewJFrameBase)parentFrame).updateImages(true); changeTypeAlgo.finalize(); changeTypeAlgo = null; dispose(); System.gc(); } /** * Accessor that returns the data type. * * @return the data type */ public int getDataType() { return dataType; } /** * Construct a delimited string that contains the parameters to this algorithm. * * @param delim the parameter delimiter (defaults to " " if empty) * * @return the parameter string */ public String getParameterString(String delim) { if (delim.equals("")) { delim = " "; } String str = new String(); str += dataType + delim; str += endianess + delim; str += useDefaultRanges + delim; if (!useDefaultRanges) { str += inTempMin + delim; str += inTempMax + delim; } str += outTempMin + delim; str += outTempMax; return str; } /** * Accessor that returns the image. * * @return The result image. */ public ModelImage getResultImage() { return resultImage; } /** * If a script is being recorded and the algorithm is done, add an entry for this algorithm. * * @param algo the algorithm to make an entry for */ public void insertScriptLine(AlgorithmBase algo) { if (algo.isCompleted()) { if (userInterface.isScriptRecording()) { // check to see if the match image is already in the ImgTable if (userInterface.getScriptDialog().getImgTableVar(image.getImageName()) == null) { if (userInterface.getScriptDialog().getActiveImgTableVar(image.getImageName()) == null) { userInterface.getScriptDialog().putActiveVar(image.getImageName()); } } if (useDefaultRanges == true) { userInterface.getScriptDialog().append("ConvertType " + userInterface.getScriptDialog().getVar(image.getImageName()) + " "); if (displayLoc == NEW) { userInterface.getScriptDialog().putVar(resultImage.getImageName()); userInterface.getScriptDialog().append(userInterface.getScriptDialog().getVar(resultImage.getImageName()) + " " + getParameterString(" ") + "\n"); } else { userInterface.getScriptDialog().append(userInterface.getScriptDialog().getVar(image.getImageName()) + " " + getParameterString(" ") + "\n"); } } else { // not using default ranges userInterface.getScriptDialog().append("ConvertType " + userInterface.getScriptDialog().getVar(image.getImageName()) + " "); if (displayLoc == NEW) { userInterface.getScriptDialog().putVar(resultImage.getImageName()); userInterface.getScriptDialog().append(userInterface.getScriptDialog().getVar(resultImage.getImageName()) + " " + getParameterString(" ") + "\n"); } else { userInterface.getScriptDialog().append(userInterface.getScriptDialog().getVar(image.getImageName()) + " " + getParameterString(" ") + "\n"); } } // end if useDefaultRanges } } } /** * Sets the flags for the checkboxes and resets labels. * * @param event Event that triggered this function. */ public synchronized void itemStateChanged(ItemEvent event) { outStart.setEnabled(true); outEnd.setEnabled(true); textOutStart.setEnabled(true); textOutEnd.setEnabled(true); if (image.isColorImage()) { if (radioARGB.isSelected()) { outStart.setText("Starting range (0 to 255)."); outEnd.setText("Ending range (0 to 255)."); textOutStart.setText("0"); textOutEnd.setText("255"); outTempMinDefault = 0; outTempMaxDefault = 255; inMin = 0; inMax = 255; outMin = 0; outMax = 255; } else if (radioARGB_USHORT.isSelected()) { outStart.setText("Starting range (0 to 65535)."); outEnd.setText("Ending range (0 to 65535)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = 0; inMax = 65535; outMin = 0; outMax = 65535; } else if (radioARGB_FLOAT.isSelected()) { outStart.setText("Starting range (-3.40 E+38 to 3.40 E+38)."); outEnd.setText("Ending range (-3.40 E+38 to 3.40 E+38)."); textOutStart.setText("0"); textOutEnd.setText("1023"); outTempMinDefault = 0; outTempMaxDefault = 1023; inMin = -Float.MAX_VALUE; inMax = Float.MAX_VALUE; outMin = -Float.MAX_VALUE; outMax = Float.MAX_VALUE; } } // if (image.isColorImage()) else { // black and white image if (radioBool.isSelected()) { outStart.setText(" "); outEnd.setText("Pixels != 0 are set to 1. "); textOutStart.setText("0"); textOutStart.setEnabled(false); textOutEnd.setText("1"); textOutEnd.setEnabled(false); outTempMinDefault = 0; outTempMaxDefault = 1; inMin = 0; inMax = 1; outMin = 0; outMax = 1; } else if (radioByte.isSelected()) { outStart.setText("Starting range (-128 to 127)."); outEnd.setText("Ending range (-128 to 127)."); textOutStart.setText("-128"); textOutEnd.setText("127"); outTempMinDefault = -128; outTempMaxDefault = 127; inMin = -128; inMax = 127; outMin = -128; outMax = 127; } else if (radioUByte.isSelected()) { outStart.setText("Starting range (0 to 255)."); outEnd.setText("Ending range (0 to 255)."); textOutStart.setText("0"); textOutEnd.setText("255"); outTempMinDefault = 0; outTempMaxDefault = 255; inMin = 0; inMax = 255; outMin = 0; outMax = 255; } else if (radioShort.isSelected()) { outStart.setText("Starting range (-32768 to 32767)."); outEnd.setText("Ending range (-32768 to 32767)."); textOutStart.setText("-1024"); textOutEnd.setText("3071"); outTempMinDefault = -1024; outTempMaxDefault = 3071; inMin = -32768; inMax = 32767; outMin = -32768; outMax = 32767; } else if (radioUShort.isSelected()) { outStart.setText("Starting range (0 to 65535)."); outEnd.setText("Ending range (0 to 65535)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = 0; inMax = 65535; outMin = 0; outMax = 65535; } else if (radioInt.isSelected()) { outStart.setText("Starting range (-2.147 E+9 to 2.147 E+9)."); outEnd.setText("Ending range (-2.147 E+9 to 2.147 E+9)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = Integer.MIN_VALUE; inMax = Integer.MAX_VALUE; outMin = Integer.MIN_VALUE; outMax = Integer.MAX_VALUE; } else if (radioUInt.isSelected()) { outStart.setText("Starting range (0 to 4.29 E+9)."); outEnd.setText("Ending range (0 to 4.29 E+9)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = 0; inMax = 4294967295L; outMin = 0; outMax = 4294967295L; } else if (radioLong.isSelected()) { outStart.setText("Starting range (-9.22 E+18 to 9.22 E+18)."); outEnd.setText("Ending range (-9.22 E+18 to 9.22 E+18)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = Long.MIN_VALUE; inMax = Long.MAX_VALUE; outMin = Long.MIN_VALUE; outMax = Long.MAX_VALUE; } else if (radioFloat.isSelected()) { outStart.setText("Starting range (-3.40 E+38 to 3.40 E+38)."); outEnd.setText("Ending range (-3.40 E+38 to 3.40 E+38)."); textOutStart.setText("0"); textOutEnd.setText("1023"); outTempMinDefault = 0; outTempMaxDefault = 1023; inMin = -Float.MAX_VALUE; inMax = Float.MAX_VALUE; outMin = -Float.MAX_VALUE; outMax = Float.MAX_VALUE; } else if (radioDouble.isSelected()) { outStart.setText("Starting range (-1.8 E+308 to 1.8 E+308)."); outEnd.setText("Ending range (-1.8 E+308 to 1.8 E+308)."); textOutStart.setText("0"); textOutEnd.setText("1023"); outTempMinDefault = 0; outTempMaxDefault = 1023; inMin = -Double.MAX_VALUE; inMax = Double.MAX_VALUE; outMin = -Double.MAX_VALUE; outMax = Double.MAX_VALUE; } } // else black and white image } /** * Loads the default settings from Preferences to set up the dialog. */ public void loadDefaults() { String defaultsString = Preferences.getDialogDefaults(getDialogName()); if ((defaultsString != null) && (newImage != null)) { try { StringTokenizer st = new StringTokenizer(defaultsString, ","); dataType = MipavUtil.getInt(st); endianess = MipavUtil.getBoolean(st); useDefaultRanges = MipavUtil.getBoolean(st); if (!useDefaultRanges) { inTempMin = MipavUtil.getFloat(st); inTempMax = MipavUtil.getFloat(st); } outTempMin = MipavUtil.getFloat(st); outTempMax = MipavUtil.getFloat(st); if (endianess) { bigEnd.setSelected(true); } else { littleEnd.setSelected(true); } if (useDefaultRanges) { fullRangeRadio.setSelected(true); } else { actionPerformed(new ActionEvent(userRangeRadio, 0, "UserRange")); userRangeRadio.setSelected(true); } if (new Boolean(st.nextToken()).booleanValue()) { newImage.setSelected(true); } else { replaceImage.setSelected(true); } // check to see if image type goes with grayscale or color // only sets defaults when last was color->color // and las was gray->gray align if (image.isColorImage()) { if (dataType == ModelStorageBase.ARGB) { radioARGB.setSelected(true); } else if (dataType == ModelStorageBase.ARGB_FLOAT) { radioARGB_FLOAT.setSelected(true); } else if (dataType == ModelStorageBase.ARGB_USHORT) { radioARGB_USHORT.setSelected(true); } } else { if (dataType == ModelStorageBase.BOOLEAN) { radioBool.setSelected(true); } else if (dataType == ModelStorageBase.BYTE) { radioByte.setSelected(true); } else if (dataType == ModelStorageBase.UBYTE) { radioUByte.setSelected(true); } else if (dataType == ModelStorageBase.SHORT) { radioShort.setSelected(true); } else if (dataType == ModelStorageBase.USHORT) { radioUShort.setSelected(true); } else if (dataType == ModelStorageBase.INTEGER) { radioInt.setSelected(true); } else if (dataType == ModelStorageBase.UINTEGER) { radioUInt.setSelected(true); } else if (dataType == ModelStorageBase.LONG) { radioLong.setSelected(true); } else if (dataType == ModelStorageBase.FLOAT) { radioFloat.setSelected(true); } else if (dataType == ModelStorageBase.DOUBLE) { radioDouble.setSelected(true); } } } catch (Exception ex) { // since there was a problem parsing the defaults string, start over with the original defaults Preferences.debug("Resetting defaults for dialog: " + getDialogName()); Preferences.removeProperty(getDialogName()); ex.printStackTrace(); } } } /** * Saves the default settings into the Preferences file. */ public void saveDefaults() { String defaultsString = new String(getParameterString(",") + "," + newImage.isSelected()); Preferences.saveDialogDefaults(getDialogName(), defaultsString); } /** * Run this algorithm from a script. * * @param parser the script parser we get the state from * * @throws IllegalArgumentException if there is something wrong with the arguments in the script */ public void scriptRun(AlgorithmScriptParser parser) throws IllegalArgumentException { setScriptRunning(true); String srcImageKey = null; String destImageKey = null; Preferences.debug("Script run of converttype"); try { srcImageKey = parser.getNextString(); } catch (Exception e) { throw new IllegalArgumentException(); } ModelImage im = parser.getImage(srcImageKey); setModal(false); image = im; userInterface = image.getUserInterface(); parentFrame = image.getParentFrame(); // the result image try { destImageKey = parser.getNextString(); } catch (Exception e) { throw new IllegalArgumentException(); } if (srcImageKey.equals(destImageKey)) { this.setDisplayLocReplace(); } else { this.setDisplayLocNew(); } Preferences.debug("about to read variables"); try { setDataType(parser.getNextInteger()); setEndianess(parser.getNextBoolean()); if (parser.getNextBoolean()) { setUseDefaultRanges(true); setDefaultRanges(); } else { setUseDefaultRanges(false); setInputRangeMin(parser.getNextDouble()); setInputRangeMax(parser.getNextDouble()); } setOutputRangeMin(parser.getNextDouble()); setOutputRangeMax(parser.getNextDouble()); } catch (Exception e) { throw new IllegalArgumentException(); } Preferences.debug("got past var read"); setActiveImage(parser.isActiveImage()); setSeparateThread(false); callAlgorithm(); if (!srcImageKey.equals(destImageKey)) { parser.putVariable(destImageKey, getResultImage().getImageName()); } } /** * Accessor that sets the data type for what the converted image is to be. * * @param type New data type. */ public void setDataType(int type) { dataType = type; } /** * Sets the default values for the input and output range. */ public void setDefaultRanges() { inTempMin = (float) image.getMin(); inTempMax = (float) image.getMax(); /* Only the input values need to be reset for a particular image * if (dataType == ModelStorageBase.BOOLEAN) { outTempMin= 0; outTempMax= 1; } else if (dataType == * ModelStorageBase.BYTE) { outTempMin = -128; outTempMax = 127; } else if (dataType == * ModelStorageBase.UBYTE) { outTempMin = 0; outTempMax = 255; } else if (dataType == ModelStorageBase.SHORT) { * outTempMin = -1024; outTempMax = 3071; } else if (dataType == ModelStorageBase.USHORT) { outTempMin = 0; * outTempMax = 4095; } else if (dataType == ModelStorageBase.INTEGER) { outTempMin = 0; outTempMax = 4095; } * else if (dataType == ModelStorageBase.LONG) { outTempMin = 0; outTempMax = 4095; } else if (dataType == * ModelStorageBase.FLOAT) { outTempMin = 0; outTempMax = 1023; } else if (dataType == ModelStorageBase.DOUBLE) * { outTempMin = 0; outTempMax = 1023; } */ // inTempMinDefault = inTempMin; // inTempMaxDefault = inTempMax; // outTempMinDefault = outTempMin; // outTempMaxDefault = outTempMax; } /** * Accessor that sets the display loc variable to new, so that a new image is created once the algorithm completes. */ public void setDisplayLocNew() { displayLoc = NEW; } /** * Accessor that sets the display loc variable to replace, so the current image is replaced once the algorithm * completes. */ public void setDisplayLocReplace() { displayLoc = REPLACE; } /** * Accessor that sets the endianess. * * @param endns Endianess. */ public void setEndianess(boolean endns) { endianess = endns; } /** * Accessor that sets the maximum input range to the parameter. * * @param max Maximum input range. */ public void setInputRangeMax(double max) { inTempMax = max; } /** * Accessor that sets the minimum input range to the parameter. * * @param min Minimum input range. */ public void setInputRangeMin(double min) { inTempMin = min; } /** * Accessor that sets the maximum output range to the parameter. * * @param max Maximum output range. */ public void setOutputRangeMax(double max) { outTempMax = max; } /** * Accessor that sets the minimum output range to the parameter. * * @param min Minimum output range. */ public void setOutputRangeMin(double min) { outTempMin = min; } /** * Accessor that sets the useDefaultRanges to the parameter. * * @param useDefault Value for useDefaultRanges variable. */ public void setUseDefaultRanges(boolean useDefault) { useDefaultRanges = useDefault; } /** * Once all the necessary variables are set, call the Change Type algorithm based on what type of image this is and * whether or not there is a separate destination image. */ private void callAlgorithm() { if (image.getNDims() == 2) { // source image is 2D int[] destExtents = new int[2]; destExtents[0] = image.getExtents()[0]; // X dim destExtents[1] = image.getExtents()[1]; // Y dim image.getFileInfo(0).setEndianess(endianess); if (displayLoc == NEW) { try { // Make result image of the new data type resultImage = new ModelImage(dataType, destExtents, makeImageName(image.getImageName(), "_changed"), userInterface); // Make algorithm changeTypeAlgo = new AlgorithmChangeType(resultImage, image, inTempMin, inTempMax, outTempMin, outTempMax, processIndep); // This is very important. Adding this object as a listener allows the algorithm to // notify this object when it has completed of failed. See algorithm performed event. // This is made possible by implementing AlgorithmedPerformed interface changeTypeAlgo.addListener(this); // Hide dialog setVisible(false); if (runInSeparateThread) { // Start the thread as a low priority because we wish to still have user interface work fast. if (changeTypeAlgo.startMethod(Thread.MIN_PRIORITY) == false) { MipavUtil.displayError("A thread is already running on this object"); } } else { changeTypeAlgo.setActiveImage(isActiveImage); if (!userInterface.isAppFrameVisible()) { changeTypeAlgo.setProgressBarVisible(false); } changeTypeAlgo.run(); } } catch (OutOfMemoryError x) { MipavUtil.displayError("Dialog convert image: unable to allocate enough memory"); if (resultImage != null) { resultImage.disposeLocal(); // Clean up memory of result image resultImage = null; } return; } } else { try { // No need to make new image space because the user has choosen to replace the source image // Make the algorithm class changeTypeAlgo = new AlgorithmChangeType(image, dataType, inTempMin, inTempMax, outTempMin, outTempMax, processIndep); // This is very important. Adding this object as a listener allows the algorithm to // notify this object when it has completed of failed. See algorithm performed event. // This is made possible by implementing AlgorithmedPerformed interface changeTypeAlgo.addListener(this); // Hide the dialog since the algorithm is about to run. setVisible(false); // These next lines set the titles in all frames where the source image is displayed to // "locked - " image name so as to indicate that the image is now read/write locked! // The image frames are disabled and then unregisted from the userinterface until the // algorithm has completed. Vector imageFrames = image.getImageFrameVector(); titles = new String[imageFrames.size()]; for (int i = 0; i < imageFrames.size(); i++) { titles[i] = ((Frame) (imageFrames.elementAt(i))).getTitle(); ((Frame) (imageFrames.elementAt(i))).setTitle("Locked: " + titles[i]); ((Frame) (imageFrames.elementAt(i))).setEnabled(false); userInterface.unregisterFrame((Frame) (imageFrames.elementAt(i))); } if (runInSeparateThread) { // Start the thread as a low priority because we wish to still have user interface. if (changeTypeAlgo.startMethod(Thread.MIN_PRIORITY) == false) { MipavUtil.displayError("A thread is already running on this object"); } } else { changeTypeAlgo.setActiveImage(isActiveImage); if (!userInterface.isAppFrameVisible()) { changeTypeAlgo.setProgressBarVisible(false); } changeTypeAlgo.run(); } } catch (OutOfMemoryError x) { MipavUtil.displayError("Dialog change type: unable to allocate enough memory"); return; } } } else if ((image.getNDims() == 3) || (image.getNDims() == 4)) { int[] destExtents; if (image.getNDims() == 3) { destExtents = new int[3]; destExtents[0] = image.getExtents()[0]; destExtents[1] = image.getExtents()[1]; destExtents[2] = image.getExtents()[2]; for (int n = 0; n < image.getExtents()[2]; n++) { image.getFileInfo(n).setEndianess(endianess); } } else { destExtents = new int[4]; destExtents[0] = image.getExtents()[0]; destExtents[1] = image.getExtents()[1]; destExtents[2] = image.getExtents()[2]; destExtents[3] = image.getExtents()[3]; for (int n = 0; n < (image.getExtents()[2] * image.getExtents()[3]); n++) { image.getFileInfo(n).setEndianess(endianess); } } if (displayLoc == NEW) { try { // Make result image of the new data type resultImage = new ModelImage(dataType, destExtents, makeImageName(image.getImageName(), "_changed"), userInterface); // Make algorithm changeTypeAlgo = new AlgorithmChangeType(resultImage, image, inTempMin, inTempMax, outTempMin, outTempMax, processIndep); // This is very important. Adding this object as a listener allows the algorithm to // notify this object when it has completed or failed. See algorithm performed event. // This is made possible by implementing AlgorithmedPerformed interface changeTypeAlgo.addListener(this); // Hide dialog setVisible(false); if (runInSeparateThread) { // Start the thread as a low priority because we wish to still have user interface work fast if (changeTypeAlgo.startMethod(Thread.MIN_PRIORITY) == false) { MipavUtil.displayError("A thread is already running on this object"); } } else { changeTypeAlgo.setActiveImage(isActiveImage); if (!userInterface.isAppFrameVisible()) { changeTypeAlgo.setProgressBarVisible(false); } changeTypeAlgo.run(); } } catch (OutOfMemoryError x) { MipavUtil.displayError("Dialog change type: unable to allocate enough memory"); if (resultImage != null) { resultImage.disposeLocal(); // Clean up image memory resultImage = null; } return; } } else { try { // Make algorithm changeTypeAlgo = new AlgorithmChangeType(image, dataType, inTempMin, inTempMax, outTempMin, outTempMax, processIndep); // This is very important. Adding this object as a listener allows the algorithm to // notify this object when it has completed or failed. See algorithm performed event. // This is made possible by implementing AlgorithmedPerformed interface changeTypeAlgo.addListener(this); // Hide dialog setVisible(false); // These next lines set the titles in all frames where the source image is displayed to // "locked - " image name so as to indicate that the image is now read/write locked! // The image frames are disabled and then unregisted from the userinterface until the // algorithm has completed. Vector imageFrames = image.getImageFrameVector(); titles = new String[imageFrames.size()]; for (int i = 0; i < imageFrames.size(); i++) { titles[i] = ((Frame) (imageFrames.elementAt(i))).getTitle(); ((Frame) (imageFrames.elementAt(i))).setTitle("Locked: " + titles[i]); ((Frame) (imageFrames.elementAt(i))).setEnabled(false); userInterface.unregisterFrame((Frame) (imageFrames.elementAt(i))); } if (runInSeparateThread) { // Start the thread as a low priority because we wish to still have user interface work fast if (changeTypeAlgo.startMethod(Thread.MIN_PRIORITY) == false) { MipavUtil.displayError("A thread is already running on this object"); } } else { changeTypeAlgo.setActiveImage(isActiveImage); if (!userInterface.isAppFrameVisible()) { changeTypeAlgo.setProgressBarVisible(false); } changeTypeAlgo.run(); } } catch (OutOfMemoryError x) { MipavUtil.displayError("Dialog change type: unable to allocate enough memory"); return; } } } } /** * Sets up the GUI (panels, buttons, etc) and displays it on the screen. */ private void init() { setForeground(Color.black); setTitle("Convert image type"); GridBagLayout gblay = new GridBagLayout(); JPanel panelImageType = new JPanel(new GridBagLayout()); panelImageType.setForeground(Color.black); panelImageType.setBorder(buildTitledBorder("Image Type")); ButtonGroup group1 = new ButtonGroup(); if (image.isColorImage()) { radioARGB = new JRadioButton("ARGB", false); radioARGB.setFont(serif12); radioARGB.addItemListener(this); group1.add(radioARGB); radioARGB_USHORT = new JRadioButton("ARGB_USHORT", false); radioARGB_USHORT.setFont(serif12); radioARGB_USHORT.addItemListener(this); group1.add(radioARGB_USHORT); radioARGB_FLOAT = new JRadioButton("ARGB_FLOAT", false); radioARGB_FLOAT.setFont(serif12); radioARGB_FLOAT.addItemListener(this); group1.add(radioARGB_FLOAT); } // if (image.isColorImage()) else { // black and white image radioBool = new JRadioButton("Boolean", false); radioBool.setFont(serif12); radioBool.addItemListener(this); group1.add(radioBool); radioByte = new JRadioButton("Byte", false); radioByte.setFont(serif12); radioByte.addItemListener(this); group1.add(radioByte); radioUByte = new JRadioButton("Unsigned Byte", false); radioUByte.setFont(serif12); radioUByte.addItemListener(this); group1.add(radioUByte); radioShort = new JRadioButton("Short", false); radioShort.setFont(serif12); radioShort.addItemListener(this); group1.add(radioShort); radioUShort = new JRadioButton("Unsigned Short", false); radioUShort.setFont(serif12); radioUShort.addItemListener(this); group1.add(radioUShort); radioInt = new JRadioButton("Integer", false); radioInt.setFont(serif12); radioInt.addItemListener(this); group1.add(radioInt); radioUInt = new JRadioButton("Unsigned Integer", false); radioUInt.setFont(serif12); radioUInt.addItemListener(this); group1.add(radioUInt); radioLong = new JRadioButton("Long", false); radioLong.setFont(serif12); radioLong.addItemListener(this); group1.add(radioLong); radioFloat = new JRadioButton("Float", false); radioFloat.setFont(serif12); radioFloat.addItemListener(this); group1.add(radioFloat); radioDouble = new JRadioButton("Double", false); radioDouble.setFont(serif12); radioDouble.addItemListener(this); group1.add(radioDouble); } // else black and white image GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.gridwidth = 1; gbc.gridheight = 1; gbc.fill = gbc.HORIZONTAL; gbc.weightx = 1; gbc.anchor = gbc.WEST; gbc.insets = new Insets(0, 5, 0, 5); if (image.isColorImage()) { panelImageType.add(radioARGB, gbc); gbc.gridy = 1; panelImageType.add(radioARGB_USHORT, gbc); gbc.gridy = 2; panelImageType.add(radioARGB_FLOAT, gbc); } // if (image.isColorImage()) else { // black and white image panelImageType.add(radioBool, gbc); gbc.gridy = 1; panelImageType.add(radioByte, gbc); gbc.gridy = 2; panelImageType.add(radioUByte, gbc); gbc.gridy = 3; panelImageType.add(radioShort, gbc); gbc.gridy = 4; panelImageType.add(radioUShort, gbc); gbc.gridy = 5; panelImageType.add(radioInt, gbc); gbc.gridy = 6; panelImageType.add(radioUInt, gbc); gbc.gridy = 7; panelImageType.add(radioLong, gbc); gbc.gridy = 8; panelImageType.add(radioFloat, gbc); gbc.gridy = 9; panelImageType.add(radioDouble, gbc); } // else black and white image JPanel panelInRange = new JPanel(gblay); panelInRange.setForeground(Color.black); panelInRange.setBorder(buildTitledBorder("Range of input values")); inputRangeGroup = new ButtonGroup(); fullRangeRadio = new JRadioButton("Use entire image range.", true); fullRangeRadio.setFont(serif12); fullRangeRadio.setActionCommand("FullRange"); fullRangeRadio.addActionListener(this); inputRangeGroup.add(fullRangeRadio); useDefaultRanges = true; userRangeRadio = new JRadioButton("Use user defined range.", false); userRangeRadio.setFont(serif12); userRangeRadio.setActionCommand("UserRange"); userRangeRadio.addActionListener(this); inputRangeGroup.add(userRangeRadio); inMin = (float) image.getMin(); inMax = (float) image.getMax(); inTempMinDefault = inMin; inTempMaxDefault = inMax; String tempStr = new String(" Start input range ( " + makeString((float) inMin, 12) + " - " + makeString((float) inMax, 12) + " )."); inStart = new JLabel(tempStr); inStart.setFont(serif12); inStart.setForeground(Color.black); inStart.setEnabled(false); textInStart = new JTextField(); textInStart.setText(makeString((float) inMin, 12)); textInStart.setFont(serif12); textInStart.addFocusListener(this); textInStart.setEnabled(false); tempStr = new String(" End input range ( " + makeString((float) inMin, 12) + " - " + makeString((float) inMax, 12) + " )."); inEnd = new JLabel(tempStr); inEnd.setFont(serif12); inEnd.setForeground(Color.black); inEnd.setEnabled(false); textInEnd = new JTextField(); textInEnd.setText(makeString((float) inMax, 12)); textInEnd.setFont(serif12); textInEnd.addFocusListener(this); textInEnd.setEnabled(false); // check to see if HistoLUT frame is open and threshold values selected if ((image.getHistoLUTFrame() != null) && image.getHistoLUTFrame().isThresholding()) { userRangeRadio.setSelected(true); fullRangeRadio.setSelected(false); textInStart.setText(makeString(image.getHistoLUTFrame().getLowerThreshold(), 12)); textInEnd.setText(makeString(image.getHistoLUTFrame().getUpperThreshold(), 12)); inStart.setEnabled(true); inEnd.setEnabled(true); textInStart.setEnabled(true); textInEnd.setEnabled(true); } // position radio buttons for full range or user range gbc.gridx = 0; gbc.gridy = 0; gbc.gridwidth = 1; gbc.gridheight = 1; gbc.anchor = gbc.WEST; panelInRange.add(fullRangeRadio, gbc); gbc.gridx = 1; panelInRange.add(userRangeRadio, gbc); // position user defined range Insets normal = gbc.insets; Insets indented = new Insets(normal.bottom, 15, normal.right, normal.top); gbc.gridx = 0; gbc.gridy = 1; gbc.insets = indented; panelInRange.add(inStart, gbc); gbc.gridy = 2; panelInRange.add(inEnd, gbc); gbc.gridx = 1; gbc.gridy = 1; gbc.fill = gbc.HORIZONTAL; gbc.gridwidth = gbc.REMAINDER; gbc.insets = normal; panelInRange.add(textInStart, gbc); gbc.gridy = 2; panelInRange.add(textInEnd, gbc); JPanel panelOutRange = new JPanel(gblay); panelOutRange.setForeground(Color.black); panelOutRange.setBorder(buildTitledBorder("Range of output values")); outStart = new JLabel(); outStart.setFont(serif12); outStart.setForeground(Color.black); outEnd = new JLabel(); outEnd.setFont(serif12); outEnd.setForeground(Color.black); textOutStart = new JTextField(7); textOutStart.setFont(serif12); textOutEnd = new JTextField(7); textOutEnd.setFont(serif12); processIndepBox = new JCheckBox("Process each slice independently (2.5D)"); processIndepBox.setFont(serif12); processIndepBox.setEnabled(image.getNDims() > 2); gbc.gridx = 0; gbc.gridy = 0; gbc.gridwidth = 1; gbc.gridheight = 1; gbc.anchor = gbc.WEST; panelOutRange.add(outStart, gbc); gbc.gridy = 1; panelOutRange.add(outEnd, gbc); gbc.gridx = 1; gbc.gridy = 0; gbc.fill = gbc.NONE; gbc.gridwidth = gbc.REMAINDER; gbc.fill = gbc.HORIZONTAL; panelOutRange.add(textOutStart, gbc); gbc.gridy = 1; panelOutRange.add(textOutEnd, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.insets = new Insets(0, 0, 0, 0); panelOutRange.add(processIndepBox, gbc); outStart.setText("Starting range (-2.147 E+9 to 2.147 E+9)."); outEnd.setText("Ending range (-2.147 E+9 to 2.147 E+9)."); textOutStart.setText("0"); textOutEnd.setText("4095"); processIndepBox.setSelected(false); // processIndepBox.addItemListener(this); JPanel destinationPanel = new JPanel(new GridBagLayout()); destinationPanel.setForeground(Color.black); destinationPanel.setBorder(buildTitledBorder("Destination")); ButtonGroup destinationGroup = new ButtonGroup(); newImage = new JRadioButton("New image", true); newImage.setFont(serif12); destinationGroup.add(newImage); replaceImage = new JRadioButton("Replace image", false); replaceImage.setFont(serif12); destinationGroup.add(replaceImage); gbc.gridx = 0; gbc.gridy = 0; gbc.gridwidth = gbc.REMAINDER; gbc.gridheight = 1; gbc.fill = gbc.HORIZONTAL; gbc.weightx = 1; gbc.anchor = gbc.WEST; destinationPanel.add(newImage, gbc); gbc.gridy = 1; destinationPanel.add(replaceImage, gbc); if (image.getLockStatus() == ModelStorageBase.UNLOCKED) { // Only if the image is unlocked can it be replaced. replaceImage.setEnabled(true); } else { replaceImage.setEnabled(false); } JPanel endianessPanel = new JPanel(new GridBagLayout()); endianessPanel.setForeground(Color.black); endianessPanel.setBorder(buildTitledBorder("Endianess")); boolean lFlag, bFlag; if (image.getFileInfo(0).getEndianess() == FileBase.LITTLE_ENDIAN) { lFlag = true; bFlag = false; } else { lFlag = false; bFlag = true; } ButtonGroup endianessGroup = new ButtonGroup(); littleEnd = new JRadioButton("Little endian", lFlag); littleEnd.setFont(serif12); endianessGroup.add(littleEnd); bigEnd = new JRadioButton("Big endian", bFlag); bigEnd.setFont(serif12); endianessGroup.add(bigEnd); gbc.gridx = 0; gbc.gridy = 0; gbc.gridwidth = gbc.REMAINDER; gbc.gridheight = 1; gbc.fill = gbc.HORIZONTAL; gbc.weightx = 1; gbc.anchor = gbc.WEST; endianessPanel.add(littleEnd, gbc); gbc.gridy = 1; endianessPanel.add(bigEnd, gbc); JPanel buttonPanel = new JPanel(); /* * buildOKButton(); buildCancelButton(); buttonPanel.add(OKButton); buttonPanel.add(cancelButton); */ buttonPanel.add(buildButtons()); JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); mainPanel.add(destinationPanel); mainPanel.add(panelInRange); mainPanel.add(panelOutRange); mainPanel.add(endianessPanel); getContentPane().add(mainPanel); getContentPane().add(panelImageType, BorderLayout.WEST); getContentPane().add(buttonPanel, BorderLayout.SOUTH); pack(); if (image.getType() == ModelStorageBase.BOOLEAN) { outStart.setText(" "); outEnd.setText("Pixels != 0 are set to 1. "); textOutStart.setText("0"); textOutStart.setEnabled(false); textOutEnd.setText("1"); textOutEnd.setEnabled(false); outTempMinDefault = 0; outTempMaxDefault = 1; inMin = 0; inMax = 1; outMin = 0; outMax = 1; radioBool.setSelected(true); } else if (image.getType() == ModelStorageBase.BYTE) { outStart.setText("Starting range (-128 to 127)."); outEnd.setText("Ending range (-128 to 127)."); textOutStart.setText("-128"); textOutEnd.setText("127"); outTempMinDefault = -128; outTempMaxDefault = 127; inMin = -128; inMax = 127; outMin = -128; outMax = 127; radioByte.setSelected(true); } else if (image.getType() == ModelStorageBase.UBYTE) { outStart.setText("Starting range (0 to 255)."); outEnd.setText("Ending range (0 to 255)."); textOutStart.setText("0"); textOutEnd.setText("255"); outTempMinDefault = 0; outTempMaxDefault = 255; inMin = 0; inMax = 255; outMin = 0; outMax = 255; radioUByte.setSelected(true); } else if (image.getType() == ModelStorageBase.SHORT) { outStart.setText("Starting range (-32768 to 32767)."); outEnd.setText("Ending range (-32768 to 32767)."); textOutStart.setText("-1024"); textOutEnd.setText("3071"); outTempMinDefault = -1024; outTempMaxDefault = 3071; inMin = -32768; inMax = 32767; outMin = -32768; outMax = 32767; radioShort.setSelected(true); } else if (image.getType() == ModelStorageBase.USHORT) { outStart.setText("Starting range (0 to 65535)."); outEnd.setText("Ending range (0 to 65535)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = 0; inMax = 65535; outMin = 0; outMax = 65535; radioUShort.setSelected(true); } else if (image.getType() == ModelStorageBase.INTEGER) { outStart.setText("Starting range (-2.147 E+9 to 2.147 E+9)."); outEnd.setText("Ending range (-2.147 E+9 to 2.147 E+9)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = Integer.MIN_VALUE; inMax = Integer.MAX_VALUE; outMin = Integer.MIN_VALUE; outMax = Integer.MAX_VALUE; radioInt.setSelected(true); } else if (image.getType() == ModelStorageBase.UINTEGER) { outStart.setText("Starting range (0 to 4.29 E+9)."); outEnd.setText("Ending range (0 to 4.29 E+9)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = 0; inMax = 4294967295L; outMin = 0; outMax = 4294967295L; radioUInt.setSelected(true); } else if (image.getType() == ModelStorageBase.LONG) { outStart.setText("Starting range (-9.22 E+18 to 9.22 E+18)."); outEnd.setText("Ending range (-9.22 E+18 to 9.22 E+18)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = Long.MIN_VALUE; inMax = Long.MAX_VALUE; outMin = Long.MIN_VALUE; outMax = Long.MAX_VALUE; radioLong.setSelected(true); } else if (image.getType() == ModelStorageBase.FLOAT) { outStart.setText("Starting range (-3.40 E+38 to 3.40 E+38)."); outEnd.setText("Ending range (-3.40 E+38 to 3.40 E+38)."); textOutStart.setText("0"); textOutEnd.setText("1023"); outTempMinDefault = 0; outTempMaxDefault = 1023; inMin = -Float.MAX_VALUE; inMax = Float.MAX_VALUE; outMin = -Float.MAX_VALUE; outMax = Float.MAX_VALUE; radioFloat.setSelected(true); } else if (image.getType() == ModelStorageBase.DOUBLE) { outStart.setText("Starting range (-1.8 E+308 to 1.8 E+308)."); outEnd.setText("Ending range (-1.8 E+308 to 1.8 E+308)."); textOutStart.setText("0"); textOutEnd.setText("1023"); outTempMinDefault = 0; outTempMaxDefault = 1023; inMin = -Double.MAX_VALUE; inMax = Double.MAX_VALUE; outMin = -Double.MAX_VALUE; outMax = Double.MAX_VALUE; radioDouble.setSelected(true); } else if (image.getType() == ModelStorageBase.ARGB) { outStart.setText("Starting range (0 to 255)."); outEnd.setText("Ending range (0 to 255)."); textOutStart.setText("0"); textOutEnd.setText("255"); outTempMinDefault = 0; outTempMaxDefault = 255; inMin = 0; inMax = 255; outMin = 0; outMax = 255; radioARGB.setSelected(true); } else if (image.getType() == ModelStorageBase.ARGB_USHORT) { outStart.setText("Starting range (0 to 65535)."); outEnd.setText("Ending range (0 to 65535)."); textOutStart.setText("0"); textOutEnd.setText("4095"); outTempMinDefault = 0; outTempMaxDefault = 4095; inMin = 0; inMax = 65535; outMin = 0; outMax = 65535; radioARGB_USHORT.setSelected(true); } else if (image.getType() == ModelStorageBase.ARGB_FLOAT) { outStart.setText("Starting range (-3.40 E+38 to 3.40 E+38)."); outEnd.setText("Ending range (-3.40 E+38 to 3.40 E+38)."); textOutStart.setText("0"); textOutEnd.setText("1023"); outTempMinDefault = 0; outTempMaxDefault = 1023; inMin = -Float.MAX_VALUE; inMax = Float.MAX_VALUE; outMin = -Float.MAX_VALUE; outMax = Float.MAX_VALUE; radioARGB_FLOAT.setSelected(true); } setVisible(true); } /** * Use the GUI results to set up the variables needed to run the algorithm. * * @return <code>true</code> if parameters set successfully, <code>false</code> otherwise. */ private boolean setVariables() { String tmpStr; System.gc(); if (image.isColorImage()) { if (radioARGB.isSelected()) { dataType = ModelStorageBase.ARGB; } else if (radioARGB_USHORT.isSelected()) { dataType = ModelStorageBase.ARGB_USHORT; } else if (radioARGB_FLOAT.isSelected()) { dataType = ModelStorageBase.ARGB_FLOAT; } else { dataType = ModelStorageBase.ARGB; } } // if (image.isColorImage()) else { // black and white image if (radioBool.isSelected()) { dataType = ModelStorageBase.BOOLEAN; } else if (radioByte.isSelected()) { dataType = ModelStorageBase.BYTE; } else if (radioUByte.isSelected()) { dataType = ModelStorageBase.UBYTE; } else if (radioShort.isSelected()) { dataType = ModelStorageBase.SHORT; } else if (radioUShort.isSelected()) { dataType = ModelStorageBase.USHORT; } else if (radioInt.isSelected()) { dataType = ModelStorageBase.INTEGER; } else if (radioUInt.isSelected()) { dataType = ModelStorageBase.UINTEGER; } else if (radioLong.isSelected()) { dataType = ModelStorageBase.LONG; } else if (radioFloat.isSelected()) { dataType = ModelStorageBase.FLOAT; } else if (radioDouble.isSelected()) { dataType = ModelStorageBase.DOUBLE; } else { dataType = ModelStorageBase.UBYTE; } } // else black and white image if (replaceImage.isSelected()) { displayLoc = REPLACE; } else if (newImage.isSelected()) { displayLoc = NEW; } if (littleEnd.isSelected()) { endianess = FileBase.LITTLE_ENDIAN; } else if (bigEnd.isSelected()) { endianess = FileBase.BIG_ENDIAN; } // check to see if default ranges should be used if (useDefaultRanges == true) { this.setDefaultRanges(); } // otherwise, get the values from the user defined input ranges else { tmpStr = textInStart.getText(); if (testParameter(tmpStr, image.getMin(), image.getMax())) { inTempMin = Double.valueOf(tmpStr).doubleValue(); } else { textInStart.requestFocus(); textInStart.selectAll(); return false; } tmpStr = textInEnd.getText(); if (testParameter(tmpStr, image.getMin(), image.getMax())) { inTempMax = Double.valueOf(tmpStr).doubleValue(); } else { textInEnd.requestFocus(); textInEnd.selectAll(); return false; } } tmpStr = textOutStart.getText(); if (testParameter(tmpStr, outMin, outMax)) { outTempMin = Double.valueOf(tmpStr).doubleValue(); } else { textOutStart.requestFocus(); textOutStart.selectAll(); return false; } tmpStr = textOutEnd.getText(); if (testParameter(tmpStr, outMin, outMax)) { outTempMax = Double.valueOf(tmpStr).doubleValue(); } else { textOutEnd.requestFocus(); textOutEnd.selectAll(); return false; } processIndep = processIndepBox.isSelected(); return true; } }
[ "NIH\\mccreedy@ba61647d-9d00-f842-95cd-605cb4296b96" ]
NIH\mccreedy@ba61647d-9d00-f842-95cd-605cb4296b96
8abddf4fa6e52a0e2613066cc0e9240bc44a597f
4b29ed83a704e509d8cf1d92c5c4d77516dbaf09
/MKF/src/logicalGameObjects/Food.java
ad63045e19a287d9b51ae4f85d154609c006ca61
[]
no_license
SwaveTheX7MasterBOOM/MKF
5b0bc3f708c498aa1a9200d381b418ea0274ab7e
9ff47e6c7a5c44bdab654f0fd56a4af538df9f10
refs/heads/master
2021-01-22T04:41:57.730075
2014-06-21T00:48:20
2014-06-21T00:48:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,982
java
package logicalGameObjects; import java.awt.Image; /** * * @author Thomas Capach * */ public abstract class Food { //Image of the food object private Image pic; // the x axis position of the food object private int pX; //the y axis posistion of the food object private int pY; //poop attack modifier private int modifier; //if the food is inside a destructable boolean insideObject; /** * constructor * @param i - image of the food object * @param x - x axis position * @param y - y axis position * @param m - poop attack modifier */ public Food(Image i, int x, int y, int m, boolean hidden) { pic = i; pX = x; pY = y; modifier = m; insideObject = hidden; } /** * get the image of the food object * @return pic - the image of the food object */ public Image getImage() { return pic; } /** * set the image of the food object * @param ii - image of the object */ public void setImage(Image ii) { pic = ii; } /** * get the x axis position of the food object * @return int pX */ public int getXPosistion() { return pX; } /** * get the y position of the food object * @return int pY */ public int getYPosition() { return pY; } /** * get the value of the poop attack modifier * @return int modifier */ public int getMod() { return modifier; } /** * set the vale of the poop attack modifier * @param x - int value of poop modifier */ public void setMod(int x) { modifier = x; } /** * gets the visibility status of the food object * @return boolean - if the object is viable */ public boolean isViable() { return insideObject; } /** * set if the the food object is visable * @param a - boolean */ public void setVisable( boolean a) { insideObject = a; } }
[ "thomas.capach@gmail.com" ]
thomas.capach@gmail.com
363888b75e485a25633ec6d417b5348e24ec4e31
b4b90af501531222fc67f8c1589592e47a125603
/heroku/src/taskHelperController/DeleteTask.java
dbfc3f777a1dbc974f10e23cb087dcd8da90ee72
[]
no_license
Natlllu/TaskHelper
ad58cac3a823b922d7367c55b9aaee8db15cf777
0386b2a5379b4c8c52713ca0340c2c0219f6f842
refs/heads/master
2022-03-04T20:06:41.361008
2019-10-13T21:33:56
2019-10-13T21:33:56
202,987,800
0
0
null
null
null
null
UTF-8
Java
false
false
1,760
java
package taskHelperController; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import dataMapper.TaskMapper; /** * Servlet implementation class DeleteTask */ @WebServlet("/DeleteTask") public class DeleteTask extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public DeleteTask() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub // TODO Auto-generated method stub // response.getWriter().append("Served at: ").append(request.getContextPath()); int task_id = Integer.parseInt(request.getParameter("Delete")); // String email = request.getParameter("email"); // String password = request.getParameter("password"); System.out.println("this is task id in delete function"+"task_id"); TaskMapper.deleteTask(task_id); System.out.println("delete success"); //request.setAttribute("email", email); //request.setAttribute("password", password); request.getRequestDispatcher("../ViewTasks.jsp").forward(request, response); doGet(request, response); } }
[ "gxuan@student.unimelb.edu.au" ]
gxuan@student.unimelb.edu.au
99018ca43e884967ca9a3cd362cd4d3d8a526c6f
78761eb8723ef39799f8b71155130847b112aafb
/app/src/main/java/com/example/iosuser11/postonwall/ServerModels/Location.java
0efe78b12d860619e0d7955254e981bbfad4b21f
[]
no_license
MikeGrabski/Post-n-Go
e9d721b0ecc3aee663f069a88d60e27551debd58
64a09a05a69efc621080bec4b314bebeb48620d7
refs/heads/master
2021-01-17T16:45:32.713698
2016-09-26T13:43:26
2016-09-26T13:43:26
68,388,126
0
0
null
null
null
null
UTF-8
Java
false
false
867
java
package com.example.iosuser11.postonwall.ServerModels; import com.google.gson.annotations.SerializedName; /** * Created by iosuser9 on 18.08.16. */ public class Location { @SerializedName("type") private String type = "Point"; @SerializedName("coordinates") private double[] coordinates = new double[2]; private String s; public Location(double longitude, double latutude) { coordinates[0] = longitude; coordinates[1] = latutude; } public Location() { } public String getCoordinates() { String s = coordinates[0] + "," + coordinates[1]; return s; } public String getType() { return type; } public void setType(String type) { this.type = type; } public void setCoordinates(double[] coordinates) { this.coordinates = coordinates; } }
[ "mgarm@outlook.com" ]
mgarm@outlook.com
4382f5854d6e296e616f783977bc7893fd1e7c5a
e02c66679c579ae867d987f35ebc0618ede3039a
/src/main/java/sk/tuke/gamestudio/games/stones/Stone.java
1942c25e447dff8c29211cd0f9d73a03963f16d9
[]
no_license
PaloKolesar/gamestudiomvnn
bc24313aac565d3062ddaaacb39a28a442f86f11
7079482e30b3c9f57301bb9eeba7c2f4544ad770
refs/heads/master
2020-03-19T10:03:09.791563
2018-06-06T14:12:22
2018-06-06T14:12:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
package sk.tuke.gamestudio.games.stones; import java.io.Serializable; public class Stone implements Serializable{ private int value; public Stone(int value) { this.value = value; } public int getValue(){ return value; } public void setValue(int value) { this.value = value; } }
[ "palo.kolesar@gmail.com" ]
palo.kolesar@gmail.com
207481270e4f3d29288fbc703f05675c8285983b
abeb432f9ee60ee6d17373c492b1e506f360530e
/src/每日一题/x的平方根.java
c65bb4264924c87807b472a0c2cf290c2a319783
[]
no_license
xiaotao1234/-xt-
f15e8cf743b182296a6a749aca9a9a8dea184cfb
f31ba40c37371254b869ea25d51a06ec969c5d08
refs/heads/master
2022-11-17T21:33:47.243151
2020-07-21T00:32:07
2020-07-21T00:32:07
265,557,263
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package 每日一题; /** * @author xt * @version 1.0 * @date 2020/5/9 21:37 */ public class x的平方根 { public int mySqrt(int x) { long left = 0; long right = x / 2 - 1; while (left < right) { long mid = (left + right + 1) >>> 1; long seq = mid * mid; if (seq > x) { right = mid - 1; } else { left = mid; } } return (int) left; } }
[ "1432049416@qq.com" ]
1432049416@qq.com
16173caf63d1139e7a1bcfb5dd142b24787e059c
7417d844ff6910b389303c552d9a0755986e6d19
/app/src/main/java/com/taa/videohd/MainActivity.java
371e4161dfc4b3cf07c161c88d2d0e82659463e5
[]
no_license
trungptdhcn/VideoHD
52fee37f9d920445678595791cece807fe694630
b51eace89f1ea06d89ed150c73a168cd82cde1ac
refs/heads/master
2021-01-10T01:58:53.661529
2016-01-17T11:18:02
2016-01-17T11:18:02
49,814,215
2
0
null
null
null
null
UTF-8
Java
false
false
3,705
java
package com.taa.videohd; import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.Signature; import android.os.Bundle; import android.support.v4.view.ViewPager; import android.util.Base64; import android.util.Log; import android.view.LayoutInflater; import android.view.ViewGroup; import butterknife.Bind; import com.google.android.gms.analytics.HitBuilders; import com.google.android.gms.analytics.Tracker; import com.ogaclejapan.smarttablayout.SmartTabLayout; import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItem; import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItemAdapter; import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItems; import com.taa.videohd.base.BaseActivity; import com.taa.videohd.ui.fragment.DailymotionFragment; import com.taa.videohd.ui.fragment.DownloadTaskFragment; import com.taa.videohd.ui.fragment.VimeoFragment; import com.taa.videohd.ui.fragment.YoutubeFragment; import com.trungpt.videodownloadmaster.R; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class MainActivity extends BaseActivity { @Bind(R.id.activity_main_viewpager) ViewPager viewPager; @Bind(R.id.activity_main_tab) ViewGroup flTabContainer; // @Bind(R.id.ivLogo) // ImageView ivLogo; // @Bind(R.id.toolbar) // Toolbar toolbar; FragmentPagerItems pages; FragmentPagerItemAdapter adapter; private Tracker mTracker; @Override public void setDataToView(Bundle savedInstanceState) { try { PackageInfo info = getPackageManager().getPackageInfo( "com.taa.videohd", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); Log.d("Your Tag", Base64.encodeToString(md.digest(), Base64.DEFAULT)); } } catch (PackageManager.NameNotFoundException e) { } catch (NoSuchAlgorithmException e) { } MyApplication application = (MyApplication) getApplication(); mTracker = application.getDefaultTracker(); flTabContainer.addView(LayoutInflater.from(this).inflate(R.layout.tab_main, flTabContainer, false)); final SmartTabLayout tabLayout = (SmartTabLayout) findViewById(R.id.tab_indicator_menu_viewpagertab); viewPager.setOffscreenPageLimit(5); pages = new FragmentPagerItems(this); pages.add(FragmentPagerItem.of("Youtube", YoutubeFragment.class)); pages.add(FragmentPagerItem.of("Vimeo Video", VimeoFragment.class)); pages.add(FragmentPagerItem.of("Dailymotion Video", DailymotionFragment.class)); SharedPreferences prefs = this.getSharedPreferences( "com.taa.videohd", Context.MODE_PRIVATE); int config = prefs.getInt("key_isDisplay", -1); if (config == 1) { pages.add(FragmentPagerItem.of("Download Task", DownloadTaskFragment.class)); } adapter = new FragmentPagerItemAdapter( getSupportFragmentManager(), pages); viewPager.setAdapter(adapter); tabLayout.setViewPager(viewPager); } @Override public int getLayout() { return R.layout.activity_main; } public void otherFragment(int position) { viewPager.setCurrentItem(position); } @Override public void onResume() { super.onResume(); } }
[ "trungptdhcn@gmail.com" ]
trungptdhcn@gmail.com
553d1b6e6dbb2da3352d4c49ea2b3c3c7852116b
df685a4ba153c9b3d43a5cbf597c0d76bd28dce3
/erp_consumer/src/main/java/com/jk/controller/warehouse/WarehouseDeliveryController.java
445c4f06872eb505ddd843d193cddfa3c48edd7b
[]
no_license
helloexp/erp_project
9e7584887a34dd4fcb921eb2cde941d58b573c8b
b7c1797fa9c2de15d303de6826ef6be20a4b4eb0
refs/heads/master
2020-04-23T01:42:57.538892
2019-01-08T04:38:41
2019-01-08T04:38:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,833
java
/** * Copyright (C), 2015-2019, XXX有限公司 * FileName: WarehouseDeliveryController * Author: Divine * Date: 2019/1/2 22:02 * Description: WarehouseDeliveryController * History: * <author> <time> <version> <desc> * 作者姓名 修改时间 版本号 描述 */ package com.jk.controller.warehouse; import com.alibaba.dubbo.config.annotation.Reference; import com.jk.model.warehouse.WarehouseDelivery; import com.jk.service.warehouse.IWarehouseDeliveryService; import com.jk.utils.ResultPage; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * 〈一句话功能简述〉<br> * 〈WarehouseDeliveryController〉 * * @author Divine * @create 2019/1/2 * @since 1.0.0 */ @Controller @RequestMapping("wDelivery") public class WarehouseDeliveryController { @Reference(version = "1.0.0") private IWarehouseDeliveryService warehouseDeliveryService; @RequiresPermissions("delivery:query") @RequestMapping("toDelivery") public String toDelivery(){ return "warehouse/delivery"; } @RequestMapping("queryDelivery") @ResponseBody public List<WarehouseDelivery> queryDelivery(WarehouseDelivery warehouseDelivery){ List<WarehouseDelivery> d = warehouseDeliveryService.queryDelivery(warehouseDelivery); return d; } @RequestMapping("outStorage") @ResponseBody public Boolean outStorage(Integer id) { try { warehouseDeliveryService.outStorage(id); return true; } catch (Exception e) { return false; } } }
[ "18845606958@163.com" ]
18845606958@163.com
7b8348aa07bff0b0c4965c3afefb60f9d85f1813
b29f59595bdff1e7fad71fb875da3e4cf5cf4310
/src/main/java/com/rar/deliveryauthuser/DeliveryAuthUserApplication.java
a24bddec687e354a1596203f9e3212b600cc5194
[]
no_license
ricardoaruiz/delivery-auth-user
1db1edf1811a8410fbfd2e7fdf23556f844adbc3
8a3259ebb1b9e9564721b6cbd09460cd9f4e8427
refs/heads/master
2020-04-06T19:37:59.055594
2018-11-15T19:50:01
2018-11-15T19:50:01
157,743,768
0
0
null
null
null
null
UTF-8
Java
false
false
924
java
package com.rar.deliveryauthuser; //import org.h2.server.web.WebServlet; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.context.annotation.Bean; @SpringBootApplication @EnableEurekaClient public class DeliveryAuthUserApplication { public static void main(String[] args) { SpringApplication.run(DeliveryAuthUserApplication.class, args); } // Para voltar a usar o H2, habilitar a dependencia no build.gradle e descomentar as linhas dessa classe // @Bean // public ServletRegistrationBean h2servletRegistration() { // ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet()); // registration.addUrlMappings("/h2/*"); // return registration; // } }
[ "ricardo.almendro.ruiz@gmail.com" ]
ricardo.almendro.ruiz@gmail.com
50d090d7227eae25d6273c19ad322a3925c48595
cbd820fd80e6adefebcdeece7787129004fb2838
/src/main/java/com/muhurtmaza/adapter/PoojaBookingListRecyclerViewAdapter.java
b75cf0d14ff1a0fa8639ed472fce0fe95b1aeb92
[]
no_license
bdpatil/MuhurtMazaLatest
2a5421ac35b04bd18ee609e5c657e113e836e8fc
8f726f4a0858b1428e8da31c38926068faf50cd7
refs/heads/master
2021-01-10T14:06:55.158306
2016-03-03T10:46:46
2016-03-03T10:46:46
53,850,281
0
0
null
null
null
null
UTF-8
Java
false
false
6,127
java
package com.muhurtmaza.adapter; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.bumptech.glide.Glide; import com.muhurtmaza.R; import com.muhurtmaza.model.NewPoojaListModel; import com.muhurtmaza.ui.NewPoojaDetailsActivity; import com.muhurtmaza.utility.AppConstants; import com.muhurtmaza.utility.AppPreferences; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; /** * Created by imac on 01/12/15. */ public class PoojaBookingListRecyclerViewAdapter extends RecyclerView.Adapter<PoojaBookingListRecyclerViewHolder> { final static String POOJA_ID ="pooja_id"; final static String POOJA_CITY ="pooja_city"; private List<NewPoojaListModel> itemList; public static final String RUPEE="\u20B9 "; AppPreferences appPreferences; String cityname; private Context context; public PoojaBookingListRecyclerViewAdapter(Context context, List<NewPoojaListModel> itemList) { this.itemList = itemList; this.context = context; } @Override public PoojaBookingListRecyclerViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { Log.d("RecyclingTest", "onCreateViewHolder method is called"); View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.cell_new_book_pooja, null); PoojaBookingListRecyclerViewHolder viewHolder = new PoojaBookingListRecyclerViewHolder(view); appPreferences = AppPreferences.getInstance(context); cityname=appPreferences.getString(AppConstants.CITY_NAME_ADAPTER, ""); if(cityname ==""){ cityname="Pune"; } return viewHolder; } @Override public void onBindViewHolder(final PoojaBookingListRecyclerViewHolder holder, final int position) { Log.d("RecyclingTest", "onBindViewHolder method is called"); holder.poojaName.setText(itemList.get(position).getPoojaName()); holder.poojaPrice.setText(RUPEE + "" + itemList.get(position).getDakshinaWithoutSamagree()); holder.poojaDuration.setText(getFormatedTime(itemList.get(position).getDuration())); holder.noOfGuruji.setText(itemList.get(position).getNoOfGuruji()); holder.noOfViews.setText(itemList.get(position).getViews()); holder.noOfLikes.setText(itemList.get(position).getBooked()); Glide.with(context) .load(itemList.get(position).getImage()) .fitCenter() .placeholder(R.drawable.pooja_image) .crossFade() .into(holder.poojaImage); displayRating(itemList.get(position).getRating(),holder); holder.cv.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(context, NewPoojaDetailsActivity.class); Bundle bundle = new Bundle(); bundle.putString(POOJA_ID, itemList.get(position).getPoojaId()); bundle.putString(POOJA_CITY, cityname); i.putExtras(bundle); v.getContext().startActivity(i); } }); } private void displayRating(String number,final PoojaBookingListRecyclerViewHolder holder){ Float rating = new Float(number); for (int i =1; i<= rating.intValue(); i++){ switch (i){ case 1: holder.star1.setBackgroundResource(R.drawable.ic_star_h); break; case 2: holder.star2.setBackgroundResource(R.drawable.ic_star_h); break; case 3: holder.star3.setBackgroundResource(R.drawable.ic_star_h); break; case 4: holder.star4.setBackgroundResource(R.drawable.ic_star_h); break; case 5: holder.star5.setBackgroundResource(R.drawable.ic_star_h); break; } } int temp = rating.intValue()+1; for (int i =temp; i<= 5; i++){ switch (i){ case 1: holder.star1.setBackgroundResource(R.drawable.ic_star); break; case 2: holder.star2.setBackgroundResource(R.drawable.ic_star); break; case 3: holder.star3.setBackgroundResource(R.drawable.ic_star); break; case 4: holder.star4.setBackgroundResource(R.drawable.ic_star); break; case 5: holder.star5.setBackgroundResource(R.drawable.ic_star); break; } } } @Override public int getItemCount() { return this.itemList.size(); } private String getFormatedTime(String time){ String duration=""; try { SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); Date date = sdf.parse(time); Calendar calendar = GregorianCalendar.getInstance(); // creates a new calendar instance calendar.setTime(date); // assigns calendar to given date int hour = calendar.get(Calendar.HOUR); int minute = calendar.get(Calendar.MINUTE); if(hour==0){ duration =minute +" min"; } if(hour!=0){ duration = hour +" hrs"; } if(hour!=0 && minute!=0){ duration = hour+":"+minute+" hrs"; } } catch (Exception e){ } return duration; } public void clear() { for(int i = 0 ; i < itemList.size() ; i++) { itemList.clear(); } } }
[ "akshay.kumar@tungstenbigdata.com" ]
akshay.kumar@tungstenbigdata.com
53d1b2f7098087fc7a281dcda918fca884ff368d
19171b1b74515ecf969ad821d5ee53523ebe6d6e
/missioni-core/missioni-dao/src/main/java/it/cnr/missioni/el/dao/RimborsoKmDAO.java
09ee9e72f0f421f15f79faff34112284a71a00b9
[]
no_license
geosdi/cnr-missioni
e053c5815c766fabbee87705c83a9c2562a7a1c4
8a31ae77cea3ed1b621c346c3c9ee3f477e712de
refs/heads/master
2022-07-09T20:40:16.461286
2022-07-01T05:45:29
2022-07-01T05:45:29
46,708,853
1
1
null
2022-07-01T05:45:30
2015-11-23T09:08:23
Java
UTF-8
Java
false
false
2,286
java
package it.cnr.missioni.el.dao; import com.google.common.base.Preconditions; import it.cnr.missioni.el.model.search.builder.IRimborsoKmSearchBuilder; import it.cnr.missioni.model.configuration.RimborsoKm; import org.elasticsearch.search.sort.SortOrder; import org.geosdi.geoplatform.experimental.el.api.mapper.GPBaseMapper; import org.geosdi.geoplatform.experimental.el.dao.AbstractElasticSearchDAO; import org.geosdi.geoplatform.experimental.el.index.GPIndexCreator; import org.geosdi.geoplatform.experimental.el.search.bool.IBooleanSearch; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; /** * @author Salvia Vito */ @Component(value = "rimborsoKmDAO") public class RimborsoKmDAO extends AbstractElasticSearchDAO<RimborsoKm> implements IRimborsoKmDAO { @Resource(name = "rimborsoKmMapper") @Override public <Mapper extends GPBaseMapper<RimborsoKm>> void setMapper(Mapper theMapper) { this.mapper = theMapper; } @Resource(name = "rimborsoKmIndexCreator") @Override public <IC extends GPIndexCreator> void setIndexCreator(IC ic) { super.setIndexCreator(ic); } /** * @return * @throws Exception */ @Override public List<RimborsoKm> findLasts() throws Exception { return null; } /** * @param rimborsoKmSearchBuilder * @return * @throws Exception */ @Override public IPageResult<RimborsoKm> findRimborsoKmByQuery(IRimborsoKmSearchBuilder rimborsoKmSearchBuilder) throws Exception { List<RimborsoKm> listaRimborsoKm = new ArrayList<RimborsoKm>(); logger.debug("###############Try to find RimboroKm by Query: {}\n\n"); return super.find(new MultiFieldsSearch("", SortOrder.DESC,0,1,rimborsoKmSearchBuilder.getListAbstractBooleanSearch().toArray(new IBooleanSearch[rimborsoKmSearchBuilder.getListAbstractBooleanSearch().size()]))); } @Override public RimborsoKm persist(RimborsoKm document) throws Exception { logger.debug("#################Try to insert {}\n\n", document); Preconditions.checkArgument((count().intValue() == 0), "Rimborso Km already inserted"); return super.persist(document); } }
[ "vito.salvia@gmail.com" ]
vito.salvia@gmail.com
f5c82105fa42c9bb864b99fdd1235782b49a5cf5
d844f1d1bdda8702fc3a1edecce48a7f466a2086
/src/edu/cmu/sv/webcrawler/apis/GroupListResource.java
072ee07616dc75cd974bb0988a3dd5bafa7802cb
[]
no_license
QawsQAER/riskadvisor
de3c2410cebdebbcb55b545916dacc072ed872a7
6477fee7e3cdb8e18af819fe067d28e70c4ff01a
refs/heads/master
2016-09-05T09:40:41.239516
2015-05-13T23:54:53
2015-05-13T23:54:53
31,633,790
0
2
null
2015-04-01T15:14:15
2015-03-04T02:31:33
Java
UTF-8
Java
false
false
603
java
package edu.cmu.sv.webcrawler.apis; import java.io.IOException; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.json.JSONException; import edu.cmu.sv.webcrawler.models.GroupList; import edu.cmu.sv.webcrawler.util.GroupListCrawler; @Path("/groupList") public class GroupListResource { @GET @Produces(MediaType.APPLICATION_JSON) public GroupList getGroupList() throws IOException, JSONException { GroupListCrawler groupListCrawler = new GroupListCrawler(); return new GroupList(groupListCrawler.getGroupList()); } }
[ "wernerzeng@gmail.com" ]
wernerzeng@gmail.com
c24119d96177953109746a64c0140654540ef295
f0b589049768c4d34d7700d72c31a5789233093e
/Post_Pre_Construct/src/com/goomo/PostConstruct_PreConstruct.java
2c4e7c48b65fbe8b21387c113a39642d5d4a42f7
[]
no_license
pankajkumarravi/Spring_AnnotationBased
aec6a4b2c0a44332e7a0e72ef09ffbcde5f64428
bbad86bd0af32834481057403af12f771981b24d
refs/heads/master
2023-01-07T08:18:57.378219
2019-04-16T02:23:23
2019-04-16T02:23:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
package com.goomo; public class PostConstruct_PreConstruct { private String message; public String getMessage() { return message; } public void setMessage(String message) { System.out.println("Message :" + message); this.message = message; } public void init() { System.out.println("Bean is going through init method"); } public void destroy() { System.out.println("Bean wull be destroyed now"); } }
[ "pankajravi25@gmail.com" ]
pankajravi25@gmail.com
4f834ed99e6c06573370da0cd4029697dec51184
95d3e828201bea0341c4c4aea550de503dd94f7d
/mall-mbg/src/main/java/com/xznn/model/OmsOrderReturnReason.java
948dcd1e3b58ef9697e4d25a46f2343a38e61fbb
[]
no_license
MapleDev/xz-mall
69a5d8d548d15d7ffcce7f7b5e3829ae4de1cb35
0807d0ecdf1be3de5e55d296be59acbbeb83453a
refs/heads/master
2022-07-07T22:27:37.435992
2019-08-13T11:02:30
2019-08-13T11:02:30
202,119,689
0
0
null
2022-06-21T01:39:40
2019-08-13T10:22:52
Java
UTF-8
Java
false
false
1,784
java
package com.xznn.model; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.util.Date; public class OmsOrderReturnReason implements Serializable { private Long id; @ApiModelProperty(value = "退货类型") private String name; private Integer sort; @ApiModelProperty(value = "状态:0->不启用;1->启用") private Integer status; @ApiModelProperty(value = "添加时间") private Date createTime; private static final long serialVersionUID = 1L; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getSort() { return sort; } public void setSort(Integer sort) { this.sort = sort; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", name=").append(name); sb.append(", sort=").append(sort); sb.append(", status=").append(status); sb.append(", createTime=").append(createTime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }
[ "zgh8126@qq.com" ]
zgh8126@qq.com
91b7d1bc7ccd2b88adf7d9b05571c885b72a585c
658a4e252c746360192f3636435e57f9e2288c1a
/ earth-live-wallpaper/SLWP/src/com/seb/SLWP/LabelMaker.java
4fe9dc79391c3d6dde6f063dd3f4ee7e4c5897e2
[]
no_license
WarrenGzMaps/earth-live-wallpaper
64d004c85ce1417c8e9622840c9c7c00bf2f994e
4ab74e125f10c19681615e0ae6e63c64bc91b818
refs/heads/master
2023-09-04T15:00:13.715220
2023-08-24T18:58:30
2023-08-24T18:58:30
51,967,976
0
0
null
null
null
null
UTF-8
Java
false
false
14,232
java
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.seb.SLWP; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.Paint.Style; import android.graphics.drawable.Drawable; import android.opengl.GLUtils; import java.util.ArrayList; import javax.microedition.khronos.opengles.GL10; import javax.microedition.khronos.opengles.GL11; import javax.microedition.khronos.opengles.GL11Ext; /** * An OpenGL text label maker. * * * OpenGL labels are implemented by creating a Bitmap, drawing all the labels * into the Bitmap, converting the Bitmap into an Alpha texture, and creating a * mesh for each label * * The benefits of this approach are that the labels are drawn using the high * quality anti-aliased font rasterizer, full character set support, and all the * text labels are stored on a single texture, which makes it faster to use. * * The drawbacks are that you can only have as many labels as will fit onto one * texture, and you have to recreate the whole texture if any label text * changes. * */ public class LabelMaker { /** * Create a label maker * or maximum compatibility with various OpenGL ES implementations, * the strike width and height must be powers of two, * We want the strike width to be at least as wide as the widest window. * * @param fullColor true if we want a full color backing store (4444), * otherwise we generate a grey L8 backing store. * @param strikeWidth width of strike * @param strikeHeight height of strike */ public LabelMaker(boolean fullColor, int strikeWidth, int strikeHeight) { mFullColor = fullColor; mStrikeWidth = strikeWidth; mStrikeHeight = strikeHeight; mTexelWidth = (float) (1.0 / mStrikeWidth); mTexelHeight = (float) (1.0 / mStrikeHeight); mClearPaint = new Paint(); mClearPaint.setARGB(0, 0, 0, 0); mClearPaint.setStyle(Style.FILL); mState = STATE_NEW; } /** * Call to initialize the class. * Call whenever the surface has been created. * * @param gl */ public void initialize(GL10 gl) { mState = STATE_INITIALIZED; int[] textures = new int[1]; gl.glGenTextures(1, textures, 0); mTextureID = textures[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID); // Use Nearest for performance. gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE); gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_REPLACE); } /** * Call when the surface has been destroyed */ public void shutdown(GL10 gl) { if ( gl != null) { if (mState > STATE_NEW) { int[] textures = new int[1]; textures[0] = mTextureID; gl.glDeleteTextures(1, textures, 0); mState = STATE_NEW; } } } /** * Call before adding labels. Clears out any existing labels. * * @param gl */ public void beginAdding(GL10 gl) { checkState(STATE_INITIALIZED, STATE_ADDING); mLabels.clear(); mU = 0; mV = 0; mLineHeight = 0; Bitmap.Config config = mFullColor ? Bitmap.Config.ARGB_4444 : Bitmap.Config.ALPHA_8; mBitmap = Bitmap.createBitmap(mStrikeWidth, mStrikeHeight, config); mCanvas = new Canvas(mBitmap); mBitmap.eraseColor(0); } /** * Call to add a label * * @param gl * @param text the text of the label * @param textPaint the paint of the label * @return the id of the label, used to measure and draw the label */ public int add(GL10 gl, String text, Paint textPaint) { return add(gl, null, text, textPaint); } /** * Call to add a label * * @param gl * @param text the text of the label * @param textPaint the paint of the label * @return the id of the label, used to measure and draw the label */ public int add(GL10 gl, Drawable background, String text, Paint textPaint) { return add(gl, background, text, textPaint, 0, 0); } /** * Call to add a label * @return the id of the label, used to measure and draw the label */ public int add(GL10 gl, Drawable drawable, int minWidth, int minHeight) { return add(gl, drawable, null, null, minWidth, minHeight); } /** * Call to add a label * * @param gl * @param text the text of the label * @param textPaint the paint of the label * @return the id of the label, used to measure and draw the label */ public int add(GL10 gl, Drawable background, String text, Paint textPaint, int minWidth, int minHeight) { checkState(STATE_ADDING, STATE_ADDING); boolean drawBackground = background != null; boolean drawText = (text != null) && (textPaint != null); Rect padding = new Rect(); if (drawBackground) { background.getPadding(padding); minWidth = Math.max(minWidth, background.getMinimumWidth()); minHeight = Math.max(minHeight, background.getMinimumHeight()); } int ascent = 0; int descent = 0; int measuredTextWidth = 0; if (drawText) { // Paint.ascent is negative, so negate it. ascent = (int) Math.ceil(-textPaint.ascent()); descent = (int) Math.ceil(textPaint.descent()); measuredTextWidth = (int) Math.ceil(textPaint.measureText(text)); } int textHeight = ascent + descent; int textWidth = Math.min(mStrikeWidth,measuredTextWidth); int padHeight = padding.top + padding.bottom; int padWidth = padding.left + padding.right; int height = Math.max(minHeight, textHeight + padHeight); int width = Math.max(minWidth, textWidth + padWidth); int effectiveTextHeight = height - padHeight; int effectiveTextWidth = width - padWidth; int centerOffsetHeight = (effectiveTextHeight - textHeight) / 2; int centerOffsetWidth = (effectiveTextWidth - textWidth) / 2; // Make changes to the local variables, only commit them // to the member variables after we've decided not to throw // any exceptions. int u = mU; int v = mV; int lineHeight = mLineHeight; if (width > mStrikeWidth) { width = mStrikeWidth; } // Is there room for this string on the current line? if (u + width > mStrikeWidth) { // No room, go to the next line: u = 0; v += lineHeight; lineHeight = 0; } lineHeight = Math.max(lineHeight, height); if (v + lineHeight > mStrikeHeight) { throw new IllegalArgumentException("Out of texture space."); } int u2 = u + width; int vBase = v + ascent; int v2 = v + height; if (drawBackground) { background.setBounds(u, v, u + width, v + height); background.draw(mCanvas); } if (drawText) { mCanvas.drawText(text, u + padding.left + centerOffsetWidth, vBase + padding.top + centerOffsetHeight, textPaint); } Grid grid = new Grid(2, 2); // Grid.set arguments: i, j, x, y, z, u, v float texU = u * mTexelWidth; float texU2 = u2 * mTexelWidth; float texV = 1.0f - v * mTexelHeight; float texV2 = 1.0f - v2 * mTexelHeight; grid.set(0, 0, 0.0f, 0.0f, 0.0f, texU , texV2); grid.set(1, 0, width, 0.0f, 0.0f, texU2, texV2); grid.set(0, 1, 0.0f, height, 0.0f, texU , texV ); grid.set(1, 1, width, height, 0.0f, texU2, texV ); // We know there's enough space, so update the member variables mU = u + width; mV = v; mLineHeight = lineHeight; mLabels.add(new Label(grid, width, height, ascent, u, v + height, width, -height)); return mLabels.size() - 1; } /** * Call to end adding labels. Must be called before drawing starts. * * @param gl */ public void endAdding(GL10 gl) { checkState(STATE_ADDING, STATE_INITIALIZED); gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, mBitmap, 0); // Reclaim storage used by bitmap and canvas. mBitmap.recycle(); mBitmap = null; mCanvas = null; } /** * Get the width in pixels of a given label. * * @param labelID * @return the width in pixels */ public float getWidth(int labelID) { return mLabels.get(labelID).width; } /** * Get the height in pixels of a given label. * * @param labelID * @return the height in pixels */ public float getHeight(int labelID) { return mLabels.get(labelID).height; } /** * Get the baseline of a given label. That's how many pixels from the top of * the label to the text baseline. (This is equivalent to the negative of * the label's paint's ascent.) * * @param labelID * @return the baseline in pixels. */ public float getBaseline(int labelID) { return mLabels.get(labelID).baseline; } /** * Begin drawing labels. Sets the OpenGL state for rapid drawing. * * @param gl * @param viewWidth * @param viewHeight */ public void beginDrawing(GL10 gl, float viewWidth, float viewHeight) { checkState(STATE_INITIALIZED, STATE_DRAWING); gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID); gl.glShadeModel(GL10.GL_FLAT); gl.glEnable(GL10.GL_BLEND); gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); gl.glColor4x(0x10000, 0x10000, 0x10000, 0x10000); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glPushMatrix(); gl.glLoadIdentity(); gl.glOrthof(0.0f, viewWidth, 0.0f, viewHeight, 0.0f, 1.0f); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glPushMatrix(); gl.glLoadIdentity(); // Magic offsets to promote consistent rasterization. gl.glTranslatef(0.375f, 0.375f, 0.0f); } /** * Draw a given label at a given x,y position, expressed in pixels, with the * lower-left-hand-corner of the view being (0,0). * * @param gl * @param x * @param y * @param labelID */ public void draw(GL10 gl, float x, float y, int labelID) { checkState(STATE_DRAWING, STATE_DRAWING); gl.glPushMatrix(); float snappedX = (float) Math.floor(x); float snappedY = (float) Math.floor(y); gl.glTranslatef(snappedX, snappedY, 0.0f); Label label = mLabels.get(labelID); gl.glEnable(GL10.GL_TEXTURE_2D); ((GL11)gl).glTexParameteriv(GL10.GL_TEXTURE_2D, GL11Ext.GL_TEXTURE_CROP_RECT_OES, label.mCrop, 0); ((GL11Ext)gl).glDrawTexiOES((int) snappedX, (int) snappedY, 0, (int) label.width, (int) label.height); gl.glPopMatrix(); } /** * Ends the drawing and restores the OpenGL state. * * @param gl */ public void endDrawing(GL10 gl) { checkState(STATE_DRAWING, STATE_INITIALIZED); gl.glDisable(GL10.GL_BLEND); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glPopMatrix(); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glPopMatrix(); } private void checkState(int oldState, int newState) { if (mState != oldState) { throw new IllegalArgumentException("Can't call this method now."); } mState = newState; } private static class Label { public Label(Grid grid, float width, float height, float baseLine, int cropU, int cropV, int cropW, int cropH) { this.grid = grid; this.width = width; this.height = height; this.baseline = baseLine; int[] crop = new int[4]; crop[0] = cropU; crop[1] = cropV; crop[2] = cropW; crop[3] = cropH; mCrop = crop; } public Grid grid; public float width; public float height; public float baseline; public int[] mCrop; } private int mStrikeWidth; private int mStrikeHeight; private boolean mFullColor; private Bitmap mBitmap; private Canvas mCanvas; private Paint mClearPaint; private int mTextureID; private float mTexelWidth; // Convert texel to U private float mTexelHeight; // Convert texel to V private int mU; private int mV; private int mLineHeight; private ArrayList<Label> mLabels = new ArrayList<Label>(); private static final int STATE_NEW = 0; private static final int STATE_INITIALIZED = 1; private static final int STATE_ADDING = 2; private static final int STATE_DRAWING = 3; private int mState; }
[ "unixseb@1184e298-1fa3-11df-a711-cd63ca7f7dc8" ]
unixseb@1184e298-1fa3-11df-a711-cd63ca7f7dc8
889fd6a6faafb76a37dd6aaa0ee163bef5988668
71c58162a495bae2bbf608252082cfd13c5711b9
/src/Sorting/MainClass.java
7e697e43d4bc9110b788feb26c8d584d65cdab64
[]
no_license
EmrulRony/DataStructureAndAlgorithm
7a2a3e03c6086e5611b261ca3d37a8e33429ad92
8d2ab2b3da2b0bbaff81e70b7aebe43fed8044d2
refs/heads/master
2020-11-24T13:54:20.992994
2019-12-04T17:14:13
2019-12-04T17:14:13
228,179,310
0
0
null
null
null
null
UTF-8
Java
false
false
497
java
package Sorting; public class MainClass { public static void main(String[] args) { int arr[] = {12, 11, 13, 5, 6, 7}; int arrSorted[] = {2,3,4,5,6,7,8}; // int[] retArr=SelectionSort.sortIt(arr); // Test selection sorta // int[] bblSort=BubbleSort.sortItRecurse(arr,arr.length); // int [] insSort=InsertionSort.sortIt(arr); int[] mergeSort = MergeSort.sortIt(arr, 0, arr.length-1); for(int i=0;i<mergeSort.length;i++) { System.out.print(mergeSort[i]+" "); } } }
[ "emrulhasanrony@gmail.com" ]
emrulhasanrony@gmail.com
b936e9497c0bb21b67130066952fe8c70ec51aad
f85c3fe06a59a407f36c9a85eea017261791ca6b
/hackathon2014/app/src/main/java/com/hackathon/hackathon2014/adapter/FriendAdapter.java
e80abb591a5100125e5b02c6d9073c92be3fb3e3
[ "MIT" ]
permissive
dst-hackathon/socialradar-android
f6b7b7da3590b23f1c18844b07e99b3e621f89bb
dade575b34b5582e3b12e2e11edc73de01527637
refs/heads/master
2021-01-22T03:13:13.000386
2014-11-02T10:36:31
2014-11-02T10:36:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,714
java
package com.hackathon.hackathon2014.adapter; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.hackathon.hackathon2014.R; import com.hackathon.hackathon2014.model.FriendModel; import com.hackathon.hackathon2014.utility.ImageDownloader; import java.util.List; public class FriendAdapter extends BaseAdapter { private Activity activity; private List<FriendModel> data; private static LayoutInflater inflater = null; public FriendAdapter(Activity activity, List<FriendModel> friendLists) { this.activity = activity; this.data = friendLists; } @Override public int getCount() { return data.size(); } @Override public Object getItem(int position) { return data.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { if ( inflater == null ) inflater = (LayoutInflater) activity .getSystemService(Context.LAYOUT_INFLATER_SERVICE); if (convertView == null) convertView = inflater.inflate(R.layout.search_results_fragment_item, null); TextView secondLine = ( TextView ) convertView.findViewById(R.id.secondLine); ImageView userAvatar = ( ImageView ) convertView.findViewById(R.id.user_avatar); FriendModel f = data.get(position); secondLine.setText(f.getEmail()); new ImageDownloader( userAvatar ).execute( "http://api.radar.codedeck.com/users/" + f.getId() + "/avatar" ); return convertView; } }
[ "sam35060@hotmail.com" ]
sam35060@hotmail.com
c51f2679ea81106cfc4686a0f1f6612f5a78de57
d70772d93afe7aeaec2b4e0546ffb9bbac4995ad
/commons/common-auth/src/main/java/com/pig4cloud/pigx/common/security/util/ConcurrentDateFormat.java
db8698324035b325c243bf7b89168e73af5bd380
[]
no_license
seayfhzl001/micro-service
c704efd256eaebca95dbaf08409ae722dc55d526
9a758a7a97f5cd12ded1ecb515d9248faa1d9858
refs/heads/master
2023-07-05T05:56:43.214941
2021-07-24T06:31:43
2021-07-24T06:31:43
279,470,072
0
0
null
null
null
null
UTF-8
Java
false
false
2,032
java
package com.pig4cloud.pigx.common.security.util; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.Queue; import java.util.TimeZone; import java.util.concurrent.ConcurrentLinkedQueue; /** * 参考tomcat8中的并发DateFormat * <p> * {@link SimpleDateFormat}的线程安全包装器。 * 不使用ThreadLocal,创建足够的SimpleDateFormat对象来满足并发性要求。 * * @author L.cm */ public class ConcurrentDateFormat { private final String format; private final Locale locale; private final TimeZone timezone; private final Queue<SimpleDateFormat> queue = new ConcurrentLinkedQueue<>(); private ConcurrentDateFormat(String format, Locale locale, TimeZone timezone) { this.format = format; this.locale = locale; this.timezone = timezone; SimpleDateFormat initial = createInstance(); queue.add(initial); } public static ConcurrentDateFormat of(String format) { return new ConcurrentDateFormat(format, Locale.getDefault(), TimeZone.getDefault()); } public static ConcurrentDateFormat of(String format, TimeZone timezone) { return new ConcurrentDateFormat(format, Locale.getDefault(), timezone); } public static ConcurrentDateFormat of(String format, Locale locale, TimeZone timezone) { return new ConcurrentDateFormat(format, locale, timezone); } public String format(Date date) { SimpleDateFormat sdf = queue.poll(); if (sdf == null) { sdf = createInstance(); } String result = sdf.format(date); queue.add(sdf); return result; } public Date parse(String source) throws ParseException { SimpleDateFormat sdf = queue.poll(); if (sdf == null) { sdf = createInstance(); } Date result = sdf.parse(source); queue.add(sdf); return result; } private SimpleDateFormat createInstance() { SimpleDateFormat sdf = new SimpleDateFormat(format, locale); sdf.setTimeZone(timezone); return sdf; } }
[ "seayfhzl@gmail.com" ]
seayfhzl@gmail.com
908be6d9110c0668fd89cafc96942b3bcdb1e097
f6096f00527c7b88a4fe6a6aa1c0e05d5669792d
/org.eclipse.winery.model.csar.toscametafile/src/main/java/org/eclipse/winery/model/csar/toscametafile/TOSCAMetaFileAttributes.java
e47041671394877e37e13d23ed51ba24c5f3c532
[ "EPL-1.0", "EPL-2.0", "Apache-2.0", "LGPL-2.0-or-later", "LGPL-2.1-only", "MIT", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "CPL-1.0", "LicenseRef-scancode-generic-export-compliance", "MPL-1.1", "Apache-1.1" ]
permissive
zhaohuabing/winery
70c8bd6d8ab1de13cd9c53d1df71bb6800668bd2
2412dd6d945e1cd7db7cc3d78807a0dc14dcbc93
refs/heads/master
2023-07-11T00:30:53.129354
2016-07-13T09:17:15
2016-07-13T09:17:15
79,974,678
0
0
Apache-2.0
2023-08-07T17:05:31
2017-01-25T02:05:48
Java
UTF-8
Java
false
false
1,577
java
/******************************************************************************* * Copyright (c) 2013 Rene Trefft. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and the Apache License 2.0 which both accompany this distribution, * and are available at http://www.eclipse.org/legal/epl-v10.html * and http://www.apache.org/licenses/LICENSE-2.0 * * Contributors: * Rene Trefft - initial API and implementation and/or initial documentation *******************************************************************************/ package org.eclipse.winery.model.csar.toscametafile; /** * Predefined attribute names and values of a TOSCA meta file. <br /> * <br /> * Copyright 2013 IAAS University of Stuttgart <br /> * <br /> * * @author Rene Trefft - rene.trefft@developers.opentosca.org * */ public class TOSCAMetaFileAttributes { // of block 0 final public static String TOSCA_META_VERSION = "TOSCA-Meta-Version"; final public static String TOSCA_META_VERSION_VALUE = "1.0"; final public static String CSAR_VERSION = "CSAR-Version"; final public static String CSAR_VERSION_VALUE = "1.0"; final public static String CREATED_BY = "Created-By"; final public static String ENTRY_DEFINITIONS = "Entry-Definitions"; final public static String TOPOLOGY = "Topology"; final public static String DESCRIPTION = "Description"; // of blocks > 0 (file blocks) final public static String NAME = "Name"; final public static String CONTENT_TYPE = "Content-Type"; }
[ "kopp.dev@gmail.com" ]
kopp.dev@gmail.com
7fa8e4ad6dc09b1af669e6a6fda1b5422fe6fe17
2cb3e640e9024b7b6943b5abf926abcf79c6b5c7
/easy/Two_Num_Sum.java
4b7c30672d091aa4bc3b90e7aaf7449613624902
[]
no_license
mujahid-ali/algo-expert
212a77063cb2964743994de259764a867c4253ee
6c730aa498eb4b3e8f5a4a3434c8f8a293eef8f9
refs/heads/master
2020-12-02T19:00:02.877135
2020-01-11T08:23:07
2020-01-11T08:23:07
231,091,372
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
//https://www.geeksforgeeks.org/given-an-array-a-and-a-number-x-check-for-pair-in-a-with-sum-as-x/ import java.util.*; class GFG{ static void findPair(int arr[], int sum){ int n = arr.length; HashSet<Integer> hs = new HashSet<Integer>(); for(int i = 0; i<n; i++){ int temp = sum - arr[i]; if(hs.contains(temp)){ System.out.println(temp +" " + arr[i]); } hs.add(arr[i]); } } public static void main(String[] args){ int arr[] = {1,4,45,6,10,-8}; int sum = 16; findPair(arr,sum); } }
[ "mujahidali0611@gmail.com" ]
mujahidali0611@gmail.com
a4dde014a1819b08b8a55ae4d4719c9e1ca09b2b
8f136274265d47ec318ead7d600c481e0852a2ac
/app/src/main/java/iqiqiya/lanlana/sqlitedemo/StudentDao.java
a046885bfdbccdfb72851e97713b515ef79a77c5
[]
no_license
iqiqiya/SqliteDemo
ea824e1b3c2b707e8aff6c9058ca6f1b7e508f5e
c4095cebf1c15245cb8b20245418211008f99cba
refs/heads/master
2020-08-16T06:35:02.589798
2019-10-16T08:55:45
2019-10-16T08:55:45
215,468,435
0
0
null
null
null
null
UTF-8
Java
false
false
2,431
java
package iqiqiya.lanlana.sqlitedemo; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.os.Environment; import android.widget.Toast; import java.util.ArrayList; /** * Author: iqiqiya * Date: 2019/10/16 * Time: 16:26 * Blog: blog.77sec.cn * Github: github.com/iqiqiya */ public class StudentDao { private SQLiteDatabase db; public StudentDao(Context context){ String path = Environment.getExternalStorageDirectory() + "/stu.db"; SQLiteOpenHelper helper = new SQLiteOpenHelper(context,path,null,2) { @Override public void onCreate(SQLiteDatabase sqLiteDatabase) { } @Override public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) { } }; db = helper.getReadableDatabase(); } public void addStudent(Student stu){ String sql = "insert into info_tb (name,age,gender) values(?,?,?)"; db.execSQL(sql,new Object[]{stu.getName(),stu.getAge()+"",stu.getGender()}); } public Cursor getStudent(String... strs){ //1.查询所有(没有参数) String sql = "select * from info_tb "; //2.含条件查询(姓名/年龄/编号)(参数形式:第一个参数指明条件,第二个参数指明条件值) if(strs.length != 0){ sql += " where " + strs[0] + "='" + strs[1] + "'"; } Cursor c = db.rawQuery(sql,null); return c; } public ArrayList<Student> getStudentInList(String... strs){ ArrayList<Student> list = new ArrayList<>(); Cursor c = getStudent(strs); while (c.moveToNext()){ int id = c.getInt(0); String name = c.getString(1); int age = c.getInt(2); String gender = c.getString(3); Student s = new Student(id,name,age,gender); list.add(s); } return list; } public void deleteStudent(String... strs){ String sql = "delete from info_tb where " + strs[0] + "='" + strs[1] + "'"; db.execSQL(sql); } public void updateStudent(Student stu){ String sql = "update info_tb set name=?,age=?,gender=? where _id=?"; db.execSQL(sql,new Object[]{stu.getName(),stu.getAge(),stu.getGender(),stu.getId()}); } }
[ "iqiqiya@outlook.com" ]
iqiqiya@outlook.com
d4c180319475e645ca7a77fca32f853da58681f4
01b23223426a1eb84d4f875e1a6f76857d5e8cd9
/icefaces3/tags/icefaces-3.1.0.ALPHA2/icefaces/tutorials/dateTimeEntry-yearRange-tutorial/src/main/java/com/icesoft/icefaces/tutorial/component/dateTimeEntry/yearRange/DateTimeEntryBean.java
56c9918da2c19f28d72dfc3f4f2ff3e401ea608e
[ "Apache-2.0" ]
permissive
numbnet/icesoft
8416ac7e5501d45791a8cd7806c2ae17305cdbb9
2f7106b27a2b3109d73faf85d873ad922774aeae
refs/heads/master
2021-01-11T04:56:52.145182
2016-11-04T16:43:45
2016-11-04T16:43:45
72,894,498
0
0
null
null
null
null
UTF-8
Java
false
false
917
java
package com.icesoft.icefaces.tutorial.component.dateTimeEntry.yearRange; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; @ManagedBean @SessionScoped public class DateTimeEntryBean { private Date selectedDate; private String yearRange = "c-5:c+5"; public DateTimeEntryBean() throws ParseException { selectedDate = new SimpleDateFormat("yyyy-M-d H:m z").parse("2010-4-30 13:9 Pacific Daylight Time"); } public Date getSelectedDate() { return selectedDate; } public void setSelectedDate(Date selectedDate) { this.selectedDate = selectedDate; } public String getYearRange() { return yearRange; } public void setYearRange(String yearRange) { this.yearRange = yearRange; } }
[ "ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74" ]
ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74
0bc5dc7d85d667421fdd3a24a17d01bf7dc3d54a
18c8e15fb6783646c64ab9c9b902178b73bb205f
/src/main/java/com/qf/hospital/HospitalApplication.java
e413db53bc8378431d6858e6fb997b1343e9d7db
[]
no_license
FF-9527/Hospital
0b5d4f62a6cc6bdfd85ac8d4291dba71798eaec3
ae81f6bddf42ad85d9507335e4dc29428424c2e3
refs/heads/master
2020-09-29T23:23:58.502923
2019-12-11T10:19:08
2019-12-11T10:19:08
227,147,712
0
1
null
null
null
null
UTF-8
Java
false
false
556
java
package com.qf.hospital; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import springfox.documentation.swagger2.annotations.EnableSwagger2; //开关类 @SpringBootApplication//标记 这是SpringBoot项目 @EnableSwagger2 //启用Swagger的扫描 @MapperScan("com.qf.hospital") public class HospitalApplication { public static void main(String[] args) { SpringApplication.run(HospitalApplication.class, args); } }
[ "280868835@qq.com" ]
280868835@qq.com
d6d879cc81215e4b77efdb2b8cb3d2c9442366e9
f61abc7980ad54ce416324e64e3f7df81d7ec963
/src/model/Maze.java
a87a470d5976cef2d3f0c812129b62f6e0593964
[]
no_license
akritis9/aMAZE
06b70d097acfa6a5b1d1b125855b115cdb9da497
5cbc89fc8ee6f1874450d71a9abe9a86d73ece24
refs/heads/main
2023-06-18T07:29:03.788600
2021-07-15T19:25:43
2021-07-15T19:25:43
386,401,304
0
1
null
null
null
null
UTF-8
Java
false
false
3,617
java
package model; import java.util.*; // represents a maze grid public class Maze { public int numRows; // dimensions of the maze public int numCols; // dimensions of the maze public HashMap<Room, List<Room>> roomsAndNeighbours; // a room and a list of its neighbours public Set<Wall> innerWalls; // All the inner walls of the maze, excludes the boundary walls public Set<Wall> boundaryWalls; public Wall startWall; public Wall endWall; public Maze(int x, int y) { numRows = y; numCols = x; roomsAndNeighbours = new HashMap<>(); createRoomsAndNeighbours(x,y); innerWalls = new HashSet<>(); createInnerWalls(x, y); /*boundaryWalls = createBoundaryWalls(x, y); startWall = createStartWall(x, y); endWall = createEndWall(x, y);*/ } /*private Wall createEndWall(int x, int y) { //may not need to implement } private Wall createStartWall(int x, int y) { // may not need to implement } private Set<Wall> createBoundaryWalls(int x, int y) { // may not need to implement }*/ // for all the rooms, create a wall between the room and its neighbours. private void createInnerWalls(int x, int y) { Iterator allRooms = roomsAndNeighbours.keySet().iterator(); while (allRooms.hasNext()) { Room room1 = (Room) allRooms.next(); List<Room> neighbours = roomsAndNeighbours.get(room1); for (int i = 0; i < neighbours.size(); i++) { Room room2 = neighbours.get(i); Wall wall = new Wall(room1,room2); if (!innerWalls.contains(wall)) { innerWalls.add(wall); } } } } private void createRoomsAndNeighbours(int x, int y) { //start with the yth row and iterate through all columns for (int i = 0; i < y; i++) { for (int j = 0; j < x; j++) { Room rm = new Room(i, j); roomsAndNeighbours.put(rm, new ArrayList<>()); } } // now assign neighbours to each room in the hashMap // first figure out if the number of neighbours is 1,2,3,or 4 // then find and fill the list of neighbours with those neighbours Iterator allRooms1 = roomsAndNeighbours.keySet().iterator(); while (allRooms1.hasNext()) { Room room = (Room) allRooms1.next(); List<Room> neighbours = roomsAndNeighbours.get(room); Iterator allRooms2 = roomsAndNeighbours.keySet().iterator(); while (allRooms2.hasNext()) { Room neighbour = (Room) allRooms2.next(); // check which of the four possible neighbours are in the maze // locate them in the hashset and add them to the list for a room //north neighbour if (((room.y - neighbour.y) == 1) && (room.x - neighbour.x == 0)) { neighbours.add(neighbour); } else if (((room.y - neighbour.y) == -1) && (room.x - neighbour.x == 0)) { //south neighbour neighbours.add(neighbour); } else if (((room.x - neighbour.x) == -1) && (room.y - neighbour.y == 0)) { //east neighbour neighbours.add(neighbour); } else if (((room.x - neighbour.x) == 1) && (room.y - neighbour.y == 0)) { // west neighbour neighbours.add(neighbour); } } } } }
[ "58141986+akritis9@users.noreply.github.com" ]
58141986+akritis9@users.noreply.github.com
059588da68611d2b218a57bae904b7ce28a9cd06
47f248823b693cdb679e864d74984765861a5348
/app/src/main/java/com/voyager/qdocker/MainActivity.java
82bdebdd1b73c21dfcd4f15f9410f604714a6765
[]
no_license
rimonrpallan3/QDocker
1de6476a1cacccbe196668a216950c58d00eef99
c1ec0de5eab452e7fee11afd19d8c1b7345b1453
refs/heads/master
2021-09-12T04:47:19.471552
2018-04-14T13:39:51
2018-04-14T13:39:51
124,846,758
0
0
null
null
null
null
UTF-8
Java
false
false
1,502
java
package com.voyager.qdocker; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; import com.voyager.qdocker.custom.qrmodule.activity.QrScannerActivity; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; public class MainActivity extends AppCompatActivity { @BindView(R.id.txt_scan_result) TextView mTxtScanResult; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ButterKnife.bind(this); } @OnClick(R.id.Main_btn_scan) void onScanBtnClick() { startActivityForResult( new Intent(MainActivity.this, QrScannerActivity.class), QrScannerActivity.QR_REQUEST_CODE); } @OnClick(R.id.Main_btn_generate) void onGenerateBtnClick() { startActivity(new Intent(MainActivity.this, DemoGeneratorActivity.class)); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == QrScannerActivity.QR_REQUEST_CODE) { mTxtScanResult.setText( resultCode == RESULT_OK ? data.getExtras().getString(QrScannerActivity.QR_RESULT_STR) : "Scanned Nothing!"); } } }
[ "rmonrpallan3@gmail.com" ]
rmonrpallan3@gmail.com
72b36a6865afd144f02c98231ab93b848424b7fb
1a7624884c69d1c1c868f0e97e6b8a633fd5523c
/TheDemoSite/src/test/java/com/qa/test/TheDemoSiteLogin.java
6bcd8be1925f9198776b0246ead4bd0a97e3d5d5
[]
no_license
pashsunuwar/Automated-Testing-Exercise-Book
a888e2ee0cec1a5ec6b3875dd9edfc91c9f8d960
5717115309d6efd1217668a4d9fa39219a1b4038
refs/heads/master
2022-12-20T06:52:54.939646
2020-08-04T12:08:49
2020-08-04T12:08:49
284,954,141
0
0
null
2020-10-14T00:10:34
2020-08-04T11:02:29
Java
UTF-8
Java
false
false
2,053
java
package com.qa.test; import static org.junit.Assert.assertEquals; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class TheDemoSiteLogin { private WebDriver driver; private WebElement target; @Before public void setupBefore() { System.setProperty( "webdriver.chrome.driver", "C:\\Users\\Pash\\Documents\\TheDemoSite\\src\\main\\resources\\WebDriver/chromedriver.exe" ); driver = new ChromeDriver(); } @Test public void testing() throws InterruptedException { driver.get("http://thedemosite.co.uk/"); //create username & password driver.get("http://thedemosite.co.uk/addauser.php"); target = driver.findElement(By.xpath("/html/body/table/tbody/tr/td[1]/form/div/center/table/tbody/tr/td[1]/div/center/table/tbody/tr[1]/td[2]/p/input")); target.sendKeys("testing123"); target = driver.findElement(By.name("password")); target.sendKeys("123password"); target.submit(); //login target = driver.findElement(By.xpath("/html/body/div/center/table/tbody/tr[2]/td/div/center/table/tbody/tr/td[2]/p/small/a[4]")); target.click(); target = driver.findElement(By.xpath("/html/body/table/tbody/tr/td[1]/form/div/center/table/tbody/tr/td[1]/table/tbody/tr[1]/td[2]/p/input")); target.sendKeys("testing123"); target = driver.findElement(By.xpath("/html/body/table/tbody/tr/td[1]/form/div/center/table/tbody/tr/td[1]/table/tbody/tr[2]/td[2]/p/input")); target.sendKeys("123password"); target = driver.findElement(By.xpath("/html/body/table/tbody/tr/td[1]/form/div/center/table/tbody/tr/td[1]/table/tbody/tr[3]/td[2]/p/input")); target.click(); target = driver.findElement(By.xpath("/html/body/table/tbody/tr/td[1]/big/blockquote/blockquote/font/center/b")); assertEquals("**Successful Login**", target.getText()); Thread.sleep(7000); } @After public void after() { driver.close(); } }
[ "psunuwar@qa.com" ]
psunuwar@qa.com
22a34499d637564df221b5cf71d90c75cde18d8e
a5a8cff3c0ef9f8f7a526b978e49c81b8cc53b75
/src/icontroller/ILanguageController.java
483e3efb76d29fb1dd2e43ba26c9f5b194b604d8
[]
no_license
bootcamp-26-java/OHibernateModule
6463f575a17f039f8f54b0d650ad2f13f1cdd0e6
1776dfdf9610e53690d7cc0542b71b785d49086f
refs/heads/master
2020-06-21T18:38:31.934692
2019-07-18T08:18:12
2019-07-18T08:18:12
197,528,515
0
0
null
null
null
null
UTF-8
Java
false
false
647
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 icontroller; import java.util.List; import models.Language; /** * * @author Arif Fridasari */ public interface ILanguageController { public List<Language> getAll(); public List<Language> search(Object keyword); public Language getById(String id); public String insert (String id, String name, String date); public String update (String id, String name, String date); public String delete (String id); }
[ "" ]
5130d14c94f6ad0a246d70018dc7f42dbd0e37af
f8eb8ed9b56fd867f01290f61d33ebf7839ebd20
/src/main/java/com/nowcoder/service/SensitiveService.java
351c181c6cfe0b37ec029ed458fd558b6529c306
[ "Apache-2.0" ]
permissive
The0leaner/ReviewUtils
36c54840ab0df42f8c49ffac89f557598acb97b5
1720cd46e43570d634f9014afd5dc24e9cda1814
refs/heads/master
2020-12-30T11:40:15.261752
2017-05-22T15:54:21
2017-05-22T15:54:21
91,518,949
0
0
null
null
null
null
UTF-8
Java
false
false
4,333
java
package com.nowcoder.service; import com.nowcoder.util.WendaUtil; import com.sun.org.apache.xml.internal.security.Init; import org.apache.commons.lang.CharUtils; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.stereotype.Service; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.Buffer; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeoutException; @Service public class SensitiveService implements InitializingBean { private static final Logger logger = LoggerFactory.getLogger(WendaUtil.class); @Override public void afterPropertiesSet() throws Exception { try { InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("SensitiveWords.txt"); InputStreamReader read = new InputStreamReader(is); BufferedReader bufferedReader = new BufferedReader(read); String lineText; while ((lineText = bufferedReader.readLine()) != null){ addWord(lineText.trim()); } read.close(); }catch (Exception e) { logger.error("读取敏感词文件失败" + e.getMessage()); } } //增加关键词 private void addWord (String lineText){ TrieNode tempNode = rootNode; for (int i = 0 ; i < lineText.length() ; ++i) { Character c = lineText.charAt(i); TrieNode node = tempNode.getSubNode(c); if (node == null){ node = new TrieNode(); tempNode.addSubNode(c , node); } tempNode = node; if (i == lineText.length() - 1) { tempNode.setKeywordEnd(true); } } } private class TrieNode { //是不是关键词词尾 private boolean end = false; //当前节点下的所有子节点 private Map<Character, TrieNode> subNodes = new HashMap<>(); public void addSubNode (Character key , TrieNode value) { subNodes.put(key , value); } TrieNode getSubNode(Character key) { return subNodes.get(key); } boolean isKeywordEnd () { return end; } void setKeywordEnd(boolean end){ this.end = end; } } private TrieNode rootNode = new TrieNode(); /** * 判断是否是一个符号 * @param c * @return */ private boolean isSymbol (char c) { int ic = (int) c; // 0x2E80-0x9FFF 东亚文字范围 return !CharUtils.isAsciiAlphanumeric(c) && (ic < 0x2E80 || ic > 0x9FFF); } public String filter (String text) { if (StringUtils.isBlank(text)) { return text; } String replacement = "***"; TrieNode tempNode = rootNode; int begin = 0; int position = 0; StringBuilder result = new StringBuilder(); while (position < text.length()) { char c = text.charAt(position); //如果是非法词汇应该调空掉 if (isSymbol(c)) { if (tempNode == rootNode) { result.append(c); ++begin; } ++position; continue; } tempNode = tempNode.getSubNode(c); if (tempNode == null){ result.append(text.charAt(begin)); position = begin + 1; //begin + 1原因在于这里没有发现敏感词 begin = position; tempNode = rootNode; //回到tree的根节点 }else if (tempNode.isKeywordEnd()) { //发现敏感词 result.append(replacement); //可以在发现敏感词的后面+1,因为前面都已经打码了 position = position + 1; begin = position; tempNode = rootNode; }else { ++position; } } result.append(text.substring(begin)); return result.toString(); } }
[ "wangzuotion@gmail.com" ]
wangzuotion@gmail.com
417d63468004f2577de82b88685b6950d333f288
9a93797540008e66d2cf3d28b3faa79115f75397
/biblioteca/biblio-gui/src/main/java/co/edu/eam/biblioteca/vista/VentanaConsultas.java
91f0518e18a89784522e6ce0d07bcc00c9ef6c00
[]
no_license
caferrerb/bibliotestgit
abe1112dae6c5859a631815baef8e26ba7776a16
dda78cc3e1c6bdca4f9f875fe05e0c52441cf099
refs/heads/master
2020-05-23T08:17:44.094219
2016-10-07T13:02:24
2016-10-07T13:02:24
70,243,846
0
0
null
null
null
null
UTF-8
Java
false
false
29,020
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * VentanaConsultas.java * * Created on 11/05/2010, 03:20:52 PM */ package co.edu.eam.biblioteca.vista; import java.awt.event.ActionListener; import javax.swing.table.DefaultTableModel; /** * This code was edited or generated using CloudGarden's Jigloo * SWT/Swing GUI Builder, which is free for non-commercial * use. If Jigloo is being used commercially (ie, by a corporation, * company or business for any purpose whatever) then you * should purchase a license for each developer using Jigloo. * Please visit www.cloudgarden.com for details. * Use of Jigloo implies acceptance of these licensing terms. * A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR * THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED * LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE. */ /** * * @author Camilo Andres */ public class VentanaConsultas extends javax.swing.JInternalFrame { /** Creates new form VentanaPrestamos */ public VentanaConsultas() { initComponents(); setVisible(true); setResizable(false); setClosable(true); setMaximizable(false); setVisible(true); } /** 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() { jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); cbAutor = new javax.swing.JComboBox(); jPanel6 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); tablaLibrosAutor = new javax.swing.JTable(); jPanel7 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); tablaPrestamosAutor = new javax.swing.JTable(); jPanel2 = new javax.swing.JPanel(); jPanel5 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jButton1 = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); cbLibro = new javax.swing.JComboBox(); jPanel8 = new javax.swing.JPanel(); jScrollPane4 = new javax.swing.JScrollPane(); tablaUsuariosCOnLibro = new javax.swing.JTable(); jPanel9 = new javax.swing.JPanel(); jScrollPane5 = new javax.swing.JScrollPane(); tablaPrestamosLibro = new javax.swing.JTable(); jPanel4 = new javax.swing.JPanel(); jPanel10 = new javax.swing.JPanel(); jScrollPane6 = new javax.swing.JScrollPane(); tablaLibrosEditorial = new javax.swing.JTable(); jPanel11 = new javax.swing.JPanel(); jScrollPane7 = new javax.swing.JScrollPane(); tablaPrestamosEditorial = new javax.swing.JTable(); jLabel4 = new javax.swing.JLabel(); cbEditorial = new javax.swing.JComboBox(); jLabel1 = new javax.swing.JLabel(); setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/Maintenance_32x32-32.png"))); // NOI18N jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel2.setText("Autor"); jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Libros Autor")); tablaLibrosAutor.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 [] { "Codigo", "Nombre", "Autor", "Ejemplares" } ) { boolean[] canEdit = new boolean [] { false, false, true, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane2.setViewportView(tablaLibrosAutor); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel6Layout.setVerticalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Prestamos Autor")); tablaPrestamosAutor.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 [] { "Codigo", "Nombre", "Fecha", "Entregado" } ) { boolean[] canEdit = new boolean [] { false, false, true, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane3.setViewportView(tablaPrestamosAutor); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel7Layout.setVerticalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE) .addContainerGap()) ); 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(jPanel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() .addComponent(jLabel2) .addGap(18, 18, 18) .addComponent(cbAutor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap(25, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(cbAutor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jTabbedPane1.addTab("Autor", new javax.swing.ImageIcon(getClass().getResource("/imagenes/User-Male.png")), jPanel1); // NOI18N jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Usuarios Bloqueados")); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null} }, new String [] { "Cedula", "Nombre", "Telefono" } ) { boolean[] canEdit = new boolean [] { false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane1.setViewportView(jTable1); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/Select.png"))); // NOI18N jButton1.setText("Desbloquear"); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1)) .addContainerGap(25, Short.MAX_VALUE)) ); jPanel5Layout.setVerticalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton1) .addContainerGap()) ); 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() .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(32, Short.MAX_VALUE)) ); jTabbedPane1.addTab("Usuarios", new javax.swing.ImageIcon(getClass().getResource("/imagenes/Buddy-Green.png")), jPanel2); // NOI18N jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel3.setText("Libro"); jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Usuarios Con prestamos del Libro")); tablaUsuariosCOnLibro.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null} }, new String [] { "Cedula", "Nombre", "Telefono" } ) { boolean[] canEdit = new boolean [] { false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane4.setViewportView(tablaUsuariosCOnLibro); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel8Layout.setVerticalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(30, Short.MAX_VALUE)) ); jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder("Prestamos Libro")); tablaPrestamosLibro.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 [] { "Codigo", "Nombre", "Fecha", "Entregado" } ) { boolean[] canEdit = new boolean [] { false, false, true, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane5.setViewportView(tablaPrestamosLibro); javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout.setHorizontalGroup( jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel9Layout.setVerticalGroup( jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup() .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup() .addComponent(jLabel3) .addGap(18, 18, 18) .addComponent(cbLibro, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jPanel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap(25, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(cbLibro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(17, Short.MAX_VALUE)) ); jTabbedPane1.addTab("Libro", new javax.swing.ImageIcon(getClass().getResource("/imagenes/Address-Book_24x24-32.png")), jPanel3); // NOI18N jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Libros Autor")); tablaLibrosEditorial.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 [] { "Codigo", "Nombre", "Autor", "Ejemplares" } ) { boolean[] canEdit = new boolean [] { false, false, true, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane6.setViewportView(tablaLibrosEditorial); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel10Layout.setVerticalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder("Prestamos Autor")); tablaPrestamosEditorial.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 [] { "Codigo", "Nombre", "Fecha", "Entregado" } ) { boolean[] canEdit = new boolean [] { false, false, true, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane7.setViewportView(tablaPrestamosEditorial); javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11); jPanel11.setLayout(jPanel11Layout); jPanel11Layout.setHorizontalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel11Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel11Layout.setVerticalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel11Layout.createSequentialGroup() .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel4.setText("EDitorial"); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(jLabel4) .addGap(18, 18, 18) .addComponent(cbEditorial, 0, 415, Short.MAX_VALUE)) .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(25, 25, 25)) ); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(cbEditorial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(38, Short.MAX_VALUE)) ); jTabbedPane1.addTab("Editoriales", new javax.swing.ImageIcon(getClass().getResource("/imagenes/Help.png")), jPanel4); // NOI18N jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/Spreadsheet2.png"))); // NOI18N jLabel1.setText("Consultas"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 524, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 524, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 456, Short.MAX_VALUE) .addContainerGap()) ); pack(); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JComboBox cbAutor; private javax.swing.JComboBox cbEditorial; private javax.swing.JComboBox cbLibro; private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel10; private javax.swing.JPanel jPanel11; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel3; private javax.swing.JPanel jPanel4; private javax.swing.JPanel jPanel5; private javax.swing.JPanel jPanel6; private javax.swing.JPanel jPanel7; private javax.swing.JPanel jPanel8; private javax.swing.JPanel jPanel9; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JScrollPane jScrollPane3; private javax.swing.JScrollPane jScrollPane4; private javax.swing.JScrollPane jScrollPane5; private javax.swing.JScrollPane jScrollPane6; private javax.swing.JScrollPane jScrollPane7; private javax.swing.JTabbedPane jTabbedPane1; private javax.swing.JTable jTable1; private javax.swing.JTable tablaLibrosAutor; private javax.swing.JTable tablaLibrosEditorial; private javax.swing.JTable tablaPrestamosAutor; private javax.swing.JTable tablaPrestamosEditorial; private javax.swing.JTable tablaPrestamosLibro; private javax.swing.JTable tablaUsuariosCOnLibro; // End of variables declaration//GEN-END:variables }
[ "caferrerb@eam.edu.co" ]
caferrerb@eam.edu.co
fd48c66f0e8240b71f3f6192412d4dff04f6cf64
a1f4b2c4e5b3b84f022b420c2a86f4a89b7c3f21
/booking-manager-api/src/main/java/cz/muni/fi/pa165/facade/BookingFacade.java
c58bb3f738c86b0be964eb3a45abe45698f1c6c5
[]
no_license
hradecek/booking-manager
9b1c8ab1b6db3154aaa2985db1b4ea0f7cf639ee
c182f0ba6a2f4ea90b8d7ff314d4df6ddfe945c6
refs/heads/master
2021-01-10T10:08:38.446952
2016-01-29T11:22:44
2016-01-29T11:22:44
44,839,517
2
5
null
2015-12-16T14:39:19
2015-10-23T21:28:18
Java
UTF-8
Java
false
false
1,619
java
package cz.muni.fi.pa165.facade; import cz.muni.fi.pa165.dto.BookingDto; import cz.muni.fi.pa165.dto.CreateBookingDto; import java.util.Collection; /** * Facade for booking operations. * * @author Ivo Hradek */ public interface BookingFacade { /** * Create booking. * * @param booking to be created. * @return Id of created booking. */ Long createBooking(CreateBookingDto booking); /** * Delete single booking by its id. * * @param id of booking to be deleted. */ void cancelBooking(Long id); /** * Get all bookings in the system. * * @return Collection of booking DTOs. If there are no bookings * then empty collection will be returned. */ Collection<BookingDto> getAllBookings(); /** * Get all bookings belonging to a hotel. * Hotel is identified by its id. * * @param id of hotel of which bookings should be retrieved. * @return Collection of booking DTOs. If there are no bookings * then empty collection will be returned. */ Collection<BookingDto> getAllHotelBookings(Long id); /** * Get all bookings for a specific room. * * @param id of a room. * @return Collection of booking DTOs. If there are no bookings * then empty collection will be returned. */ Collection<BookingDto> getAllRoomBookings(Long id); /** * Get single booking by its id. * * @param id of a booking to be retrieved. * @return DTO of founded booking if it is found. Otherwise null. */ BookingDto getBookingById(Long id); }
[ "ivohradek@gmail.com" ]
ivohradek@gmail.com
39fc439b6cb4e112e1f9ffbb75b771094fa68d19
643315f61e98000f9d9fe65226e630d1bbe5ccf2
/src/Game/Game/Team.java
a0251f352dbce45ec0cdb3c038ae48046660a771
[]
no_license
alt277/Hash-tables_HW
60b739aec9555708ce9257d92b73e99cde63e0ca
9939ce4f72936c3ad68abdc3a87f6d8398451541
refs/heads/master
2022-04-24T11:51:55.302093
2020-04-26T08:06:25
2020-04-26T08:06:25
258,974,653
0
0
null
2020-04-26T08:14:09
2020-04-26T08:06:17
Java
UTF-8
Java
false
false
541
java
package Game.Game; import java.util.Random; public class Team { protected Hero[] team; int counter; public Team(int number) { counter= number; team=new Hero[number]; team[0] =new Doctor(); for (int i=1;i<counter;i++){ Random Rnd=new Random(); int rand=Rnd.nextInt(number); if (rand%2==0) team[i]=new Warrior(); else team[i]=new Assasin(); } } public Hero[] getTeam() { return team; } }
[ "altima875@gmail.com" ]
altima875@gmail.com
751af58275cdd8e8207bb95b82db0475bf6e7124
0b24be4213f55c51bf637c707835a6760dba9683
/src/leetcode/SudokuSolver.java
7afb1569ded5cfd901951fd5e63e07a4e8dd6990
[]
no_license
b41sh/leetcode
5570ceaf8ce1fb3ea26bed98e95e12cea8c2e253
6a36fa0d6216550ee27e753e862e455b7e191d32
refs/heads/master
2020-03-15T11:38:30.177514
2019-02-25T15:24:40
2019-02-25T15:24:40
132,124,839
0
0
null
null
null
null
UTF-8
Java
false
false
3,373
java
package leetcode.sudokuSolver; // Source : https://leetcode.com/problems/sudoku-solver/ // Author : Shen Bai // Date : 2018-05-17 import java.util.ArrayList; import java.util.List; /** * Write a program to solve a Sudoku puzzle by filling the empty cells. * A sudoku solution must satisfy all of the following rules: * Each of the digits 1-9 must occur exactly once in each row. * Each of the digits 1-9 must occur exactly once in each column. * Each of the the digits 1-9 must occur exactly once in each of the 9 3x3 sub-boxes of the grid. * Empty cells are indicated by the character '.'. * Note: * The given board contain only digits 1-9 and the character '.'. * You may assume that the given Sudoku puzzle will have a single unique solution. * The given board size is always 9x9. */ public class SudokuSolver { /** * DFS */ public void solveSudoku(char[][] board) { List<Node> nodes = new ArrayList<Node>(); for (int i = 0; i < board.length; i++) { for (int j = 0; j < board[i].length; j++) { if (board[i][j] == '.') { Node node = new Node(i, j); nodes.add(node); } } } boolean ret = fill(nodes, board, 0); return; } private boolean fill(List<Node> nodes, char[][] board, int index) { if (index == nodes.size()) { return true; } Node node = nodes.get(index); int i = node.getI(); int j = node.getJ(); System.out.println("index=" + index); char c = '1'; while (c <= '9') { board[i][j] = c; if (validSudoku(board, i, j)) { if (fill(nodes, board, index + 1)) { return true; } } c++; } board[i][j] = '.'; return false; } private boolean validSudoku(char[][] board, int i, int j) { int[] validX = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int[] validY = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int[] validZ = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; for (int m = 0; m < 9; m++) { if (board[i][m] != '.') { int x = board[i][m] - 48; if (validX[x] == 1) { return false; } else { validX[x] = 1; } } if (board[m][j] != '.') { int y = board[m][j] - 48; if (validY[y] == 1) { return false; } else { validY[y] = 1; } } int subI = (i / 3) * 3 + m / 3; int subJ = (j / 3) * 3 + m % 3; if (board[subI][subJ] != '.') { int z = board[subI][subJ] - 48; if (validZ[z] == 1) { return false; } else { validZ[z] = 1; } } } return true; } private class Node { private int i; private int j; Node(int i, int j) { this.i = i; this.j = j; } public int getI() { return this.i; } public int getJ() { return this.j; } } }
[ "baishen2009@gmail.com" ]
baishen2009@gmail.com
3531e4b421c3872d4f363ef8c5868ecf5a394b56
e087ccadfcca0d5fae67fba927a8042f6ed903d9
/minecraft/Food/items/ingots/KuptoniteIngot.java
a8ec0dd88c626798208559ba846c4bd4c650cb93
[]
no_license
kulalolk/Mod-without-a-name
1915fab8f1f2a043c680a9820d0ae0bfc5d6a654
fba1d80cbd53d70af5b2814163a67db3f1e5993e
refs/heads/master
2021-01-23T21:38:48.972574
2014-01-01T06:58:44
2014-01-01T06:58:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
345
java
package Food.items.ingots; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class KuptoniteIngot extends Item { public KuptoniteIngot(int id) { super(id); setMaxStackSize(64); setCreativeTab(CreativeTabs.tabMisc); setUnlocalizedName("KuptonIngot"); setTextureName("food:KuptonIngot"); } }
[ "kulalolk@gmail.com" ]
kulalolk@gmail.com
d094fe9cabf3b6140b1fc9d33a9a5b1d1e86c365
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XRENDERING-481-1-20-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/xwiki/rendering/internal/macro/toc/TreeParametersBuilder_ESTest.java
25ac4c43643fc8de707d068edb3d0666322de87f
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
3,848
java
/* * This file was automatically generated by EvoSuite * Fri Oct 29 13:17:17 UTC 2021 */ package org.xwiki.rendering.internal.macro.toc; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import java.util.Map; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.evosuite.runtime.javaee.injection.Injector; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.xwiki.component.embed.EmbeddableComponentManager; import org.xwiki.properties.BeanManager; import org.xwiki.rendering.block.MacroBlock; import org.xwiki.rendering.internal.macro.toc.TreeParametersBuilder; import org.xwiki.rendering.internal.transformation.macro.MacroTransformation; import org.xwiki.rendering.listener.Listener; import org.xwiki.rendering.macro.MacroManager; import org.xwiki.rendering.macro.toc.TocMacroParameters; import org.xwiki.rendering.transformation.MacroTransformationContext; import org.xwiki.rendering.transformation.RenderingContext; import org.xwiki.rendering.util.ErrorBlockGenerator; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class TreeParametersBuilder_ESTest extends TreeParametersBuilder_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { EmbeddableComponentManager embeddableComponentManager0 = new EmbeddableComponentManager(); MacroTransformationContext macroTransformationContext0 = new MacroTransformationContext(); EmbeddableComponentManager embeddableComponentManager1 = new EmbeddableComponentManager(); MacroTransformation macroTransformation0 = new MacroTransformation(); BeanManager beanManager0 = mock(BeanManager.class, new ViolatedAssumptionAnswer()); Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "beanManager", (Object) beanManager0); ErrorBlockGenerator errorBlockGenerator0 = mock(ErrorBlockGenerator.class, new ViolatedAssumptionAnswer()); Map<String, String> map0 = Listener.EMPTY_PARAMETERS; MacroBlock macroBlock0 = new MacroBlock(";2", map0, ";2", false); macroTransformationContext0.setCurrentMacroBlock(macroBlock0); Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "errorBlockGenerator", (Object) errorBlockGenerator0); Logger logger0 = mock(Logger.class, new ViolatedAssumptionAnswer()); Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "logger", (Object) logger0); MacroManager macroManager0 = mock(MacroManager.class, new ViolatedAssumptionAnswer()); Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "macroManager", (Object) macroManager0); RenderingContext renderingContext0 = mock(RenderingContext.class, new ViolatedAssumptionAnswer()); Injector.inject(macroTransformation0, (Class<?>) MacroTransformation.class, "renderingContext", (Object) renderingContext0); Injector.validateBean(macroTransformation0, (Class<?>) MacroTransformation.class); macroTransformationContext0.setTransformation(macroTransformation0); TocMacroParameters tocMacroParameters0 = new TocMacroParameters(); tocMacroParameters0.setNumbered(false); TocMacroParameters.Scope tocMacroParameters_Scope0 = TocMacroParameters.Scope.LOCAL; tocMacroParameters0.setScope(tocMacroParameters_Scope0); TreeParametersBuilder treeParametersBuilder0 = new TreeParametersBuilder(); TocMacroParameters tocMacroParameters1 = new TocMacroParameters(); // Undeclared exception! treeParametersBuilder0.build(macroBlock0, tocMacroParameters0, macroTransformationContext0); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
7d083ee8e5ca7429654a23cf88d25aca66fbfc86
804e5729d9b2398dc1396862ab42130b55edd98e
/app/src/main/java/com/umnicode/samp_launcher/core/SAMP/Components/ArchiveSystem/ArchiveComponent.java
8b88c728ecc9b4d3455385121c2183dfdfc3e4c7
[]
no_license
Tandat11/OpenSAMPLauncher
d3dd722a02007dca1ae76580023f9419fa5272da
1c4f9d23769a1e6b13702155d4eade859a15af68
refs/heads/master
2023-02-19T04:15:11.529933
2021-01-19T23:32:32
2021-01-19T23:32:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,124
java
package com.umnicode.samp_launcher.core.SAMP.Components.ArchiveSystem; import com.umnicode.samp_launcher.core.SAMP.Components.ArchiveSystem.ExtractTaskFile.ExtractTaskFileInit; import com.umnicode.samp_launcher.core.SAMP.Components.AsyncTaskContainer; import com.umnicode.samp_launcher.core.SAMP.Components.TaskStatus; import com.umnicode.samp_launcher.core.Utils; import java.io.File; import java.util.ArrayList; public class ArchiveComponent { public static ExtractTask CreateTask(ArrayList<ExtractTaskFileInit> FilepathList, ExtractTaskCallback Callback){ // Create default task return new ExtractTask(0, FilepathList, TaskStatus.CreateEmpty(FilepathList.size()), Callback); } static public AsyncTaskContainer RunTask(ExtractTask Task){ return new AsyncTaskContainer(new ExtractAsyncTask(Task)); } static public ArchiveType GetTypeOfArchive(File Archive){ String Extension = Utils.GetFileLastExtension(Archive); if (Extension.equals("zip")){ return ArchiveType.ZIP; } else{ return ArchiveType.UNSUPPORTED; } } }
[ "umnicode2@gmail.com" ]
umnicode2@gmail.com
8c97810528a0ec12dbb26cd12ef0cb05b7f44217
0983c11fc1bd9ebdfbb3d23ec0d0554a3e25fb2f
/src/main/java/com/arnaldoneto/workshopmongo/services/UserService.java
989014194be653ab86463c63845be20e2b931058
[]
no_license
arnaldofvilela/workshop-spring-boot-mongodb
8408b8e6e336c565491112278ecf03a31df1a6d2
aa6b3d1e82e38e8eaee251bd4da3294d941ebf20
refs/heads/master
2023-03-12T07:26:28.698230
2021-02-21T00:31:28
2021-02-21T00:31:28
339,110,870
0
0
null
null
null
null
UTF-8
Java
false
false
1,284
java
package com.arnaldoneto.workshopmongo.services; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.arnaldoneto.workshopmongo.domain.User; import com.arnaldoneto.workshopmongo.dto.UserDTO; import com.arnaldoneto.workshopmongo.repository.UserRepository; import com.arnaldoneto.workshopmongo.services.exception.ObjectNotFoundException; @Service public class UserService { @Autowired private UserRepository repo; public List<User> findAll(){ return repo.findAll(); } public User findById(String id) { Optional<User> obj = repo.findById(id); return obj.orElseThrow(() -> new ObjectNotFoundException("Objeto não encontrado")); } public User insert(User obj) { return repo.insert(obj); } public void delete(String id) { findById(id); repo.deleteById(id); } public User update(User obj) { User newObj = findById(obj.getId()); updateData(newObj, obj); return repo.save(newObj); } private void updateData(User newObj, User obj) { newObj.setName(obj.getName()); newObj.setEmail(obj.getEmail()); } public User fromDTO(UserDTO objDto) { return new User(objDto.getId(), objDto.getName(), objDto.getEmail()); } }
[ "vilela-neto@hotmail.com" ]
vilela-neto@hotmail.com
7da3cb2fc7ce3baa0786642f6ccd7fd8ce2b4434
99a252f8b70db462d3f669e4bfe966fcb0280515
/src/Day9/Human.java
dce559f8f8ec702912f23d9c3f9528e7c331d780
[]
no_license
oskarbay01/JavaSolution
262d5b26a4eb74e7667c8a2f9444f05cb4d69eb0
dcbcbf8e0ba3cfac4008c40f7fa028381e8c45f6
refs/heads/master
2023-05-05T11:18:01.300415
2021-05-23T04:56:02
2021-05-23T07:26:13
369,836,082
0
0
null
null
null
null
UTF-8
Java
false
false
368
java
package Day9; public class Human { public String name; public Human(String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void printinfo(){ System.out.println("Это человек с именем "+name); } }
[ "aidosuly0@gmail.com" ]
aidosuly0@gmail.com
0545e0aaff4d253f5e2a7c8308f7514ef8b0fe83
91858970f1c0386dce025cf74e1dbc17b522a432
/back-end/src/main/java/be/gestatech/application/petstore/model/Product.java
4408262e119b141f518a67cd873f7c1353128c4e
[ "MIT" ]
permissive
gestatech/petstore
9fb09fef8ae565a47269dae79e665eaf89f17345
5a32c4cbb7e03f26cd15a76e5af8fb7163e230bb
refs/heads/master
2021-08-15T07:46:13.102051
2017-11-17T15:25:26
2017-11-17T15:25:26
110,526,907
0
0
null
null
null
null
UTF-8
Java
false
false
3,733
java
package be.gestatech.application.petstore.model; import java.io.Serializable; import java.util.Objects; import javax.persistence.*; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; @Entity @Cacheable @NamedQueries({ // TODO fetch doesn't work with GlassFish // @NamedQuery(name = Product.FIND_BY_CATEGORY_NAME, query = // "SELECT p FROM Product p LEFT JOIN FETCH p.items LEFT JOIN FETCH p.category WHERE p.category.name = // :pname"), @NamedQuery(name = Product.FIND_BY_CATEGORY_NAME, query = "SELECT p FROM Product p WHERE p.category.name = :pname"), @NamedQuery(name = Product.FIND_ALL, query = "SELECT p FROM Product p") }) @XmlRootElement public class Product implements Serializable { private static final long serialVersionUID = 2932185735230344359L; // ====================================== // = Attributes = // ====================================== public static final String FIND_BY_CATEGORY_NAME = "Product.findByCategoryName"; public static final String FIND_ALL = "Product.findAll"; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", updatable = false, nullable = false) private Long id; @Version @Column(name = "version") private int version; @Column(length = 30, nullable = false) @NotNull @Size(min = 1, max = 30) private String name; // ====================================== // = Constants = // ====================================== @Column(length = 3000, nullable = false) @NotNull @Size(max = 3000) private String description; @ManyToOne(cascade = CascadeType.PERSIST) @JoinColumn(name = "category_fk", nullable = false) @XmlTransient private Category category; // ====================================== // = Constructors = // ====================================== public Product() { } public Product(String name, String description, Category category) { this.name = name; this.description = description; this.category = category; } // ====================================== // = Getters & setters = // ====================================== public Long getId() { return this.id; } public void setId(final Long id) { this.id = id; } public int getVersion() { return this.version; } public void setVersion(final int version) { this.version = version; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Category getCategory() { return this.category; } public void setCategory(final Category category) { this.category = category; } // ====================================== // = Methods hash, equals, toString = // ====================================== @Override public final boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Product)) return false; Product product = (Product) o; return Objects.equals(name, product.name) && Objects.equals(description, product.description); } @Override public final int hashCode() { return Objects.hash(name, description); } @Override public String toString() { return name; } }
[ "fariala.amuri@gestatech.be" ]
fariala.amuri@gestatech.be
91653b4ec801f3f1b94bde0777ea2f92ed78bc6b
cd8d60f547cb8383abd45fb6afa6fd4ac11ce17b
/Liberary/src/StudentRegisteration.java
70b03d23d59e91901a8722e03373410e16c37743
[]
no_license
Drongma17/servlet
5933befb2cd10c09735e5392818f7013d3b7f732
c0cd22c590b63c453ea646c4bb3b268997167a47
refs/heads/master
2020-04-25T23:21:25.654623
2019-02-28T16:35:35
2019-02-28T16:35:35
169,957,926
0
0
null
null
null
null
UTF-8
Java
false
false
1,345
java
import java.io.IOException; import java.io.PrintWriter; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class StudentRegisteration extends HttpServlet { private static final long serialVersionUID =1L; RequestDispatcher dispatcher=null; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text/html"); PrintWriter out=resp.getWriter(); dispatcher=req.getRequestDispatcher("Header1.html"); dispatcher.include(req,resp); out.println("<html>"); out.println("<body>"); out.println("<br>"); out.println("</br>"); out.println("<br>"); out.println("</br>"); out.println("</body>"); out.println("</html>"); dispatcher=req.getRequestDispatcher("StudentRegisteration.html"); dispatcher.include(req,resp); dispatcher=req.getRequestDispatcher("Footer.html"); dispatcher.include(req,resp); } }
[ "ngawang2yeshi@gmail.com" ]
ngawang2yeshi@gmail.com
899aa391b7da40c95a7b657e5f2d6c8baebec6b9
31c84ce527b46ea5b5143a26fb40e8488b503c6a
/GWT-Grundlagen-Maven/module1002/src/main/java/de/gishmo/gwt/example/module1002/client/ui/detail/DetailPlace.java
a11569f6044634c3ccf1985b56893d03bbb28226
[ "Apache-2.0" ]
permissive
FrankHossfeld/Training
cdaa69610cc151380d6cea8919663a616cc73e7f
430db23d2859ce517ea7901393eda0d112b43c38
refs/heads/master
2022-11-23T05:03:29.882014
2022-06-23T15:40:06
2022-06-23T15:40:06
68,102,948
1
0
Apache-2.0
2022-11-16T03:16:44
2016-09-13T11:38:45
Java
UTF-8
Java
false
false
1,679
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 de.gishmo.gwt.example.module1002.client.ui.detail; import com.google.gwt.place.shared.Place; import com.google.gwt.place.shared.PlaceTokenizer; import com.google.gwt.place.shared.Prefix; public class DetailPlace extends Place { private long id; //------------------------------------------------------------------------------ public DetailPlace(long id) { super(); this.id = id; } //------------------------------------------------------------------------------ public long getId() { return id; } public void setId(long id) { this.id = id; } //------------------------------------------------------------------------------ @Prefix("de") public static class Tokenizer implements PlaceTokenizer<DetailPlace> { public DetailPlace getPlace(String token) { try { Long id = Long.parseLong(token); return new DetailPlace(id); } catch (Exception e) { return new DetailPlace(0); } } public String getToken(DetailPlace place) { return Long.toString(place.getId()); } } }
[ "frank.hossfeld@googlemail.com" ]
frank.hossfeld@googlemail.com
2f1a51ecbb1b489b7df0743952eeae4489e0aaf3
c59662b854a3e06355e564874a052b992f1f5bf3
/TruthTable.java
b9ee787cc8e4b6dc1187b10d9c97e5ce9b95d0c5
[]
no_license
AdrChm/JJIT
5d5aee303b1562b647672d0d7b347460f5f8fc41
5f84cb5f6c4bbc88a9818b23b3cb3ae292649a8d
refs/heads/main
2023-05-31T14:23:55.693220
2023-05-21T21:30:13
2023-05-21T21:30:13
247,514,330
0
0
null
null
null
null
UTF-8
Java
false
false
2,417
java
// Program to print out the truth table. // two hardcoded propositional expressions p1 and p2. // The expression have three boolean varaibles, a, b and c. // Each column of table ocupies 7 characters plus separator. public class TruthTable { // The first propositional expression, p1. private static boolean p1(boolean a, boolean b, boolean c) { return a && (b || c); } // p1 // The second propositional expression, p2. private static boolean p2(boolean a, boolean b, boolean c) { return a && b || a && c; } // p2 // Print a line of underscores as wide as the truth table. private static void printStraightLine() { System.out.println(" _______________________________________ "); } // printStraightLine // Print the headings of the truth table. private static void printHeadings() { System.out.println("| a | b | c | p1 | p2 |"); } // printHeadings // Print a line of underscores // with vertical bartds for the column separators. private static void printColumnsLine() { System.out.println("|_______|_______|_______|_______|_______|"); } // printlnColumnsLine // To print a row, we use formatRowItem to make the // column entries have 7 characters. private static void printRow(boolean a, boolean b, boolean c) { System.out.println("|" + formatRowItem(a) + "|" + formatRowItem(b) + "|" + formatRowItem(c) + "|" + formatRowItem(p1(a,b,c)) + "|" + formatRowItem(p2(a,b,c)) + "|"); } // printRow // Take a boolean row item and return 7 characters // to represent that item. private static String formatRowItem(boolean rowItem) { return rowItem ? " true " : " false "; } // formatRowItem // The main method has nested loops to generate table rows. public static void main(String [] args) { printStraightLine(); printHeadings(); printColumnsLine(); // Stat of with all three variables being true. boolean a = true, b = true, c = true; // Exectute twice for 'a' variable, // and resure 'a' goes from true to false. for (int aCount = 1; aCount <= 2; aCount++, a = !a) // Do the same for 'b' for each 'a' value. for (int bCount = 1; bCount <= 2; bCount++, b = !b) // Do the same for 'c' for each 'b' value. for (int cCount = 1; cCount <= 2; cCount++, c = !c) // Print a row for each a,b and c combination. printRow(a, b, c); printColumnsLine(); } // main } // TruthTable
[ "adrianchmielewski11@gmail.com" ]
adrianchmielewski11@gmail.com
a760212588df7bafad594ebf146edab702404949
b9af3416603dac60e4dc8490c90009da0c1c2125
/Chapter01/chapter-01-00-calendar/src/main/java/com/kmakrutin/chapter0100calendar/domain/CalendarUser.java
079fa53e5ef51c9dc61c91bc1baf2e6f98891d76
[]
no_license
KirillMakrutin/spring_security
8047bb5b6c9f2aaab8218302a6d5c79a1d1f6c1d
ad73591f76bab115b4e64f16fcd5c3cc5e76e6bd
refs/heads/master
2020-06-09T17:25:45.180640
2019-08-05T12:46:51
2019-08-05T12:46:51
193,476,799
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
package com.kmakrutin.chapter0100calendar.domain; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import lombok.Data; @Entity @Table( name = "CALENDAR_USERS" ) @Data public class CalendarUser { @Id @GeneratedValue( strategy = GenerationType.IDENTITY ) private Integer id; private String firstName; private String lastName; private String email; private String password; public String getName() { return firstName + " " + lastName; } }
[ "k.makrutin@gmail.com" ]
k.makrutin@gmail.com
59b7c33d5b1b21030d0dff78a710aea0ba2dbff0
61e9cc5785085ad6b360400424cef935a736274d
/app/src/main/java/com/lakue/htmleditor/span/AreYoutubeSpan.java
9d18231c2a2b1c9be7ddf22bffdf707872ae19a3
[]
no_license
lakue119/Java-HtmlEditor
74ac79d289cc249087b734391c6af621692177c5
add299932bc79f8027a341ef7f0f9d230b404b7e
refs/heads/main
2022-12-31T06:18:34.261636
2020-10-12T05:40:35
2020-10-12T05:40:35
302,054,406
1
0
null
null
null
null
UTF-8
Java
false
false
1,779
java
package com.lakue.htmleditor.span; import android.content.Context; import android.graphics.Bitmap; import android.text.TextUtils; import android.text.style.ImageSpan; import android.util.Log; public class AreYoutubeSpan extends ImageSpan implements ARE_Span, ARE_Clickable_Span { private Context mContext; private String mVideoUrl; @Override public void onAREClick() { Log.i("aweljtlka","AreYoutubeSpan"); } public enum VideoType { LOCAL, SERVER, UNKNOWN, } public AreYoutubeSpan(Context context, Bitmap bitmapDrawable, String videoUrl) { super(context, bitmapDrawable); this.mContext = context; this.mVideoUrl = videoUrl; } @Override public String getHtml() { Log.i("SDFDSF",mVideoUrl); StringBuffer htmlBuffer = new StringBuffer("<p align=\"middle\"><iframe width=\"320\" height=\"180\" src=\""); htmlBuffer.append(mVideoUrl); htmlBuffer.append( "\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe></p>"); // String path = TextUtils.isEmpty(mVideoUrl) ? mVideoPath : mVideoUrl; // htmlBuffer.append(path); // htmlBuffer.append("\" uri=\""); // htmlBuffer.append(mVideoPath); // htmlBuffer.append("\" controls=\"controls\">"); //// htmlBuffer.append("您的浏览器不支持 video 标签。"); // htmlBuffer.append("</video>"); return htmlBuffer.toString(); } public AreVideoSpan.VideoType getVideoType() { if (!TextUtils.isEmpty(mVideoUrl)) { return AreVideoSpan.VideoType.SERVER; } return AreVideoSpan.VideoType.UNKNOWN; } public String getVideoUrl() { return mVideoUrl; } }
[ "audfkr0808@naver.com" ]
audfkr0808@naver.com
c95cb6da7006f3d08befa369adaca76430e1a43c
bed6ed866f41c3f8fd96034f8018585fd4a33546
/base/src/main/java/com/twosigma/beakerx/table/BxTableSettingsDefaults.java
f31523ec42d6802cdd39ed23f6be48807e9f55ec
[ "Apache-2.0" ]
permissive
NattyTools/beakerx_kernel_base
041405d81a23930451bdb9588a3615eee4dc251a
83d7bd1db8408715b26100460f0719b46b57b08a
refs/heads/master
2023-02-05T03:42:19.475169
2020-12-22T13:08:22
2020-12-22T13:08:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,198
java
/* * Copyright 2020 TWO SIGMA OPEN SOURCE, LLC * * 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.twosigma.beakerx.table; import java.util.HashMap; import java.util.Map; public class BxTableSettingsDefaults implements TableSettingsDefaults { @Override public Map<String, Map> getDefault() { Map<String, Object> btd = new HashMap<>(); btd.put("version", 1); HashMap<String, Object> options = new HashMap<>(); options.put("auto_link_table_links", false); options.put("show_publication", true); btd.put("options", options); HashMap<String, Map> df = new HashMap<>(); df.put("beakerx_tabledisplay", btd); return df; } }
[ "jaroslaw.malek@codete.com" ]
jaroslaw.malek@codete.com
db939e9c57a4ca57da4e17b67c333419114bcf31
3b6b584daadc0c1834625678ab1a895728066583
/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java
1cdecd0d56de0169dac52f46515167b69145bed9
[]
no_license
tobilatta/DynamLicht
2c0f0d92b6bd1333e6de70e4ac0626779c7efb00
9f466a7b950b44c387faf5bb5be8b3618b6446e2
refs/heads/master
2021-01-13T13:07:40.338075
2017-09-06T08:40:00
2017-09-06T08:40:00
72,745,159
0
0
null
null
null
null
UTF-8
Java
false
false
39,543
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package android.support.v7.appcompat; public final class R { public static final class anim { public static final int abc_fade_in = 0x7f040000; public static final int abc_fade_out = 0x7f040001; public static final int abc_slide_in_bottom = 0x7f040002; public static final int abc_slide_in_top = 0x7f040003; public static final int abc_slide_out_bottom = 0x7f040004; public static final int abc_slide_out_top = 0x7f040005; } public static final class attr { public static final int actionBarDivider = 0x7f010000; public static final int actionBarItemBackground = 0x7f010001; public static final int actionBarSize = 0x7f010002; public static final int actionBarSplitStyle = 0x7f010003; public static final int actionBarStyle = 0x7f010004; public static final int actionBarTabBarStyle = 0x7f010005; public static final int actionBarTabStyle = 0x7f010006; public static final int actionBarTabTextStyle = 0x7f010007; public static final int actionBarWidgetTheme = 0x7f010008; public static final int actionButtonStyle = 0x7f010009; public static final int actionDropDownStyle = 0x7f010062; public static final int actionLayout = 0x7f010059; public static final int actionMenuTextAppearance = 0x7f01000a; public static final int actionMenuTextColor = 0x7f01000b; public static final int actionModeBackground = 0x7f01000c; public static final int actionModeCloseButtonStyle = 0x7f01000d; public static final int actionModeCloseDrawable = 0x7f01000e; public static final int actionModeCopyDrawable = 0x7f01000f; public static final int actionModeCutDrawable = 0x7f010010; public static final int actionModeFindDrawable = 0x7f010011; public static final int actionModePasteDrawable = 0x7f010012; public static final int actionModePopupWindowStyle = 0x7f010013; public static final int actionModeSelectAllDrawable = 0x7f010014; public static final int actionModeShareDrawable = 0x7f010015; public static final int actionModeSplitBackground = 0x7f010016; public static final int actionModeStyle = 0x7f010017; public static final int actionModeWebSearchDrawable = 0x7f010018; public static final int actionOverflowButtonStyle = 0x7f010019; public static final int actionProviderClass = 0x7f01005b; public static final int actionViewClass = 0x7f01005a; public static final int activityChooserViewStyle = 0x7f01001a; public static final int background = 0x7f010047; public static final int backgroundSplit = 0x7f010049; public static final int backgroundStacked = 0x7f010048; public static final int buttonBarButtonStyle = 0x7f01001b; public static final int buttonBarStyle = 0x7f01001c; public static final int customNavigationLayout = 0x7f01004a; public static final int disableChildrenWhenDisabled = 0x7f010061; public static final int displayOptions = 0x7f010040; public static final int divider = 0x7f010046; public static final int dividerHorizontal = 0x7f01001d; public static final int dividerPadding = 0x7f010057; public static final int dividerVertical = 0x7f01001e; public static final int dropDownListViewStyle = 0x7f01001f; public static final int dropdownListPreferredItemHeight = 0x7f010063; public static final int expandActivityOverflowButtonDrawable = 0x7f010054; public static final int height = 0x7f010020; public static final int homeAsUpIndicator = 0x7f010021; public static final int homeLayout = 0x7f01004b; public static final int icon = 0x7f010044; public static final int iconifiedByDefault = 0x7f01005c; public static final int indeterminateProgressStyle = 0x7f01004d; public static final int initialActivityCount = 0x7f010053; public static final int isLightTheme = 0x7f010022; public static final int itemPadding = 0x7f01004f; public static final int listChoiceBackgroundIndicator = 0x7f010067; public static final int listPopupWindowStyle = 0x7f010023; public static final int listPreferredItemHeight = 0x7f010024; public static final int listPreferredItemHeightLarge = 0x7f010025; public static final int listPreferredItemHeightSmall = 0x7f010026; public static final int listPreferredItemPaddingLeft = 0x7f010027; public static final int listPreferredItemPaddingRight = 0x7f010028; public static final int logo = 0x7f010045; public static final int navigationMode = 0x7f01003f; public static final int paddingEnd = 0x7f010069; public static final int paddingStart = 0x7f010068; public static final int panelMenuListTheme = 0x7f010066; public static final int panelMenuListWidth = 0x7f010065; public static final int popupMenuStyle = 0x7f010064; public static final int popupPromptView = 0x7f010060; public static final int progressBarPadding = 0x7f01004e; public static final int progressBarStyle = 0x7f01004c; public static final int prompt = 0x7f01005e; public static final int queryHint = 0x7f01005d; public static final int searchDropdownBackground = 0x7f010029; public static final int searchResultListItemHeight = 0x7f01002a; public static final int searchViewAutoCompleteTextView = 0x7f01002b; public static final int searchViewCloseIcon = 0x7f01002c; public static final int searchViewEditQuery = 0x7f01002d; public static final int searchViewEditQueryBackground = 0x7f01002e; public static final int searchViewGoIcon = 0x7f01002f; public static final int searchViewSearchIcon = 0x7f010030; public static final int searchViewTextField = 0x7f010031; public static final int searchViewTextFieldRight = 0x7f010032; public static final int searchViewVoiceIcon = 0x7f010033; public static final int selectableItemBackground = 0x7f010034; public static final int showAsAction = 0x7f010058; public static final int showDividers = 0x7f010056; public static final int spinnerDropDownItemStyle = 0x7f010035; public static final int spinnerMode = 0x7f01005f; public static final int spinnerStyle = 0x7f010036; public static final int subtitle = 0x7f010041; public static final int subtitleTextStyle = 0x7f010043; public static final int textAllCaps = 0x7f010055; public static final int textAppearanceLargePopupMenu = 0x7f010037; public static final int textAppearanceListItem = 0x7f010038; public static final int textAppearanceListItemSmall = 0x7f010039; public static final int textAppearanceSearchResultSubtitle = 0x7f01003a; public static final int textAppearanceSearchResultTitle = 0x7f01003b; public static final int textAppearanceSmallPopupMenu = 0x7f01003c; public static final int textColorSearchUrl = 0x7f01003d; public static final int title = 0x7f01003e; public static final int titleTextStyle = 0x7f010042; public static final int windowActionBar = 0x7f010050; public static final int windowActionBarOverlay = 0x7f010051; public static final int windowSplitActionBar = 0x7f010052; } public static final class bool { public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f050000; public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f050003; public static final int abc_config_actionMenuItemAllCaps = 0x7f050004; public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f050001; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f050005; public static final int abc_split_action_bar_is_narrow = 0x7f050002; } public static final class color { public static final int abc_search_url_text_holo = 0x7f090003; public static final int abc_search_url_text_normal = 0x7f090000; public static final int abc_search_url_text_pressed = 0x7f090001; public static final int abc_search_url_text_selected = 0x7f090002; } public static final class dimen { public static final int abc_action_bar_default_height = 0x7f060000; public static final int abc_action_bar_icon_vertical_padding = 0x7f060001; public static final int abc_action_bar_stacked_max_height = 0x7f06000a; public static final int abc_action_bar_stacked_tab_max_width = 0x7f06000b; public static final int abc_action_bar_subtitle_bottom_margin = 0x7f060002; public static final int abc_action_bar_subtitle_text_size = 0x7f060003; public static final int abc_action_bar_subtitle_top_margin = 0x7f060004; public static final int abc_action_bar_title_text_size = 0x7f060005; public static final int abc_action_button_min_width = 0x7f060008; public static final int abc_config_prefDialogWidth = 0x7f060006; public static final int abc_dropdownitem_icon_width = 0x7f06000c; public static final int abc_dropdownitem_text_padding_left = 0x7f06000d; public static final int abc_dropdownitem_text_padding_right = 0x7f06000e; public static final int abc_panel_menu_list_width = 0x7f06000f; public static final int abc_search_view_preferred_width = 0x7f060010; public static final int abc_search_view_text_min_width = 0x7f060007; } public static final class drawable { public static final int abc_ab_bottom_solid_dark_holo = 0x7f020000; public static final int abc_ab_bottom_solid_light_holo = 0x7f020001; public static final int abc_ab_bottom_transparent_dark_holo = 0x7f020002; public static final int abc_ab_bottom_transparent_light_holo = 0x7f020003; public static final int abc_ab_share_pack_holo_dark = 0x7f020004; public static final int abc_ab_share_pack_holo_light = 0x7f020005; public static final int abc_ab_solid_dark_holo = 0x7f020006; public static final int abc_ab_solid_light_holo = 0x7f020007; public static final int abc_ab_stacked_solid_dark_holo = 0x7f020008; public static final int abc_ab_stacked_solid_light_holo = 0x7f020009; public static final int abc_ab_stacked_transparent_dark_holo = 0x7f02000a; public static final int abc_ab_stacked_transparent_light_holo = 0x7f02000b; public static final int abc_ab_transparent_dark_holo = 0x7f02000c; public static final int abc_ab_transparent_light_holo = 0x7f02000d; public static final int abc_cab_background_bottom_holo_dark = 0x7f02000e; public static final int abc_cab_background_bottom_holo_light = 0x7f02000f; public static final int abc_cab_background_top_holo_dark = 0x7f020010; public static final int abc_cab_background_top_holo_light = 0x7f020011; public static final int abc_ic_ab_back_holo_dark = 0x7f020012; public static final int abc_ic_ab_back_holo_light = 0x7f020013; public static final int abc_ic_cab_done_holo_dark = 0x7f020014; public static final int abc_ic_cab_done_holo_light = 0x7f020015; public static final int abc_ic_clear = 0x7f020016; public static final int abc_ic_clear_disabled = 0x7f020017; public static final int abc_ic_clear_holo_light = 0x7f020018; public static final int abc_ic_clear_normal = 0x7f020019; public static final int abc_ic_clear_search_api_disabled_holo_light = 0x7f02001a; public static final int abc_ic_clear_search_api_holo_light = 0x7f02001b; public static final int abc_ic_commit_search_api_holo_dark = 0x7f02001c; public static final int abc_ic_commit_search_api_holo_light = 0x7f02001d; public static final int abc_ic_go = 0x7f02001e; public static final int abc_ic_go_search_api_holo_light = 0x7f02001f; public static final int abc_ic_menu_moreoverflow_normal_holo_dark = 0x7f020020; public static final int abc_ic_menu_moreoverflow_normal_holo_light = 0x7f020021; public static final int abc_ic_menu_share_holo_dark = 0x7f020022; public static final int abc_ic_menu_share_holo_light = 0x7f020023; public static final int abc_ic_search = 0x7f020024; public static final int abc_ic_search_api_holo_light = 0x7f020025; public static final int abc_ic_voice_search = 0x7f020026; public static final int abc_ic_voice_search_api_holo_light = 0x7f020027; public static final int abc_item_background_holo_dark = 0x7f020028; public static final int abc_item_background_holo_light = 0x7f020029; public static final int abc_list_divider_holo_dark = 0x7f02002a; public static final int abc_list_divider_holo_light = 0x7f02002b; public static final int abc_list_focused_holo = 0x7f02002c; public static final int abc_list_longpressed_holo = 0x7f02002d; public static final int abc_list_pressed_holo_dark = 0x7f02002e; public static final int abc_list_pressed_holo_light = 0x7f02002f; public static final int abc_list_selector_background_transition_holo_dark = 0x7f020030; public static final int abc_list_selector_background_transition_holo_light = 0x7f020031; public static final int abc_list_selector_disabled_holo_dark = 0x7f020032; public static final int abc_list_selector_disabled_holo_light = 0x7f020033; public static final int abc_list_selector_holo_dark = 0x7f020034; public static final int abc_list_selector_holo_light = 0x7f020035; public static final int abc_menu_dropdown_panel_holo_dark = 0x7f020036; public static final int abc_menu_dropdown_panel_holo_light = 0x7f020037; public static final int abc_menu_hardkey_panel_holo_dark = 0x7f020038; public static final int abc_menu_hardkey_panel_holo_light = 0x7f020039; public static final int abc_search_dropdown_dark = 0x7f02003a; public static final int abc_search_dropdown_light = 0x7f02003b; public static final int abc_spinner_ab_default_holo_dark = 0x7f02003c; public static final int abc_spinner_ab_default_holo_light = 0x7f02003d; public static final int abc_spinner_ab_disabled_holo_dark = 0x7f02003e; public static final int abc_spinner_ab_disabled_holo_light = 0x7f02003f; public static final int abc_spinner_ab_focused_holo_dark = 0x7f020040; public static final int abc_spinner_ab_focused_holo_light = 0x7f020041; public static final int abc_spinner_ab_holo_dark = 0x7f020042; public static final int abc_spinner_ab_holo_light = 0x7f020043; public static final int abc_spinner_ab_pressed_holo_dark = 0x7f020044; public static final int abc_spinner_ab_pressed_holo_light = 0x7f020045; public static final int abc_tab_indicator_ab_holo = 0x7f020046; public static final int abc_tab_selected_focused_holo = 0x7f020047; public static final int abc_tab_selected_holo = 0x7f020048; public static final int abc_tab_selected_pressed_holo = 0x7f020049; public static final int abc_tab_unselected_pressed_holo = 0x7f02004a; public static final int abc_textfield_search_default_holo_dark = 0x7f02004b; public static final int abc_textfield_search_default_holo_light = 0x7f02004c; public static final int abc_textfield_search_right_default_holo_dark = 0x7f02004d; public static final int abc_textfield_search_right_default_holo_light = 0x7f02004e; public static final int abc_textfield_search_right_selected_holo_dark = 0x7f02004f; public static final int abc_textfield_search_right_selected_holo_light = 0x7f020050; public static final int abc_textfield_search_selected_holo_dark = 0x7f020051; public static final int abc_textfield_search_selected_holo_light = 0x7f020052; public static final int abc_textfield_searchview_holo_dark = 0x7f020053; public static final int abc_textfield_searchview_holo_light = 0x7f020054; public static final int abc_textfield_searchview_right_holo_dark = 0x7f020055; public static final int abc_textfield_searchview_right_holo_light = 0x7f020056; } public static final class id { public static final int action_bar = 0x7f0a001a; public static final int action_bar_activity_content = 0x7f0a0000; public static final int action_bar_container = 0x7f0a0019; public static final int action_bar_overlay_layout = 0x7f0a001d; public static final int action_bar_root = 0x7f0a0018; public static final int action_bar_subtitle = 0x7f0a0021; public static final int action_bar_title = 0x7f0a0020; public static final int action_context_bar = 0x7f0a001b; public static final int action_menu_divider = 0x7f0a0001; public static final int action_menu_presenter = 0x7f0a0002; public static final int action_mode_bar = 0x7f0a002f; public static final int action_mode_bar_stub = 0x7f0a002e; public static final int action_mode_close_button = 0x7f0a0022; public static final int activity_chooser_view_content = 0x7f0a0023; public static final int always = 0x7f0a0011; public static final int beginning = 0x7f0a000d; public static final int checkbox = 0x7f0a002b; public static final int collapseActionView = 0x7f0a0012; public static final int default_activity_button = 0x7f0a0026; public static final int dialog = 0x7f0a0016; public static final int disableHome = 0x7f0a0007; public static final int dropdown = 0x7f0a0017; public static final int edit_query = 0x7f0a0036; public static final int end = 0x7f0a000e; public static final int expand_activities_button = 0x7f0a0024; public static final int expanded_menu = 0x7f0a002a; public static final int home = 0x7f0a0003; public static final int homeAsUp = 0x7f0a0008; public static final int icon = 0x7f0a0028; public static final int ifRoom = 0x7f0a0013; public static final int image = 0x7f0a0025; public static final int left_icon = 0x7f0a0031; public static final int listMode = 0x7f0a0004; public static final int list_item = 0x7f0a0027; public static final int middle = 0x7f0a000f; public static final int never = 0x7f0a0014; public static final int none = 0x7f0a0010; public static final int normal = 0x7f0a0005; public static final int progress_circular = 0x7f0a0034; public static final int progress_horizontal = 0x7f0a0035; public static final int radio = 0x7f0a002d; public static final int right_container = 0x7f0a0032; public static final int right_icon = 0x7f0a0033; public static final int search_badge = 0x7f0a0038; public static final int search_bar = 0x7f0a0037; public static final int search_button = 0x7f0a0039; public static final int search_close_btn = 0x7f0a003e; public static final int search_edit_frame = 0x7f0a003a; public static final int search_go_btn = 0x7f0a0040; public static final int search_mag_icon = 0x7f0a003b; public static final int search_plate = 0x7f0a003c; public static final int search_src_text = 0x7f0a003d; public static final int search_voice_btn = 0x7f0a0041; public static final int shortcut = 0x7f0a002c; public static final int showCustom = 0x7f0a0009; public static final int showHome = 0x7f0a000a; public static final int showTitle = 0x7f0a000b; public static final int split_action_bar = 0x7f0a001c; public static final int submit_area = 0x7f0a003f; public static final int tabMode = 0x7f0a0006; public static final int title = 0x7f0a0029; public static final int title_container = 0x7f0a0030; public static final int top_action_bar = 0x7f0a001e; public static final int up = 0x7f0a001f; public static final int useLogo = 0x7f0a000c; public static final int withText = 0x7f0a0015; } public static final class integer { public static final int abc_max_action_buttons = 0x7f070000; } public static final class layout { public static final int abc_action_bar_decor = 0x7f030000; public static final int abc_action_bar_decor_include = 0x7f030001; public static final int abc_action_bar_decor_overlay = 0x7f030002; public static final int abc_action_bar_home = 0x7f030003; public static final int abc_action_bar_tab = 0x7f030004; public static final int abc_action_bar_tabbar = 0x7f030005; public static final int abc_action_bar_title_item = 0x7f030006; public static final int abc_action_bar_view_list_nav_layout = 0x7f030007; public static final int abc_action_menu_item_layout = 0x7f030008; public static final int abc_action_menu_layout = 0x7f030009; public static final int abc_action_mode_bar = 0x7f03000a; public static final int abc_action_mode_close_item = 0x7f03000b; public static final int abc_activity_chooser_view = 0x7f03000c; public static final int abc_activity_chooser_view_include = 0x7f03000d; public static final int abc_activity_chooser_view_list_item = 0x7f03000e; public static final int abc_expanded_menu_layout = 0x7f03000f; public static final int abc_list_menu_item_checkbox = 0x7f030010; public static final int abc_list_menu_item_icon = 0x7f030011; public static final int abc_list_menu_item_layout = 0x7f030012; public static final int abc_list_menu_item_radio = 0x7f030013; public static final int abc_popup_menu_item_layout = 0x7f030014; public static final int abc_screen = 0x7f030015; public static final int abc_search_dropdown_item_icons_2line = 0x7f030016; public static final int abc_search_view = 0x7f030017; public static final int support_simple_spinner_dropdown_item = 0x7f030020; } public static final class 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_searchview_description_clear = 0x7f0b0006; public static final int abc_searchview_description_query = 0x7f0b0007; public static final int abc_searchview_description_search = 0x7f0b0008; public static final int abc_searchview_description_submit = 0x7f0b0009; public static final int abc_searchview_description_voice = 0x7f0b000a; public static final int abc_shareactionprovider_share_with = 0x7f0b000b; public static final int abc_shareactionprovider_share_with_application = 0x7f0b000c; } public static final class style { public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog = 0x7f080039; public static final int TextAppearance_AppCompat_Base_SearchResult = 0x7f08003a; public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle = 0x7f080006; public static final int TextAppearance_AppCompat_Base_SearchResult_Title = 0x7f080007; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large = 0x7f080008; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small = 0x7f080009; public static final int TextAppearance_AppCompat_Light_Base_SearchResult = 0x7f08003b; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle = 0x7f08000a; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title = 0x7f08000b; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large = 0x7f08000c; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small = 0x7f08000d; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f08003c; public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f08003d; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f08003e; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f08003f; public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f080040; public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f080041; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f080042; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f080043; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f080044; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f080045; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f080046; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f080047; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f080048; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f080049; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f08004a; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu = 0x7f08000e; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle = 0x7f08000f; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse = 0x7f080010; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title = 0x7f080011; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse = 0x7f080012; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle = 0x7f080013; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse = 0x7f080014; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title = 0x7f080015; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse = 0x7f080016; public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem = 0x7f08004b; public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f08004c; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f08004d; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f08004e; public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item = 0x7f08004f; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f080050; public static final int Theme_AppCompat = 0x7f080051; public static final int Theme_AppCompat_Base_CompactMenu = 0x7f080052; public static final int Theme_AppCompat_Base_CompactMenu_Dialog = 0x7f080053; public static final int Theme_AppCompat_CompactMenu = 0x7f080054; public static final int Theme_AppCompat_CompactMenu_Dialog = 0x7f080055; public static final int Theme_AppCompat_Light = 0x7f080056; public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f080057; public static final int Theme_Base = 0x7f080000; public static final int Theme_Base_AppCompat = 0x7f080017; public static final int Theme_Base_AppCompat_Light = 0x7f080018; public static final int Theme_Base_AppCompat_Light_DarkActionBar = 0x7f080019; public static final int Theme_Base_Light = 0x7f080001; public static final int Widget_AppCompat_ActionBar = 0x7f080058; public static final int Widget_AppCompat_ActionBar_Solid = 0x7f080059; public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f08005a; public static final int Widget_AppCompat_ActionBar_TabText = 0x7f08005b; public static final int Widget_AppCompat_ActionBar_TabView = 0x7f08005c; public static final int Widget_AppCompat_ActionButton = 0x7f08005d; public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f08005e; public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f08005f; public static final int Widget_AppCompat_ActionMode = 0x7f080060; public static final int Widget_AppCompat_ActivityChooserView = 0x7f080061; public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f080062; public static final int Widget_AppCompat_Base_ActionBar = 0x7f08001a; public static final int Widget_AppCompat_Base_ActionBar_Solid = 0x7f08001b; public static final int Widget_AppCompat_Base_ActionBar_TabBar = 0x7f08001c; public static final int Widget_AppCompat_Base_ActionBar_TabText = 0x7f08001d; public static final int Widget_AppCompat_Base_ActionBar_TabView = 0x7f08001e; public static final int Widget_AppCompat_Base_ActionButton = 0x7f08001f; public static final int Widget_AppCompat_Base_ActionButton_CloseMode = 0x7f080020; public static final int Widget_AppCompat_Base_ActionButton_Overflow = 0x7f080021; public static final int Widget_AppCompat_Base_ActionMode = 0x7f080063; public static final int Widget_AppCompat_Base_ActivityChooserView = 0x7f080022; public static final int Widget_AppCompat_Base_AutoCompleteTextView = 0x7f080002; public static final int Widget_AppCompat_Base_DropDownItem_Spinner = 0x7f080023; public static final int Widget_AppCompat_Base_ListView_DropDown = 0x7f080024; public static final int Widget_AppCompat_Base_ListView_Menu = 0x7f080025; public static final int Widget_AppCompat_Base_PopupMenu = 0x7f080026; public static final int Widget_AppCompat_Base_ProgressBar = 0x7f080003; public static final int Widget_AppCompat_Base_ProgressBar_Horizontal = 0x7f080004; public static final int Widget_AppCompat_Base_Spinner = 0x7f080027; public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f080064; public static final int Widget_AppCompat_Light_ActionBar = 0x7f080065; public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f080066; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f080067; public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f080068; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f080069; public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f08006a; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f08006b; public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f08006c; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f08006d; public static final int Widget_AppCompat_Light_ActionButton = 0x7f08006e; public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f08006f; public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f080070; public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f080071; public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f080072; public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f080073; public static final int Widget_AppCompat_Light_Base_ActionBar = 0x7f080028; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid = 0x7f080029; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse = 0x7f08002a; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar = 0x7f08002b; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse = 0x7f08002c; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText = 0x7f08002d; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse = 0x7f08002e; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView = 0x7f08002f; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse = 0x7f080030; public static final int Widget_AppCompat_Light_Base_ActionButton = 0x7f080031; public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode = 0x7f080032; public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow = 0x7f080033; public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse = 0x7f080034; public static final int Widget_AppCompat_Light_Base_ActivityChooserView = 0x7f080074; public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView = 0x7f080005; public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner = 0x7f080035; public static final int Widget_AppCompat_Light_Base_ListView_DropDown = 0x7f080036; public static final int Widget_AppCompat_Light_Base_PopupMenu = 0x7f080037; public static final int Widget_AppCompat_Light_Base_Spinner = 0x7f080038; public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f080075; public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f080076; public static final int Widget_AppCompat_Light_PopupMenu = 0x7f080077; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f080078; public static final int Widget_AppCompat_ListView_DropDown = 0x7f080079; public static final int Widget_AppCompat_ListView_Menu = 0x7f08007a; public static final int Widget_AppCompat_PopupMenu = 0x7f08007b; public static final int Widget_AppCompat_ProgressBar = 0x7f08007c; public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f08007d; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f08007e; } public static final class styleable { public static final int[] ActionBar = { 0x7f010020, 0x7f01003e, 0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c, 0x7f01004d, 0x7f01004e, 0x7f01004f }; public static final int[] ActionBarLayout = { 0x010100b3 }; public static final int ActionBarLayout_android_layout_gravity = 0; public static final int[] ActionBarWindow = { 0x7f010050, 0x7f010051, 0x7f010052 }; public static final int ActionBarWindow_windowActionBar = 0; public static final int ActionBarWindow_windowActionBarOverlay = 1; public static final int ActionBarWindow_windowSplitActionBar = 2; public static final int ActionBar_background = 10; public static final int ActionBar_backgroundSplit = 12; public static final int ActionBar_backgroundStacked = 11; public static final int ActionBar_customNavigationLayout = 13; public static final int ActionBar_displayOptions = 3; public static final int ActionBar_divider = 9; public static final int ActionBar_height = 0; public static final int ActionBar_homeLayout = 14; public static final int ActionBar_icon = 7; public static final int ActionBar_indeterminateProgressStyle = 16; public static final int ActionBar_itemPadding = 18; public static final int ActionBar_logo = 8; public static final int ActionBar_navigationMode = 2; public static final int ActionBar_progressBarPadding = 17; public static final int ActionBar_progressBarStyle = 15; public static final int ActionBar_subtitle = 4; public static final int ActionBar_subtitleTextStyle = 6; public static final int ActionBar_title = 1; public static final int ActionBar_titleTextStyle = 5; public static final int[] ActionMenuItemView = { 0x0101013f }; public static final int ActionMenuItemView_android_minWidth = 0; public static final int[] ActionMenuView = { }; public static final int[] ActionMode = { 0x7f010020, 0x7f010042, 0x7f010043, 0x7f010047, 0x7f010049 }; public static final int ActionMode_background = 3; public static final int ActionMode_backgroundSplit = 4; public static final int ActionMode_height = 0; public static final int ActionMode_subtitleTextStyle = 2; public static final int ActionMode_titleTextStyle = 1; public static final int[] ActivityChooserView = { 0x7f010053, 0x7f010054 }; public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; public static final int ActivityChooserView_initialActivityCount = 0; public static final int[] CompatTextView = { 0x7f010055 }; public static final int CompatTextView_textAllCaps = 0; public static final int[] LinearLayoutICS = { 0x7f010046, 0x7f010056, 0x7f010057 }; public static final int LinearLayoutICS_divider = 0; public static final int LinearLayoutICS_dividerPadding = 2; public static final int LinearLayoutICS_showDividers = 1; public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; public static final int MenuGroup_android_checkableBehavior = 5; public static final int MenuGroup_android_enabled = 0; public static final int MenuGroup_android_id = 1; public static final int MenuGroup_android_menuCategory = 3; public static final int MenuGroup_android_orderInCategory = 4; public static final int MenuGroup_android_visible = 2; public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010058, 0x7f010059, 0x7f01005a, 0x7f01005b }; public static final int MenuItem_actionLayout = 14; public static final int MenuItem_actionProviderClass = 16; public static final int MenuItem_actionViewClass = 15; public static final int MenuItem_android_alphabeticShortcut = 9; public static final int MenuItem_android_checkable = 11; public static final int MenuItem_android_checked = 3; public static final int MenuItem_android_enabled = 1; public static final int MenuItem_android_icon = 0; public static final int MenuItem_android_id = 2; public static final int MenuItem_android_menuCategory = 5; public static final int MenuItem_android_numericShortcut = 10; public static final int MenuItem_android_onClick = 12; public static final int MenuItem_android_orderInCategory = 6; public static final int MenuItem_android_title = 7; public static final int MenuItem_android_titleCondensed = 8; public static final int MenuItem_android_visible = 4; public static final int MenuItem_showAsAction = 13; public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x0101041a }; public static final int MenuView_android_headerBackground = 4; public static final int MenuView_android_horizontalDivider = 2; public static final int MenuView_android_itemBackground = 5; public static final int MenuView_android_itemIconDisabledAlpha = 6; public static final int MenuView_android_itemTextAppearance = 1; public static final int MenuView_android_preserveIconSpacing = 7; public static final int MenuView_android_verticalDivider = 3; public static final int MenuView_android_windowAnimationStyle = 0; public static final int[] SearchView = { 0x0101011f, 0x01010220, 0x01010264, 0x7f01005c, 0x7f01005d }; public static final int SearchView_android_imeOptions = 2; public static final int SearchView_android_inputType = 1; public static final int SearchView_android_maxWidth = 0; public static final int SearchView_iconifiedByDefault = 3; public static final int SearchView_queryHint = 4; public static final int[] Spinner = { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f01005e, 0x7f01005f, 0x7f010060, 0x7f010061 }; public static final int Spinner_android_dropDownHorizontalOffset = 4; public static final int Spinner_android_dropDownSelector = 1; public static final int Spinner_android_dropDownVerticalOffset = 5; public static final int Spinner_android_dropDownWidth = 3; public static final int Spinner_android_gravity = 0; public static final int Spinner_android_popupBackground = 2; public static final int Spinner_disableChildrenWhenDisabled = 9; public static final int Spinner_popupPromptView = 8; public static final int Spinner_prompt = 6; public static final int Spinner_spinnerMode = 7; public static final int[] Theme = { 0x7f010062, 0x7f010063, 0x7f010064, 0x7f010065, 0x7f010066, 0x7f010067 }; public static final int Theme_actionDropDownStyle = 0; public static final int Theme_dropdownListPreferredItemHeight = 1; public static final int Theme_listChoiceBackgroundIndicator = 5; public static final int Theme_panelMenuListTheme = 4; public static final int Theme_panelMenuListWidth = 3; public static final int Theme_popupMenuStyle = 2; public static final int[] View = { 0x010100da, 0x7f010068, 0x7f010069 }; public static final int View_android_focusable = 0; public static final int View_paddingEnd = 2; public static final int View_paddingStart = 1; } }
[ "tobias.latta1@haw-hamburg.de" ]
tobias.latta1@haw-hamburg.de
2c90bb2b1d8d2147b6c9422fac0151889c85859e
9d1870a895c63f540937f04a6285dd25ada5e52a
/chromecast-app-reverse-engineering/src/from-androguard-dad-broken-but-might-help/cso.java
7c259b51294aed1f46843b275257de332d380720
[]
no_license
Churritosjesus/Chromecast-Reverse-Engineering
572aa97eb1fd65380ca0549b4166393505328ed4
29fae511060a820f2500a4e6e038dfdb591f4402
refs/heads/master
2023-06-04T10:27:15.869608
2015-10-27T10:43:11
2015-10-27T10:43:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
179
java
cso() { return; } protected final synthetic Object initialValue() { String[] v0_1 = new String[4]; return v0_1; }
[ "v.richomme@gmail.com" ]
v.richomme@gmail.com
87fd3ca94765b1dae9ed05013a3d73f5e73064ab
fe545c73c3853377eeaa79447310d3986f9c0e0e
/workspace/12_io/src/ex01_char/PrintWriterMainClass.java
edc33708df48c5dba2b1cc6b6b4fe160b5d1639b
[]
no_license
Kang-Dongseok/javastudy
9fb640f8b5bccd9a154de137dde3710bcd60d6c7
ca431fce8eb3fa60cfd2d225a2a8f7a96f086e6a
refs/heads/main
2023-04-01T21:58:56.202528
2021-03-31T08:49:24
2021-03-31T08:49:24
347,885,800
0
0
null
null
null
null
UTF-8
Java
false
false
771
java
package ex01_char; import java.io.IOException; import java.io.PrintWriter; // PrintWriter 클래스 // 1. FileWriter 클래스와 같은 목적으로 사용합니다. // 2. 출력 메소드 : writer(), print(), println() // 3. println() 메소드를 사용하면 자동으로 줄 바꿈이 처리됩니다. public class PrintWriterMainClass { public static void main(String[] args) { PrintWriter out = null; try { out = new PrintWriter("index.html"); out.println("<script>"); out.println("alert('Hello Java!')"); out.println("</script>"); }catch (IOException e) { e.printStackTrace(); } finally { try { if(out != null) {out.close();} } catch (Exception e) { e.printStackTrace(); } } } }
[ "kds2048@naver.com" ]
kds2048@naver.com
a93dbcc0330f5582f1af87b4a8ab0d6f07b37066
e047e5274b22abf6d4c8b8baae2e50da3dc4d2b5
/src/main/java/com/rtmap/traffic/touch/filter/PvgLogFilter.java
06de71b867ec0525dcded014a00b702e86067751
[]
no_license
gaowanmin/PVG-touch
31b1709bbc1e87ea8a3ac3402b49517b3cbe4a07
6500dc7569dba6075e452f0af3c86fc4d3a732aa
refs/heads/master
2020-03-09T22:01:16.619829
2018-04-11T06:16:54
2018-04-11T06:16:54
129,024,868
0
0
null
null
null
null
UTF-8
Java
false
false
4,914
java
package com.rtmap.traffic.touch.filter; import com.alibaba.fastjson.JSON; import com.rtmap.traffic.touch.model.entity.log.LogAction; import com.rtmap.traffic.touch.model.vo.OpRst; import com.rtmap.traffic.touch.service.IPvgLogService; import com.rtmap.traffic.touch.util.DateUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.StringUtils; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.util.Date; /** * 拦截器 记录所有请求日志和错误日志 * 排除 monitor 相关 * * @author xuhailong * @Date 2017/3/13 */ public class PvgLogFilter implements Filter { private Logger logger = LoggerFactory.getLogger(this.getClass()); private LogAction pvgLog; private IPvgLogService pvgLogService; public void init(FilterConfig filterConfig) throws ServletException { logger.debug(" ==> PvgLogFilter init "); WebApplicationContext webApplicationContext = WebApplicationContextUtils.getWebApplicationContext(filterConfig.getServletContext()); pvgLogService = webApplicationContext.getBean(IPvgLogService.class); } public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { logger.debug(" ==> PvgLogFilter doFilter "); try { HttpServletRequest httpRequest = (HttpServletRequest) servletRequest; initAction(httpRequest); filterChain.doFilter(servletRequest, servletResponse); } catch (Exception e) { e.printStackTrace(); //记录错误日志 pvgLogService.addErrorLog(((HttpServletRequest) servletRequest).getServletPath(),e.getMessage()); //向浏览器写出错误 writeOutError((HttpServletResponse) servletResponse); } finally { pvgLog.setResponseTime(new Date()); if (pvgLogService != null && !"/".equals(pvgLog.getModule()) && !"monitor".equals(pvgLog.getModule())) { pvgLogService.addLogAction(pvgLog); } } } /** * 向浏览器写出错误 * * @param servletResponse response * @throws IOException */ private void writeOutError(HttpServletResponse servletResponse) throws IOException { servletResponse.setCharacterEncoding("utf-8"); servletResponse.setContentType("application/json; charset=utf-8"); PrintWriter writer = servletResponse.getWriter(); // 系统异常 OpRst opRst = new OpRst(); opRst.setCode(-1); opRst.setMsg("系统发生未处理异常,请稍后再试..."); writer.print(JSON.toJSONString(opRst)); writer.flush(); writer.close(); } public void destroy() { logger.debug(" ==> PvgLogFilter destroy "); } /** * 根据http请求对象初始化动作日志 * * @param httpRequest http请求对象 */ private void initAction(HttpServletRequest httpRequest) { pvgLog = new LogAction(); String virtualUser = httpRequest.getParameter("virtualUser"); if (!StringUtils.isEmpty(virtualUser)) { pvgLog.setVirtualUser(virtualUser); } String currentAirport = httpRequest.getParameter("currentAirport"); if (StringUtils.isEmpty(currentAirport)) currentAirport = "PVG"; pvgLog.setCurrentAirport(currentAirport); pvgLog.setTouchId(httpRequest.getParameter("touchId")); String servletPath = httpRequest.getServletPath();// /api/bas/currentDateTime if (!StringUtils.isEmpty(servletPath)) { String[] array = servletPath.split("/"); String module; if (array.length >= 2) { module = array[1]; } else if (array.length == 0) { module = "/"; } else { module = array[1]; } pvgLog.setModule(module); } pvgLog.setAction(servletPath); String requestTime = httpRequest.getParameter("requestTime"); if (!StringUtils.isEmpty(requestTime)) { pvgLog.setRequestTime(DateUtil.parseDate(Long.valueOf(requestTime))); } pvgLog.setReceivedTime(new Date()); String requestParams = JSON.toJSONString(httpRequest.getParameterMap()); pvgLog.setRequestParams(requestParams); String debug = httpRequest.getParameter("debug"); if (!StringUtils.isEmpty(debug) && !debug.trim().equals("0")) { pvgLog.setRmk("test"); } } }
[ "714418170@qq.com" ]
714418170@qq.com
7487a122cc9ce159c96cc8d7976913cbe1e623f2
07202104e1d91620105367ca8eb13e5af6b41653
/hw08-spring-orm-library/src/test/java/ru/geracimov/otus/spring/hw10libraryjpa/domain/AuthorTest.java
62fc98f5c844e46825d8a5b53f6799aaca14f861
[]
no_license
geracimov/otus-spring-2018-2
691f55f2c0fbd2c4a1eb5b3f9fbb80afb01ba369
3152dadf71d21a1e960a0d4df9e41614f8fb2413
refs/heads/master
2022-10-15T13:29:48.404582
2019-10-02T20:07:51
2019-10-02T20:07:51
182,581,028
0
0
null
2022-09-08T01:02:59
2019-04-21T20:49:27
Java
UTF-8
Java
false
false
869
java
package ru.geracimov.otus.spring.hw10libraryjpa.domain; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager; import ru.geracimov.otus.spring.hw08libraryorm.domain.Author; import java.time.LocalDate; import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; //@RunWith(SpringRunner.class) @DataJpaTest public class AuthorTest { @Autowired TestEntityManager em; @Test public void saveAndGet() { Author a = new Author("name", LocalDate.now()); UUID uuid = (UUID) em.persistAndGetId(a); System.out.println(uuid); Author aDb = em.find(Author.class, uuid); assertThat(aDb).isEqualTo(a); } }
[ "geracimov@gmail.com" ]
geracimov@gmail.com
5d5720849f3f31bf35d9ba2ba30d983ea3cc7dd9
f4a5f3efbc7df9cf4f55298176dead204abf7716
/chineteklib/src/main/java/com/xx/chinetek/chineteklib/util/function/NetDateTimeAdapter.java
8ae200a09de2123e2949ca42c96dfb744eba9c17
[]
no_license
xuxin511/M
2a85689f22d6d589258be2e0d36dc9f8d177dc2f
f46bcff917dc19a566a3a4c8fd2cbb33afb5609f
refs/heads/master
2022-01-04T22:23:49.659940
2018-03-30T02:55:08
2018-03-30T02:55:08
109,813,726
0
1
null
null
null
null
UTF-8
Java
false
false
1,081
java
package com.xx.chinetek.chineteklib.util.function; import android.text.TextUtils; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Date; /** * Created by GHOST on 2017/6/22. */ public class NetDateTimeAdapter extends TypeAdapter<Date> { @Override public Date read(JsonReader reader) throws IOException { if (reader.peek() == JsonToken.NULL) { reader.nextNull(); return null; } Date result = null; String str = reader.nextString(); // str = str.replaceAll("[^0-9]", ""); if (!TextUtils.isEmpty(str)) { try { Date date=new Date(str); result = date;//;new Date(Long.parseLong(str)); } catch (NumberFormatException e) { } } return result; } @Override public void write(JsonWriter writer, Date value) throws IOException { // Nah.. } }
[ "ghost_511@sina.com" ]
ghost_511@sina.com
ea570faad61bcbf73ac199a3a0f1e6ed643df192
8f1a00c63e03de907158895c7f27bfd7c0ac173d
/src/main/java/com/cloudbaboons/config/package-info.java
80a6279ca62fd9d8d88d93dd2502f24c96e12759
[]
no_license
cloudbaboons/cloudbaboons
3ca9653dbb68f478c6128a0e6bd31eceea09128f
14fadadb52b4eb81f9dfc8c8069d997f0f5d0dda
refs/heads/master
2021-01-19T16:37:22.434313
2017-09-18T06:27:16
2017-09-18T06:27:16
101,013,053
0
0
null
null
null
null
UTF-8
Java
false
false
82
java
/** * Spring Framework configuration files. */ package com.cloudbaboons.config;
[ "kapil.kataria@kp.org" ]
kapil.kataria@kp.org
a5276f94889c116f1e2d71efb60c5fdd5cf5ac86
318f01d9c7d6d5615c32eaf3a48b38e72c89dec6
/thirdpp-trust-channel/src/main/java/com/zendaimoney/trust/channel/exception/PlatformErrorCode.java
4b723c7c9d3208a21c2ef36656b4e29b46007abc
[]
no_license
ichoukou/thirdapp
dce52f5df2834f79a51895475b995a3e758be8c0
aae0a1596e06992b600a1a442723b833736240e3
refs/heads/master
2020-05-03T03:12:33.064089
2018-04-18T06:00:14
2018-04-18T06:00:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,119
java
package com.zendaimoney.trust.channel.exception; /** * 异常代码,加入默认说明,这样减少配置文件的写入了 */ public enum PlatformErrorCode { //检验错误,0开头 VALIDATE_ISNULL("000001","{0} 为空"), VALIDATE_OVERLENGTH("000002","{0} 过长"), VALIDATE_ILLEGAL_MULTIVALUE("000003","{0} 应该为 [{1}]"), ERROR_CODE_MESSAGE_NULL("000004","{0} validate提示信息未配置"), ERROR_CODE_MESSAGE_FORMAT_BAD("000005","{0} validate提示信息格式不对"), //系统错误,1开头 DEFAULT("100001", "默认,无具体信息"), UNKNOWN_ERROR("100002", "未知错误"), DB_ERROR("100003", "数据库操作错误"), PARAM_ERROR("100004", "参数错误"), SYSTEM_BUSY("100005","系统忙,请稍后再试"), XML_VALIDATE_ERROR("100006", "xml格式校验错误"), TRUST_PROXY_ERROR("100007","代理器运行错误"), //业务错误,3开头 CHANNEL_SOCKET_ERROR("300000","SOCKET通信异常"), CMB_PARSE_ERROR("300001", "返回响应报文异常 解析错误"), READ_CONFIG_ERROR("300002","读取配置文件错误"), DTO_ENCODE_ERROR("300003","数据传递对象编码错误"), DTO_DECODE_ERROR("300004","数据传递对象解码错误"), CHANNEL_NOT_FOUND_ERROR("300005", "业务通道不存在或已关闭"), CHANNEL_START_ERROR("300006", "通道初始化错误"), CHANNEL_BIZ_NOT_FOUND_ERROR("300007", "业务通道类型不存在"), CHANNEL_FILE_DOWNLOAD_ERROR("300008", "文件下载失败"), CHANNEL_FILE_PARSE_ERROR("300009", "文件解析失败"), CHANNEL_FILE_MKDIR_ERROR("300010","TPP创建文件异常"), CHANNEL_FTP_MKDIR_ERROR("300011","FTP创建文件失败"), CHANNEL_FTP_CHANGE_PATH_ERROR("300012","FTP切换目录失败"), VO_2_DTO_ERROR("300013","VO转换 错误"), BATCH_OPER_UPDATE_ERROR("300014","批量操作更新错误"), ; private String code; private String defaultMessage; PlatformErrorCode(String code, String defaultMessage) { this.code = code; this.defaultMessage = defaultMessage; } public String getErrorCode() { return this.code; } public String getDefaultMessage() { return defaultMessage; } }
[ "gaohongxuhappy@163.com" ]
gaohongxuhappy@163.com
529fe1756364d7fdbf46ca8bbd79941d39029def
12f3b7a1d7fd7592e87b5d16c9c9cccc5b1b3ee6
/src/com/flyerbox/view/PollDialog.java
c8905f0af275be3964aceebbd989c962e9ebee99
[]
no_license
k2lhu/FlyerBoxClient
f462bca73a9f543441aed9dddc4b10d810fc734f
d0431650e42ecb747cba74de119bfd1a44533701
refs/heads/master
2021-01-22T06:40:17.885306
2014-12-10T18:57:03
2014-12-10T18:57:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,112
java
package com.flyerbox.view; import android.app.Dialog; import android.app.Fragment; import android.app.FragmentManager; import android.content.Context; import android.view.View; import android.view.Window; import android.view.WindowManager.LayoutParams; import com.flyerbox.R; /** * Created by tmrafael on 04.12.2014. */ public class PollDialog extends Dialog { public PollDialog(Context context, int theme, FragmentManager fragmentManager) { super(context, theme); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.dialog_complete); setCanceledOnTouchOutside(false); View returnButton = findViewById(R.id.poll_dialog_return_button); final FragmentManager fManager = fragmentManager; returnButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Fragment fragment = new PollsFragment(); fManager.beginTransaction().replace(R.id.frame_container, fragment).commit(); dismiss(); } }); } }
[ "egor.gora@gmail.com" ]
egor.gora@gmail.com
71397d70e9d4fa646f3602f2eeda891061844f28
c8664fc194971e6e39ba8674b20d88ccfa7663b1
/com/tencent/mm/plugin/backup/h/o.java
a7ad95041999946769019d796054b4b6f0e2b471
[]
no_license
raochuan/wexin1120
b926bc8d4143c4b523ed43e265cd20ef0c89ad40
1eaa71e1e3e7c9f9b9f96db8de56db3dfc4fb4d3
refs/heads/master
2020-05-17T23:57:00.000696
2017-11-03T02:33:27
2017-11-03T02:33:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,366
java
package com.tencent.mm.plugin.backup.h; import b.a.a.b; import com.tencent.gmtrace.GMTrace; import java.util.LinkedList; public final class o extends com.tencent.mm.bl.a { public String ID; public long jXg; public m jXj; public int jXl; public long jXm; public long jXn; public int jXo; public int jXp; public o() { GMTrace.i(14831730032640L, 110505); GMTrace.o(14831730032640L, 110505); } protected final int a(int paramInt, Object... paramVarArgs) { GMTrace.i(14831864250368L, 110506); if (paramInt == 0) { paramVarArgs = (b.a.a.c.a)paramVarArgs[0]; if (this.ID == null) { throw new b("Not all required fields were included: ID"); } if (this.ID != null) { paramVarArgs.e(1, this.ID); } paramVarArgs.R(2, this.jXm); paramVarArgs.R(3, this.jXn); paramVarArgs.fd(4, this.jXo); paramVarArgs.fd(5, this.jXp); paramVarArgs.R(6, this.jXg); if (this.jXj != null) { paramVarArgs.ff(7, this.jXj.aWM()); this.jXj.a(paramVarArgs); } paramVarArgs.fd(8, this.jXl); GMTrace.o(14831864250368L, 110506); return 0; } int i; if (paramInt == 1) { paramInt = 0; if (this.ID != null) { paramInt = b.a.a.b.b.a.f(1, this.ID) + 0; } i = paramInt + b.a.a.a.Q(2, this.jXm) + b.a.a.a.Q(3, this.jXn) + b.a.a.a.fa(4, this.jXo) + b.a.a.a.fa(5, this.jXp) + b.a.a.a.Q(6, this.jXg); paramInt = i; if (this.jXj != null) { paramInt = i + b.a.a.a.fc(7, this.jXj.aWM()); } i = b.a.a.a.fa(8, this.jXl); GMTrace.o(14831864250368L, 110506); return paramInt + i; } if (paramInt == 2) { paramVarArgs = new b.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = com.tencent.mm.bl.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bl.a.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.cpJ(); } } if (this.ID == null) { throw new b("Not all required fields were included: ID"); } GMTrace.o(14831864250368L, 110506); return 0; } if (paramInt == 3) { Object localObject1 = (b.a.a.a.a)paramVarArgs[0]; o localo = (o)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: GMTrace.o(14831864250368L, 110506); return -1; case 1: localo.ID = ((b.a.a.a.a)localObject1).xSv.readString(); GMTrace.o(14831864250368L, 110506); return 0; case 2: localo.jXm = ((b.a.a.a.a)localObject1).xSv.nn(); GMTrace.o(14831864250368L, 110506); return 0; case 3: localo.jXn = ((b.a.a.a.a)localObject1).xSv.nn(); GMTrace.o(14831864250368L, 110506); return 0; case 4: localo.jXo = ((b.a.a.a.a)localObject1).xSv.nm(); GMTrace.o(14831864250368L, 110506); return 0; case 5: localo.jXp = ((b.a.a.a.a)localObject1).xSv.nm(); GMTrace.o(14831864250368L, 110506); return 0; case 6: localo.jXg = ((b.a.a.a.a)localObject1).xSv.nn(); GMTrace.o(14831864250368L, 110506); return 0; case 7: paramVarArgs = ((b.a.a.a.a)localObject1).FK(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { Object localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new m(); localObject2 = new b.a.a.a.a((byte[])localObject2, unknownTagHandler); for (boolean bool = true; bool; bool = ((m)localObject1).a((b.a.a.a.a)localObject2, (com.tencent.mm.bl.a)localObject1, com.tencent.mm.bl.a.a((b.a.a.a.a)localObject2))) {} localo.jXj = ((m)localObject1); paramInt += 1; } GMTrace.o(14831864250368L, 110506); return 0; } localo.jXl = ((b.a.a.a.a)localObject1).xSv.nm(); GMTrace.o(14831864250368L, 110506); return 0; } GMTrace.o(14831864250368L, 110506); return -1; } } /* Location: /Users/xianghongyan/decompile/dex2jar/classes2-dex2jar.jar!/com/tencent/mm/plugin/backup/h/o.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "15223790237@139.com" ]
15223790237@139.com
1212489f3691d1a0be5ea8d1f573e6bcb4e7c12d
7fee790d4d50b25e17ad679346d0876783a121bd
/src/main/java/chap3/phaser_test6_2/extthread/PThreadC.java
60aeadaea9face24fedce1d98c1ba6a46629ed58
[]
no_license
hjy628/concurrency-practice
e9523a2c941cbf27ca8c26d394bd370af946650b
ea2437e024e22efe7e1a38efdebb91931733088f
refs/heads/master
2021-05-07T03:10:30.509441
2017-11-23T08:12:33
2017-11-23T08:12:33
110,631,352
0
0
null
null
null
null
UTF-8
Java
false
false
374
java
package chap3.phaser_test6_2.extthread; import chap3.phaser_test6_2.service.MyService; /** * Created by hjy on 17-11-15. */ public class PThreadC extends Thread{ private MyService service; public PThreadC(MyService service) { super(); this.service = service; } @Override public void run() { service.testMethodB(); } }
[ "hjy628@gmail.com" ]
hjy628@gmail.com
7f05bb176156012449f6e4bd862b69734dcc341b
20594c70d76899c1e8ba6eeadd9072d228cd1452
/src/Images/Viewer/ImageFilterDemo.java
373fde4c75b725e75c0415f9d313587a677cea9f
[]
no_license
bswiatek/javaCompleteReference
edabfbf2a8b8baf465c2d217aab08c7930bbd9fc
ea26734e8fcc95491abe86091699d540b3c04f32
refs/heads/master
2020-04-18T04:55:11.029316
2017-01-16T19:32:21
2017-01-16T19:32:21
66,380,601
0
0
null
null
null
null
UTF-8
Java
false
false
1,957
java
package Images.Viewer; import java.applet.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class ImageFilterDemo extends Applet implements ActionListener { Image img; PlugInFilter pif; Image fimg; Image curImg; LoadedImage lim; Label lab; Button reset; public void init() { setLayout(new BorderLayout()); Panel p = new Panel(); add(p, BorderLayout.SOUTH); reset = new Button("Przywróć"); reset.addActionListener(this); p.add(reset); StringTokenizer st = new StringTokenizer("GrayScale+Invert+Contrast+Blur+Sharpen", "+"); while (st.hasMoreTokens()) { Button b = new Button(st.nextToken()); b.addActionListener(this); p.add(b); } lab = new Label(""); add(lab, BorderLayout.NORTH); img = getImage(getDocumentBase(), "/home/bartek/Pictures/bp20.jpg"); lim = new LoadedImage(img); add(lim, BorderLayout.CENTER); } @Override public void actionPerformed(ActionEvent e) { String a = ""; try { a = e.getActionCommand(); if (a.equals("Przywróć")) { lim.set(img); lab.setText("Obraz oryginalny"); } else { pif = (PlugInFilter) Class.forName("Images.Viewer." + a).newInstance(); fimg = pif.filter(this, img); lim.set(fimg); lab.setText("Obraz przefiltrowany: " + a); } repaint(); }catch (ClassNotFoundException e1) { lab.setText("Nie znaleziono klasy " +a); lim.set(img); repaint(); } catch (InstantiationException e1) { lab.setText("Nie powiodło się tworzneie egzemplarza klasy " + a); } catch (IllegalAccessException e1) { lab.setText("Brak dostępu: " + a); } } }
[ "emini1@swiatek.biz" ]
emini1@swiatek.biz
42e24e8143e10063a9f5a8cbaea415a0162c1952
9f6f3642955a621c068d2aa0d9056f8d0f03a7d8
/src/main/java/jp/co/casley/jankenapi/repository/db/entity/generate/MtJankenStrategyExample.java
f9ff06004605dceba1cc58093d3183393ff2fc12
[]
no_license
kazuya-matsuoka/JankenAPI
b8f275b9018f7c764713fab9d79f9e600e0ad7f9
f7d16db0d04011699ce785db2c55d6f9f2e14ae8
refs/heads/master
2020-09-17T05:25:42.155312
2019-11-25T17:38:08
2019-11-25T17:38:08
223,733,638
0
0
null
null
null
null
UTF-8
Java
false
false
26,145
java
package jp.co.casley.jankenapi.repository.db.entity.generate; import java.util.ArrayList; import java.util.Date; import java.util.List; public class MtJankenStrategyExample { /** * This field was generated by MyBatis Generator. * This field corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. * This field corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. * This field corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ protected List<Criteria> oredCriteria; /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public MtJankenStrategyExample() { oredCriteria = new ArrayList<Criteria>(); } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public String getOrderByClause() { return orderByClause; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public void setDistinct(boolean distinct) { this.distinct = distinct; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public boolean isDistinct() { return distinct; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public List<Criteria> getOredCriteria() { return oredCriteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public void or(Criteria criteria) { oredCriteria.add(criteria); } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andStrategyIsNull() { addCriterion("strategy is null"); return (Criteria) this; } public Criteria andStrategyIsNotNull() { addCriterion("strategy is not null"); return (Criteria) this; } public Criteria andStrategyEqualTo(String value) { addCriterion("strategy =", value, "strategy"); return (Criteria) this; } public Criteria andStrategyNotEqualTo(String value) { addCriterion("strategy <>", value, "strategy"); return (Criteria) this; } public Criteria andStrategyGreaterThan(String value) { addCriterion("strategy >", value, "strategy"); return (Criteria) this; } public Criteria andStrategyGreaterThanOrEqualTo(String value) { addCriterion("strategy >=", value, "strategy"); return (Criteria) this; } public Criteria andStrategyLessThan(String value) { addCriterion("strategy <", value, "strategy"); return (Criteria) this; } public Criteria andStrategyLessThanOrEqualTo(String value) { addCriterion("strategy <=", value, "strategy"); return (Criteria) this; } public Criteria andStrategyLike(String value) { addCriterion("strategy like", value, "strategy"); return (Criteria) this; } public Criteria andStrategyNotLike(String value) { addCriterion("strategy not like", value, "strategy"); return (Criteria) this; } public Criteria andStrategyIn(List<String> values) { addCriterion("strategy in", values, "strategy"); return (Criteria) this; } public Criteria andStrategyNotIn(List<String> values) { addCriterion("strategy not in", values, "strategy"); return (Criteria) this; } public Criteria andStrategyBetween(String value1, String value2) { addCriterion("strategy between", value1, value2, "strategy"); return (Criteria) this; } public Criteria andStrategyNotBetween(String value1, String value2) { addCriterion("strategy not between", value1, value2, "strategy"); return (Criteria) this; } public Criteria andStrategyNameIsNull() { addCriterion("strategy_name is null"); return (Criteria) this; } public Criteria andStrategyNameIsNotNull() { addCriterion("strategy_name is not null"); return (Criteria) this; } public Criteria andStrategyNameEqualTo(String value) { addCriterion("strategy_name =", value, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameNotEqualTo(String value) { addCriterion("strategy_name <>", value, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameGreaterThan(String value) { addCriterion("strategy_name >", value, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameGreaterThanOrEqualTo(String value) { addCriterion("strategy_name >=", value, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameLessThan(String value) { addCriterion("strategy_name <", value, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameLessThanOrEqualTo(String value) { addCriterion("strategy_name <=", value, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameLike(String value) { addCriterion("strategy_name like", value, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameNotLike(String value) { addCriterion("strategy_name not like", value, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameIn(List<String> values) { addCriterion("strategy_name in", values, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameNotIn(List<String> values) { addCriterion("strategy_name not in", values, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameBetween(String value1, String value2) { addCriterion("strategy_name between", value1, value2, "strategyName"); return (Criteria) this; } public Criteria andStrategyNameNotBetween(String value1, String value2) { addCriterion("strategy_name not between", value1, value2, "strategyName"); return (Criteria) this; } public Criteria andCreateDateIsNull() { addCriterion("create_date is null"); return (Criteria) this; } public Criteria andCreateDateIsNotNull() { addCriterion("create_date is not null"); return (Criteria) this; } public Criteria andCreateDateEqualTo(Date value) { addCriterion("create_date =", value, "createDate"); return (Criteria) this; } public Criteria andCreateDateNotEqualTo(Date value) { addCriterion("create_date <>", value, "createDate"); return (Criteria) this; } public Criteria andCreateDateGreaterThan(Date value) { addCriterion("create_date >", value, "createDate"); return (Criteria) this; } public Criteria andCreateDateGreaterThanOrEqualTo(Date value) { addCriterion("create_date >=", value, "createDate"); return (Criteria) this; } public Criteria andCreateDateLessThan(Date value) { addCriterion("create_date <", value, "createDate"); return (Criteria) this; } public Criteria andCreateDateLessThanOrEqualTo(Date value) { addCriterion("create_date <=", value, "createDate"); return (Criteria) this; } public Criteria andCreateDateIn(List<Date> values) { addCriterion("create_date in", values, "createDate"); return (Criteria) this; } public Criteria andCreateDateNotIn(List<Date> values) { addCriterion("create_date not in", values, "createDate"); return (Criteria) this; } public Criteria andCreateDateBetween(Date value1, Date value2) { addCriterion("create_date between", value1, value2, "createDate"); return (Criteria) this; } public Criteria andCreateDateNotBetween(Date value1, Date value2) { addCriterion("create_date not between", value1, value2, "createDate"); return (Criteria) this; } public Criteria andCreateUserIsNull() { addCriterion("create_user is null"); return (Criteria) this; } public Criteria andCreateUserIsNotNull() { addCriterion("create_user is not null"); return (Criteria) this; } public Criteria andCreateUserEqualTo(String value) { addCriterion("create_user =", value, "createUser"); return (Criteria) this; } public Criteria andCreateUserNotEqualTo(String value) { addCriterion("create_user <>", value, "createUser"); return (Criteria) this; } public Criteria andCreateUserGreaterThan(String value) { addCriterion("create_user >", value, "createUser"); return (Criteria) this; } public Criteria andCreateUserGreaterThanOrEqualTo(String value) { addCriterion("create_user >=", value, "createUser"); return (Criteria) this; } public Criteria andCreateUserLessThan(String value) { addCriterion("create_user <", value, "createUser"); return (Criteria) this; } public Criteria andCreateUserLessThanOrEqualTo(String value) { addCriterion("create_user <=", value, "createUser"); return (Criteria) this; } public Criteria andCreateUserLike(String value) { addCriterion("create_user like", value, "createUser"); return (Criteria) this; } public Criteria andCreateUserNotLike(String value) { addCriterion("create_user not like", value, "createUser"); return (Criteria) this; } public Criteria andCreateUserIn(List<String> values) { addCriterion("create_user in", values, "createUser"); return (Criteria) this; } public Criteria andCreateUserNotIn(List<String> values) { addCriterion("create_user not in", values, "createUser"); return (Criteria) this; } public Criteria andCreateUserBetween(String value1, String value2) { addCriterion("create_user between", value1, value2, "createUser"); return (Criteria) this; } public Criteria andCreateUserNotBetween(String value1, String value2) { addCriterion("create_user not between", value1, value2, "createUser"); return (Criteria) this; } public Criteria andUpdateDateIsNull() { addCriterion("update_date is null"); return (Criteria) this; } public Criteria andUpdateDateIsNotNull() { addCriterion("update_date is not null"); return (Criteria) this; } public Criteria andUpdateDateEqualTo(Date value) { addCriterion("update_date =", value, "updateDate"); return (Criteria) this; } public Criteria andUpdateDateNotEqualTo(Date value) { addCriterion("update_date <>", value, "updateDate"); return (Criteria) this; } public Criteria andUpdateDateGreaterThan(Date value) { addCriterion("update_date >", value, "updateDate"); return (Criteria) this; } public Criteria andUpdateDateGreaterThanOrEqualTo(Date value) { addCriterion("update_date >=", value, "updateDate"); return (Criteria) this; } public Criteria andUpdateDateLessThan(Date value) { addCriterion("update_date <", value, "updateDate"); return (Criteria) this; } public Criteria andUpdateDateLessThanOrEqualTo(Date value) { addCriterion("update_date <=", value, "updateDate"); return (Criteria) this; } public Criteria andUpdateDateIn(List<Date> values) { addCriterion("update_date in", values, "updateDate"); return (Criteria) this; } public Criteria andUpdateDateNotIn(List<Date> values) { addCriterion("update_date not in", values, "updateDate"); return (Criteria) this; } public Criteria andUpdateDateBetween(Date value1, Date value2) { addCriterion("update_date between", value1, value2, "updateDate"); return (Criteria) this; } public Criteria andUpdateDateNotBetween(Date value1, Date value2) { addCriterion("update_date not between", value1, value2, "updateDate"); return (Criteria) this; } public Criteria andUpdateUserIsNull() { addCriterion("update_user is null"); return (Criteria) this; } public Criteria andUpdateUserIsNotNull() { addCriterion("update_user is not null"); return (Criteria) this; } public Criteria andUpdateUserEqualTo(String value) { addCriterion("update_user =", value, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserNotEqualTo(String value) { addCriterion("update_user <>", value, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserGreaterThan(String value) { addCriterion("update_user >", value, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserGreaterThanOrEqualTo(String value) { addCriterion("update_user >=", value, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserLessThan(String value) { addCriterion("update_user <", value, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserLessThanOrEqualTo(String value) { addCriterion("update_user <=", value, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserLike(String value) { addCriterion("update_user like", value, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserNotLike(String value) { addCriterion("update_user not like", value, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserIn(List<String> values) { addCriterion("update_user in", values, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserNotIn(List<String> values) { addCriterion("update_user not in", values, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserBetween(String value1, String value2) { addCriterion("update_user between", value1, value2, "updateUser"); return (Criteria) this; } public Criteria andUpdateUserNotBetween(String value1, String value2) { addCriterion("update_user not between", value1, value2, "updateUser"); return (Criteria) this; } public Criteria andRowVersionIsNull() { addCriterion("row_version is null"); return (Criteria) this; } public Criteria andRowVersionIsNotNull() { addCriterion("row_version is not null"); return (Criteria) this; } public Criteria andRowVersionEqualTo(String value) { addCriterion("row_version =", value, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionNotEqualTo(String value) { addCriterion("row_version <>", value, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionGreaterThan(String value) { addCriterion("row_version >", value, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionGreaterThanOrEqualTo(String value) { addCriterion("row_version >=", value, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionLessThan(String value) { addCriterion("row_version <", value, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionLessThanOrEqualTo(String value) { addCriterion("row_version <=", value, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionLike(String value) { addCriterion("row_version like", value, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionNotLike(String value) { addCriterion("row_version not like", value, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionIn(List<String> values) { addCriterion("row_version in", values, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionNotIn(List<String> values) { addCriterion("row_version not in", values, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionBetween(String value1, String value2) { addCriterion("row_version between", value1, value2, "rowVersion"); return (Criteria) this; } public Criteria andRowVersionNotBetween(String value1, String value2) { addCriterion("row_version not between", value1, value2, "rowVersion"); return (Criteria) this; } } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated do_not_delete_during_merge Fri Nov 01 00:32:53 JST 2019 */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table jankendb.mt_janken_strategy * * @mbg.generated Fri Nov 01 00:32:53 JST 2019 */ public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
[ "kazuya@192.168.0.33" ]
kazuya@192.168.0.33
8d304424d3382f8623be51acf96b602f5a4f5f02
f8597d77251a459f91f49f662d11be4190f847f5
/src/main/java/io/github/socraticphoenix/jource/ast/value/JavaSourceLiteralArray.java
7a351958cea447cf09ad50d836e4423f48537145
[]
no_license
SocraticPhoenix/Jource
630e6c369a04f720266516357a09a64c42506c5e
058fc2ed642e856c069872c097982c2fb83d622d
refs/heads/master
2022-04-24T03:57:34.357678
2020-04-23T03:46:54
2020-04-23T03:46:54
84,269,867
0
0
null
null
null
null
UTF-8
Java
false
false
3,387
java
/* * The MIT License (MIT) * * Copyright (c) 2016 socraticphoenix@gmail.com * Copyright (c) 2016 contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and * associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package io.github.socraticphoenix.jource.ast.value; import io.github.socraticphoenix.jource.ast.JavaSourceContext; import io.github.socraticphoenix.jource.ast.type.JavaSourceNamespace; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class JavaSourceLiteralArray<T extends JavaSourceLiteral> implements JavaSourceLiteral<Object[]> { private List<T> literals; private JavaSourceNamespace type; public JavaSourceLiteralArray(JavaSourceNamespace component) { this.literals = new ArrayList<>(); this.type = component.array(component.getArray() + 1); } public JavaSourceLiteralArray addElement(T element) { this.literals.add(element); return this; } public List<T> getLiterals() { return this.literals; } @Override public String write(int indent, JavaSourceContext context) { StringBuilder builder = new StringBuilder(); builder.append("new ").append(this.type.write(indent + 1, context)).append("{"); for (int i = 0; i < this.literals.size(); i++) { builder.append(this.literals.get(i).write(indent + 1, context)); if(i < this.literals.size() - 1) { builder.append(", "); } } builder.append("}"); return builder.toString(); } @Override public String writeConstant(JavaSourceContext context) { StringBuilder builder = new StringBuilder(); builder.append("{"); for (int i = 0; i < this.literals.size(); i++) { builder.append(this.literals.get(i).write(context)); if(i < this.literals.size() - 1) { builder.append(", "); } } builder.append("}"); return builder.toString(); } @Override public boolean usesIndents() { return false; } @Override public JavaSourceNamespace type() { return this.type; } @Override public List<JavaSourceNamespace> associatedTypes() { return Collections.singletonList(this.type()); } @Override public Object[] value() { return this.literals.toArray(); } }
[ "socraticphoenix@gmail.com" ]
socraticphoenix@gmail.com
cd0f72f2f3dbb064f26c62efe1650c8b7b563167
2c04dddb7890f69add4bf76eaba139b3393b42a9
/fr.umlv.valuetype/src/main/java/fr/umlv/valuetype/specialization/Species.java
73b5e2cc8bb77f9b0d17fafd5a62acf50c00a7cb
[ "MIT" ]
permissive
forax/valuetype-lworld
9da132338a93acc720756cf1a1b5af24b7e34a63
4dff808e182b2376861e0d481288f761f56c4fb0
refs/heads/master
2021-07-06T04:02:37.482241
2020-09-11T16:25:54
2020-09-11T16:25:54
138,787,569
9
2
null
null
null
null
UTF-8
Java
false
false
6,128
java
package fr.umlv.valuetype.specialization; import static java.lang.invoke.MethodType.methodType; import static java.util.Collections.reverse; import static java.util.stream.Collectors.toList; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles.Lookup; import java.lang.reflect.Array; import java.lang.reflect.Modifier; import java.lang.reflect.TypeVariable; import java.lang.reflect.UndeclaredThrowableException; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; /* public interface Species<T> { public Species<T> raw(); public Class<?> rawClass(); public int getTypeArgumentCount(); public <I> Species<I> getTypeArgument(int index); public <I> Species<I> with(Species<?>... typeArguments); public T[] newArray(int length); public void checkCast(T e); static final ClassValue<MethodHandle> SPECIES_GETTER = new ClassValue<>() { @Override protected MethodHandle computeValue(Class<?> type) { Lookup lookup; try { // FIXME lookup = MethodHandles.privateLookupIn(type, MethodHandles.lookup()); } catch (IllegalAccessException e) { throw (IllegalAccessError)new IllegalAccessError().initCause(e); } try { return lookup.findGetter(type, "__SPECIES__", Species.class).asType(methodType(Species.class, Object.class)); } catch (@SuppressWarnings("unused") NoSuchFieldException e) { return null; } catch (IllegalAccessException e) { throw (IllegalAccessError)new IllegalAccessError().initCause(e); } } }; @SuppressWarnings("unchecked") public static <T> Species<T> species(T instance) { var clazz = instance.getClass(); var getter = SPECIES_GETTER.get(clazz); if (getter == null) { return (Species<T>)raw(clazz); } try { return (Species<T>)getter.invokeExact(instance); } catch (Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException)e; } if (e instanceof Error) { throw (Error)e; } throw new UndeclaredThrowableException(e); } } static final ClassValue<Species<?>> SPECIES = new ClassValue<>() { @Override protected Species<?> computeValue(Class<?> type) { var typeVariables = getTypeVariables(type); //FIXME var bounds = typeVariables.stream().map(t -> SPECIES.get((Class<?>)t.getBounds()[0])).toArray(Species<?>[]::new); return new Species<>() { private final HashMap<List<Species<?>>, Species<?>> specializationMap = new HashMap<>(); @Override public Species<Object> raw() { return this; } @Override public Class<?> rawClass() { return type; } @Override public int getTypeArgumentCount() { return bounds.length; } @Override @SuppressWarnings("unchecked") public <I> Species<I> getTypeArgument(int index) { return (Species<I>)bounds[index]; } @Override @SuppressWarnings("unchecked") public <I> Species<I> with(Species<?>... typeArguments) { return (Species<I>)specializationMap.computeIfAbsent(Arrays.asList(typeArguments), __ -> genericOf(this, typeArguments)); } @Override public Object[] newArray(int length) { return (Object[])Array.newInstance(type, length); } @Override public void checkCast(Object e) { type.cast(e); } @Override public String toString() { return type.getName(); } }; } }; private static List<TypeVariable<?>> getTypeVariables(Class<?> type) { List<TypeVariable<?>> typeVariables = Stream.<Class<?>> iterate(type, t -> t != null, t -> Modifier.isStatic(t.getModifiers())? null: t.getEnclosingClass()) .flatMap(t -> Arrays.stream(t.getTypeParameters())) .collect(toList()); reverse(typeVariables); return typeVariables; } @SuppressWarnings("unchecked") public static <T> Species<T> raw(Class<T> type) { if (type.isPrimitive()) { throw new IllegalArgumentException("type can not be a primitive"); } return (Species<T>)SPECIES.get(type); } private static <I> Species<I> genericOf(Species<I> raw, Species<?>[] typeArguments) { if (raw.getTypeArgumentCount() != typeArguments.length) { throw new IllegalArgumentException("wrong number of type arguments " + raw + " " + Arrays.toString(typeArguments)); } return new Species<>() { @Override public Species<I> raw() { return raw; } @Override public Class<?> rawClass() { return raw.rawClass(); } @Override public int getTypeArgumentCount() { return typeArguments.length; } @Override @SuppressWarnings("unchecked") public <J> Species<J> getTypeArgument(int index) { return (Species<J>)typeArguments[index]; } @Override public <J> Species<J> with(Species<?>... typeArguments) { return raw.with(typeArguments); } @Override public I[] newArray(int length) { return raw.newArray(length); } @Override public void checkCast(I instance) { var species = species(instance); if (species == this) { // quickcheck return; } raw.checkCast(instance); // raw check for(var i = 0; i < typeArguments.length; i++) { // type argument checks if (!typeArguments[i].rawClass().isAssignableFrom(species.getTypeArgument(i).rawClass())) { throw new ClassCastException("can not cast " + species + " to " + this); } } } @Override public String toString() { return raw.toString() + Arrays.stream(typeArguments).map(Species::toString).collect(Collectors.joining(", ", "<", ">")); } }; } } */
[ "forax@univ-mlv.fr" ]
forax@univ-mlv.fr
86be762c12d797c5793fe2cb2f007d925e43a8e9
5de076285c97512fe37a1e15197b672aca891a6f
/src/main/java/com/kh/homeplus/facility/model/exception/FacilityException.java
f71a62483a0d83df61e776051719d116b72debd4
[]
no_license
GwakHuisu/homeplus
f45233f2b3612c9e474a9cd69eafc00a6f50a131
d9735f217d76435c97534ce326a8e9981aab77be
refs/heads/master
2022-12-22T10:59:47.007977
2020-03-08T18:14:16
2020-03-08T18:14:16
245,837,585
0
1
null
2022-12-16T15:06:29
2020-03-08T15:18:59
JavaScript
UTF-8
Java
false
false
168
java
package com.kh.homeplus.facility.model.exception; public class FacilityException extends RuntimeException { public FacilityException(String msg) { super(msg); } }
[ "gwakhuisu8110@gmail.com" ]
gwakhuisu8110@gmail.com
76a3ed6f7dce3fed525d9c2c6a3d91bb366ff4ad
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/com/facebook/react/modules/debug/FpsDebugFrameCallback.java
cdc433130101662bba8d0f4f6689daa83e337ba5
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
5,991
java
package com.facebook.react.modules.debug; import android.annotation.TargetApi; import android.view.Choreographer; import android.view.Choreographer.FrameCallback; import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.ReactContext; import com.facebook.react.uimanager.UIManagerModule; import java.util.Map.Entry; import java.util.TreeMap; @TargetApi(16) public class FpsDebugFrameCallback implements FrameCallback { private static final double EXPECTED_FRAME_TIME = 16.9d; private int m4PlusFrameStutters = 0; private final Choreographer mChoreographer; private final DidJSUpdateUiDuringFrameDetector mDidJSUpdateUiDuringFrameDetector; private int mExpectedNumFramesPrev = 0; private long mFirstFrameTime = -1; private boolean mIsRecordingFpsInfoAtEachFrame = false; private long mLastFrameTime = -1; private int mNumFrameCallbacks = 0; private int mNumFrameCallbacksWithBatchDispatches = 0; private final ReactContext mReactContext; private boolean mShouldStop = false; private TreeMap<Long, FpsInfo> mTimeToFps; private final UIManagerModule mUIManagerModule; public static class FpsInfo { public final double fps; public final double jsFps; public final int total4PlusFrameStutters; public final int totalExpectedFrames; public final int totalFrames; public final int totalJsFrames; public final int totalTimeMs; public FpsInfo(int totalFrames2, int totalJsFrames2, int totalExpectedFrames2, int total4PlusFrameStutters2, double fps2, double jsFps2, int totalTimeMs2) { this.totalFrames = totalFrames2; this.totalJsFrames = totalJsFrames2; this.totalExpectedFrames = totalExpectedFrames2; this.total4PlusFrameStutters = total4PlusFrameStutters2; this.fps = fps2; this.jsFps = jsFps2; this.totalTimeMs = totalTimeMs2; } } public FpsDebugFrameCallback(Choreographer choreographer, ReactContext reactContext) { this.mChoreographer = choreographer; this.mReactContext = reactContext; this.mUIManagerModule = (UIManagerModule) reactContext.getNativeModule(UIManagerModule.class); this.mDidJSUpdateUiDuringFrameDetector = new DidJSUpdateUiDuringFrameDetector(); } public void doFrame(long l) { if (!this.mShouldStop) { if (this.mFirstFrameTime == -1) { this.mFirstFrameTime = l; } long lastFrameStartTime = this.mLastFrameTime; this.mLastFrameTime = l; if (this.mDidJSUpdateUiDuringFrameDetector.getDidJSHitFrameAndCleanup(lastFrameStartTime, l)) { this.mNumFrameCallbacksWithBatchDispatches++; } this.mNumFrameCallbacks++; int expectedNumFrames = getExpectedNumFrames(); if ((expectedNumFrames - this.mExpectedNumFramesPrev) - 1 >= 4) { this.m4PlusFrameStutters++; } if (this.mIsRecordingFpsInfoAtEachFrame) { Assertions.assertNotNull(this.mTimeToFps); this.mTimeToFps.put(Long.valueOf(System.currentTimeMillis()), new FpsInfo(getNumFrames(), getNumJSFrames(), expectedNumFrames, this.m4PlusFrameStutters, getFPS(), getJSFPS(), getTotalTimeMS())); } this.mExpectedNumFramesPrev = expectedNumFrames; this.mChoreographer.postFrameCallback(this); } } public void start() { this.mShouldStop = false; this.mReactContext.getCatalystInstance().addBridgeIdleDebugListener(this.mDidJSUpdateUiDuringFrameDetector); this.mUIManagerModule.setViewHierarchyUpdateDebugListener(this.mDidJSUpdateUiDuringFrameDetector); this.mChoreographer.postFrameCallback(this); } public void startAndRecordFpsAtEachFrame() { this.mTimeToFps = new TreeMap<>(); this.mIsRecordingFpsInfoAtEachFrame = true; start(); } public void stop() { this.mShouldStop = true; this.mReactContext.getCatalystInstance().removeBridgeIdleDebugListener(this.mDidJSUpdateUiDuringFrameDetector); this.mUIManagerModule.setViewHierarchyUpdateDebugListener(null); } public double getFPS() { if (this.mLastFrameTime == this.mFirstFrameTime) { return 0.0d; } return (((double) getNumFrames()) * 1.0E9d) / ((double) (this.mLastFrameTime - this.mFirstFrameTime)); } public double getJSFPS() { if (this.mLastFrameTime == this.mFirstFrameTime) { return 0.0d; } return (((double) getNumJSFrames()) * 1.0E9d) / ((double) (this.mLastFrameTime - this.mFirstFrameTime)); } public int getNumFrames() { return this.mNumFrameCallbacks - 1; } public int getNumJSFrames() { return this.mNumFrameCallbacksWithBatchDispatches - 1; } public int getExpectedNumFrames() { return (int) ((((double) getTotalTimeMS()) / EXPECTED_FRAME_TIME) + 1.0d); } public int get4PlusFrameStutters() { return this.m4PlusFrameStutters; } public int getTotalTimeMS() { return ((int) (((double) this.mLastFrameTime) - ((double) this.mFirstFrameTime))) / 1000000; } public FpsInfo getFpsInfo(long upToTimeMs) { Assertions.assertNotNull(this.mTimeToFps, "FPS was not recorded at each frame!"); Entry<Long, FpsInfo> bestEntry = this.mTimeToFps.floorEntry(Long.valueOf(upToTimeMs)); if (bestEntry == null) { return null; } return (FpsInfo) bestEntry.getValue(); } public void reset() { this.mFirstFrameTime = -1; this.mLastFrameTime = -1; this.mNumFrameCallbacks = 0; this.m4PlusFrameStutters = 0; this.mNumFrameCallbacksWithBatchDispatches = 0; this.mIsRecordingFpsInfoAtEachFrame = false; this.mTimeToFps = null; } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
bdb7059c7cef48117b73254479ab9a6ebf3d369b
dcfdbc7add93212f59ce7a11f1a518e90f152e24
/Spring-mvc-Anno2-GetEmp/src/main/java/com/spring/bo/BOimp.java
4ddf2079d9cef5b54f54d352b84148dc164fe1f6
[]
no_license
deepndra9755/springmvc
5564a7793e73cafe323364b6cc28931e5dee211f
508cb209ec501e95b0067a17a380e8ff2cbf6fe8
refs/heads/master
2023-07-02T06:21:01.238739
2021-08-08T01:46:19
2021-08-08T01:46:19
393,670,802
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package com.spring.bo; public class BOimp { //ID,NAME,LAST,ROLL int id; String Name; String last; int roll; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return Name; } public void setName(String name) { Name = name; } public String getLast() { return last; } public void setLast(String last) { this.last = last; } public int getRoll() { return roll; } public void setRoll(int roll) { this.roll = roll; } }
[ "cotlin@DESKTOP-RNJ3PV0" ]
cotlin@DESKTOP-RNJ3PV0
9742801a4915f424130684147ae6642778910a02
a2c97c258f77a7ef7bb849135cdb26e38bacb022
/src/main/java/br/com/rhribeiro25/bank/model/dtos/UserCreateDTORequest.java
f7488b2028f27fa077d483791745a979bf8aeba7
[]
no_license
rhribeiro25/bank-project-spring-boot
4e2fc251b1a15aa94c67b2d87793f5c639ad06d6
42817d0103a46009227a1df00f4025ce780d21ab
refs/heads/master
2023-06-15T17:16:17.815908
2021-07-11T11:44:40
2021-07-11T11:44:40
312,475,163
0
0
null
null
null
null
UTF-8
Java
false
false
1,231
java
package br.com.rhribeiro25.bank.model.dtos; import br.com.rhribeiro25.bank.model.entity.AccountEntity; import br.com.rhribeiro25.bank.model.entity.UserEntity; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import javax.validation.Valid; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** * @author Renan Ribeiro * @date 12/11/2020. */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class UserCreateDTORequest { @NotBlank(message = "{name.not.blank}") @Size(max = 127, message = "{name.size}") private String name; @NotBlank(message = "{cpf.not.blank}") @Size(max = 14, message = "{cpf.size}") private String cpf; @Valid @NotNull(message = "{account.not.null}") private AccountCreateDTORequest account; public UserEntity returnUserEntity() { AccountEntity account = null; if (this.account != null) account = this.account.returnAccountEntity(); return UserEntity.builder() .name(name) .cpf(cpf) .account(account) .build(); } }
[ "renan.shaolin.25@gmail.com" ]
renan.shaolin.25@gmail.com
37b450eafefaa8e39550a696f388bbe555672692
e60a371fdbfe269e69a0a1281856f7db83d088c6
/src/main/java/org/belemkadem/accouchement/domain/enumeration/ModeAnesthesie.java
38cb7e00c43808ccc0f8be7c44904a7c622389d7
[]
no_license
belemkadem/testAccouchement
96cdce6e89e62521a3048c906c580991dc1f3741
30a40f72f59559ead3d0bcb765515f5a4d30e73e
refs/heads/master
2023-05-14T21:24:53.449138
2019-05-03T22:33:27
2019-05-03T22:33:27
196,832,178
0
0
null
2023-05-06T07:12:58
2019-07-14T12:10:26
Java
UTF-8
Java
false
false
162
java
package org.belemkadem.accouchement.domain.enumeration; /** * The ModeAnesthesie enumeration. */ public enum ModeAnesthesie { AG, PERIDURALE, NON_DEFINI }
[ "belemkademyassine@gmail.com" ]
belemkademyassine@gmail.com
8ad85cad52fafaf9dbb5d9dd71756f11c18da144
2ada60315f1f5dbfa9509fb3fd860c2e0d8c51a1
/src/vista/PanelJugadores.java
f18b13311972aa2a722e4ebc8dfb56a717ae9f10
[]
no_license
GPatiA2/Scrabble
4f935fd719606532f37c737f75b9a8a55dbf8a58
ded369f3a3f6d4115c0b09a18c9e47d333b95027
refs/heads/main
2023-08-20T10:42:24.859999
2021-10-27T21:11:38
2021-10-27T21:11:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,940
java
package vista; import java.awt.GridLayout; import java.util.List; import javax.swing.JPanel; import controlador.Controller; import modelo.Ficha; import modelo.Integrante; import modelo.JugadorObserver; import modelo.TManagerObserver; public class PanelJugadores extends JPanel implements TManagerObserver,JugadorObserver { private static final long serialVersionUID = 1L; private Controller c; private PanelTurnos panelTurnos; private PanelJugadorActual panelJugadorActual; public PanelJugadores(Controller c) { this.c = c; initPanel(); registerOn(this.c); } private void initPanel() { this.setLayout(new GridLayout(1,2)); this.panelTurnos = new PanelTurnos(); //contiene todos los componentes de la visualizacion de turnos this.panelJugadorActual = new PanelJugadorActual(); this.add(this.panelJugadorActual); this.add(this.panelTurnos); } @Override public void mostrarTurnos(String act, String sig) { this.panelTurnos.setText(act,sig); if(act.equals(this.panelJugadorActual.getNick())) { GamePanel.setEnableGame(true); } else { GamePanel.setEnableGame(false); } } @Override public void registerOn(Controller c) { c.addTManagerObserver(this); c.addJugadorObserver(this, panelTurnos.getActual()); } @Override public void nuevoTurno(Integrante i, String act, String sig) { panelTurnos.setText(act, sig); panelJugadorActual.mostrarMonedas(i.getCoin()); panelJugadorActual.mostrarPuntos(i.getScore(), i.getNick()); if(i.getNick().equals(act)) { GamePanel.setEnableGame(true); } else { GamePanel.setEnableGame(false); } } @Override public void onError(String err,String nick) {} @Override public void onRegister(String act, String sig) { panelTurnos.setText(act, sig); } @Override public void turnoAcabado(String j) { // TODO Auto-generated method stub } @Override public void fichaRobada(Ficha f, Integrante j) { // TODO Auto-generated method stub } @Override public void fichaUsada(Ficha f, Integrante player) { // TODO Auto-generated method stub } @Override public void borrarFichaMano(Ficha f, Integrante j, boolean bienColocada) { // TODO Auto-generated method stub } @Override public void mostrarPuntos(int puntos, String nick) { this.panelJugadorActual.mostrarPuntos(puntos, nick); } @Override public void mostrarMonedas(int monedas, String nick) { this.panelJugadorActual.mostrarMonedas(monedas); } @Override public void onRegister(String nick, int puntos, int monedas, List<Ficha> mano) { this.panelJugadorActual.mostrarPuntos(puntos, nick); this.panelJugadorActual.mostrarMonedas(monedas); if(nick.equals(this.panelTurnos.getActual())) { GamePanel.setEnableGame(true); } else { GamePanel.setEnableGame(false); } } @Override public void partidaAcabada(String nick) { } public String getAct() { return panelTurnos.getActual(); } }
[ "gugarc07@ucm.es" ]
gugarc07@ucm.es
5e34b3203cc5aebf6c2487c8fd9129bdae0a0018
aa3353339f3203a539dca899b32940bb0fd71fee
/Examples/src/main/java/com/aspose/asposecloudpdf/examples/document/GetPageFileAttachmentAnnotationsExample.java
f1eda1cb00c10c5c79fd97291cc3867758d2bb67
[ "MIT" ]
permissive
aspose-pdf-cloud/aspose-pdf-cloud-java
88d8ea76840ef8949482aa54c1c8240903d988dc
9f088ed5cc59429c3e2832b372d9a174eb749ad8
refs/heads/master
2023-08-30T13:31:57.015852
2023-08-28T12:10:59
2023-08-28T12:10:59
134,710,143
2
3
MIT
2023-08-28T12:11:01
2018-05-24T12:09:47
Java
UTF-8
Java
false
false
722
java
package com.aspose.asposecloudpdf.examples.document; import com.aspose.asposecloudpdf.ApiException; import com.aspose.asposecloudpdf.api.PdfApi; import com.aspose.asposecloudpdf.examples.Common; import com.aspose.asposecloudpdf.model.FileAttachmentAnnotationsResponse; public class GetPageFileAttachmentAnnotationsExample { public static void main(String[] args) throws ApiException { PdfApi pdfApi = new PdfApi("XXXXXXXXXXX", "XXXXXXX"); String name = "PdfWithAnnotations.pdf"; Common.uploadFile(pdfApi, name); int pageNumber = 2; FileAttachmentAnnotationsResponse response = pdfApi.getPageFileAttachmentAnnotations(name, pageNumber, null, ""); System.out.println(response); } }
[ "mateen.sajid@systemsltd.com" ]
mateen.sajid@systemsltd.com
73839ca59dd450a0bfaf29bc5de2ff5739a7fca5
df9826228e9b42b805abe5c0c0d1778b609b1c9d
/src/net/yosoydev/CinemaUDG/Caja.java
a86df988139d3d279e7841a9061726b0d07ae08a
[ "MIT" ]
permissive
jesus997/CinemaUDG
9962adc26d504db8a8ef55991d00ee04a76ff770
c505ec0268d01e1f6d30682997cde23419bb9065
refs/heads/master
2021-05-08T20:57:01.472358
2018-02-06T23:41:54
2018-02-06T23:41:54
119,623,689
0
0
null
null
null
null
UTF-8
Java
false
false
4,886
java
package net.yosoydev.CinemaUDG; import java.text.NumberFormat; import java.util.ArrayList; import java.util.List; import java.util.Locale; /** * * @author jesus */ public class Caja { private final String nombre; private double montoRecabado; private int clientesAtendidos; private int boletosVendidos; private boolean ocupado; public Caja(String nombre) { this.nombre = nombre; this.montoRecabado = 0.0d; this.clientesAtendidos = 0; this.boletosVendidos = 0; this.ocupado = false; } public String obtenerNombre() { return this.nombre; } public double obtenerMontoRecabado() { return this.montoRecabado; } public int obtenerClientesAtendidos() { return this.clientesAtendidos; } public int obtenerBoletosVendidos() { return this.boletosVendidos; } public boolean estaOcupada() { return ocupado; } public void iniciarVenta(Cliente cliente) { // Inicia la venta de boletos this.ocupado = true; Sala s = obtenerSala(); if(s == null) { this.ocupado = false; CinemaUDG.cerrarCinema(); } else { if(cliente.obtenerNumeroDeAsientos() > 0 && (s.obtenerAsientosDisponibles() < cliente.obtenerNumeroDeAsientos())) { if(s.obtenerAsientosDisponibles() < 1) { iniciarVenta(cliente); } else { int sobrante = cliente.obtenerNumeroDeAsientos() - s.obtenerAsientosDisponibles(); System.out.println("=================================================================="); System.out.println(" - Partición detectada -"); System.out.println(" > Cliente: " + cliente.nombre); System.out.println(" > Numero de asientos solicitados: " + cliente.obtenerNumeroDeAsientos()); System.out.println(" > Numero de asientos asignados: " + s.obtenerAsientosDisponibles()); System.out.println(" > Numero de asientos sobrantes: " + sobrante); System.out.println(""); iniciarVenta(cliente.particionarCliente(sobrante)); } } if(cliente.obtenerNumeroDeAsientos() > 0) { if(s.hayAsientosDisponibles()) { cliente.asignarSala(s); s.asignarAsientos(cliente); this.montoRecabado += CinemaUDG.PRECIO_BOLETO * cliente.obtenerNumeroDeAsientos(); this.boletosVendidos += cliente.obtenerNumeroDeAsientos(); this.clientesAtendidos++; System.out.println("=================================================================="); System.out.println("Atiende: " + this.nombre); System.out.println("Vendiendo boleto a: " + cliente.nombre); System.out.println("Numero de boletos adquiridos: " + cliente.obtenerNumeroDeAsientos()); System.out.println("Sala: " + s.obtenerNombre() + " (" + s.obtenerAsientosDisponibles() + "/" + s.obtenerCapacidadMaxima() + ")" ); System.out.println("Pelicula: " + s.obtenerPelicula()); System.out.println("Asientos: " + cliente.asientosToString()); System.out.println("Total a pagar: " + moneda(CinemaUDG.PRECIO_BOLETO * cliente.obtenerNumeroDeAsientos())); this.ocupado = false; } else { System.out.println("=================================================================="); System.out.println(" - CLIENTE FUERA DE SALA -"); System.out.println("El cliente " + cliente.obtenerNombre() + " se ha quedado con " + cliente.obtenerNumeroDeAsientos() + " boletos sin atender."); System.out.println("Esto debido a que el Cinema se ha quedado sin salas disponibles."); System.out.println("=================================================================="); } } } } public Sala obtenerSala() { List<Sala> salasDisponibles = new ArrayList<>(); CinemaUDG.obtenerSalas().stream().filter((s) -> (s.hayAsientosDisponibles())).forEachOrdered((s) -> { salasDisponibles.add(s); }); if(salasDisponibles.isEmpty()) return null; return salasDisponibles.get(((int) (Math.random() * salasDisponibles.size()))); } private static String moneda(double valor) { Locale locale = new Locale("es", "MX"); NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance(locale); return currencyFormatter.format(valor); } }
[ "j.magallon@oohmd.com" ]
j.magallon@oohmd.com
5cea02ef9000ab0a826582eaeab56da10d25f04b
7fc4a7cf96045784aae088ffc08c0288f98a3754
/office/src/main/java/jp/kenichi/jna/tlb/office/IRibbonUI.java
708627a4acf0204aff5350ae6b2b665bb2d5c879
[ "MIT" ]
permissive
ken1ma/jna-tlb-access-2010
afaa6d1612de43bfa0709f1af16789ab2647ce29
b469b2f15b5f3f17d05d578a25e3a8211b05a83b
refs/heads/master
2020-03-13T18:57:11.724825
2018-04-27T05:11:56
2018-05-01T07:55:02
131,245,017
1
0
null
null
null
null
UTF-8
Java
false
false
1,990
java
package jp.kenichi.jna.tlb.office; import com.sun.jna.platform.win32.COM.util.annotation.ComInterface; import com.sun.jna.platform.win32.COM.util.annotation.ComMethod; import com.sun.jna.platform.win32.COM.util.annotation.ComProperty; import com.sun.jna.platform.win32.COM.util.IDispatch; import com.sun.jna.platform.win32.COM.util.IUnknown; import com.sun.jna.platform.win32.COM.util.IRawDispatchHandle; import com.sun.jna.platform.win32.Variant.VARIANT; /** * <p>uuid({000C03A7-0000-0000-C000-000000000046})</p> */ @ComInterface(iid="{000C03A7-0000-0000-C000-000000000046}") public interface IRibbonUI extends IUnknown, IRawDispatchHandle, IDispatch { /** * <p>id(0x1)</p> * <p>vtableId(7)</p> */ @ComMethod(name = "Invalidate", dispId = 0x1) void Invalidate(); /** * <p>id(0x2)</p> * <p>vtableId(8)</p> * @param ControlID [in] {@code String} */ @ComMethod(name = "InvalidateControl", dispId = 0x2) void InvalidateControl(String ControlID); /** * <p>id(0x3)</p> * <p>vtableId(9)</p> * @param ControlID [in] {@code String} */ @ComMethod(name = "InvalidateControlMso", dispId = 0x3) void InvalidateControlMso(String ControlID); /** * <p>id(0x4)</p> * <p>vtableId(10)</p> * @param ControlID [in] {@code String} */ @ComMethod(name = "ActivateTab", dispId = 0x4) void ActivateTab(String ControlID); /** * <p>id(0x5)</p> * <p>vtableId(11)</p> * @param ControlID [in] {@code String} */ @ComMethod(name = "ActivateTabMso", dispId = 0x5) void ActivateTabMso(String ControlID); /** * <p>id(0x6)</p> * <p>vtableId(12)</p> * @param ControlID [in] {@code String} * @param Namespace [in] {@code String} */ @ComMethod(name = "ActivateTabQ", dispId = 0x6) void ActivateTabQ(String ControlID, String Namespace); }
[ "" ]
1469f981166ace04ff78e74129178b701176234c
dcf1066d2bc2688e00ea7c9e7bbdd676d44b9c9e
/src/LRUCache.java
ddb4c8b15e5ea497c1fef94b04cda2d70399cc96
[]
no_license
manvigupta1987/java_programming
dd1ffbbecb3067981c98a0ccef5365a45a5901fa
8aafa9e838392719554e8ff9cffe20f1a63c5be9
refs/heads/main
2023-06-18T17:59:56.087098
2021-07-06T08:07:55
2021-07-06T08:07:55
323,863,429
0
0
null
null
null
null
UTF-8
Java
false
false
3,354
java
// LRU cache is used to store the most frequently used value at the front and // least frequently used value at the end of the cache. Also, this cache is restricted to the // capacity mentioned by the user. If more values need to be added in the cache, the Least // frequently used values need to be removed. // To achieve the fast lookups, we can use HashMap and for fast removals, we can use Doubly linked list. // We can design the LRU using the Double linked list and Hashmap of node. // HashMap is good as get and put method in hashMap can be done in constant time. // When we access or add any node, its considered as the most frequently used node. Hence it // has to be moved or add to the front of the cache. To acheive this functionality, we are using // double linked list. // DLL allows to add and remove the nodes in the constant time. import java.util.HashMap; public class LRUCache { Node head = new Node(); // head is just an dummy node and doesnt contain any value. Node tail = new Node(); // tail is just an dummy node and doesnt contain any value. HashMap<Integer, Node> hashMap; int cache_capacity; public LRUCache(int capacity) { hashMap = new HashMap<>(capacity); this.cache_capacity = capacity; head.next = tail; tail.prev = head; } public int get(int key) { int result = -1; Node node = hashMap.get(key); if (node != null) { remove(node); add(node); return node.val; } return result; } public void put(int key, int value) { Node node = hashMap.get(key); if(node != null) { remove(node); node.val = value; add(node); } else { if (hashMap.size() == this.cache_capacity) { hashMap.remove(tail.prev.key); remove(tail.prev); } Node new_node = new Node(); new_node.key = key; new_node.val = value; add(new_node); hashMap.put(key, new_node); } } /** * This method adds the node to the front of the linked list as it is considered as most * frequently used node. * @param node : to add the node in the linked list */ private void add(Node node) { Node head_next = head.next; head.next = node; node.prev = head; head_next.prev = node; node.next = head_next; } private void remove(Node node) { Node prev_node = node.prev; Node next_node = node.next; prev_node.next = next_node; next_node.prev = prev_node; } class Node { int val; int key; Node prev; Node next; } public static void main(String[] args) { LRUCache lRUCache = new LRUCache(2); lRUCache.put(1, 1); // cache is {1=1} lRUCache.put(2, 2); // cache is {1=1, 2=2} lRUCache.get(1); // return 1 lRUCache.put(3, 3); // LRU key was 2, evicts key 2, cache is {1=1, 3=3} lRUCache.get(2); // returns -1 (not found) lRUCache.put(4, 4); // LRU key was 1, evicts key 1, cache is {4=4, 3=3} lRUCache.get(1); // return -1 (not found) lRUCache.get(3); // return 3 lRUCache.get(4); // return 4 } }
[ "manvigupta1987@gmail.com" ]
manvigupta1987@gmail.com
6433effb883b8ce02482b66ff451ddc9422a7a2f
b550eadeb89d460d65eb2e97afb099ba33d4a72a
/src/main/java/ex2/common/ProtocolType.java
fb86c2b0d6605cf7ef087a2785986f129ce91724
[]
no_license
guidou44/tp3-cryptography
98e093244c276ebfdb9b140f1f9d3b5fa30f9c47
60ba16d6d9ed3b66513065103a10fd3e5dd26ec4
refs/heads/main
2023-02-04T02:42:13.632706
2020-12-17T02:58:01
2020-12-17T02:58:01
316,150,133
0
0
null
null
null
null
UTF-8
Java
false
false
1,194
java
package ex2.common; import ex2.domain.exceptions.InvalidChoiceException; /* * Enum qui contient les choix de protocole pour le premier menu quand le programme est lancé * */ public enum ProtocolType implements ConsoleChoice { HTTP_DIGEST(1, "HTTP-Digest"), WEB_AUTH(2, "WebAuth"), NONE(3, "Quitter"); private String name; private int entryNumber; ProtocolType(int entryNumber, String name) { this.entryNumber = entryNumber; this.name = name; } public int getEntryNUmber() { return this.entryNumber; } public String getName() { return this.name; } public void print() { System.out.println(getEntryNUmber() + " : " + getName()); } /* * Fonction qu permet d'obtenir le protocole choisis à partir du numéro entré à la console. * */ public static ProtocolType from(int number) { for (ProtocolType protocolType : ProtocolType.values()) { if (protocolType.getEntryNUmber() == number) { return protocolType; } } throw new InvalidChoiceException(String.format("no protocol correspond to choice: %d", number)); } }
[ "guidou06@gmail.com" ]
guidou06@gmail.com
9734278cdf17a714b531bb70e80b7ca3c4ab4ba1
cb2f0d8a5ae1422c67a84c4b9e268f6ec03cab10
/ControleMultimidiaUniversal/src/com/embedded/controlemultimidiauniversal/ControlFragment.java
1bd42e78ffa87da5ae1f031c98c8ae8703399a93
[ "Apache-2.0" ]
permissive
felipelindemberg/ControleMultimidiaUniversal
dedd735850784f4675237b934ada4427b8208af4
491487411bc63db497943fac78b810ac7e37ef44
refs/heads/master
2021-01-17T13:21:04.704372
2013-11-25T13:44:56
2013-11-25T13:44:56
14,026,212
1
0
null
null
null
null
UTF-8
Java
false
false
4,662
java
package com.embedded.controlemultimidiauniversal; import java.util.HashMap; import java.util.Map; import android.app.Fragment; import android.content.Context; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.RadioGroup; import android.widget.RadioGroup.OnCheckedChangeListener; import com.embedded.controlemultimidiauniversal.net.Command; import com.embedded.controlemultimidiauniversal.net.HttpSenderTask; import com.embedded.controlemultimidiauniversal.net.SearchResidence; public class ControlFragment extends Fragment { private Equipment equipment = Equipment.TV; private String address; private String nameRoom = "Teste"; private MainActivity mainActivity; public ControlFragment(MainActivity mainActivity) { this.mainActivity = mainActivity; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.control, container, false); createRadioGroupEvent(view); createButtonsEvent(view); callSearchResidence(); return view; } public void callSearchResidence() { ApplicationManager applicationManager = new ApplicationManager() { @Override public Context getContext() { return mainActivity; } @Override public void closeApplication() { mainActivity.finish(); } }; SetableAddressRoom setableAddressRoom = new SetableAddressRoom() { @Override public void onAddressDiscovery(String addressRoom) { address = addressRoom; } }; SearchResidence searchResidence = new SearchResidence( setableAddressRoom, applicationManager); searchResidence.execute(); } private void createRadioGroupEvent(View view) { RadioGroup equipmentGroup = (RadioGroup) view .findViewById(R.id.radioGroupEquipments); equipmentGroup .setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { switch (group.getCheckedRadioButtonId()) { case R.id.radioButtonTv: equipment = Equipment.TV; break; case R.id.radioButtonSom: equipment = Equipment.SOM; break; } if (MainActivity.D) Log.d(getClass().getSimpleName(), "Equipamento alterado: " + equipment.toString()); } }); } private void createButtonsEvent(View view) { ImageButton btn_power = (ImageButton) view .findViewById(R.id.buttonPower); btn_power.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { sendCommand(Command.POWER); } }); ImageButton btn_upChannel = (ImageButton) view .findViewById(R.id.buttonUpChannel); btn_upChannel.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { sendCommand(Command.UP_CHANNEL); } }); ImageButton btn_doButtonChannel = (ImageButton) view .findViewById(R.id.buttonDownChannel); btn_doButtonChannel.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { sendCommand(Command.DOWN_CHANNEL); } }); ImageButton btn_upVolume = (ImageButton) view .findViewById(R.id.buttonUpVolume); btn_upVolume.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { sendCommand(Command.UP_VOLUME); } }); ImageButton btn_downButton = (ImageButton) view .findViewById(R.id.buttonDownVolume); btn_downButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { sendCommand(Command.DOWN_VOLUME); } }); ImageButton btn_mute = (ImageButton) view.findViewById(R.id.buttonMute); btn_mute.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { sendCommand(Command.MUTE); } }); } private void sendCommand(Command command) { Map<String, String> params = new HashMap<String, String>(); String url; Log.i("Info", address + " " + command.toString() + " " + nameRoom + " " + equipment); params.put("address", address); params.put("path", "sendCommand"); params.put("command", command.toString()); params.put("nameRoom", nameRoom); url = HttpSenderTask.createURL(params, nameRoom, equipment, command); new HttpSenderTask().execute("post", url); } }
[ "felipe.miranda.mdrs@gmail.com" ]
felipe.miranda.mdrs@gmail.com
7548a6f1e79d7427b62d17663a6a293a8124390c
146a30bee123722b5b32c0022c280bbe7d9b6850
/depsWorkSpace/bc-java-master/prov/src/main/java/org/mightyfish/jcajce/provider/symmetric/DES.java
3086c165feb3fd04e5064fefc9d78628872ad615
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
GLC-Project/java-experiment
1d5aa7b9974c8ae572970ce6a8280e6a65417837
b03b224b8d5028dd578ca0e7df85d7d09a26688e
refs/heads/master
2020-12-23T23:47:57.341646
2016-02-13T16:20:45
2016-02-13T16:20:45
237,313,620
0
1
null
2020-01-30T21:56:54
2020-01-30T21:56:53
null
UTF-8
Java
false
false
16,390
java
package org.mightyfish.jcajce.provider.symmetric; import java.security.AlgorithmParameters; import java.security.InvalidAlgorithmParameterException; import java.security.SecureRandom; import java.security.spec.AlgorithmParameterSpec; import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; import javax.crypto.SecretKey; import javax.crypto.spec.DESKeySpec; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.SecretKeySpec; import org.mightyfish.asn1.ASN1ObjectIdentifier; import org.mightyfish.asn1.oiw.OIWObjectIdentifiers; import org.mightyfish.asn1.pkcs.PKCSObjectIdentifiers; import org.mightyfish.crypto.CipherParameters; import org.mightyfish.crypto.KeyGenerationParameters; import org.mightyfish.crypto.engines.DESEngine; import org.mightyfish.crypto.engines.RFC3211WrapEngine; import org.mightyfish.crypto.generators.DESKeyGenerator; import org.mightyfish.crypto.macs.CBCBlockCipherMac; import org.mightyfish.crypto.macs.CFBBlockCipherMac; import org.mightyfish.crypto.macs.CMac; import org.mightyfish.crypto.macs.ISO9797Alg3Mac; import org.mightyfish.crypto.modes.CBCBlockCipher; import org.mightyfish.crypto.paddings.ISO7816d4Padding; import org.mightyfish.crypto.params.DESParameters; import org.mightyfish.crypto.params.KeyParameter; import org.mightyfish.crypto.params.ParametersWithIV; import org.mightyfish.jcajce.provider.config.ConfigurableProvider; import org.mightyfish.jcajce.provider.symmetric.util.BCPBEKey; import org.mightyfish.jcajce.provider.symmetric.util.BaseAlgorithmParameterGenerator; import org.mightyfish.jcajce.provider.symmetric.util.BaseBlockCipher; import org.mightyfish.jcajce.provider.symmetric.util.BaseKeyGenerator; import org.mightyfish.jcajce.provider.symmetric.util.BaseMac; import org.mightyfish.jcajce.provider.symmetric.util.BaseSecretKeyFactory; import org.mightyfish.jcajce.provider.symmetric.util.BaseWrapCipher; import org.mightyfish.jcajce.provider.symmetric.util.PBE; import org.mightyfish.jcajce.provider.util.AlgorithmProvider; import org.mightyfish.jce.provider.BouncyCastleProvider; public final class DES { private DES() { } static public class ECB extends BaseBlockCipher { public ECB() { super(new DESEngine()); } } static public class CBC extends BaseBlockCipher { public CBC() { super(new CBCBlockCipher(new DESEngine()), 64); } } /** * DES CFB8 */ public static class DESCFB8 extends BaseMac { public DESCFB8() { super(new CFBBlockCipherMac(new DESEngine())); } } /** * DES64 */ public static class DES64 extends BaseMac { public DES64() { super(new CBCBlockCipherMac(new DESEngine(), 64)); } } /** * DES64with7816-4Padding */ public static class DES64with7816d4 extends BaseMac { public DES64with7816d4() { super(new CBCBlockCipherMac(new DESEngine(), 64, new ISO7816d4Padding())); } } public static class CBCMAC extends BaseMac { public CBCMAC() { super(new CBCBlockCipherMac(new DESEngine())); } } static public class CMAC extends BaseMac { public CMAC() { super(new CMac(new DESEngine())); } } /** * DES9797Alg3with7816-4Padding */ public static class DES9797Alg3with7816d4 extends BaseMac { public DES9797Alg3with7816d4() { super(new ISO9797Alg3Mac(new DESEngine(), new ISO7816d4Padding())); } } /** * DES9797Alg3 */ public static class DES9797Alg3 extends BaseMac { public DES9797Alg3() { super(new ISO9797Alg3Mac(new DESEngine())); } } public static class RFC3211 extends BaseWrapCipher { public RFC3211() { super(new RFC3211WrapEngine(new DESEngine()), 8); } } public static class AlgParamGen extends BaseAlgorithmParameterGenerator { protected void engineInit( AlgorithmParameterSpec genParamSpec, SecureRandom random) throws InvalidAlgorithmParameterException { throw new InvalidAlgorithmParameterException("No supported AlgorithmParameterSpec for DES parameter generation."); } protected AlgorithmParameters engineGenerateParameters() { byte[] iv = new byte[8]; if (random == null) { random = new SecureRandom(); } random.nextBytes(iv); AlgorithmParameters params; try { params = AlgorithmParameters.getInstance("DES", BouncyCastleProvider.PROVIDER_NAME); params.init(new IvParameterSpec(iv)); } catch (Exception e) { throw new RuntimeException(e.getMessage()); } return params; } } /** * DES - the default for this is to generate a key in * a-b-a format that's 24 bytes long but has 16 bytes of * key material (the first 8 bytes is repeated as the last * 8 bytes). If you give it a size, you'll get just what you * asked for. */ public static class KeyGenerator extends BaseKeyGenerator { public KeyGenerator() { super("DES", 64, new DESKeyGenerator()); } protected void engineInit( int keySize, SecureRandom random) { super.engineInit(keySize, random); } protected SecretKey engineGenerateKey() { if (uninitialised) { engine.init(new KeyGenerationParameters(new SecureRandom(), defaultKeySize)); uninitialised = false; } return new SecretKeySpec(engine.generateKey(), algName); } } static public class KeyFactory extends BaseSecretKeyFactory { public KeyFactory() { super("DES", null); } protected KeySpec engineGetKeySpec( SecretKey key, Class keySpec) throws InvalidKeySpecException { if (keySpec == null) { throw new InvalidKeySpecException("keySpec parameter is null"); } if (key == null) { throw new InvalidKeySpecException("key parameter is null"); } if (SecretKeySpec.class.isAssignableFrom(keySpec)) { return new SecretKeySpec(key.getEncoded(), algName); } else if (DESKeySpec.class.isAssignableFrom(keySpec)) { byte[] bytes = key.getEncoded(); try { return new DESKeySpec(bytes); } catch (Exception e) { throw new InvalidKeySpecException(e.toString()); } } throw new InvalidKeySpecException("Invalid KeySpec"); } protected SecretKey engineGenerateSecret( KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DESKeySpec) { DESKeySpec desKeySpec = (DESKeySpec)keySpec; return new SecretKeySpec(desKeySpec.getKey(), "DES"); } return super.engineGenerateSecret(keySpec); } } static public class DESPBEKeyFactory extends BaseSecretKeyFactory { private boolean forCipher; private int scheme; private int digest; private int keySize; private int ivSize; public DESPBEKeyFactory( String algorithm, ASN1ObjectIdentifier oid, boolean forCipher, int scheme, int digest, int keySize, int ivSize) { super(algorithm, oid); this.forCipher = forCipher; this.scheme = scheme; this.digest = digest; this.keySize = keySize; this.ivSize = ivSize; } protected SecretKey engineGenerateSecret( KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof PBEKeySpec) { PBEKeySpec pbeSpec = (PBEKeySpec)keySpec; CipherParameters param; if (pbeSpec.getSalt() == null) { return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, null); } if (forCipher) { param = PBE.Util.makePBEParameters(pbeSpec, scheme, digest, keySize, ivSize); } else { param = PBE.Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); } KeyParameter kParam; if (param instanceof ParametersWithIV) { kParam = (KeyParameter)((ParametersWithIV)param).getParameters(); } else { kParam = (KeyParameter)param; } DESParameters.setOddParity(kParam.getKey()); return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); } throw new InvalidKeySpecException("Invalid KeySpec"); } } /** * PBEWithMD2AndDES */ static public class PBEWithMD2KeyFactory extends DESPBEKeyFactory { public PBEWithMD2KeyFactory() { super("PBEwithMD2andDES", PKCSObjectIdentifiers.pbeWithMD2AndDES_CBC, true, PKCS5S1, MD2, 64, 64); } } /** * PBEWithMD5AndDES */ static public class PBEWithMD5KeyFactory extends DESPBEKeyFactory { public PBEWithMD5KeyFactory() { super("PBEwithMD5andDES", PKCSObjectIdentifiers.pbeWithMD5AndDES_CBC, true, PKCS5S1, MD5, 64, 64); } } /** * PBEWithSHA1AndDES */ static public class PBEWithSHA1KeyFactory extends DESPBEKeyFactory { public PBEWithSHA1KeyFactory() { super("PBEwithSHA1andDES", PKCSObjectIdentifiers.pbeWithSHA1AndDES_CBC, true, PKCS5S1, SHA1, 64, 64); } } /** * PBEWithMD2AndDES */ static public class PBEWithMD2 extends BaseBlockCipher { public PBEWithMD2() { super(new CBCBlockCipher(new DESEngine())); } } /** * PBEWithMD5AndDES */ static public class PBEWithMD5 extends BaseBlockCipher { public PBEWithMD5() { super(new CBCBlockCipher(new DESEngine())); } } /** * PBEWithSHA1AndDES */ static public class PBEWithSHA1 extends BaseBlockCipher { public PBEWithSHA1() { super(new CBCBlockCipher(new DESEngine())); } } public static class Mappings extends AlgorithmProvider { private static final String PREFIX = DES.class.getName(); private static final String PACKAGE = "org.mightyfish.jcajce.provider.symmetric"; // JDK 1.2 public Mappings() { } public void configure(ConfigurableProvider provider) { provider.addAlgorithm("Cipher.DES", PREFIX + "$ECB"); provider.addAlgorithm("Cipher." + OIWObjectIdentifiers.desCBC, PREFIX + "$CBC"); addAlias(provider, OIWObjectIdentifiers.desCBC, "DES"); provider.addAlgorithm("Cipher.DESRFC3211WRAP", PREFIX + "$RFC3211"); provider.addAlgorithm("KeyGenerator.DES", PREFIX + "$KeyGenerator"); provider.addAlgorithm("SecretKeyFactory.DES", PREFIX + "$KeyFactory"); provider.addAlgorithm("Mac.DESCMAC", PREFIX + "$CMAC"); provider.addAlgorithm("Mac.DESMAC", PREFIX + "$CBCMAC"); provider.addAlgorithm("Alg.Alias.Mac.DES", "DESMAC"); provider.addAlgorithm("Mac.DESMAC/CFB8", PREFIX + "$DESCFB8"); provider.addAlgorithm("Alg.Alias.Mac.DES/CFB8", "DESMAC/CFB8"); provider.addAlgorithm("Mac.DESMAC64", PREFIX + "$DES64"); provider.addAlgorithm("Alg.Alias.Mac.DES64", "DESMAC64"); provider.addAlgorithm("Mac.DESMAC64WITHISO7816-4PADDING", PREFIX + "$DES64with7816d4"); provider.addAlgorithm("Alg.Alias.Mac.DES64WITHISO7816-4PADDING", "DESMAC64WITHISO7816-4PADDING"); provider.addAlgorithm("Alg.Alias.Mac.DESISO9797ALG1MACWITHISO7816-4PADDING", "DESMAC64WITHISO7816-4PADDING"); provider.addAlgorithm("Alg.Alias.Mac.DESISO9797ALG1WITHISO7816-4PADDING", "DESMAC64WITHISO7816-4PADDING"); provider.addAlgorithm("Mac.DESWITHISO9797", PREFIX + "$DES9797Alg3"); provider.addAlgorithm("Alg.Alias.Mac.DESISO9797MAC", "DESWITHISO9797"); provider.addAlgorithm("Mac.ISO9797ALG3MAC", PREFIX + "$DES9797Alg3"); provider.addAlgorithm("Alg.Alias.Mac.ISO9797ALG3", "ISO9797ALG3MAC"); provider.addAlgorithm("Mac.ISO9797ALG3WITHISO7816-4PADDING", PREFIX + "$DES9797Alg3with7816d4"); provider.addAlgorithm("Alg.Alias.Mac.ISO9797ALG3MACWITHISO7816-4PADDING", "ISO9797ALG3WITHISO7816-4PADDING"); provider.addAlgorithm("AlgorithmParameters.DES", PACKAGE + ".util.IvAlgorithmParameters"); provider.addAlgorithm("Alg.Alias.AlgorithmParameters." + OIWObjectIdentifiers.desCBC, "DES"); provider.addAlgorithm("AlgorithmParameterGenerator.DES", PREFIX + "$AlgParamGen"); provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator." + OIWObjectIdentifiers.desCBC, "DES"); provider.addAlgorithm("Cipher.PBEWITHMD2ANDDES", PREFIX + "$PBEWithMD2"); provider.addAlgorithm("Cipher.PBEWITHMD5ANDDES", PREFIX + "$PBEWithMD5"); provider.addAlgorithm("Cipher.PBEWITHSHA1ANDDES", PREFIX + "$PBEWithSHA1"); provider.addAlgorithm("Alg.Alias.Cipher." + PKCSObjectIdentifiers.pbeWithMD2AndDES_CBC, "PBEWITHMD2ANDDES"); provider.addAlgorithm("Alg.Alias.Cipher." + PKCSObjectIdentifiers.pbeWithMD5AndDES_CBC, "PBEWITHMD5ANDDES"); provider.addAlgorithm("Alg.Alias.Cipher." + PKCSObjectIdentifiers.pbeWithSHA1AndDES_CBC, "PBEWITHSHA1ANDDES"); provider.addAlgorithm("SecretKeyFactory.PBEWITHMD2ANDDES", PREFIX + "$PBEWithMD2KeyFactory"); provider.addAlgorithm("SecretKeyFactory.PBEWITHMD5ANDDES", PREFIX + "$PBEWithMD5KeyFactory"); provider.addAlgorithm("SecretKeyFactory.PBEWITHSHA1ANDDES", PREFIX + "$PBEWithSHA1KeyFactory"); provider.addAlgorithm("Alg.Alias.SecretKeyFactory.PBEWITHMD2ANDDES-CBC", "PBEWITHMD2ANDDES"); provider.addAlgorithm("Alg.Alias.SecretKeyFactory.PBEWITHMD5ANDDES-CBC", "PBEWITHMD5ANDDES"); provider.addAlgorithm("Alg.Alias.SecretKeyFactory.PBEWITHSHA1ANDDES-CBC", "PBEWITHSHA1ANDDES"); provider.addAlgorithm("Alg.Alias.SecretKeyFactory." + PKCSObjectIdentifiers.pbeWithMD2AndDES_CBC, "PBEWITHMD2ANDDES"); provider.addAlgorithm("Alg.Alias.SecretKeyFactory." + PKCSObjectIdentifiers.pbeWithMD5AndDES_CBC, "PBEWITHMD5ANDDES"); provider.addAlgorithm("Alg.Alias.SecretKeyFactory." + PKCSObjectIdentifiers.pbeWithSHA1AndDES_CBC, "PBEWITHSHA1ANDDES"); } private void addAlias(ConfigurableProvider provider, ASN1ObjectIdentifier oid, String name) { provider.addAlgorithm("Alg.Alias.KeyGenerator." + oid.getId(), name); provider.addAlgorithm("Alg.Alias.KeyFactory." + oid.getId(), name); } } }
[ "a.eslampanah@live.com" ]
a.eslampanah@live.com
b7e52eb63564d2f30bdbd4535d3ea9e6de7c0105
dd180ad7d21bffe41227d81acbc63aa64b4cd1c9
/algorithm_study/algorithm/Chapter01_Prac/Q3.java
ab58797cfc066cdc90f698614978c2370089a066
[]
no_license
nari-52/algorithm_study
49a48c0ed75e864c3b2adb0c3b4e36d3f15babf5
3fc36f957620f9e66020090615b5f27a2c438258
refs/heads/master
2022-12-28T03:52:58.183303
2020-09-28T14:20:10
2020-09-28T14:20:10
292,556,142
0
0
null
null
null
null
UTF-8
Java
false
false
46
java
package Chapter01_Prac; public class Q3 { }
[ "60787793+nari-52@users.noreply.github.com" ]
60787793+nari-52@users.noreply.github.com
ad87bef616774b165a531ee045a955121858a593
7a434423e32fa235f121fc1e26003bacd8d0e7c8
/src/test/java/dds_ordenes_de_trabajo/tp/PersistenceTest.java
cfdf600bab1b6bb0f5d02eefb5afb26dd1765210
[]
no_license
estefimw/dds-tp-individual
5912e4a66deba522e5576e5153c7d1bf35845a21
dfb24d1b1fc7f03b1db429784e48b71056aca697
refs/heads/master
2021-01-11T10:07:08.478629
2016-11-03T18:48:49
2016-11-03T18:48:49
72,774,436
0
0
null
null
null
null
UTF-8
Java
false
false
3,460
java
package dds_ordenes_de_trabajo.tp; import org.uqbarproject.jpa.java8.extras.WithGlobalEntityManager; import org.uqbarproject.jpa.java8.extras.test.AbstractPersistenceTest; import dds_ordenes_de_trabajo.Persistence; import dds_ordenes_de_trabajo.cliente; import dds_ordenes_de_trabajo.ordenDeTrabajo; import dds_ordenes_de_trabajo.usoRepuesto; import dds_ordenes_de_trabajo.repuesto; import java.util.List; import org.junit.Assert; import org.junit.Test; public class PersistenceTest extends AbstractPersistenceTest implements WithGlobalEntityManager{ @Test public void testPersistirOrdenDeTrabajo(){ cliente cliente =new cliente("Estefi","Imw",1523880); ordenDeTrabajo orden = new ordenDeTrabajo(cliente); repuesto mesa = new repuesto(); usoRepuesto imputable =new usoRepuesto(500.0,"mesa", mesa); orden.agregarImputable(imputable); Persistence persist = new Persistence(); withTransaction(() -> { persist.agregarOrdenDeTrabajo(orden); entityManager().flush(); }); withTransaction(() -> { entityManager().clear(); List<ordenDeTrabajo> lista = persist.obtenerOrdenesDeTrabajo(); Assert.assertEquals(orden.getIdOrden(),lista.get(0).getIdOrden()); }); } @Test public void testFindOrdenDeTrabajo(){ cliente cliente =new cliente("Estefi","Imw",1523880); ordenDeTrabajo orden = new ordenDeTrabajo(cliente); repuesto mesa = new repuesto(); usoRepuesto imputable =new usoRepuesto(500.0,"mesa", mesa); orden.agregarImputable(imputable); Persistence persist = new Persistence(); withTransaction(() -> { persist.agregarOrdenDeTrabajo(orden); }); withTransaction(() -> { entityManager().clear(); ordenDeTrabajo ordenInstance = entityManager().find(orden.getClass(),orden.getIdOrden()); Assert.assertEquals(orden.getIdOrden(), ordenInstance.getIdOrden()); Assert.assertEquals(orden.getEstadoOrden(), ordenInstance.getEstadoOrden()); Assert.assertEquals(orden.getFechaOrden(), ordenInstance.getFechaOrden()); Assert.assertEquals(orden.getPrimerImputable().getId_imputable(), ordenInstance.getPrimerImputable().getId_imputable()); Assert.assertEquals(orden.getCliente().getIdCliente(), ordenInstance.getCliente().getIdCliente()); }); } @Test public void testPersistirRepuesto(){ repuesto mesa = new repuesto(2,"mesa"); withTransaction(() -> { entityManager().persist(mesa); entityManager().flush(); entityManager().clear(); }); withTransaction(()->{ repuesto mesa2 = entityManager().find(mesa.getClass(),mesa.getIdRepuesto()); Assert.assertEquals(mesa.getIdRepuesto(),mesa2.getIdRepuesto()); }); } @Test public void testPersistirUsoRepuesto(){ repuesto mesa = new repuesto(2,"mesa"); usoRepuesto imp= new usoRepuesto(2.0,"mesa", mesa); withTransaction(() -> { entityManager().persist(imp); entityManager().flush(); entityManager().clear(); }); withTransaction(() -> { usoRepuesto imp2= entityManager().find(imp.getClass(), imp.getId_imputable()); Assert.assertEquals(imp.getId_imputable(), imp2.getId_imputable()); }); } @Test public void testPersistirCliente(){ cliente cliente =new cliente("Estefi","Imw",1523880); withTransaction(() -> { entityManager().persist(cliente); entityManager().flush(); entityManager().clear(); }); withTransaction(() -> { cliente cliente2= entityManager().find(cliente.getClass(), cliente.getIdCliente()); Assert.assertEquals(cliente.getIdCliente(), cliente2.getIdCliente()); }); } }
[ "estefi.im@hotmail.com" ]
estefi.im@hotmail.com
3344d75a5f830085507ae8e94c8b0b760ec87384
bb7f5ad769bb60e6426e53d35508d98f65381a34
/template_sfh/java/${basepackage_dir}/service/impl/${className}ServiceImpl.java
d731196b4924ea5aa9d50378aed235a782ec2bc1
[]
no_license
chenxh3799/SF_Template
3fd5789ad941ce3619f3c66533c478a8b5379817
64ebf38195da374a6fd4d80401f47b98121aa785
refs/heads/master
2020-03-09T05:32:37.961760
2018-04-08T08:11:02
2018-04-08T08:11:02
128,616,330
0
0
null
null
null
null
UTF-8
Java
false
false
2,949
java
<#include "/java_copyright.include"> <#include "/macro.include"> <#assign className = table.className> <#assign classNameLower = className?uncap_first> package ${basepackage}.service.impl; import java.util.Date; import java.util.HashMap; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.sinolife.sf.framework.page.DataPage; import com.sinolife.sf.framework.page.DataPageRequest; import ${basepackage}.domain.${className}; import ${basepackage}.orm.${className}Orm; import ${basepackage}.service.${className}Service; @Service("${classNameLower}Service") public class ${className}ServiceImpl implements ${className}Service{ @Autowired private ${className}Orm ${classNameLower}Orm; /** * 这里如果需要效验,自己注入Spring的效验上下文 */ public void add${className}(${className} entity) { //需要开发者在这里填写业务逻辑 ${classNameLower}Orm.save(entity); } public ${className} create${className}() { return new ${className}(); } /** * 分页查询,需要先使用buildDataPageRequest方法构造出查询语句 */ public DataPage<${className}> list(DataPageRequest request) { return ${classNameLower}Orm.list(request); } /** * 构造hibernate 查询过滤语句 */ public DataPageRequest buildDataPageRequest(DataPageRequest request, ${className} ${classNameLower}) { DataPageRequest req=request.clone(); StringBuffer sqlBuf=new StringBuffer(); HashMap paramters= new HashMap(); req.getOptions().put("paramters",paramters); //注意,这里只进行了简单的非空判断,开发时可以根据实际情况加强非空检查力度 <@generateFilters /> if(sqlBuf.length()>0) { req.getOptions().put("filter", sqlBuf.toString()); } return req; } public void update${className}(${className} entity) { //需要开发者在这里填写业务逻辑 ${classNameLower}Orm.update(entity); } /** * 根据主键查询 */ public ${className} get${className}ByPK(<@getPKDataType/> pk) { return ${classNameLower}Orm.getByPK(pk); } /** * 根据主键进行删除 */ public void remove${className}(<@getPKDataType/> pk) { ${classNameLower}Orm.removeByPK(pk); } } <#--构造hibernate查询过滤使用--> <#macro generateFilters> <#list table.columns as column> <#if (column.javaType =="java.lang.String")> if(${classNameLower}.get${column.columnName}()!=null && !"".equals(${classNameLower}.get${column.columnName}())) <#else> if(${classNameLower}.get${column.columnName}()!=null) </#if> { paramters.put("${column.columnNameLower}", ${classNameLower}.get${column.columnName}()); if(sqlBuf.length()>0) sqlBuf.append(" and "); sqlBuf.append(" ${column.columnNameLower}=:${column.columnNameLower}" ); } </#list> </#macro>
[ "294289064@qq.com" ]
294289064@qq.com
32c257c26671a969741a3d33b7df516a5ec4518e
99c1d9a06feb68b26516211d72dbc1b14a225f17
/nbReman/src/org/harley/reman/sistema/Educciones.java
76e1ec81e7316392cce2bd6b3fcde4ea9efc24a3
[]
no_license
aquila15/REMAN
5418e5f1bf19c4475187389210c6ba5910ff0735
771d36ceabc58fe21dbf8d8af74760db886708e4
refs/heads/master
2021-01-18T02:30:15.752143
2015-12-27T10:44:50
2015-12-27T10:44:50
48,641,073
0
0
null
2015-12-27T10:23:30
2015-12-27T10:23:30
null
UTF-8
Java
false
false
2,688
java
package org.harley.reman.sistema; import java.util.ArrayList; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @XmlRootElement(name = "educciones") @XmlType(propOrder = { "actual", "historicos", "versiones" }) public class Educciones { Educcion actual; ArrayList<Educcion> versiones; ArrayList<Historico> historicos; public Educciones() { this.versiones = new ArrayList<>(); this.historicos = new ArrayList<>(); } public Educcion getActual() { return actual; } public void setActual(Educcion actual) { this.actual = actual; } public ArrayList<Educcion> getVersiones() { return versiones; } @XmlElementWrapper(name = "versiones") @XmlElement(name = "version") public void setVersiones(ArrayList<Educcion> versiones) { this.versiones = versiones; } public ArrayList<Historico> getHistoricos() { return historicos; } @XmlElementWrapper(name = "historicos") @XmlElement(name = "historico") public void setHistoricos(ArrayList<Historico> historicos) { this.historicos = historicos; } public boolean isEmpty(){ return (this.historicos == null); } public void newEdu(Educcion edu){ String nomEdu = edu.eduNombre.getNombre(); addHistorico(edu, edu.eduFec, "Creación de la Educción " + nomEdu, edu.eduEspNom); addEduccion(edu); actual = edu; } public void modEdu(Educcion edu){ actual = edu; } public void verEdu(String verVer, String verFec, String verRazCam, String verEsp){ actual.setEduVer(verVer); addHistorico(actual, verFec, verRazCam, verEsp); addEduccion(actual); } public void addHistorico(Educcion edu, String fecha, String razon, String actor){ Historico hist = new Historico(edu.getEduVer(), fecha, razon, actor); historicos.add(hist); } public void addEduccion(Educcion edu){ versiones.add(edu); } public Educcion getVer(String ver){ for (Educcion version : versiones) { if (version.eduVer.equals(ver)) { return version; } } return null; } public Educcion getLast(){ Educcion last = versiones.get(versiones.size()-1); return last; } }
[ "glunaluza@gmail.com" ]
glunaluza@gmail.com
b159bee99ddada9fc39f58e8f0d9958eba246bee
6d55f68783a85cb911fb81931fd6b3f396304c6c
/src/object/Song.java
ad6c51a6a374a47768a1981ccb5e8a369000e984
[]
no_license
papaps/Beatify
39be9061efce525c11999f9e8447060e7ddfb970
8eb4d99bf22bcbd2347d79625d70f1b85508b8d8
refs/heads/master
2021-10-27T05:09:22.530353
2019-04-16T03:18:48
2019-04-16T03:18:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,802
java
package object; import java.io.File; import java.time.LocalDate; public class Song implements Searchable { private int song_id; private String song_name; private String genre; private LocalDate date_uploaded; private int album_id; private String album_name; private String artist_name; private int artist__id; private File song_URL; public int getSong_id() { return song_id; } public void setSong_id(int song_id) { this.song_id = song_id; } public String getSong_name() { return song_name; } public void setSong_name(String song_name) { this.song_name = song_name; } public String getGenre() { return genre; } public void setGenre(String genre) { this.genre = genre; } public LocalDate getDate_uploaded() { return date_uploaded; } public void setDate_uploaded(LocalDate date_uploaded) { this.date_uploaded = date_uploaded; } public int getAlbum_id() { return album_id; } public void setAlbum_id(int album_id) { this.album_id = album_id; } public String getAlbum_name() { return album_name; } public void setAlbum_name(String album_name) { this.album_name = album_name; } public String getArtist_name() { return artist_name; } public void setArtist_name(String artist_name) { this.artist_name = artist_name; } public int getArtist__id() { return artist__id; } public void setArtist__id(int artist__id) { this.artist__id = artist__id; } public File getSong_URL() { return song_URL; } public void setSong_URL(File song_URL) { this.song_URL = song_URL; } }
[ "gabtan99@gmail.com" ]
gabtan99@gmail.com
a85a12ec6e7aa4c55862c85086052fb343759e37
25270e51f37af34bb3b2b13e7a69153990f622c5
/eventhub-service-layer/src/test/java/org/eventhub/service/user/package-info.java
2fc8cfb42eccd92f5238137bd5612fe2fca85aa9
[]
no_license
AhmedEraky/EventHub
cc46578bd197f41874699212cb5bf9e6d151cba4
235da2304abadc03a8ee74c57e18fde6e4277673
refs/heads/master
2023-01-28T23:58:05.030671
2020-12-10T09:22:40
2020-12-10T09:22:40
187,353,552
1
0
null
null
null
null
UTF-8
Java
false
false
162
java
/** * Contains all test classes for user services * @author Ahmed Eraky * @author Mahmoud Shereif * @author Menna Ahmed */ package org.eventhub.service.user;
[ "mnet30@yahoo.com" ]
mnet30@yahoo.com
38e95edd74224c31b8fac88503d683f5f0a0c1f3
a360329c1572184e201090fd08ad6a88c66c913a
/src/main/java/com/example/source/item/response/PageDataResult.java
ece2d1ed427b4c3881a82bd24ffcd760854adf8a
[]
no_license
hutter-zhx/source-item-one
6760ceb2a8dd05e1d4c48c0e6189eb240b53185a
86b3cd0146e242ddd7179f5e6e15561e58385c4f
refs/heads/master
2022-03-03T18:47:29.260920
2020-02-19T12:35:11
2020-02-19T12:35:11
241,599,479
1
0
null
2021-04-22T17:04:37
2020-02-19T10:59:23
Java
UTF-8
Java
false
false
692
java
package com.example.source.item.response; import lombok.ToString; import java.util.List; /** * 封装分页数据 */ @ToString public class PageDataResult { private Integer code=200; private List<?> list; //总记录数量 内部用 private Integer totals; public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public List<?> getList() { return list; } public void setList(List<?> list) { this.list = list; } public Integer getTotals() { return totals; } public void setTotals(Integer totals) { this.totals = totals; } }
[ "1015910794@qq.com" ]
1015910794@qq.com
98a4ff6ac381d26eca84058ddb32e02286e800b2
04f5aeca43b5ce887992a883c401b87c797ee87a
/Java Intermedio/Ejercicio4/src/servidor/Principal.java
490dc178c456943e700c9ee7b888e50a8cf4213c
[]
no_license
maroxa86/MasterExes
daa19040e3fa1919b66aa01a693372c223111898
cdd3a600db04a1bb941a70a1738d7421ab0250c7
refs/heads/master
2021-01-11T11:15:16.943525
2018-04-01T11:54:50
2018-04-01T11:54:50
72,865,483
1
0
null
null
null
null
UTF-8
Java
false
false
216
java
package servidor; import java.io.IOException; public class Principal { public static void main(String[] args) throws IOException{ Servidor servidor = new Servidor(); servidor.startServidor(); } }
[ "maroxa86@gmail.com" ]
maroxa86@gmail.com
fad6693a7fd5b903e80ef740f291b602a3eddd0c
555b70eed21edd287020b73e40c49c62fbd3e1dc
/sacmi/src/main/java/br/com/mimilis/sacmi/fin/ref/TipoFinanceiro.java
baee0bba94267b7cfce67712b96801f40cf783ce
[]
no_license
PPShow/sacmi
96596521d026a4639a555709687a944af08a8119
ff1e0e651e7d820be4ef7c8e76a304d37dcdb03d
refs/heads/master
2021-09-05T15:57:41.377610
2018-01-29T13:42:44
2018-01-29T13:42:44
111,393,615
0
0
null
null
null
null
UTF-8
Java
false
false
1,177
java
package br.com.mimilis.sacmi.fin.ref; public enum TipoFinanceiro { RECEITA(1, 1, "Receita", 'R'), DESPESA(2, 1, "Despesa", 'D'); private Integer id; private Integer grupo; private String descricao; private Character valor; private TipoFinanceiro(Integer id, Integer grupo, String descricao, Character valor) { this.id = id; this.grupo = grupo; this.descricao = descricao; this.valor = valor; } public Integer id() { return id; } public Integer grupo() { return grupo; } public String descricao() { return descricao; } public Character valor() { return valor; } public static TipoFinanceiro recuperar(Integer id) { if(id == null) { return null; } for(TipoFinanceiro tf : TipoFinanceiro.values()) { if(tf.id.equals(id)) { return tf; } } throw new IllegalArgumentException("Id ["+id+"] não encontrado"); } public static TipoFinanceiro recuperar(Character valor) { if(valor == null) { return null; } for(TipoFinanceiro tf : TipoFinanceiro.values()) { if(tf.valor.equals(valor)) { return tf; } } throw new IllegalArgumentException("Valor '"+valor+"' não encontrado"); } }
[ "flamo_fui@hotmail.com" ]
flamo_fui@hotmail.com
f614c24c542ddd2e71c19b543dd140ed82355896
cc7936260b439d259d1dc5f07b5269b9501496f0
/src/main/java/com/jf/mydemo/mytest/ConsumeTest/Resource.java
c86c89d1f5fdf38dd175c9f75a55bed3fa400d19
[]
no_license
Monkey-D-Jie/MyTest
d392057eae39e8febe5917c542200d895f67b4bb
588d122cbea8f8dbfa893b78a9845c7aaf5f5fee
refs/heads/master
2020-03-19T07:22:19.263495
2019-06-19T01:54:51
2019-06-19T01:54:51
136,108,158
1
0
null
null
null
null
UTF-8
Java
false
false
4,823
java
package com.jf.mydemo.mytest.ConsumeTest; import com.jf.mydemo.mytest.ObjectTest.Serializable.User; import java.io.Serializable; import java.util.Date; /** * 资源 */ public class Resource implements Serializable { /** * 唯一标识 */ private String resourceId; /** * 资源文件类型,视频、图片、文本 */ private Integer resFileType; /** * 资源名称 */ private String resName; /** * 资源大小,单位K */ private Float resSize; /** * 文件的格式,未知、png、word、excel */ private String resFormat; /** * 上传用户id */ private String userId; /** * 云盘资源所在文件id */ private String folderId; /** * 上传时间(录播资源为空) */ private Date uplaodTime; /** * 上传成功状态,涉及转码可能要用到,待讨论 */ private Integer uploadStatus; /** * 是否为录播资源,0录播资源,1用户云盘上传资源 */ private Integer isRecordVideo; /** * 云存储文件id */ private String fileId; /** * 文本转码后pdf对应的文件id */ private String transcodeFileId; /** * 数据状态,A:正常;S:停用;D:删除 */ private String status; /** * 更新时间,时间戳,数据操作变化时间 */ private Date timestamp; /** * 发布人 */ private User publishUser; /** * 发布时间 */ private Date publishTime; /** * 发布描述 */ private String pubDesc; /** * 发布资源类型 */ private String pubType; public String getResourceId() { return resourceId; } public void setResourceId(String resourceId) { this.resourceId = resourceId; } public Integer getResFileType() { return resFileType; } public void setResFileType(Integer resFileType) { this.resFileType = resFileType; } public String getResName() { return resName; } public void setResName(String resName) { this.resName = resName; } public Float getResSize() { return resSize; } public void setResSize(Float resSize) { this.resSize = resSize; } public String getResFormat() { return resFormat; } public void setResFormat(String resFormat) { this.resFormat = resFormat; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public Date getUplaodTime() { return uplaodTime; } public void setUplaodTime(Date uplaodTime) { this.uplaodTime = uplaodTime; } public Integer getUploadStatus() { return uploadStatus; } public void setUploadStatus(Integer uploadStatus) { this.uploadStatus = uploadStatus; } public Integer getIsRecordVideo() { return isRecordVideo; } public void setIsRecordVideo(Integer isRecordVideo) { this.isRecordVideo = isRecordVideo; } public String getFileId() { return fileId; } public void setFileId(String fileId) { this.fileId = fileId; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public Date getTimestamp() { return timestamp; } public void setTimestamp(Date timestamp) { this.timestamp = timestamp; } public String getFolderId() { return folderId; } public void setFolderId(String folderId) { this.folderId = folderId; } public String getTranscodeFileId() { return transcodeFileId; } public void setTranscodeFileId(String transcodeFileId) { this.transcodeFileId = transcodeFileId; } public User getPublishUser() { return publishUser; } public void setPublishUser(User publishUser) { this.publishUser = publishUser; } public Date getPublishTime() { return publishTime; } public void setPublishTime(Date publishTime) { this.publishTime = publishTime; } public String getPubDesc() { return pubDesc; } public void setPubDesc(String pubDesc) { this.pubDesc = pubDesc; } public String getPubType() { return pubType; } public void setPubType(String pubType) { this.pubType = pubType; } @Override public String toString() { return "Resource{" + "resourceId='" + resourceId + '\'' + ", resName='" + resName + '\'' + '}'; } }
[ "liuyujunqi@163.com" ]
liuyujunqi@163.com
424ed0d3ceba901e554ce7e29570e88471e91855
a4e61f1fe2603b3a4ab29e6063134fac4d0bea25
/src/office66/GameOfLife.java
49896ee8c66b899a5a8b13f7932a2fc0d946b48c
[]
no_license
zsm625/LeetCode
45a9f1f9772142acb86b786e10c8302cbe2122ca
179aa8cec25bea03465e35599d2585d3180caefb
refs/heads/master
2023-07-24T03:27:31.878834
2023-07-18T09:39:52
2023-07-18T09:39:52
207,589,296
0
0
null
null
null
null
UTF-8
Java
false
false
3,357
java
package office66; /** * 细胞生存游戏 * 给定一个包含 m × n 个格子的面板,每一个格子都可以看成是一个细胞。 * 每个细胞都具有一个初始状态:1 即为活细胞(live),或 0 即为死细胞(dead)。 * 每个细胞与其八个相邻位置(水平,垂直,对角线)的细胞都遵循以下四条生存定律: * 如果活细胞周围八个位置的活细胞数少于两个,则该位置活细胞死亡; * 如果活细胞周围八个位置有两个或三个活细胞,则该位置活细胞仍然存活; * 如果活细胞周围八个位置有超过三个活细胞,则该位置活细胞死亡; * 如果死细胞周围正好有三个活细胞,则该位置死细胞复活; * @author ZSM * * @time 2020年4月2日上午11:37:52 */ public class GameOfLife { /** * 时间复杂度为O(mn) * 空间复杂度为O(mn) *@author ZSM * @param board */ public void gameOfLife(int[][] board) { if(board==null || board.length==0) { return ; } int[][] res = new int[board.length][board[0].length]; //将board数组复制到res数组中 for(int i=0;i<board.length;i++) { for(int j=0;j<board[i].length;j++) { res[i][j]=board[i][j]; } } int[] neighbor = {0,1,-1}; for(int i=0;i<res.length;i++) { for(int j=0;j<res[i].length;j++) { int liveLife = 0; //对当前格子的八个隔壁格子进行遍历 for(int r = 0;r<3;r++) { for(int c = 0;c<3;c++) { if(!(neighbor[r]==0 && neighbor[c]==0)) { int row = i+neighbor[r]; int col = j+neighbor[c]; if((row>=0 && row<res.length )&& (col>=0 && col<res[i].length) && res[row][col]==1 ) { liveLife++; } } } } //几种情况有 if(res[i][j]==1 && (liveLife <2 || liveLife>3)) { board[i][j] = 0; } if(res[i][j]==0 && (liveLife==3)) { board[i][j]=1; } } } } //试试用复合状态的,尝试将空间复杂度转为O(1) public void gameOfLife2(int[][] board) { if(board==null || board.length==0) { return; } int[] neighbor= {0,1,-1}; for(int row=0;row<board.length;row++) { for(int col=0;col<board[row].length;col++) { //遍历周围的八个格子 // if(board[row][col]==1) { for(int i=0;i<3;i++) { for(int j=0;j<3;j++) { if(!(neighbor[i]==0 && neighbor[j]==0)) { int r = row+neighbor[i]; int c = col+neighbor[j]; if((r>=0 && r<board.length )&& (c>=0 && c<board[row].length) && board[r][c]%10==1) { //保证原来的 board[row][col]+=10; } } } } // } } } //最后整理得到的结果 for(int r=0;r<board.length;r++) { for(int c=0;c<board[r].length;c++) { // board[r][c]/10 if(board[r][c]%10==1 ) { if(board[r][c]/10<2 || board[r][c]/10>3) { board[r][c]=0; }else { board[r][c]=1; } } if(board[r][c]%10==0) { if(board[r][c]/10==3) { board[r][c]=1; }else { board[r][c]=0; } } } } } public static void main(String[] args) { GameOfLife life = new GameOfLife(); int[][] board = {{0,1,0},{0,0,1},{1,1,1},{0,0,0}}; life.gameOfLife2(board); } }
[ "zhoushimin_625@163.com" ]
zhoushimin_625@163.com
b3ed74c605e7646785199fe344efa876e41d0b55
0900ec88ff61c3c7cced13a553c167da9ceb81ae
/JBiblePrototype/src/app/bible/ui/BibleUI.java
3d9c707fa36c50890afd746fc4206bdad29b9c65
[ "MIT" ]
permissive
pretizy/Jbible
00f7adde707a2c22543f71b444ad5572e471c2f4
78622a4d1fa3255644be728c08e426a772911799
refs/heads/master
2020-05-29T22:26:28.093896
2015-03-19T17:47:20
2015-03-19T17:47:20
31,784,338
2
0
null
null
null
null
UTF-8
Java
false
false
5,232
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 app.bible.ui; import controllers.ChapterController; import controllers.VerseController; import java.util.Iterator; import java.util.List; import java.util.Observable; import java.util.Observer; import models.BookModel; import models.ChapterModel; import models.VerseModel; /** * * @author root */ /*implement Observer so that the JTextArea can be updated when the Model changees using the observer pattern */ public class BibleUI extends javax.swing.JPanel { /** * Creates new form BibleUI */ public BibleUI() { /* instantiate variables of the model and Controller in the correct order that wont give a null pointer exception */ model = new ChapterModel(new BookModel(1, "old"), 1); initComponents(); vmodel = new VerseModel(1, jTextArea1, model); control = new ChapterController(books1.getList(), chapters1.getModel()); vcontrol = new VerseController(chapters1.getList(), vmodel); vmodel.setVerse(1); } /** * 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() { books1 = new app.bible.ui.Books(); chapters1 = new app.bible.ui.Chapters(model); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); setBackground(new java.awt.Color(153, 153, 0)); chapters1.setBackground(new java.awt.Color(204, 204, 255)); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); jButton1.setText("Settings"); jButton2.setText("Speaker"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(books1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(chapters1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton1) .addContainerGap()))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(books1, javax.swing.GroupLayout.DEFAULT_SIZE, 312, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jScrollPane1) .addComponent(chapters1, javax.swing.GroupLayout.DEFAULT_SIZE, 283, Short.MAX_VALUE))) ); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private app.bible.ui.Books books1; private app.bible.ui.Chapters chapters1; private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextArea jTextArea1; // End of variables declaration//GEN-END:variables //create extra variables private ChapterModel model; private ChapterController control; private VerseModel vmodel; private VerseController vcontrol; /*override method update of interface Observer in other to update the JTextArea with the updated model when notified by the model */ }
[ "pretizy@gmail.com" ]
pretizy@gmail.com
f7f0c675d76b953b14181f62413e0bf9cb9db012
cf108f86ae8bf47beed52e9a19456db867d2d3fa
/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/PasswordTextPropertyDescriptor.java
a3333aa0aecf3087c1d38e9b0247190aa139fe12
[ "Apache-2.0", "EPL-1.0" ]
permissive
KangZhiDong/DataToolsPlatform
7aaabe8bfe9b3540b12be991a7b7ea2e8193e1ee
76be044c0c2a413f09e1f00bf4a4ce08c52be070
refs/heads/master
2020-05-09T21:20:10.681385
2019-04-16T06:29:04
2019-04-16T06:29:04
181,438,269
1
0
Apache-2.0
2019-04-15T08:08:45
2019-04-15T07:49:46
null
UTF-8
Java
false
false
3,869
java
/******************************************************************************* * Copyright (c) 2005 Sybase, Inc. * * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: brianf - initial API and implementation ******************************************************************************/ package org.eclipse.datatools.connectivity.ui; import org.eclipse.datatools.connectivity.drivers.DriverInstance; import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.views.properties.TextPropertyDescriptor; /** * @author brianf * */ public class PasswordTextPropertyDescriptor extends TextPropertyDescriptor { private static String PASSWORD_PROP_ID = "org.eclipse.datatools.connectivity.db.password"; //$NON-NLS-1$ public PasswordTextPropertyDescriptor() { this(PASSWORD_PROP_ID, ConnectivityUIPlugin.getDefault().getResourceString("PasswordTextPropertyDescriptor.property.label")); //$NON-NLS-1$ } /** * @param id * @param displayName */ public PasswordTextPropertyDescriptor(Object id, String displayName) { super(id, displayName); this.setLabelProvider(new PasswordLabelProvider()); } /* (non-Javadoc) * @see org.eclipse.ui.views.properties.TextPropertyDescriptor#createPropertyEditor(org.eclipse.swt.widgets.Composite) */ public CellEditor createPropertyEditor(Composite parent) { CellEditor editor = new TextCellEditor(parent, SWT.PASSWORD); if (getValidator() != null) { editor.setValidator(getValidator()); } return editor; } /** * @author brianf * */ class PasswordLabelProvider implements ILabelProvider { /* (non-Javadoc) * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object) */ public Image getImage(Object element) { return null; } /* (non-Javadoc) * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object) */ public String getText(Object element) { if (element instanceof String) { String value = (String) element; if (value != null) { String mask = ""; //$NON-NLS-1$ for (int i = 0; i < value.length(); i++) { mask = mask + "*"; //$NON-NLS-1$ } return mask; } } else if (element instanceof DriverInstance) { DriverInstance di = (DriverInstance) element; String value = di.getNamedProperty("password"); //$NON-NLS-1$ if (value != null) { String mask = ""; //$NON-NLS-1$ for (int i = 0; i < value.length(); i++) { mask = mask + "*"; //$NON-NLS-1$ } return mask; } } return null; } /* (non-Javadoc) * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener) */ public void addListener(ILabelProviderListener listener) { } /* (non-Javadoc) * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() */ public void dispose() { } /* (non-Javadoc) * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String) */ public boolean isLabelProperty(Object element, String property) { return true; } /* (non-Javadoc) * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener) */ public void removeListener(ILabelProviderListener listener) { } } }
[ "kzd666@163.com" ]
kzd666@163.com
54fd10e07e38818ca38421fe21d9133551b70114
6e598d1af7857e72e26fdc7f198723f7665649c3
/src/com/sumames/sir/entity/Garage.java
91938cf4f9e889ed350233a7859dec0fbd2af7fe
[]
no_license
kirakatou/SIR
3dd95cda92d7f9ce18696aceba6619d64bf424e0
c89625735733387446ab5b8977e4460aee6482af
refs/heads/master
2021-01-12T17:24:09.435046
2016-11-19T19:02:50
2016-11-19T19:02:50
71,560,697
0
1
null
2016-10-30T10:41:29
2016-10-21T11:49:02
Java
UTF-8
Java
false
false
5,874
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.sumames.sir.entity; import java.io.Serializable; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author Asus */ @Entity @Table(name = "garage", catalog = "sir", schema = "") public class Garage implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "record_id") private Integer recordId; @Column(name = "name") private String name; @Column(name = "description") private String description; @Column(name = "record_version") private Integer recordVersion; @Column(name = "default_status") private Boolean defaultStatus; @Column(name = "void_status") private Boolean voidStatus; @Column(name = "void_reason") private String voidReason; @Column(name = "void_datetime") @Temporal(TemporalType.TIMESTAMP) private Date voidDatetime; @Column(name = "void_by_user_record_id") private Integer voidByUserRecordId; @Column(name = "create_Datetime") @Temporal(TemporalType.TIMESTAMP) private Date createDatetime; @Column(name = "create_by_user_Record_id") private Integer createbyuserRecordid; @Column(name = "edit_Datetime") @Temporal(TemporalType.TIMESTAMP) private Date editDatetime; @Column(name = "edit_by_user_Record_id") private Integer editbyuserRecordid; @Column(name = "authorize_datetime") @Temporal(TemporalType.TIMESTAMP) private Date authorizeDatetime; @Column(name = "authorize_by_user_Record_id") private Integer authorizebyuserRecordid; @Column(name = "delete_datetime") @Temporal(TemporalType.TIMESTAMP) private Date deleteDatetime; @Column(name = "delete_by_user_Record_id") private Integer deletebyuserRecordid; public Garage() { } public Integer getRecordId() { return recordId; } public void setRecordId(Integer recordId) { this.recordId = recordId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Integer getRecordVersion() { return recordVersion; } public void setRecordVersion(Integer recordVersion) { this.recordVersion = recordVersion; } public Boolean getDefaultStatus() { return defaultStatus; } public void setDefaultStatus(Boolean defaultStatus) { this.defaultStatus = defaultStatus; } public Boolean getVoidStatus() { return voidStatus; } public void setVoidStatus(Boolean voidStatus) { this.voidStatus = voidStatus; } public String getVoidReason() { return voidReason; } public void setVoidReason(String voidReason) { this.voidReason = voidReason; } public Date getVoidDatetime() { return voidDatetime; } public void setVoidDatetime(Date voidDatetime) { this.voidDatetime = voidDatetime; } public Integer getVoidByUserRecordId() { return voidByUserRecordId; } public void setVoidByUserRecordId(Integer voidByUserRecordId) { this.voidByUserRecordId = voidByUserRecordId; } public Date getCreateDatetime() { return createDatetime; } public void setCreateDatetime(Date createDatetime) { this.createDatetime = createDatetime; } public Integer getCreatebyuserRecordid() { return createbyuserRecordid; } public void setCreatebyuserRecordid(Integer createbyuserRecordid) { this.createbyuserRecordid = createbyuserRecordid; } public Date getEditDatetime() { return editDatetime; } public void setEditDatetime(Date editDatetime) { this.editDatetime = editDatetime; } public Integer getEditbyuserRecordid() { return editbyuserRecordid; } public void setEditbyuserRecordid(Integer editbyuserRecordid) { this.editbyuserRecordid = editbyuserRecordid; } public Date getAuthorizeDatetime() { return authorizeDatetime; } public void setAuthorizeDatetime(Date authorizeDatetime) { this.authorizeDatetime = authorizeDatetime; } public Integer getAuthorizebyuserRecordid() { return authorizebyuserRecordid; } public void setAuthorizebyuserRecordid(Integer authorizebyuserRecordid) { this.authorizebyuserRecordid = authorizebyuserRecordid; } public Date getDeleteDatetime() { return deleteDatetime; } public void setDeleteDatetime(Date deleteDatetime) { this.deleteDatetime = deleteDatetime; } public Integer getDeletebyuserRecordid() { return deletebyuserRecordid; } public void setDeletebyuserRecordid(Integer deletebyuserRecordid) { this.deletebyuserRecordid = deletebyuserRecordid; } }
[ "Sutandi" ]
Sutandi
033504cfc805ce156a749c71cb990033cb048d55
3b8347056027427993fdc22a8ab937ce83d56617
/src/pe/libertadores/dto/ProductoGlobalDTO.java
e6306b369f315e3a193d1ce099852b08297af6f9
[]
no_license
mshelzr/alojanet
2d8e8002b68462560f3c211cbd16b2b46bb26c91
d5128d094383690ff080c0e491bbddaa82c2abd4
refs/heads/master
2020-04-05T06:10:32.326865
2014-05-20T12:06:26
2014-05-20T12:06:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,369
java
package pe.libertadores.dto; // Generated 04-ene-2014 20:15:56 by Hibernate Tools 4.0.0 /** * ProductoGlobalDTO generated by hbm2java */ public class ProductoGlobalDTO implements java.io.Serializable { private int idProductoGlobal; private TipoProductoDTO tipoProductoDTO; private int idProducto; private String descripcion; public ProductoGlobalDTO() { } public ProductoGlobalDTO(int idProductoGlobal, TipoProductoDTO tipoProductoDTO, int idProducto, String descripcion) { super(); this.idProductoGlobal = idProductoGlobal; this.tipoProductoDTO = tipoProductoDTO; this.idProducto = idProducto; this.descripcion = descripcion; } public int getIdProductoGlobal() { return idProductoGlobal; } public void setIdProductoGlobal(int idProductoGlobal) { this.idProductoGlobal = idProductoGlobal; } public TipoProductoDTO getTipoProductoDTO() { return tipoProductoDTO; } public void setTipoProductoDTO(TipoProductoDTO tipoProductoDTO) { this.tipoProductoDTO = tipoProductoDTO; } public int getIdProducto() { return idProducto; } public void setIdProducto(int idProducto) { this.idProducto = idProducto; } public String getDescripcion() { return descripcion; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } }
[ "mshelzr" ]
mshelzr
16e95a82e88cfe039d23aeb35cc4eacfd2515b55
469da40c238685b3a21af37e12265e7a3b126322
/java/season03/hw06/src/main/java/spring/services/MyTestService2.java
33596d640653766d3cd846b58967d4e1f713a71a
[]
no_license
peanuts6/homework
0583325b6e3d4d50d9c3ce1ffb2797d768c82d9b
cc01976ed33fad08e7546996e083f646abf9c29d
refs/heads/master
2021-01-01T16:54:53.783942
2018-01-29T04:19:03
2018-01-29T04:19:03
97,952,408
0
1
null
null
null
null
UTF-8
Java
false
false
408
java
package spring.services; import org.springframework.stereotype.Component; @Component("myTestService2") public class MyTestService2 { public MyTestService2() { System.out.println("MyTestService2 craeated "+this); } public void doBusinessAAA(String[] args,boolean suc) { } public void doBusinessBBB(boolean suc) { } public void doBusinessCCC() { } }
[ "24599489@qq.com" ]
24599489@qq.com
8c0a39a674493d100b14d10e4ec2d31e564ef21f
265302da0a7cf8c2f06dd0f96970c75e29abc19b
/ar_webapp/src/main/java/org/kuali/kra/meeting/ModifyScheduleAuthorizer.java
120ba1497bd52ca905b8927985d08e1e375062dd
[ "Apache-2.0", "ECL-2.0" ]
permissive
Ariah-Group/Research
ee7718eaf15b59f526fca6983947c8d6c0108ac4
e593c68d44176dbbbcdb033c593a0f0d28527b71
refs/heads/master
2021-01-23T15:50:54.951284
2017-05-05T02:10:59
2017-05-05T02:10:59
26,879,351
1
1
null
null
null
null
UTF-8
Java
false
false
1,004
java
/* * Copyright 2005-2014 The Kuali Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ecl1.php * * 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.kuali.kra.meeting; import org.kuali.kra.common.committee.meeting.ModifyScheduleAuthorizerBase; import org.kuali.kra.infrastructure.PermissionConstants; public class ModifyScheduleAuthorizer extends ModifyScheduleAuthorizerBase { @Override protected String getModfifySchedulePermissionNameHook() { return PermissionConstants.MODIFY_SCHEDULE; } }
[ "code@ariahgroup.org" ]
code@ariahgroup.org
22dcafe51c6a1ce63ed45dcebf90e6652cac0bad
63152c4f60c3be964e9f4e315ae50cb35a75c555
/sql/core/target/java/org/apache/spark/sql/execution/streaming/MaxWatermark.java
cf1a4c0afc0482393caf550bfbe53c43e3a66365
[ "EPL-1.0", "Classpath-exception-2.0", "LicenseRef-scancode-unicode", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-free-unknown", "GCC-exception-3.1", "LGPL-2.0-or-later", "CDDL-1.0", "MIT", "CC-BY-SA-3.0", "NAIST-2003", "LGPL-2.1-only", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-other-permissive", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "CPL-1.0", "CC-PDDC", "EPL-2.0", "CDDL-1.1", "BSD-2-Clause", "CC0-1.0", "Python-2.0", "LicenseRef-scancode-unknown" ]
permissive
PowersYang/spark-cn
76c407d774e35d18feb52297c68c65889a75a002
06a0459999131ee14864a69a15746c900e815a14
refs/heads/master
2022-12-11T20:18:37.376098
2020-03-30T09:48:22
2020-03-30T09:48:22
219,248,341
0
0
Apache-2.0
2022-12-05T23:46:17
2019-11-03T03:55:17
HTML
UTF-8
Java
false
false
1,219
java
package org.apache.spark.sql.execution.streaming; /** * Policy to choose the *max* of the operator watermark values as the global watermark value. So the * global watermark will advance if any of the individual operator watermarks has advanced. * In other words, in a streaming query with multiple input streams and watermarks defined on all * of them, the global watermark will advance as fast as the fastest input. So if there is watermark * based state cleanup or late-data dropping, then this policy is the most aggressive one and * may lead to unexpected behavior if the data of the slow stream is delayed. */ public class MaxWatermark { static public long chooseGlobalWatermark (scala.collection.Seq<java.lang.Object> operatorWatermarks) { throw new RuntimeException(); } static public abstract boolean canEqual (Object that) ; static public abstract boolean equals (Object that) ; static public abstract Object productElement (int n) ; static public abstract int productArity () ; static public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); } static public java.lang.String productPrefix () { throw new RuntimeException(); } }
[ "577790911@qq.com" ]
577790911@qq.com
e7b349a423374bff0d633a97edf536a00023b78c
722d56e9c5734e8ad4439a615348b90b5c6cd0f1
/hitao/hitao_commons/src/main/java/com/utils/JwtTokenUtil.java
3e941dab5b8b4ced1ce0c7227488a5d89c2be9be
[]
no_license
wobuxiangzhucea/hitao
42c8514e830fcc655ae5ba5e3d26904559d7ad9e
b0b8f9fa57b914b1d819a93feb67f3dc1848120e
refs/heads/master
2020-03-31T20:33:15.229166
2018-10-22T01:44:56
2018-10-22T01:44:56
152,545,285
0
0
null
null
null
null
UTF-8
Java
false
false
4,504
java
package com.hzit.utils; import com.auth0.jwt.JWT; import com.auth0.jwt.JWTVerifier; import com.auth0.jwt.algorithms.Algorithm; import com.auth0.jwt.interfaces.Claim; import com.auth0.jwt.interfaces.DecodedJWT; import com.auth0.jwt.interfaces.Verification; import java.io.UnsupportedEncodingException; import java.util.Date; import java.util.HashMap; import java.util.Map; /** * Jwt 工具类 */ public class JwtTokenUtil { // 过期时间120分钟 private static final long EXPIRE_TIME = 2*60*60*1000; /** * 秘钥 --->验证token有没有被修改过!UUID.randomdUUID().toString() */ private static String secret = "c083da1c-8865-4b09-95a9-0364d4a54e7c"; /** * 生成token * @param username 业务参数 用户名 * @param email 业务参数 邮箱 * @return token * @throws UnsupportedEncodingException */ public static String createToken(String username,String userId) throws UnsupportedEncodingException { Map<String,Object> header = new HashMap<String,Object>(); //头信息指定了JWT使用的签名算法 header.put("type","jwt"); header.put("alg","HS256");// HS256 表示使用了HMAC-SHA256 算法 long currentTime = System.currentTimeMillis(); long expireTime = currentTime + 7200*1000;// 2个小时后超时 String token = JWT.create().withHeader(header) .withClaim("username",username) .withClaim("userid",userId) .withIssuedAt(new Date(currentTime)) //签发时间 .withExpiresAt(new Date(expireTime)) ////过期时间 .withJWTId("df046d05-8948-4c08-8506-988cc72e057e") //唯一的身份,主要作为一次性token,从而避免重放攻击 .sign(Algorithm.HMAC256(secret)); //加密 return token; } /** * 解析token * @param token * @return 解析结果 */ public static Map<String,Claim> parseToken(String token) throws UnsupportedEncodingException { Verification verification = JWT.require(Algorithm.HMAC256(secret)); JWTVerifier verifier = verification.build(); DecodedJWT decodedJWT= null; try{ decodedJWT = verifier.verify(token);//验证token }catch (Exception e){ return null; } return decodedJWT.getClaims(); } /** * 校验token是否正确 * @param token 密钥 * @param secret 用户的密码 * @return 是否正确 */ public static boolean verify(String token, String username,String userId, String secret) { try { Algorithm algorithm = Algorithm.HMAC256(secret); JWTVerifier verifier = JWT.require(algorithm) .withClaim("username", username) .withClaim("userId",userId) .build(); DecodedJWT jwt = verifier.verify(token); return true; } catch (Exception exception) { return false; } } /** * 生成签名,2小时后过期 * @param username 用户名 * @param secret 用户的密码 * @return 加密的token */ public static String sign(String username,String userId, String secret) { try { Date date = new Date(System.currentTimeMillis()+EXPIRE_TIME); Algorithm algorithm = Algorithm.HMAC256(secret); Map<String,Object> header = new HashMap<String,Object>(); //头信息指定了JWT使用的签名算法 header.put("type","jwt"); header.put("alg","HS256");// HS256 表示使用了HMAC-SHA256 算法 // 附带username信息 return JWT.create().withHeader(header) .withClaim("userId",userId) .withClaim("username", username) .withExpiresAt(date) .sign(algorithm); } catch (UnsupportedEncodingException e) { return null; } } /** * 用户名 * @return */ public static String getUser(String token) { DecodedJWT decodedJWT= JWT.decode(token);; return decodedJWT.getClaim("username").asString(); } /** * 获取用户编号 * @param token * @return */ public static String getUserId(String token){ DecodedJWT decodedJWT = JWT.decode(token); return decodedJWT.getClaim("userId").asString(); } }
[ "1397764602@qq.com" ]
1397764602@qq.com
72e6de3756af169045f4e08d50e638c18a5b5a47
43cb9ab777e6d1776a76725763a1d922cd141610
/src/main/java/kr/or/ddit/lprod/controller/AllLprod.java
aab8cffbff97ad91cf6fab83ea26d8b43e170b02
[]
no_license
byez0210/jsp
32297856f1fb005eca33e243ff1723109b2b7e40
d84d7cea4898a3d8fb8e55b1d89ccf8e0e814ddb
refs/heads/master
2023-02-18T17:41:10.080966
2021-01-21T00:26:06
2021-01-21T00:26:06
323,770,708
0
0
null
null
null
null
UTF-8
Java
false
false
760
java
package kr.or.ddit.lprod.controller; import java.util.List; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import kr.or.ddit.lprod.model.LprodVo; import kr.or.ddit.lprod.service.LprodService; import kr.or.ddit.lprod.service.LprodServiceI; @WebServlet("/allLprod") public class AllLprod extends HttpServlet{ protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException ,java.io.IOException { LprodServiceI lprodService = new LprodService(); List<LprodVo> lprodList = lprodService.selectAllLprod(); req.setAttribute("lprodList",lprodList); req.getRequestDispatcher("/lprod/lprod.jsp").forward(req, resp); }; }
[ "byez02100@gmail.com" ]
byez02100@gmail.com
045db5265f3ce9d62f74f6afc4e76f840a51c5ec
1b71391fdddd0ee748669a6a4badfcd69347c281
/.evosuite/tmp_2018_12_07_15_47_26/tests/system/model/dao/QuestionDao_ESTest_scaffolding.java
74548f9a4d04e0edc42779a084c005c8295aa268
[]
no_license
berl-a/DiplomaBackend
e809f2257c059314f310d4a6e8195b23831d9eda
d6e65609133ff93b2b275a1eb0496e9e6ce790ce
refs/heads/master
2020-04-01T06:47:56.459540
2019-01-02T18:22:43
2019-01-02T18:22:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,516
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Dec 07 15:02:55 GMT 2018 */ package system.model.dao; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class QuestionDao_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "system.model.dao.QuestionDao"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("file.encoding", "Cp1251"); java.lang.System.setProperty("java.awt.headless", "true"); java.lang.System.setProperty("java.io.tmpdir", "C:\\Users\\admin\\AppData\\Local\\Temp\\"); java.lang.System.setProperty("user.country", "RU"); java.lang.System.setProperty("user.dir", "D:\\Data\\Diploma\\Project\\Backend"); java.lang.System.setProperty("user.home", "C:\\Users\\admin"); java.lang.System.setProperty("user.language", "ru"); java.lang.System.setProperty("user.name", "admin"); java.lang.System.setProperty("user.timezone", "Europe/Belgrade"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QuestionDao_ESTest_scaffolding.class.getClassLoader() , "system.controller.service.database.IntStringBlobDatabaseEntry", "system.controller.service.database.DatabaseService", "org.springframework.beans.factory.annotation.Autowired", "system.controller.service.database.StringDatabaseEntry", "system.model.dao.QuestionDao", "org.springframework.stereotype.Component", "system.controller.service.database.FilterBehaviour", "system.model.dao.Idable", "org.springframework.stereotype.Service", "system.model.dao.Dao", "org.springframework.stereotype.Indexed", "org.springframework.stereotype.Repository", "system.controller.service.database.DatabaseEntry", "system.controller.service.database.MySQLDatabaseService" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("system.controller.service.database.MySQLDatabaseService", false, QuestionDao_ESTest_scaffolding.class.getClassLoader())); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QuestionDao_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "system.model.dao.Dao", "system.model.dao.QuestionDao", "system.controller.service.database.MySQLDatabaseService", "system.model.classes.questions.Question", "system.controller.service.database.IntStringBlobDatabaseEntry" ); } }
[ "romanberla@gmail.com" ]
romanberla@gmail.com
5dc65b649ed6a95ecf4eb7d8f6acd7bcfc643c62
35e08caf162e5203806ec370d17ea4ec61223d8e
/src/main/java/com/yonyou/h/services/Lu4AppJobImpl.java
07c4f66d55d3ce230c1c5b993d854b5382857c7b
[]
no_license
chizengkun/RestFul2.0
9521ede6041528f8c987f254d15bfb22ed41ead6
1ac0d77f08bd717c4ccf5a10d2358c4ac5ae313e
refs/heads/master
2016-08-11T16:52:07.937105
2016-04-14T00:39:51
2016-04-14T00:39:51
55,114,338
0
1
null
null
null
null
GB18030
Java
false
false
4,308
java
package com.yonyou.h.services; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.springframework.beans.factory.annotation.Autowired; import org.tempuri.WebServiceSoap; import com.ufida.g3.domain.dic.ZdYljg; import com.ufida.hap.context.util.HapSpringContextUtils; import com.ufida.hap.util.DBAgent; import com.ufida.hap.util.DateUtils; import com.yonyou.h.util.C; public class Lu4AppJobImpl implements Lu4AppJobIntf { private LuPhs4AppIntf luphs4AppIntf; public LuPhs4AppIntf getLuphs4AppIntf() { return luphs4AppIntf; } @Autowired public void setLuphs4AppIntf(LuPhs4AppIntf luphs4AppIntf) { this.luphs4AppIntf = luphs4AppIntf; } private DBAgent getDBAgent() { return DBAgent.getInstance(); } private void newTransLog(String sqbm, String empi, Long lday) { Map<String,Object> condi = new HashMap<String, Object>(); condi.put("sqbm", sqbm); condi.put("empi", empi); condi.put("lday", lday); String sql="INSERT INTO APP_UPLOG(SQBM,EMPI,QYRQ) VALUES(:sqbm, :empi, :lday)"; getDBAgent().executeSQL(sql, condi); } private void newTransErrorLog(String sqbm, String empi, Long lday, String errmsg) { Map<String,Object> condi = new HashMap<String, Object>(); condi.put("sqbm", sqbm); condi.put("empi", empi); condi.put("lday", lday); condi.put("errmsg", errmsg); String sql="INSERT INTO APP_UPERRORLOG(SQBM,EMPI,QYRQ,ERRMSG) VALUES(:sqbm, :empi, :lday,:errmsg)"; getDBAgent().executeSQL(sql, condi); } private void getPHR(String sqbm) { Map<String, Object> condi = new HashMap<String, Object>(); condi.put("sqbm", sqbm); Long lday = DateUtils.dateToLongDonly(DateUtils.currentDate()); condi.put("qyrq", lday); StringBuilder sb = new StringBuilder(); sb.append("SELECT A0.EMPI FROM DA_GRDA0 A0, DA_GRDA1 A1"); sb.append(" WHERE A0.SQBM=A1.SQBM AND A0.EMPI=A1.EMPI"); sb.append(" AND A0.STATE='1' AND A0.SQBM=:sqbm AND A1.QYRQ=:qyrq "); sb.append(" AND A0.EMPI NOT IN (SELECT EMPI FROM APP_UPLOG WHERE SQBM=:sqbm AND QYRQ=:qyrq)"); List<Map<String, Object>> ret = getDBAgent().querySQL(sb.toString(), condi, null); if (ret != null && ret.size() > 0) { // TODO:过滤已经上传的记录 Document doc = DocumentHelper.createDocument(); Element root = doc.addElement(C.REQUEST_ROOT_NODE); for (Map<String, Object> obj : ret) { String empi = obj.get("EMPI").toString(); root.addElement("empi").addText(empi); // 取数据封装 try { String req = luphs4AppIntf.getPHS(doc.asXML()); /*Document doc111 = DocumentHelper.parseText( req); System.out.println( doc111.asXML());*/ WebServiceSoap websvr = HapSpringContextUtils.getBean(WebServiceSoap.class); Document retdoc = DocumentHelper.parseText(websvr.updateData(req)); Element ment = (Element) retdoc.selectSingleNode("//resultcode"); if (ment != null) { if (ment.getText().equals("0")) { // 上传成功! newTransLog(sqbm, empi, lday); } else { // 失败 Element errment = (Element) retdoc.selectSingleNode("//resultmsg"); if (errment != null) { // 保存失败信息 newTransErrorLog(sqbm, empi, lday, errment.getText()); } else { // 消息自己定义 newTransErrorLog(sqbm, empi, lday, "上传失败"); } } } } catch (DocumentException e) { e.printStackTrace(); newTransErrorLog(sqbm, empi, lday, e.getMessage()); // 记录到错误日志中,后续检查 } } } } private void getJobs() { // 按罗湖的社康提交数据 Map<String, Object> condi = new HashMap<String, Object>(); condi.put("bm[like]$v%", "440303"); condi.put("sendstate", 1L); List<ZdYljg> yljgList = getDBAgent().find(ZdYljg.class, condi, null); for (ZdYljg yljg : yljgList) { // 按机构获取对应的数据 getPHR(yljg.getBm()); } } // 上传数据 public void transJob() { getJobs(); } public void actionCheck() { // } }
[ "chizengkun@163.com" ]
chizengkun@163.com
07ba641f2c25446f3e7970ddacbe36c99c09a9e5
2adc834c069ad4a710e6d4ae09eaa66ca75998e8
/com.gerken.frontend.se.xform/jet2java/com/gerken/frontend/se/xform/compiled/_jet_editorconstraintfailurejava.java
f0e4a6ac18340815473f7a3c040e57fd8573376a
[ "Apache-2.0" ]
permissive
chrisGerken/transformAuthoring
8f5adcbcc2cd4a6135862a1ba2188bd33d0d908a
b5d1c7441bf6364f1276a03d0e7bc391d5302130
refs/heads/master
2021-01-17T13:30:30.825197
2017-01-02T13:07:23
2017-01-02T13:07:23
12,684,968
1
1
null
2016-05-15T00:48:21
2013-09-08T18:00:20
Java
UTF-8
Java
false
false
5,826
java
package com.gerken.frontend.se.xform.compiled; import org.eclipse.jet.JET2Context; import org.eclipse.jet.JET2Template; import org.eclipse.jet.JET2Writer; import org.eclipse.jet.taglib.RuntimeTagElement; import org.eclipse.jet.taglib.TagInfo; public class _jet_editorconstraintfailurejava implements JET2Template { private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$ public _jet_editorconstraintfailurejava() { super(); } private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$ private static final TagInfo _td_c_get_1_9 = new TagInfo("c:get", //$NON-NLS-1$ 1, 9, new String[] { "select", //$NON-NLS-1$ }, new String[] { "$editor/@editorPackage", //$NON-NLS-1$ } ); public void generate(final JET2Context context, final JET2Writer __out) { JET2Writer out = __out; out.write("package "); //$NON-NLS-1$ RuntimeTagElement _jettag_c_get_1_9 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_1_9); //$NON-NLS-1$ //$NON-NLS-2$ _jettag_c_get_1_9.setRuntimeParent(null); _jettag_c_get_1_9.setTagInfo(_td_c_get_1_9); _jettag_c_get_1_9.doStart(context, out); _jettag_c_get_1_9.doEnd(); out.write(";"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("import org.w3c.dom.Node;"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("public class ConstraintFailure {"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("\tprivate Node \ttargetNode;"); //$NON-NLS-1$ out.write(NL); out.write("\tprivate int\t\tseverity;"); //$NON-NLS-1$ out.write(NL); out.write("\tprivate String \tmessage;"); //$NON-NLS-1$ out.write(NL); out.write("\tprivate String shingleLabel;"); //$NON-NLS-1$ out.write(NL); out.write("\t"); //$NON-NLS-1$ out.write(NL); out.write("\tpublic static int CONSTRAINT_INFO\t = 2;"); //$NON-NLS-1$ out.write(NL); out.write("\tpublic static int CONSTRAINT_WARNING = 3;"); //$NON-NLS-1$ out.write(NL); out.write("\tpublic static int CONSTRAINT_ERROR \t = 4;"); //$NON-NLS-1$ out.write(NL); out.write("\t"); //$NON-NLS-1$ out.write(NL); out.write("\tpublic ConstraintFailure(Node targetNode, int severity, String message, String shingleLabel) {"); //$NON-NLS-1$ out.write(NL); out.write("\t\tthis.targetNode = targetNode;"); //$NON-NLS-1$ out.write(NL); out.write("\t\tthis.severity = severity;"); //$NON-NLS-1$ out.write(NL); out.write("\t\tthis.message = message;"); //$NON-NLS-1$ out.write(NL); out.write("\t\tthis.shingleLabel = shingleLabel;"); //$NON-NLS-1$ out.write(NL); out.write("\t}"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("\tpublic Node getTargetNode() {"); //$NON-NLS-1$ out.write(NL); out.write("\t\treturn targetNode;"); //$NON-NLS-1$ out.write(NL); out.write("\t}"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("\tpublic void setTargetNode(Node targetNode) {"); //$NON-NLS-1$ out.write(NL); out.write("\t\tthis.targetNode = targetNode;"); //$NON-NLS-1$ out.write(NL); out.write("\t}"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("\tpublic int getSeverity() {"); //$NON-NLS-1$ out.write(NL); out.write("\t\treturn severity;"); //$NON-NLS-1$ out.write(NL); out.write("\t}"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("\tpublic void setSeverity(int severity) {"); //$NON-NLS-1$ out.write(NL); out.write("\t\tthis.severity = severity;"); //$NON-NLS-1$ out.write(NL); out.write("\t}"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("\tpublic String getMessage() {"); //$NON-NLS-1$ out.write(NL); out.write("\t\treturn message;"); //$NON-NLS-1$ out.write(NL); out.write("\t}"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("\tpublic void setMessage(String message) {"); //$NON-NLS-1$ out.write(NL); out.write("\t\tthis.message = message;"); //$NON-NLS-1$ out.write(NL); out.write("\t}"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("\tpublic String getShingleLabel() {"); //$NON-NLS-1$ out.write(NL); out.write("\t\treturn shingleLabel;"); //$NON-NLS-1$ out.write(NL); out.write("\t}"); //$NON-NLS-1$ out.write(NL); out.write(NL); out.write("}"); //$NON-NLS-1$ out.write(NL); } }
[ "chris.gerken@gerkenip.com" ]
chris.gerken@gerkenip.com
54389bf3a0f8a5da41ff08e7fae9b4475b0e852d
f92efd14f940aa51c522cd652cc4bdaf0f393e17
/Common/src/main/java/com/calvities/cl/utils/ExceptionUtil.java
1eb01b0dd7a1f3a2375b41f0d40153f4e5fd97de
[]
no_license
calvities/Project_Base_Demo
a474f8a638daa2242fb7dee1d6cd70609f708517
fd35a8e56c710276c61ec3e137a6c06a885e0c9b
refs/heads/master
2023-02-18T11:10:54.340101
2021-01-05T08:15:37
2021-01-05T08:15:37
324,926,714
2
0
null
null
null
null
UTF-8
Java
false
false
987
java
package com.calvities.cl.utils; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; /** * 异常处理工具 * @Author CL * @Date 2020/12/25 */ public class ExceptionUtil { /** * 异常信息 * @param e 异常 * @return 异常信息 */ public static String getMessage(Exception e) { StringWriter sw = null; PrintWriter pw = null; try { sw = new StringWriter(); pw = new PrintWriter(sw); // 将出错的栈信息输出到printWriter中 e.printStackTrace(pw); pw.flush(); sw.flush(); } finally { if (sw != null) { try { sw.close(); } catch (IOException e1) { e1.printStackTrace(); } } if (pw != null) { pw.close(); } } return sw.toString(); } }
[ "707316053@qq.com" ]
707316053@qq.com
10acedab3e2ff5ba210e8c975ec9d1c7b7864e5e
55de9ca4e441991a5315bc6e3f6c286f71c4e6e1
/src/main/java/game/domain/dto/JpaDto.java
5e5036bdb946ca2c56745567997bc4943d09313c
[]
no_license
worbs7/spring-rpgGame
6f3b46bf653d97fd33c0c79f48ed75b8f003c9f3
f074bf1f7f189fcd71ac64524d870b6a8a84fb8c
refs/heads/master
2022-12-27T14:16:30.689624
2020-10-13T06:59:27
2020-10-13T06:59:27
301,335,891
0
0
null
null
null
null
UTF-8
Java
false
false
807
java
package game.domain.dto; import java.time.LocalDateTime; import game.domain.entity.JpaBoard; import lombok.Data; import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class JpaDto { private Long no; private String writer; private String subject; private String content; private String user_ip; private int count; private LocalDateTime reg_date; public JpaBoard toEntity() { return JpaBoard.builder().content(content).subject(subject).user_ip(user_ip).writer(writer).build(); } public JpaDto(JpaBoard bo) { this.no = bo.getNo(); this.writer = bo.getWriter(); this.subject = bo.getSubject(); this.content = bo.getContent(); this.user_ip = bo.getUser_ip(); this.count = bo.getCount(); this.reg_date = bo.getReg_date(); } }
[ "301306@DESKTOP-FE1JJ57" ]
301306@DESKTOP-FE1JJ57
bdfb512b3e2ff5c3c4a994ae9738a9014e3fdcba
e23d016b0385ac42a6339dfa641a5ec4ce110c8a
/src/main/java/com/kirkirillov/tracker/my_tracker/exceptionHandling/EntityGlobalExceptionHandler.java
34a72a29a736c472cbbfc5fec3b8841db4313c73
[]
no_license
Kirill-Kirillov/MyTracker
59e2dc6504a496b068d69bbd6b74f4cf9ce8ed23
fdc9eb910b46419d322e1c99006ec2ba1217a9f3
refs/heads/master
2023-02-05T10:01:45.314398
2020-12-24T07:00:05
2020-12-24T07:00:05
320,292,548
0
0
null
null
null
null
UTF-8
Java
false
false
996
java
package com.kirkirillov.tracker.my_tracker.exceptionHandling; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; @ControllerAdvice public class EntityGlobalExceptionHandler { @ExceptionHandler public ResponseEntity<EntityIncorrectData> handlingException(NoSuchEntityException exception) { EntityIncorrectData data = new EntityIncorrectData(); data.setInfo(exception.getMessage()); return new ResponseEntity<>(data, HttpStatus.NOT_FOUND); } @ExceptionHandler public ResponseEntity<EntityIncorrectData> handlingException(Exception exception) { EntityIncorrectData data = new EntityIncorrectData(); data.setInfo(exception.getMessage()); return new ResponseEntity<>(data, HttpStatus.BAD_REQUEST); } }
[ "kirillov_ko@icloud.com" ]
kirillov_ko@icloud.com