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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5f2885d01d7bf783a084f3d86f12966177313acc | bcdfbed3d889fd81763647907232ad007921c1e2 | /src/GUI/frame/SearchHostFrame.java | db2908c145872d440b9a63f7b3440f8e9e087ffb | [] | no_license | neighborBoy0/TPNote2 | 6561a0f242a5ce5002bf3a29941b787003c92972 | 13667c482b26dcccb1423fdba6f95c28f53b61aa | refs/heads/master | 2022-03-27T18:28:54.298485 | 2020-01-14T15:18:38 | 2020-01-14T15:18:38 | 232,305,855 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,058 | java | package GUI.frame;
import GUI.panel.smallpanel.SearchBoatPanel;
import GUI.panel.smallpanel.SearchHostPanel;
import javax.swing.*;
import java.awt.*;
public class SearchHostFrame extends JFrame {
public static SearchHostFrame instance = new SearchHostFrame();
private SearchHostFrame(){
//set frame size
this.setSize(600, 400);
//set frame title
this.setTitle("Recherche du propriétaire");
//get main panel
JPanel p = SearchHostPanel.instance;
//set panel size
p.setPreferredSize(new Dimension(600, 400));
//add main panel
this.setContentPane(p);
//set frame center
this.setLocationRelativeTo(null);
//set frame is not resizable
this.setResizable(false);
//set close method:
// DISPOSE_ON_CLOSE: only close this frame
this.setDefaultCloseOperation(SearchHostFrame.DISPOSE_ON_CLOSE);
}
//test this module
public static void main(String[] args){
instance.setVisible(true);
}
}
| [
"yinyuman96@gmail.com"
] | yinyuman96@gmail.com |
d189e767b4e589ba1cbf957cf2165e175d16ce40 | d8918ff814a49ee6d72131da589e510ba2272589 | /HW7/test/src/edu/umb/cs680/hw07/FileTest.java | 87b9a955d5b578400fba16b6954d4a9c6c3ed67a | [] | no_license | jzhang03/CS680_JingZhang | f7ad505cb4e991086b9748d30c4be359b29cc0f8 | afe0bf2fbd273a265c4388140efb2de6122af943 | refs/heads/master | 2023-01-29T19:01:53.414426 | 2020-12-06T19:45:00 | 2020-12-06T19:45:00 | 298,662,287 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,614 | java | //
// CS680: HW7
// Copyright 2020 Jing Zhang <Jing.Zhang002@umb.edu>
// Git Repositories: https://github.com/jzhang03/CS680_JingZhang
// Git Name: jzhang03
//
package edu.umb.cs680.hw07;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.time.LocalDateTime;
public class FileTest {
private LocalDateTime Date = LocalDateTime.now();
Directory root = new Directory(null, "Root", 0, Date);
Directory home = new Directory(root, "Home", 0, Date);
Directory applications = new Directory(root, "Applications", 0, Date);
Directory code = new Directory(home, "Code", 0, Date);
File a = new File(applications, "a", 1, Date);
File b = new File(applications, "b", 1, Date);
File c = new File(home, "c", 2, Date);
File d = new File(home, "d", 2, Date);
File e = new File(code, "e", 5, Date);
File f = new File(code, "f", 10, Date);
private String[] fileToStringArray(File f) {
String[] fileInfo = {String.valueOf(f.isDirectory()), f.getName(), Integer.toString(f.getSize()),
f.getCreationTime().toString(), f.getParent().getName()};
return fileInfo;
}
@Test
public void verifyFileEqualityA() {
String[] expected = {"false", "a", "1", Date.toString(), "Applications"};
File actual = this.a;
assertArrayEquals(expected, fileToStringArray(actual));
}
@Test
public void verifyFileEqualityB() {
String[] expected = {"false", "b", "1", Date.toString(), "Applications"};
File actual = this.b;
assertArrayEquals(expected, fileToStringArray(actual));
}
@Test
public void verifyFileEqualityC() {
String[] expected = {"false", "c", "2", Date.toString(), "Home"};
File actual = this.c;
assertArrayEquals(expected, fileToStringArray(actual));
}
@Test
public void verifyFileEqualityD() {
String[] expected = {"false", "d", "2", Date.toString(), "Home"};
File actual = this.d;
assertArrayEquals(expected, fileToStringArray(actual));
}
@Test
public void verifyFileEqualityE() {
String[] expected = {"false", "e", "5", Date.toString(), "Code"};
File actual = this.e;
assertArrayEquals(expected, fileToStringArray(actual));
}
@Test
public void verifyFileEqualityF() {
String[] expected = {"false", "f", "10", Date.toString(), "Code"};
File actual = this.f;
assertArrayEquals(expected, fileToStringArray(actual));
}
}
| [
"jzhang03@DESKTOP-KASGRPT"
] | jzhang03@DESKTOP-KASGRPT |
25f4a2341a4a0862b4db1cdfa169d913296b2a84 | a6b54995cc36e4a9d4926110549fe0f0419fa368 | /src/view/views/PayrollViewPanel.java | 43a68ff04ffc5af029040c6a3ae7b8d7efb2ba40 | [] | no_license | XietrZ/BILECOPayrollSystem | d21b9681643b9e704dde8be7f4e21babdb652dd6 | 2d50a252b29703f8ccd6ea53893d44225b95d650 | refs/heads/master | 2023-07-13T08:01:50.343770 | 2021-08-22T12:06:36 | 2021-08-22T12:06:36 | 184,376,588 | 0 | 0 | null | 2021-08-22T12:06:36 | 2019-05-01T06:13:58 | Java | UTF-8 | Java | false | false | 28,909 | java | package view.views;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingConstants;
import javax.swing.table.TableRowSorter;
import view.dialog.DeleteUpdateEmployeeDialog;
import database.Database;
import model.Constant;
import model.PayrollTableModel;
import model.PayslipComponentInfo;
import model.PayslipDataStorageInfo;
import model.statics.Images;
import model.statics.Utilities;
import model.view.AddCommentsOnAllPayslipDialog;
import model.view.AddEarningOrDeductionDataLayout;
import model.view.AddPayrollDateDialogLayout;
import model.view.DisplayOptionsDialog;
import model.view.Edit15th30thTotalDialog;
import model.view.EditSignatureInfoDialog;
import model.view.OptionViewPanel;
import model.view.PayrollSlipLayout;
import model.view.PayslipDataDialog;
import model.view.ReusableTable;
import model.view.ShowAllEmployeeAddPayrollDataDialogLayout;
import model.view.WithOrWithoutATMDialog;
import model.view.YesOrNoIfDeleteDialogLayout;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.util.ArrayList;
public class PayrollViewPanel extends JPanel {
private final String CLASS_NAME="\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"+this.getClass().getSimpleName()+".java";
private static PayrollViewPanel instance;
private Images img;
private JPanel viewPanel,topPanel;
private int topRightBtnWidth=73, topRightBtnHeight=34;
private void l__________________________l(){}
public PayrollSlipLayout payrollSlip;
public ReusableTable fullScreenTable,totalFullScreenTable;
public JScrollPane fullScreenTableScrollPane,totalTableScrollPane;
public JButton payrollOptionButton,pdfOptionButton,excelOptionButton,lockOptionButton,
addBtn,delBtn,showPayslipDialogBtn,netPayCopyModeBtn, cancelNetPayCopyModeBtn,
showBtn;
public DisplayOptionsDialog
dispEmployeePayrollSummaryOptionPDFEXCEL,dispDialogWithPayrolDateComboboxOnlyOptionPDFEXCEL;
public ArrayList<PayslipDataStorageInfo> payslipDataStorageList;
public OptionViewPanel optionPanel,pdfPanel,excelPanel;
public AddPayrollDateDialogLayout addPayrollDateDialog;
public YesOrNoIfDeleteDialogLayout deletePayrollWarningDialog, lockedWarningDialog;
public ShowAllEmployeeAddPayrollDataDialogLayout showAllEmpAddPayDaDialog;
public AddEarningOrDeductionDataLayout addEDDataDialog;
public PayslipDataDialog payslipDataDialog;
public AddCommentsOnAllPayslipDialog addCommentsOnAllPayslipDialog;
public WithOrWithoutATMDialog withOrWithoutATMDialog;
public JLabel rowCountLabel,payrollDateDataLabel;
public JPanel bottomPanel,showDisplayPanel,topRightButtonPanel;
public JComboBox<String>departmentComboBox,payrollDateComboBox;
public JTextField filterTextField;
public EditSignatureInfoDialog editSignatureInfoDialog;
private void l________________________________l(){}
/**
* Create the panel.
*/
public PayrollViewPanel() {
init();
set();
}
private void init(){
dispEmployeePayrollSummaryOptionPDFEXCEL=new DisplayOptionsDialog();
dispDialogWithPayrolDateComboboxOnlyOptionPDFEXCEL=new DisplayOptionsDialog();
payslipDataStorageList=new ArrayList<PayslipDataStorageInfo>();
addPayrollDateDialog=new AddPayrollDateDialogLayout();
deletePayrollWarningDialog = new YesOrNoIfDeleteDialogLayout();
lockedWarningDialog = new YesOrNoIfDeleteDialogLayout();
lockedWarningDialog.setSize(lockedWarningDialog.getWidth(), lockedWarningDialog.getHeight()+10);
showAllEmpAddPayDaDialog = new ShowAllEmployeeAddPayrollDataDialogLayout();
addEDDataDialog = new AddEarningOrDeductionDataLayout();
payslipDataDialog = new PayslipDataDialog();
editSignatureInfoDialog= new EditSignatureInfoDialog();
withOrWithoutATMDialog= new WithOrWithoutATMDialog();
addCommentsOnAllPayslipDialog = new AddCommentsOnAllPayslipDialog();
img=Images.getInstance();
}
private void set(){
setThisPanelComponents();
setOptionDialogComponents();
setOptionPanelComponents();
setPDFPanelComponents();
setExcelPanelComponents();
setViewPanel();
setTopPanelComponents();
setShowDisplayPanel();
setTopRightButtonPanelComponents();
setTableComponents();
setBottomPanelComponents();
setAddOrDeductionData();
//--> Add background
// add(payrollViewPanelBg);
repaint();
}
private void l____________________________l(){}
/**
* Set this panel components.
*/
private void setThisPanelComponents(){
setBounds(0, Constant.VIEW_Y, Constant.VIEW_WIDTH, Constant.VIEW_HEIGHT);
setBackground(Color.GREEN);
setLayout(null);
setVisible(false);
setOpaque(false);
//--> Temporary add
payrollSlip=new PayrollSlipLayout();
payrollSlip.setLocation(403, 11);
add(payrollSlip);
payrollSlip.setVisible(false);
}
/**
* Set the components of all dialog in this view panel.
*/
private void setOptionDialogComponents(){
DisplayOptionsDialog dialog= dispEmployeePayrollSummaryOptionPDFEXCEL;
dialog.setTitle("Display per Department Payroll PDF Option");
dialog.showButton.setIcon(Images.getInstance().showPDFPayrollImg);
dialog.showButton.setRolloverIcon(Images.getInstance().showPDFPayrollImgHover);
dialog.setSize(dialog.getWidth()+40, dialog.getHeight());
dialog=dispDialogWithPayrolDateComboboxOnlyOptionPDFEXCEL;
dialog.setTitle("Display Overall Payroll PDF Option");
dialog.showButton.setIcon(Images.getInstance().showPDFPayrollImg);
dialog.showButton.setRolloverIcon(Images.getInstance().showPDFPayrollImgHover);
dialog.lblDepartment.setVisible(false);
dialog.departmentComboBox.setVisible(false);
dialog.setSize(dialog.getWidth()+60, dialog.getHeight()-10);
}
/**
* Set component of option panel.
*/
private void setOptionPanelComponents(){
String[] buttonKeyList={
Constant.VIEW_EARNING_DATA,
Constant.VIEW_DEDUCTION_DATA,
Constant.SHOW_PAYROLL_DATE,
Constant.EDIT_SIGNATURE_INFO,
Constant.ADD_COMMENTS_ON_PAYSLIP
};
ImageIcon[] imageList={
img.viewEarningDataImg,
img.viewDeductionDataImg,
img.showPayrollDateImg,
img.editSignatureInfoImg,
img.addCommentsToPayslipImg
};
ImageIcon[] imageHoverList={
img.viewEarningDataImgHover,
img.viewDeductionDataImgHover,
img.showPayrollDateImgHover,
img.editSignatureInfoImgHover,
img.addCommentsToPayslipImgHover
};
optionPanel=new OptionViewPanel(
buttonKeyList, img.payrollOptionsBgImg,
imageList, imageHoverList,
170, 50, 144, 125
);
optionPanel.buttonList.get("View Earning Data").setToolTipText("Alt+A");
optionPanel.buttonList.get("View Deduction Data").setToolTipText("Alt+D");
add(optionPanel);
}
/**
* Set PDF Panel Components.
*/
private void setPDFPanelComponents(){
String[] buttonKeyList=null;
ImageIcon[] imageList=null;
ImageIcon[] imageHoverList=null;
pdfPanel=new OptionViewPanel(
buttonKeyList, img.pdfOptionsContractualBgImg,
imageList, imageHoverList,
210, 50, 242, 188
);
add(pdfPanel);
}
/**
* Set necessary components of pdf panel.
* @param bgImg
* @param width
* @param height
* @param buttonKeyList
* @param imageList
* @param imageHoverList
*/
private void setNecessaryPDFPanelComponentsWhenExtended(ImageIcon bgImg,int width,int height,
String[]buttonKeyList, ImageIcon[]imageList, ImageIcon[] imageHoverList){
//--> Set Calculation Panel
pdfPanel.setLayout(null);
pdfPanel.setOpaque(false);
pdfPanel.bg.setIcon(bgImg);
pdfPanel.setSize(width, height);
pdfPanel.bg.setBounds(0,0,pdfPanel.getWidth(),pdfPanel.getHeight());
pdfPanel.initNewListValues(buttonKeyList, imageList, imageHoverList);
pdfPanel.addOptionButtons();
repaint();
}
/**
* Set component of EXCEL panel.
*/
private void setExcelPanelComponents(){
String[] buttonKeyList=null;
ImageIcon[] imageList=null;
ImageIcon[] imageHoverList=null;
excelPanel=new OptionViewPanel(
buttonKeyList, img.excelOptionsBgImg ,
imageList, imageHoverList,
250, 50, 211, 321
);
add(excelPanel);
}
/**
* Set necessary components of excel panel.
* @param bgImg
* @param width
* @param height
* @param buttonKeyList
* @param imageList
* @param imageHoverList
*/
private void setNecessaryExcelPanelComponentsWhenExtended(ImageIcon bgImg,int width,int height,
String[]buttonKeyList, ImageIcon[]imageList, ImageIcon[] imageHoverList){
//--> Set Calculation Panel
excelPanel.setLayout(null);
excelPanel.setOpaque(false);
excelPanel.bg.setIcon(bgImg);
excelPanel.setSize(width, height);
excelPanel.bg.setBounds(0,0,excelPanel.getWidth(),excelPanel.getHeight());
excelPanel.initNewListValues(buttonKeyList, imageList, imageHoverList);
excelPanel.addOptionButtons();
repaint();
}
/**
* Set view panel where top panel and table panel is added.
*/
private void setViewPanel(){
//--> Set View Panel:
viewPanel=new JPanel();
viewPanel.setBounds(10,0,this.getWidth()-20,this.getHeight()-Constant.SCROLL_BAR_WIDTH);
viewPanel.setBackground(Color.BLUE);
viewPanel.setOpaque(false);
viewPanel.setLayout(new BorderLayout());
add(viewPanel);
}
/**
* Set components of the top panel.
*/
private void setTopPanelComponents(){
topPanel = new JPanel();
topPanel.setPreferredSize(new Dimension(0,100));
topPanel.setBackground(Constant.BILECO_DEFAULT_COLOR_GREEN);
topPanel.setOpaque(false);
topPanel.setLayout(null);
viewPanel.add(topPanel, BorderLayout.NORTH);
//---------------------------------------------
//--> Add View TITLE Label.
JLabel lblEmployee = new JLabel(img.payrollViewTitleImg);
lblEmployee.setBounds(13, 13, 135,26);
lblEmployee.setFont(Constant.VIEW_TITLE);
topPanel.add(lblEmployee);
//---------------------------------------------
//--> Add Option button.
payrollOptionButton = Utilities.getInstance().initializeNewButton(
148, 5, 47, 47, img.optionBtnImg, img.optionHoverBtnImg
);
payrollOptionButton.setFocusable(false);
topPanel.add(payrollOptionButton);
//---------------------------------------------
//--> Add PDF button.
pdfOptionButton = Utilities.getInstance().initializeNewButton(
payrollOptionButton.getX()+payrollOptionButton.getWidth()-2,
payrollOptionButton.getY(),
42, 42
, img.pdfImgBtn, img.pdfImgBtnHover
);
pdfOptionButton.setFocusable(false);
topPanel.add(pdfOptionButton);
//---------------------------------------------
//--> Add EXCEL button.
excelOptionButton = Utilities.getInstance().initializeNewButton(
pdfOptionButton.getX()+pdfOptionButton.getWidth()-2,
pdfOptionButton.getY(),
42, 42
, img.excelImgBtn, img.excelImgBtnHover
);
excelOptionButton.setFocusable(false);
topPanel.add(excelOptionButton);
//---------------------------------------------
//--> Add Lock button.
lockOptionButton = Utilities.getInstance().initializeNewButton(
excelOptionButton.getX()+excelOptionButton.getWidth()-2,
excelOptionButton.getY(),
37, 39
, img.lockImgBtn, img.lockImgBtnHover
);
lockOptionButton.setFocusable(false);
topPanel.add(lockOptionButton);
//-----------------------------------------------
//--> Add the TITLE if DATA or DATE option button/label
int optionSettingTitleBtnWIDTH=127,optionSettingTitleBtnHEIGHT=30;
payrollDateDataLabel=new JLabel();
payrollDateDataLabel.setHorizontalAlignment(JLabel.CENTER);
payrollDateDataLabel.setVerticalAlignment(JLabel.CENTER);
payrollDateDataLabel.setBounds(
Constant.VIEW_WIDTH/2-(optionSettingTitleBtnWIDTH/2),
20,
optionSettingTitleBtnWIDTH,
optionSettingTitleBtnHEIGHT
);
topPanel.add(payrollDateDataLabel);
//--------------------------------------------------------------
//--> Add Search bar image.
int h=52;
JLabel searchBar = new JLabel(img.searchBarImg);
searchBar.setBounds(435,h, 376, 43);
//--> Add Filter Textfield, Label and Combobox, search button.
filterTextField = new JTextField();
filterTextField.setBounds(442, h, 340, 31);
filterTextField.setOpaque(false);
filterTextField.setBorder(BorderFactory.createEmptyBorder());
filterTextField.setColumns(10);
filterTextField.setFocusable(true);
topPanel.add(filterTextField);
JButton searchBtn = Utilities.getInstance().initializeNewButton(
782, h+4, 23, 24, img.searchBtnImg, img.searchBtnHoverImg
);
topPanel.add(searchBtn);
topPanel.add(searchBar);
}
/**
* Set the components of top right button panel where
* add, delete, netpaycopymode, cancelcopymode.
*/
private void setTopRightButtonPanelComponents(){
int y=70;;
//--> Top left panel
topRightButtonPanel = new JPanel();
topRightButtonPanel.setBounds(
showDisplayPanel.getX()+showDisplayPanel.getWidth()-(topRightBtnWidth*3),
y,
topRightBtnWidth,
topRightBtnHeight
);
topRightButtonPanel.setBackground(Color.GREEN);
topRightButtonPanel.setOpaque(false);
topRightButtonPanel.setLayout(new GridLayout(1, 3, 0, 0));
topPanel.add(topRightButtonPanel);
//---------------------------------------------
//--> Add ADD payroll date/data btn
addBtn = Utilities.getInstance().initializeNewButton(
-1,-1,-1,-1, img.edAddImg, img.edAddImgHover
);
topRightButtonPanel.add(addBtn);
//---------------------------------------------
//--> Add DELETE payroll date/data btn
delBtn = Utilities.getInstance().initializeNewButton(
-1,-1,-1,-1, img.edDeleteImg, img.edDeleteImgHover
);
topRightButtonPanel.add(delBtn);
//---------------------------------------------
//--> Add SHOW PAYSLIP DIALOG btn
//--> Add DELETE payroll date/data btn
showPayslipDialogBtn = Utilities.getInstance().initializeNewButton(
-1,-1,-1,-1, img.showPayslipDialogBtnImg, img.showPayslipDialogBtnImgHover
);
topRightButtonPanel.add(showPayslipDialogBtn);
//---------------------------------------------
//--> Add NET PAY COPY MODE btn
netPayCopyModeBtn = Utilities.getInstance().initializeNewButton(
-1,-1,-1,-1, img.netPayCopyModeImg, img.netPayCopyModeImgHover
);
topRightButtonPanel.add(netPayCopyModeBtn);
cancelNetPayCopyModeBtn = Utilities.getInstance().initializeNewButton(
-1,-1,-1,-1, img.cancelNetPayCopyModeImg, img.cancelNetPayCopyModeImgHover
);
topRightButtonPanel.add(cancelNetPayCopyModeBtn);
// updateTopLeftPanel(3,"");
// leftTopPanel.add(addBtn);
// leftTopPanel.add(deleteBtn);
// leftTopPanel.add(editBtn);
// leftTopPanel.add(calculateBtn);
// leftTopPanel.add(saveBtn);
// leftTopPanel.add(cancelBtn);
}
/**
* Set the component of show display panel.
*/
private void setShowDisplayPanel(){
showDisplayPanel=new JPanel();
showDisplayPanel.setBounds(950,0,289,65);
showDisplayPanel.setOpaque(false);
showDisplayPanel.setLayout(null);
topPanel.add(showDisplayPanel);
//----------------------------
showBtn = Utilities.getInstance().initializeNewButton(
214, 32, 73, 34, img.showButtonImg, img.showButtonImgHover
);
showBtn.setToolTipText("Alt+W");
showDisplayPanel.add(showBtn);
payrollDateComboBox = new JComboBox<String>();
payrollDateComboBox.setBounds(94,6,107,20);
showDisplayPanel.add(payrollDateComboBox);
departmentComboBox = new JComboBox<String>();
departmentComboBox.setBounds(94,35,107,20);
showDisplayPanel.add(departmentComboBox);
//----------------------------
JLabel label = new JLabel(img.showDisplayPanelBG);
label.setBounds(0, 0, showDisplayPanel.getWidth(),showDisplayPanel.getHeight());
showDisplayPanel.add(label);
}
/**
* Set components of the table panel.
*/
private void setTableComponents(){
JPanel tablePanel = new JPanel();
tablePanel.setOpaque(false);
tablePanel.setBackground(Color.ORANGE);
tablePanel.setLayout(new GridLayout(1,0));
viewPanel.add(tablePanel, BorderLayout.CENTER);
//--> Set table
TableRowSorter<PayrollTableModel> sorter;
//> Employee Table
PayrollTableModel fullScreenTableModel=new PayrollTableModel();
sorter= new TableRowSorter<PayrollTableModel>(fullScreenTableModel);
fullScreenTable=new ReusableTable(fullScreenTableModel, sorter, false);
// fullScreenTable.setBackground(new Color(255, 255, 153));
fullScreenTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
//---------------------------------------------------------------------------------------------------------------------------------
//--> Set Scrollpane
//--> Create the scroll pane and add the table to it.
//--> Remember: To show the horizontal scroll bar,
// the main panel layout must be null/absolute and autoresize of table id OFF.
// Since the horizontal scroll bar is not shown if the scrollpane is too long.
// Height of a horzontak scrollbar is 20;
fullScreenTableScrollPane = new JScrollPane(fullScreenTable);
fullScreenTableScrollPane.setBounds(
0,
0,
tablePanel.getWidth(),
tablePanel.getHeight());
fullScreenTableScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
fullScreenTableScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
fullScreenTableScrollPane.setOpaque(false);
tablePanel.add(fullScreenTableScrollPane);
}
private void setBottomPanelComponents(){
bottomPanel = new JPanel();
bottomPanel.setOpaque(false);
bottomPanel.setBackground(Color.ORANGE);
bottomPanel.setPreferredSize(new Dimension(0,20));
bottomPanel.setLayout(null);
viewPanel.add(bottomPanel, BorderLayout.SOUTH);
//-------------------------------------------------------------
rowCountLabel = new JLabel("Row Count: 0");
rowCountLabel.setBounds(10, 0, Constant.ROW_COUNT_LABEL_WIDTH, Constant.ROW_COUNT_LABEL_HEIGHT);
bottomPanel.add(rowCountLabel);
//-------------------------------------------------------------
//> Set Total Table
PayrollTableModel totalTableModel=new PayrollTableModel();
TableRowSorter<PayrollTableModel>totalSorter= new TableRowSorter<PayrollTableModel>(totalTableModel);
totalFullScreenTable=new ReusableTable(totalTableModel,totalSorter,true);
//> Set Total Table Scrollpane.
totalTableScrollPane = new JScrollPane(totalFullScreenTable);
totalTableScrollPane.setBounds(
rowCountLabel.getX(),
rowCountLabel.getY()+rowCountLabel.getHeight()+10,
Constant.VIEW_WIDTH-Constant.SCROLL_BAR_WIDTH*2,
60);
totalTableScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
totalTableScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
bottomPanel.add(totalTableScrollPane);
}
private void setAddOrDeductionData(){
addEDDataDialog.setTitle("Choose Payroll Date and Generate ID");
addEDDataDialog.cancelButton.setVisible(false);
}
private void l_____________________________l(){}
/**
* Adjust the height of bottom panel depending if payroll date or payroll data are shown.
* @param height
*/
public void changeTheHeightOfBottomPanel(int height){
bottomPanel.setPreferredSize(new Dimension(0,height));
}
/**
* Execute the search mechanism of all tables.
*/
public void executeSearchMechanismOfAllTables(){
if(fullScreenTable.getModel().getRowCount()>0){
fullScreenTable.searchFilterMechanism(filterTextField,rowCountLabel);
}
}
/**
* Return a payslip storage info based from the given earningID or deductionID.
* @param db
* @param id
* @param mode
* @return
*/
public PayslipDataStorageInfo getPayslipStorageInfoBasedFromDeductionOrEarningID(Database db,String id,int mode){
for(PayslipDataStorageInfo info:payslipDataStorageList){
if(mode==Constant.EARNING_MODE && info.earningID.equals(id)){
return info;
}
else if(mode==Constant.DEDUCTION_MODE && info.deductionID.equals(id)){
return info;
}
}
return null;
}
/**
* Update the shown buttons in top left button.
* @param numoFBtns
*/
public void updateTopRightButtonPanel(int numoFBtns){
//> Remove all
topRightButtonPanel.remove(addBtn);
topRightButtonPanel.remove(delBtn);
topRightButtonPanel.remove(showPayslipDialogBtn);
topRightButtonPanel.remove(netPayCopyModeBtn);
topRightButtonPanel.remove(cancelNetPayCopyModeBtn);
//--> Manipulations
//--> Set Location
topRightButtonPanel.setLocation(
showDisplayPanel.getX()+showDisplayPanel.getWidth()-(topRightBtnWidth*numoFBtns),
topRightButtonPanel.getY()
);
if(numoFBtns==2){
//> Add necessary
topRightButtonPanel.add(addBtn);
topRightButtonPanel.add(delBtn);
}
//--> When calculate, save, cancel buttons are only shown.
else if(numoFBtns==4){
//> Add necessary
topRightButtonPanel.add(addBtn);
topRightButtonPanel.add(delBtn);
topRightButtonPanel.add(showPayslipDialogBtn);
topRightButtonPanel.add((netPayCopyModeBtn.isVisible())?netPayCopyModeBtn:cancelNetPayCopyModeBtn);
}
//> Set and add components
topRightButtonPanel.setSize(topRightBtnWidth*numoFBtns,topRightBtnHeight);
topRightButtonPanel.revalidate();
topRightButtonPanel.repaint();
}
public void setPDFPanelComponentsContractual(){
String[] buttonKeyList={
Constant.DISPLAY_PAYSLIP_PDF,
Constant.DISPLAY_DEPARTMENT_PAYROLL_DATA_PDF,
Constant.DISPLAY_SSS_LOAN_DATA_PDF,
Constant.DISPLAY_PAGIBIG_LOAN_PDF,
Constant.DISPLAY_MEDICARE_PDF,
Constant.DISPLAY_SSS_CONT_PDF,
Constant.DISPLAY_HDMF_PDF
};
ImageIcon[] imageList={
img.displayPayslipPDFImg,
img.displayDepartmentPayrollDataPDFImg,
img.displaySSSLoanPayrollDataPDFImg,
img.displayPagibigLoanPayrollDataPDFImg,
img.displayMedicarePayrollDataPDFImg,
img.displaySssContPayrollDataPDFImg,
img.displayHDMFPayrollDataPDFImg
};
ImageIcon[] imageHoverList={
img.displayPayslipPDFImgHover,
img.displayDepartmentPayrollDataPDFImgHover,
img.displaySSSLoanPayrollDataPDFImgHover,
img.displayPagibigLoanPayrollDataPDFImgHover,
img.displayMedicarePayrollDataPDFImgHover,
img.displaySssContPayrollDataPDFImgHover,
img.displayHDMFPayrollDataPDFImgHover
};
setNecessaryPDFPanelComponentsWhenExtended(
img.pdfOptionsContractualBgImg,
242, 188,
buttonKeyList, imageList, imageHoverList);
}
/**
* Set component of pdf panel.
*/
public void setPDFPanelComponentsRegular(){
String[] buttonKeyList={
Constant.DISPLAY_PAYSLIP_PDF,
Constant.DISPLAY_EMPLOYEE_PAYROLL_DATA_PDF,
Constant.DISPLAY_DEPARTMENT_PAYROLL_DATA_PDF,
Constant.DISPLAY_ASEMCO_DATA_PDF,
Constant.DISPLAY_BCCI_DATA_PDF,
Constant.DISPLAY_OCCCI_DATA_PDF,
Constant.DISPLAY_DBP_DATA_PDF,
Constant.DISPLAY_CITY_SAVINGS_DATA_PDF,
Constant.DISPLAY_ST_PLAN_PDF,
Constant.DISPLAY_W_TAX_PDF,
Constant.DISPLAY_LBP_PDF,
Constant.DISPLAY_SSS_LOAN_DATA_PDF,
Constant.DISPLAY_PAGIBIG_LOAN_PDF,
Constant.DISPLAY_UNION_DUES_PDF,
Constant.DISPLAY_SSS_CONT_PDF,
Constant.DISPLAY_HDMF_PDF,
Constant.DISPLAY_MEDICARE_PDF
};
ImageIcon[] imageList={
img.displayPayslipPDFImg,
img.displayEmployeePayrollDataPDFImg,
img.displayDepartmentPayrollDataPDFImg,
img.displayASEMCOPayrollDataPDFImg,
img.displayBCCIPayrollDataPDFImg,
img.displayOCCCIPayrollDataPDFImg,
img.displayDBPPayrollDataPDFImg,
img.displayCitySavingsPayrollDataPDFImg,
img.displayStPlanPayrollDataPDFImg,
img.displayWTaxPayrollDataPDFImg,
img.displayLBPPayrollDataPDFImg,
img.displaySSSLoanPayrollDataPDFImg,
img.displayPagibigLoanPayrollDataPDFImg,
img.displayUnionDuesPayrollDataPDFImg,
img.displaySssContPayrollDataPDFImg,
img.displayHDMFPayrollDataPDFImg,
img.displayMedicarePayrollDataPDFImg
};
ImageIcon[] imageHoverList={
img.displayPayslipPDFImgHover,
img.displayEmployeePayrollDataPDFImgHover,
img.displayDepartmentPayrollDataPDFImgHover,
img.displayASEMCOPayrollDataPDFImgHover,
img.displayBCCIPayrollDataPDFImgHover,
img.displayOCCCIPayrollDataPDFImgHover,
img.displayDBPPayrollDataPDFImgHover,
img.displayCitySavingsPayrollDataPDFImgHover,
img.displayStPlanPayrollDataPDFImgHover,
img.displayWTaxPayrollDataPDFImgHover,
img.displayLBPPayrollDataPDFImgHover,
img.displaySSSLoanPayrollDataPDFImgHover,
img.displayPagibigLoanPayrollDataPDFImgHover,
img.displayUnionDuesPayrollDataPDFImgHover,
img.displaySssContPayrollDataPDFImgHover,
img.displayHDMFPayrollDataPDFImgHover,
img.displayMedicarePayrollDataPDFImgHover
};
setNecessaryPDFPanelComponentsWhenExtended(
img.pdfOptionsBgImg,
242, 335,
buttonKeyList, imageList, imageHoverList);
}
/**
* Set component of EXCEL panel.
*/
public void setExcelPanelComponentsRegular(){
String[] buttonKeyList={
Constant.EXPORT_EMPLOYEE_PAYROLL_DATA_EXCEL,
Constant.EXPORT_DEPARTMENT_PAYROLL_DATA_EXCEL,
Constant.EXPORT_ASEMCO_DATA_EXCEL,
Constant.EXPORT_BCCI_DATA_EXCEL,
Constant.EXPORT_OCCCI_DATA_EXCEL,
Constant.EXPORT_DBP_DATA_EXCEL,
Constant.EXPORT_CITY_SAVINGS_DATA_EXCEL,
Constant.EXPORT_ST_PLAN_EXCEL,
Constant.EXPORT_W_TAX_EXCEL,
Constant.EXPORT_LBP_EXCEL,
Constant.EXPORT_SSS_LOAN_DATA_EXCEL,
Constant.EXPORT_PAGIBIG_LOAN_EXCEL,
Constant.EXPORT_UNION_DUES_EXCEL,
Constant.EXPORT_SSS_CONT_EXCEL,
Constant.EXPORT_HDMF_EXCEL,
Constant.EXPORT_MEDICARE_EXCEL
};
ImageIcon[] imageList={
img.exportEmployeePayrollDataExcelImg,
img.exportDepartmentPayrollDataExcelImg,
img.exportASEMCOPayrollDataExcelImg,
img.exportBCCIPayrollDataExcelImg,
img.exportOCCCIPayrollDataExcelImg,
img.exportDBPPayrollDataExcelImg,
img.exportCitySavingsPayrollDataExcelImg,
img.exportStPlanPayrollDataExcelImg,
img.exportWTaxPayrollDataExcelImg,
img.exportLBPPayrollDataExcelImg,
img.exportSSSLoanPayrollDataExcelImg,
img.exportPagibigLoanPayrollDataExcelImg,
img.exportUnionDuesPayrollDataExcelImg,
img.exportSssContPayrollDataExcelImg,
img.exportHDMFPayrollDataExcelImg,
img.exportMedicarePayrollDataExcelImg
};
ImageIcon[] imageHoverList={
img.exportEmployeePayrollDataExcelImgHover,
img.exportDepartmentPayrollDataExcelImgHover,
img.exportASEMCOPayrollDataExcelImgHover,
img.exportBCCIPayrollDataExcelImgHover,
img.exportOCCCIPayrollDataExcelImgHover,
img.exportDBPPayrollDataExcelImgHover,
img.exportCitySavingsPayrollDataExcelImgHover,
img.exportStPlanPayrollDataExcelImgHover,
img.exportWTaxPayrollDataExcelImgHover,
img.exportLBPPayrollDataExcelImgHover,
img.exportSSSLoanPayrollDataExcelImgHover,
img.exportPagibigLoanPayrollDataExcelImgHover,
img.exportUnionDuesPayrollDataExcelImgHover,
img.exportSssContPayrollDataExcelImgHover,
img.exportHDMFPayrollDataExcelImgHover,
img.exportMedicarePayrollDataExcelImgHover
};
setNecessaryExcelPanelComponentsWhenExtended(
img.excelOptionsBgImg,
211, 321,
buttonKeyList, imageList, imageHoverList);
}
/**
* Set component of EXCEL panel.
*/
public void setExcelPanelComponentsContractual(){
String[] buttonKeyList={
Constant.EXPORT_DEPARTMENT_PAYROLL_DATA_EXCEL,
Constant.EXPORT_SSS_LOAN_DATA_EXCEL,
Constant.EXPORT_PAGIBIG_LOAN_EXCEL,
Constant.EXPORT_MEDICARE_EXCEL,
Constant.EXPORT_SSS_CONT_EXCEL,
Constant.EXPORT_HDMF_EXCEL
};
ImageIcon[] imageList={
img.exportDepartmentPayrollDataExcelImg,
img.exportSSSLoanPayrollDataExcelImg,
img.exportPagibigLoanPayrollDataExcelImg,
img.exportMedicarePayrollDataExcelImg,
img.exportSssContPayrollDataExcelImg,
img.exportHDMFPayrollDataExcelImg
};
ImageIcon[] imageHoverList={
img.exportDepartmentPayrollDataExcelImgHover,
img.exportSSSLoanPayrollDataExcelImgHover,
img.exportPagibigLoanPayrollDataExcelImgHover,
img.exportMedicarePayrollDataExcelImgHover,
img.exportSssContPayrollDataExcelImgHover,
img.exportHDMFPayrollDataExcelImgHover
};
setNecessaryExcelPanelComponentsWhenExtended(
img.excelOptionsContractualBgImg,
211, 153,
buttonKeyList, imageList, imageHoverList);
}
private void l_________________________________l(){}
public static PayrollViewPanel getInstance(){
if(instance==null)
instance=new PayrollViewPanel();
return instance;
}
public static void setInstanceToNull(){
instance =null;
}
}
| [
"sxietrz@yahoo.com"
] | sxietrz@yahoo.com |
075f12d2d7893e483a813b9c9aa229a8c8cc7697 | cb96b2424da3777f42f3fdb6f5e54133f5564249 | /src/pageObjects/Checklisten_Editor_Page.java | 877d35b4bbc381ed166c2c7ceb079b2a35d76178 | [] | no_license | quoctuan1986/xentry-scrennshot-automate | bb4916bfb6d4655254db4a74c406c649797088a5 | 2767ae60cc35a5f02a45872b6aa619de3402abc3 | refs/heads/master | 2023-02-27T04:00:07.884411 | 2021-02-05T12:33:40 | 2021-02-05T12:33:40 | 310,558,547 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 20,988 | java | package pageObjects;
import org.openqa.selenium.*;
import org.openqa.selenium.interactions.Actions;
public class Checklisten_Editor_Page {
public static WebDriver driver;
public Checklisten_Editor_Page(WebDriver driver){this.driver = driver;}
public static WebElement elementWithXpath(String xpath){
WebElement ele = driver.findElement(By.xpath(xpath));
return ele;
}
public static WebElement elementWithId(String id){
WebElement ele = driver.findElement(By.id(id));
return ele;
}
public static void moveTheCosorToElement(WebElement element){
Actions builder = new Actions(driver);
builder.moveToElement(element).build().perform();
}
public static void scrollDownThePageToZweiteSprache(){
WebElement element = driver.findElement(By.xpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[1]/div[6]/div[2]/label"));
moveTheCosorToElement(element);
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", element);
}
public static void zoomIn(){
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("document.body.style.zoom = '0.9'");
}
public static void zoomIn_2(){
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("document.body.style.zoom = '0.8'");
}
public static void zoomRelease(){
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("document.body.style.zoom = '1.0'");
}
public static void clickOn3PunktMenu(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[1]/xy-c-side-navigation/div/footer/xy-c-aux-menu/button").click();
}
public static void clickOnSettingButton(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[1]/xy-c-side-navigation/div/footer/xy-c-aux-menu/button/nav/button").click();
}
public static void clickOnBetriebSetting(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/ul/li[2]/button").click();
}
public static void clickOnMarktSetting(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/ul/li[3]/button").click();
}
public static void choiceChecklisteAnahmeProtokol() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[1]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[1]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[2]/li/span").click();
Thread.sleep(2000);
}
public static void choiceChecklisteAnahmeProtokolForVAN() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[1]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[1]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[4]/li/span").click();
Thread.sleep(2000);
}
public static void choiceChecklisteAnahmeProtokolForLKW() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[1]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[1]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[6]/li/span").click();
Thread.sleep(2000);
}
public static void choiceAllgemeineCheckliste() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[1]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[1]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[1]/li/span").click();
Thread.sleep(2000);
}
public static void choiceChecklisteAnahmeProtokolForMarkt() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-market-settings/div/div[2]/ma-cc-checklist-settings/div/div/div/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-market-settings/div/div[2]/ma-cc-checklist-settings/div/div/div/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[2]/li").click();
Thread.sleep(2000);
}
public static void choiceChecklisteAnahmeProtokolForMarktLKW() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-market-settings/div/div[2]/ma-cc-checklist-settings/div/div/div/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-market-settings/div/div[2]/ma-cc-checklist-settings/div/div/div/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[6]/li/span").click();
Thread.sleep(2000);
}
public static void choiceChecklisteAnahmeProtokolForVANOfMarkt() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-market-settings/div/div[2]/ma-cc-checklist-settings/div/div/div/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-market-settings/div/div[2]/ma-cc-checklist-settings/div/div/div/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[4]/li/span").click();
Thread.sleep(2000);
}
public static void choiceAllgemeineChecklisteForMarkt() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[1]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-market-settings/div/div[2]/ma-cc-checklist-settings/div/div/div/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[1]/li/span").click();
Thread.sleep(2000);
}
public static void clickOnButtonBearbeiten(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/button").click();
}
public static void clickOnButtonBearbeitenInMarktSetting(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-market-settings/div/div[2]/ma-cc-checklist-settings/div/div/button").click();
}
public static void clickOnButtonSpeichern(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/footer/div[2]/xy-c-spinner/div/button").click();
}
public static void clickOnPlusSymbolOfAussenSeite(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[1]/div[1]/div[2]/button").click();
}
public static void choiceTypJaOrNein() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/div/form/div[3]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/div/form/div[3]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[1]/li").click();
Thread.sleep(2000);
}
public static void choiceTypIOOrNIO() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/div/form/div[3]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/div/form/div[3]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[2]/li").click();
Thread.sleep(2000);
}
public static void closeDialogPruefEditor(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/header/div[2]/xy-c-spinner/div/button").click();
}
public static void clickOnTextPruefEditor(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/header/div[1]/h2").click();
}
public static void searchWithText(String text) throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[1]/div[1]/div/div/div/ma-cc-reception-list/div/div/header/div/xy-c-search/div/button").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[1]/div[1]/div/div/div/ma-cc-reception-list/div/div/header/div/xy-c-search/div/div/input").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[1]/div[1]/div/div/div/ma-cc-reception-list/div/div/header/div/xy-c-search/div/div/input").sendKeys(text);
Thread.sleep(2000);
}
public static void clickOnSearchButton(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[1]/div[1]/div/div/div/ma-cc-reception-list/div/div/header/div/xy-c-search/div/button").click();
}
public static void clickOnBetriebPruefrik(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[10]/div[1]/div[2]/div/h2").click();
}
public static void clickOnBetriebPruefrikLKW(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[6]/div[1]/div[2]/div/h2").click();
}
public static void clickOnBetriebPruefrikForVan(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[8]/div[1]/div[2]/div/h2").click();
}
public static void sendkeysInRubrikeditorOfLangbezeichnung() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-category-editor/xy-c-dialog-body/div/div/form/div[2]/xy-c-input/xy-c-input-wrapper/div/div/input").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-category-editor/xy-c-dialog-body/div/div/form/div[2]/xy-c-input/xy-c-input-wrapper/div/div/input").sendKeys(" ");
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-category-editor/xy-c-dialog-body/div/header/div[1]/h2").click();
Thread.sleep(2000);
}
public static void sendkeysInPruefEditorOfKurzbezeichnung(String text){
WebElement element = driver.findElement(By.xpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/div/form/div[1]/xy-c-input/xy-c-input-wrapper/div/div/input"));
element.click();
element.sendKeys(text);
}
public static void sendkeysInPruefEditorOfLangbezeichnung(String text){
WebElement element = driver.findElement(By.xpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/div/form/div[2]/xy-c-input/xy-c-input-wrapper/div/div/input"));
element.click();
element.sendKeys(text);
}
public static void clickOnButtonUebernehmen(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/footer/div/xy-c-spinner/div/button").click();
}
public static void clickOnMarktRubrikAnlegen(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[9]/div[1]/div[2]/div").click();
}
public static void clickOnMarktRubrikAnlegenVAN(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[7]/div[1]/div[2]/div").click();
}
public static void clickOnMarktRubrikAnlegenLKW(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[5]/div[1]/div[2]/div").click();
}
public static void sendkeysInRubrikEditorOfKurzbezeichnung(String text){
WebElement element = driver.findElement(By.xpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-category-editor/xy-c-dialog-body/div/div/form/div[1]/xy-c-input/xy-c-input-wrapper/div/div/input"));
for (int l=0; l<26; l++){
element.sendKeys(Keys.BACK_SPACE);
}
element.click();
element.sendKeys(text);
}
public static void sendkeysInRubrikEditorOfLangbezeichnung(String text){
WebElement element = driver.findElement(By.xpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-category-editor/xy-c-dialog-body/div/div/form/div[2]/xy-c-input/xy-c-input-wrapper/div/div/input"));
for (int l=0; l<40; l++){
element.sendKeys(Keys.BACK_SPACE);
}
element.click();
element.sendKeys(text);
}
public static void clickOnButtonUebernehmenForRubrikAnlegen(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-category-editor/xy-c-dialog-body/div/footer/div/xy-c-spinner/div/button").click();
}
public static void clickOnCheckBoxAktiv(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-checkpoint-editor/xy-c-dialog-body/div/div/form/div[5]/div/label").click();
}
public static void clickOnTextRubrikEditor(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-category-editor/xy-c-dialog-body/div/header/div[1]/h2").click();
}
public static void closeRubrikEditor(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[3]/div/ma-cc-category-editor/xy-c-dialog-body/div/header/div[2]/xy-c-spinner/div/button").click();
}
public static void choiceSubOutlet() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[2]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[2]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[2]/li").click();
Thread.sleep(2000);
}
public static void choiceGesamtOutlet() throws InterruptedException{
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[2]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[2]/label").click();
Thread.sleep(2000);
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/div/div/ma-cc-company-settings/div/div[2]/ma-cc-checklist-settings/div/div/div[2]/xy-c-select-box/xy-c-input-wrapper/div/div/p-dropdown/div/div[4]/div/ul/p-dropdownitem[1]/li").click();
Thread.sleep(2000);
}
public static void clickOnIButton(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[1]/div[2]/div[3]/div[2]/div[1]/span[4]/xy-c-tooltip/div/button").click();
}
public static void deletePruefPunktOfSubOutlet(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[1]/div[2]/div[3]/div[2]/div[2]/button").click();
}
public static void deletePruefPunktOfBetrieb(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[1]/div[2]/div[2]/div[2]/div[2]/button").click();
}
public static void deletePruefPunktOfMarkt(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/div/div/div[1]/div[2]/div/div[2]/div[2]/button").click();
}
public static void clickOnButtonSpeichernInSetting(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/footer/button").click();
}
public static void closeSetting(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog/div[2]/ma-cc-settings/form/header/button").click();
}
public static void clickOnTextCheckListprotokoll(){
elementWithXpath("/html/body/ma-cc-car-check-app/div/xy-c-frame/div/div/div[3]/xy-c-dialog[2]/div[2]/ma-cc-checklist-editor/xy-c-dialog-body/div/header/div[1]/h2").click();
}
}
| [
"tuan.tran@linova.de"
] | tuan.tran@linova.de |
33e2d4289c187991e9e58accfda336ec9f5d5397 | 7f5ae5da29944d3239df1d9249eea0e6f36d8a5b | /app/src/main/java/com/mmu/foodbank/Child.java | ae3d334f81eaf80399b508cebe90052994ff0b9f | [] | no_license | abuden98/Foodbank | f30f3b49f64e67be08bbefbd5882118d0d05ee8b | cacc10b3b9e6c47ff8fd561af23eed8df3962de4 | refs/heads/master | 2023-02-27T07:00:47.258432 | 2021-02-06T21:08:10 | 2021-02-06T21:08:10 | 329,518,095 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,199 | java | package com.mmu.foodbank;
public class Child {
private String userName;
private String foodName;
private String quantity;
private String number;
private String imageUri;
private Double x,y;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getFoodName() {
return foodName;
}
public void setFoodName(String foodName) {
this.foodName = foodName;
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public String getImageUri() {
return imageUri;
}
public void setImageUri(String imageUri) {
this.imageUri = imageUri;
}
public Double getX() {
return x;
}
public void setX(Double x) {
this.x = x;
}
public Double getY() {
return y;
}
public void setY(Double y) {
this.y = y;
}
} | [
"fikryizuddin1998@gmail.com"
] | fikryizuddin1998@gmail.com |
25bdbb3c0f891f2b08695c1af022984660dfbb06 | bf09eb988c1fb6fecc7f4ec44a32e57745adb878 | /src/main/java/com/taskmanager/web/TaskController.java | e0d331c0c77562cf27d02bb71a0a723a99053987 | [] | no_license | Qwerl/taskManager | ef4295b535087f22d828dc21d74dfc5603ccd94c | bc9ea1534f7bc2598c08cfcca456e43da36873ea | refs/heads/master | 2021-01-11T04:32:07.716386 | 2017-03-05T00:31:32 | 2017-03-05T00:31:32 | 71,171,385 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 762 | java | package com.taskmanager.web;
import java.util.List;
import com.taskmanager.entities.Task;
import com.taskmanager.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class TaskController {
@Autowired
private TaskService taskService;
@PostMapping(value = "/task")
public List<Task> list() {
return taskService.getTasks();
}
@PostMapping(value = "account/{accountId}/task")
public List<Task> listByAccountId(@PathVariable Long accountId) {
return taskService.getTasksByAccountId(accountId);
}
}
| [
"Askar.Bikmetov@gmai.com"
] | Askar.Bikmetov@gmai.com |
8cbf581851dfbf51d6a48ddf48077593a77d15c7 | 82bbb5e21428ed18cd797766b2ba14caf27d42f7 | /src/main/java/com/cognizant/employee/dao/DepartmentDAOImpl.java | c4d54cc58a3ece141bb6ca0c836555fe5c713430 | [] | no_license | Danussh18/RestFullAPIS | 702ba0de9cb84527436be52fe9c9d0bc48f79d24 | c790df028f6f369a2f6ff018e02a8c150e8f6819 | refs/heads/master | 2023-06-14T09:29:47.019942 | 2021-07-07T10:01:05 | 2021-07-07T10:01:05 | 383,752,510 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 845 | java | package com.cognizant.employee.dao;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;
import com.cognizant.employee.model.Department;
@Component
public class DepartmentDAOImpl implements DepartmentDAO {
private static final Logger LOGGER = LoggerFactory.getLogger(DepartmentDAOImpl.class);
private static List<Department> departmentList;
static {
ApplicationContext context = new ClassPathXmlApplicationContext("employee.xml");
departmentList = (List<Department>) context.getBean("departmentList", java.util.ArrayList.class);
}
@Override
public List<Department> getAllDepartments() {
return departmentList;
}
}
| [
"62802664+Danussh18@users.noreply.github.com"
] | 62802664+Danussh18@users.noreply.github.com |
7e63791283146ca1c4605b0f216a572b25b49c7f | 07decdd394947f4ab1883cc8b5c2fae9fab89873 | /comp_talking/src/androidTest/java/com/lilei/talking/ExampleInstrumentedTest.java | 39bc7fbccaf55db0719648abfb40c36e175304a8 | [] | no_license | rhine-li-lei/BeeComponent | a8ab4174957b9b095f63d203c144b78e09e435c4 | ea38a150894ccdd9f8c83ef39b0785b618654792 | refs/heads/master | 2020-03-30T01:19:11.415188 | 2018-12-03T09:22:35 | 2018-12-03T09:22:35 | 150,570,333 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 738 | java | package com.lilei.talking;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.lilei.aking.test", appContext.getPackageName());
}
}
| [
"1136447460@qq.com"
] | 1136447460@qq.com |
1707c754c18a81ded2d7063568794b5ee7fb2227 | 54c122d2e84eb98494b21b37a4d9f998bcfbd5a1 | /src/org/langqiao/newinstance/JavaCourse.java | db46ad389187d34db984cead7e1aa85df2945cad | [] | no_license | hideaki10/spring | 702051e2aa228ae60091925a7cd89ca024253087 | d88579959e3098d35625024748c42689574dc32b | refs/heads/master | 2020-04-07T05:02:57.231530 | 2018-11-18T12:28:16 | 2018-11-18T12:28:16 | 158,081,366 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 184 | java | package org.langqiao.newinstance;
public class JavaCourse implements ICourse{
@Override
public void learn(){
System.out.println("学习java");
}
}
| [
"sen.shikou@xcrat.com"
] | sen.shikou@xcrat.com |
8f15439110b3dd9c681e2c0bd27b43051ce6a182 | 9b9dd4b68f21e57d219fb3af422e76be7fc7a7ee | /src/main/java/org/lanternpowered/server/block/provider/property/PropertyProviderCollections.java | 4efe67f546fface18c278818a002494568928ae4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Mosaplex/Lantern | 3cf754db3a3e0240ecd1d6070074cf0d097f729c | 7f536b5b0d06a05dfeb62d2873664c42ee28f91f | refs/heads/master | 2021-03-21T11:02:08.501286 | 2019-07-02T15:49:13 | 2019-07-02T15:49:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,844 | java | /*
* This file is part of LanternServer, licensed under the MIT License (MIT).
*
* Copyright (c) LanternPowered <https://www.lanternpowered.org>
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) 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 org.lanternpowered.server.block.provider.property;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.blastResistance;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.flammable;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.gravityAffected;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.hardness;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.lightEmission;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.matter;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.passable;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.replaceable;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.solidCube;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.solidMaterial;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.solidSide;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.statisticsTracked;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.surrogateBlock;
import static org.lanternpowered.server.block.provider.property.PropertyProviders.unbreakable;
import org.spongepowered.api.data.property.block.MatterProperty;
/**
* Some presents of {@link PropertyProviderCollection}s that can be
* shared across block types.
*/
public final class PropertyProviderCollections {
public static final PropertyProviderCollection DEFAULT = PropertyProviderCollection.builder()
.add(matter(MatterProperty.Matter.SOLID))
.add(flammable(false))
.add(hardness(1.0))
.add(blastResistance(5.0))
.add(lightEmission(0))
.add(passable(false))
.add(gravityAffected(false))
.add(unbreakable(false))
.add(replaceable(false))
.add(surrogateBlock(false))
.add(statisticsTracked(true))
.add(solidMaterial(true))
.build();
public static final PropertyProviderCollection PASSABLE = PropertyProviderCollection.builder()
.add(passable(true))
.add(solidCube(false))
.add(solidSide(false))
.add(solidMaterial(false))
.build();
public static final PropertyProviderCollection UNBREAKABLE = PropertyProviderCollection.builder()
.add(unbreakable(true))
.add(hardness(-1.0))
.add(blastResistance(6000000.0))
.add(statisticsTracked(false))
.build();
public static final PropertyProviderCollection INSTANT_BROKEN = PropertyProviderCollection.builder()
.add(hardness(0.0))
.add(blastResistance(0.0))
.build();
public static final PropertyProviderCollection DEFAULT_GAS = DEFAULT.toBuilder()
.add(matter(MatterProperty.Matter.GAS))
.add(solidMaterial(false))
.add(replaceable(true))
.add(PASSABLE)
.build();
public static final PropertyProviderCollection DEFAULT_LIQUID = DEFAULT.toBuilder()
.add(matter(MatterProperty.Matter.LIQUID))
.add(solidMaterial(false))
.add(replaceable(true))
.add(PASSABLE)
.build();
private PropertyProviderCollections() {
}
}
| [
"seppevolkaerts@hotmail.com"
] | seppevolkaerts@hotmail.com |
d7706c315a415a36a404f3af0ca2c263ef0ff51a | b878b54c84227e96084e982dc6bff15a04970d92 | /app/src/main/java/com/example/exploding_kittens/EK_Actions/PlayAttackCard.java | 5d42848bf913c83ff8b2f9ea9d680ef2c9f1d722 | [] | no_license | chanlau/Exploding_Kittens | 9faff308c732c31dc300d15bcc23b9cf5751683e | abbfe5168fb81be43202459138754b46263460a2 | refs/heads/master | 2023-01-11T10:43:32.847922 | 2020-11-06T01:40:47 | 2020-11-06T01:40:47 | 295,557,360 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 296 | java | package com.example.exploding_kittens.EK_Actions;
import com.example.exploding_kittens.EK_Actions.actionMessage.GameAction;
import com.example.exploding_kittens.EK_Player.Player;
public class PlayAttackCard extends GameAction {
public PlayAttackCard(Player p) {
super(p);
}
}
| [
"ngg21@up.edu"
] | ngg21@up.edu |
90b700672909f4452e6e3fd7544df780f13de6f1 | f744728e2741434a7f2b13b61c7eb17a59125657 | /app/src/main/java/com/shemaroo/ratefetchapp/MainActivity.java | ea96c31e24ddfc1484f714182ed5bbe3654a6c9f | [] | no_license | larsjo9/RateFetch | 3978e38ba76a1ade267f0e0c52e96f7ff01cf8a6 | 2d6ce9fc61a8461469e83dfc75c27e916985bddd | refs/heads/master | 2020-03-23T07:43:57.458647 | 2018-07-17T12:35:33 | 2018-07-17T12:35:33 | 141,287,515 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,311 | java | package com.shemaroo.ratefetchapp;
import android.app.ProgressDialog;
import android.content.Intent;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.shemaroo.ratefetchapp.adapter.DataAdapter;
import com.shemaroo.ratefetchapp.datepicker.DatePickerFrom;
import com.shemaroo.ratefetchapp.datepicker.DatePickerTo;
import com.shemaroo.ratefetchapp.model.RecentList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class MainActivity extends AppCompatActivity {
private static final String url = "http://192.168.2.128/yedaz/check_rate.php";
private Button submit;
private EditText dateFrom,dateTo;
private String TAG = MainActivity.class.getSimpleName();
private ProgressDialog progressDialog;
public static final String JSON_ARRAY = "result";
private JSONArray result;
private RecyclerView recyclerView;
private RecyclerView.Adapter adapter;
List<RecentList> fullData;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
progressDialog = new ProgressDialog(this);
progressDialog.setCancelable(false);
submit = (Button)findViewById(R.id.btn_submit);
dateFrom = (EditText)findViewById(R.id.date_from);
dateTo = (EditText)findViewById(R.id.date_to);
fullData = new ArrayList<>();
recyclerView = (RecyclerView) findViewById(R.id.recyclerViewRecent);
recyclerView.setHasFixedSize(true);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);
recyclerView.setLayoutManager(layoutManager);
dateFrom.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
DialogFragment newFragment = new DatePickerFrom();
FragmentManager fm = getSupportFragmentManager();
newFragment.show(fm,"Date Picker");
}
});
dateTo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
DialogFragment otherFragment = new DatePickerTo();
FragmentManager fmm = getSupportFragmentManager();
otherFragment.show(fmm,"Date Picker");
}
});
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String dtFrom = dateFrom.getText().toString().trim();
String dtTo = dateTo.getText().toString().trim();
fetchData(dtFrom,dtTo);
}
});
}
private void fetchData(final String dtFrom,final String dtTo) {
// Tag used to cancel the request
String tag_string_req = "req_signup";
progressDialog.setMessage("Fetching data pls wait...");
progressDialog.show();
StringRequest strReq = new StringRequest(Request.Method.POST,
url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Log.d(TAG, "Data Response: " + response.toString());
JSONObject jObj = null;
try {
jObj = new JSONObject(response);
result = jObj.getJSONArray(JSON_ARRAY);
//Calling method getStudents to get the students from the JSON Array
getRecentActivity(result);
} catch (JSONException e) {
// JSON error
e.printStackTrace();
toast("Json error: " + e.getMessage());
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.e(TAG, "Error: " + error.getMessage());
toast("Unknown Error occurred");
progressDialog.hide();
}
}) {
@Override
protected Map<String, String> getParams() {
// Posting parameters to login url
Map<String, String> params = new HashMap<>();
params.put("dateFrom", dtFrom);
params.put("dateTo", dtTo);
return params;
}
};
// Adding request to request queue
AndroidLoginController.getInstance().addToRequestQueue(strReq, tag_string_req);
}
private void getRecentActivity(JSONArray j) {
for (int i = 0; i < j.length(); i++) {
RecentList recentList = new RecentList();
JSONObject json = null;
try {
json = j.getJSONObject(i);
recentList.setId(json.getString("id"));
recentList.setTradeDate(json.getString("trade_date"));
recentList.setUsd(json.getString("usd"));
recentList.setGbp(json.getString("gbp"));
recentList.setEuro(json.getString("euro"));
recentList.setYen(json.getString("yen"));
progressDialog.hide();
} catch (JSONException e) {
e.printStackTrace();
}
fullData.add(recentList);
}
adapter = new DataAdapter(fullData, this);
recyclerView.setAdapter(adapter);
}
private void toast(String x){
Toast.makeText(this, x, Toast.LENGTH_SHORT).show();
}
@Override
public void onBackPressed() {
super.onBackPressed();
finish();
}
}
| [
"larson.joseph9@gmail.com"
] | larson.joseph9@gmail.com |
c7da5ea07b7e9b4e49103109e45679e532fcdc1d | 7796e5d7ac9e1fdcb220983630122ca49efc335a | /src/main/java/com/pricetector/pmpdemo/model/Tracker.java | 04ebf87cc2c17b219cbc8a0622cb06fdbabb9dbb | [] | no_license | yvoschinsky/PMP-Demo | a955e1d88fa11aede4a9cf0d4963404ea0d17255 | 5b8b1548b8f44964a99820a7546aa646df15b864 | refs/heads/master | 2016-09-10T19:58:41.923290 | 2011-07-07T16:39:38 | 2011-07-07T16:39:38 | 1,976,063 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,598 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.pricetector.pmpdemo.model;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author dbukhanets
*/
@Entity
@Table(name = "tracker")
public class Tracker implements Serializable {
@Id
@GeneratedValue
@Column(name = "id")
private Long id;
@ManyToOne()
@JoinColumn(name = "user")
private User user;
@ManyToOne()
@JoinColumn(name = "retailer")
private Retailer retailer;
@Column(name = "productId", length = 128)
private String sku;
@Column(name = "period", length = 128)
private Long period;
@Column(name = "email", length = 128)
private String email;
@Column(name = "dateCreated")
@Temporal(TemporalType.TIMESTAMP)
private Date dateCreated;
@Column(name = "affordablePrice")
private Double affordablePrice;
public Double getAffordablePrice() {
return affordablePrice;
}
public Tracker setAffordablePrice(Double affordablePrice) {
this.affordablePrice = affordablePrice;
return this;
}
public Long getId() {
return id;
}
public Tracker setId(Long id) {
this.id = id;
return this;
}
public String getSku() {
return sku;
}
public Tracker setSku(String productId) {
this.sku = productId;
return this;
}
public Retailer getRetailer() {
return retailer;
}
public Tracker setRetailer(Retailer retailer) {
this.retailer = retailer;
return this;
}
public User getUser() {
return user;
}
public Tracker setUser(User user) {
this.user = user;
return this;
}
public Date getDateCreated() {
return dateCreated;
}
public Tracker setDateCreated(Date dateCreated) {
this.dateCreated = dateCreated;
return this;
}
public Long getPeriod() {
return period;
}
public Tracker setPeriod(Long period) {
this.period = period;
return this;
}
public String getEmail() {
return email;
}
public Tracker setEmail(String email) {
this.email = email;
return this;
}
}
| [
"dkozyrev@geeksforless.net"
] | dkozyrev@geeksforless.net |
93d27546c14c27cbb442af1f25c062c3bc2db27d | 5e7bc3cbaceaba8be2cb9de951198c5283844173 | /components/data/MongodbData/src/main/java/com/fast/dev/data/mongo/config/converts/Decimal128ToBigDecimalConverter.java | ebb5c375ffab9eadd83dcb0e799c1bed15018e58 | [] | no_license | lianshufeng/Fast | abbb162db05b4b0ece3db60a7eea0c38c686462a | 0b29400c2ec88db033729e9dd645db9aa792d06f | refs/heads/master | 2022-07-08T23:30:13.190635 | 2021-05-26T05:41:10 | 2021-05-26T05:41:10 | 130,854,753 | 9 | 1 | null | 2022-06-25T07:26:27 | 2018-04-24T12:58:53 | Java | UTF-8 | Java | false | false | 596 | java | package com.fast.dev.data.mongo.config.converts;
import org.bson.types.Decimal128;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.convert.ReadingConverter;
import org.springframework.data.convert.WritingConverter;
import java.math.BigDecimal;
@ReadingConverter
@WritingConverter
public class Decimal128ToBigDecimalConverter implements Converter<Decimal128, BigDecimal> {
public BigDecimal convert(Decimal128 decimal128) {
return decimal128.bigDecimalValue();
}
} | [
"251708339@qq.com"
] | 251708339@qq.com |
af118f23cc085276baeebbf7e4b8e9ba61342c37 | 35a5e70b61b7ca820cc6a6eca972cf0a71368737 | /app/src/main/java/com/fzuclover/putmedown/features/timingrecord/TimingRecordActivity.java | 0f161c6c2f10dc96e6d1f5564d28f9c3cfc9be0f | [] | no_license | liezhengli/put-me-down | 6469d3dc64fa29bc128c571f13162d9b01b2420f | b986672d185e20a40e42b75c1c40896a3e2245b3 | refs/heads/master | 2020-02-26T15:54:27.836938 | 2017-03-31T14:48:16 | 2017-03-31T14:48:16 | 70,911,900 | 0 | 2 | null | 2016-12-13T16:00:49 | 2016-10-14T13:17:56 | Java | UTF-8 | Java | false | false | 1,515 | java | package com.fzuclover.putmedown.features.timingrecord;
import android.graphics.Color;
import android.os.Bundle;
import com.fzuclover.putmedown.BaseActivity;
import com.fzuclover.putmedown.R;
import com.fzuclover.putmedown.model.RecordModel;
import com.fzuclover.putmedown.views.pmdtimeline.FreeTimeLine;
import com.fzuclover.putmedown.views.pmdtimeline.FreeTimeLineConfig;
public class TimingRecordActivity extends BaseActivity implements TimingRecordContract.View {
private FreeTimeLine mTimeLine;
private TimingRecordContract.Presenter mPresenter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_timing_record);
init();
}
private void init(){
mPresenter = new TimingRecordPresenter(this, RecordModel.getInstance(this));
mTimeLine = (FreeTimeLine) findViewById(R.id.time_line_view);
FreeTimeLineConfig config = new FreeTimeLineConfig();
config.setHollowColor(Color.parseColor("#5b9ef4"));
config.setSolidColor(Color.parseColor("#5b9ef4"));
config.setLineColor(Color.parseColor("#5b9ef4"));
config.setSuckerColor(Color.parseColor("#5b9ef4"));
config.setShowToggle(true);
config.setTopType(0);
mTimeLine.setConfig(config);
mTimeLine.setElements(mPresenter.getElements());
if(mPresenter.getElements().size() == 0) {
toastShort("尚未生成记录");
}
}
}
| [
"nowlinlei@outlook.com"
] | nowlinlei@outlook.com |
b267f2d6b78e051e7fe64fa027375e6e8fabb6cb | 71c9a676e7ce4db8d1d34665addd58bb7120ce74 | /movie/src/main/java/com/stackroute/repository/MovieRepository.java | ed818b60f4aaf607af0140db2641cae5b404c11a | [] | no_license | aye-am-rt/MicroServices-Dockerized-Multi-Moduled | 8a407d4d9c453d57a68f6a6da44dbcabcd08dcca | 0134191248141408c03b6977dd5422fabb80fccf | refs/heads/master | 2020-08-12T07:35:41.001246 | 2019-10-12T21:47:16 | 2019-10-12T21:47:16 | 214,718,401 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 387 | java | package com.stackroute.repository;
import com.stackroute.domain.Movie;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
@Repository
public interface MovieRepository extends MongoRepository<Movie,Integer> {
}
| [
"riteshtiwari.271097@gmail.com"
] | riteshtiwari.271097@gmail.com |
70bfecfd939e403d660baabbfa628edc5719c870 | 7c80d6bc6627e63c9759981b5fb0141c1723e38c | /Sprint-Survey-Builder-Application/src/main/java/com/surveybuilder/dao/RegistrationDao.java | d9cd736e8be89a5fbf8f1de45f00b24027d5b633 | [] | no_license | sanidhya1108/Final-Survey-Builder | ae917858a9ca0d46dd40b6edfb0bce7d8b30af2d | 7aacd522ddb169db9c5ecc7e481fa3d322f65eb9 | refs/heads/main | 2023-09-02T04:55:38.345278 | 2021-11-09T05:20:25 | 2021-11-09T05:20:25 | 425,808,199 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 70 | java | package com.surveybuilder.dao;
public interface RegistrationDao {
}
| [
"sanidandwate@gmail.com"
] | sanidandwate@gmail.com |
4105d6cfe146cf09b1609f8509369ea61c909dd7 | 8d47bead46b274afd6320cc37fc71310abcd0606 | /jspstudy2/src/action/member/MailFormAction.java | 8490e3ed5d1cae4e5d8ae34f2a911229e73a6133 | [] | no_license | NayoungKwon413/UI-study | f94f93e8029b231d5d8874e3b1df3a1035bdcb29 | 922086e10bc3b06076c92123a0f00d5117e95d75 | refs/heads/master | 2022-12-04T17:52:12.853568 | 2020-09-03T09:54:47 | 2020-09-03T09:54:47 | 292,530,613 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 506 | java | package action.member;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import action.ActionForward;
public class MailFormAction extends AdminLoginAction {
@Override
protected ActionForward doExecute(HttpServletRequest request, HttpServletResponse response){
List<String> list = Arrays.asList(request.getParameterValues("mailchk"));
request.setAttribute("list", list);
return new ActionForward();
}
}
| [
"monika94@naver.com"
] | monika94@naver.com |
9310306c41310546d07114cb9138a456ec597e6a | fe2649d960048c215360cd61179f449cb9786619 | /src/main/java/XPathBaseListener.java | ebaeade1f4d66e88ea2ce7cd39f0c0d9415cd0b4 | [] | no_license | ZheWang711/XQuery | 55f25d79390505d1affb574b2fff2672d6624deb | 1ab03f62d3cc4f92a5ae59c789bf315828be6460 | refs/heads/master | 2021-03-22T03:40:21.136512 | 2017-03-17T06:59:09 | 2017-03-17T06:59:09 | 79,162,692 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,784 | java | // Generated from XPath.g4 by ANTLR 4.3
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.TerminalNode;
/**
* This class provides an empty implementation of {@link XPathListener},
* which can be extended to create a listener which only needs to handle a subset
* of the available methods.
*/
public class XPathBaseListener implements XPathListener {
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAbs_slash(@NotNull XPathParser.Abs_slashContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAbs_slash(@NotNull XPathParser.Abs_slashContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFilter_and(@NotNull XPathParser.Filter_andContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFilter_and(@NotNull XPathParser.Filter_andContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterConcatenate(@NotNull XPathParser.ConcatenateContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitConcatenate(@NotNull XPathParser.ConcatenateContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFilter_eq(@NotNull XPathParser.Filter_eqContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFilter_eq(@NotNull XPathParser.Filter_eqContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterId_eq(@NotNull XPathParser.Id_eqContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitId_eq(@NotNull XPathParser.Id_eqContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDot(@NotNull XPathParser.DotContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDot(@NotNull XPathParser.DotContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterValue_eq(@NotNull XPathParser.Value_eqContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitValue_eq(@NotNull XPathParser.Value_eqContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterRe_expr(@NotNull XPathParser.Re_exprContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitRe_expr(@NotNull XPathParser.Re_exprContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAtt_name(@NotNull XPathParser.Att_nameContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAtt_name(@NotNull XPathParser.Att_nameContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterRe_filter(@NotNull XPathParser.Re_filterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitRe_filter(@NotNull XPathParser.Re_filterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFilter_re(@NotNull XPathParser.Filter_reContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFilter_re(@NotNull XPathParser.Filter_reContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterWildcard(@NotNull XPathParser.WildcardContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitWildcard(@NotNull XPathParser.WildcardContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterRe_slash(@NotNull XPathParser.Re_slashContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitRe_slash(@NotNull XPathParser.Re_slashContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAbs_db_slash(@NotNull XPathParser.Abs_db_slashContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAbs_db_slash(@NotNull XPathParser.Abs_db_slashContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDouble_dot(@NotNull XPathParser.Double_dotContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDouble_dot(@NotNull XPathParser.Double_dotContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterRe_db_slash(@NotNull XPathParser.Re_db_slashContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitRe_db_slash(@NotNull XPathParser.Re_db_slashContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterTag(@NotNull XPathParser.TagContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitTag(@NotNull XPathParser.TagContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterText(@NotNull XPathParser.TextContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitText(@NotNull XPathParser.TextContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFilter_or(@NotNull XPathParser.Filter_orContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFilter_or(@NotNull XPathParser.Filter_orContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFilter_not(@NotNull XPathParser.Filter_notContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFilter_not(@NotNull XPathParser.Filter_notContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void visitTerminal(@NotNull TerminalNode node) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void visitErrorNode(@NotNull ErrorNode node) { }
} | [
"zhw176@ucsd.edu"
] | zhw176@ucsd.edu |
cd63935d5d1fd7dafab38e7c94447834a452951c | 522566ce6d9cd9835fe18292fb459aa66b5ab387 | /src/edu/usc/cs576/AudioVideoQuery.java | 51c4c770459ad2dc5d60c4cf13f2328a0eacd2b6 | [] | no_license | BeccaLiu/Mutimedia | a4b5135684dcb23acaf2a49b9a955e5d3ee7e4ed | d8b84ff62f5ac76d119ca1195bcab2d4430cd5bf | refs/heads/master | 2021-01-16T18:40:05.338113 | 2014-09-11T00:15:20 | 2014-09-11T00:15:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 17,993 | java | package edu.usc.cs576;
import java.io.File;
import java.util.ArrayList;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Shell;
import edu.usc.cs576.features.AudioExtractor;
import edu.usc.cs576.features.MatchScorer;
import edu.usc.cs576.features.VideoColorExtractor;
import edu.usc.cs576.features.VideoMotionExtractor;
public class AudioVideoQuery {
static File videoFile;
static File audioFile;
byte [][] queryFrames;
VideoPlayer queryPlayer;
AudioPlayer queryAudioPlayer;
VideoPlayer matchPlayer;
AudioPlayer matchAudioPlayer;
// sync control;
long queryPlayTime;
long queryDuration;
long matchPlayTime;
long matchDuration;
protected Shell shell;
private Label queryLabel;
private Composite matchComposite;
private Composite queryComposite;
private Button queryPauseButton;
private Button matchPauseButton;
private Button queryStopButton;
private Button queryPlayButton;
private Button matchStopButton;
private Button matchPlayButton;
private Label lblMatchvideo;
private List matchList;
private Composite queryProgressBar;
private Composite matchProgressBar;
private Composite colorScoreComposite;
private Composite motionScoreComposite;
private Composite audioScoreComposite;
private Composite totalScoreComposite;
ArrayList<Integer> percentageResult;
ArrayList<ArrayList<Integer>> colorScores;
ArrayList<ArrayList<Integer>> motionScores;
ArrayList<ArrayList<Integer>> audioScores;
ArrayList<ArrayList<Integer>> totalScores;
ArrayList<File> dataFilenames;
ScoreShower colorScoreShower;
ScoreShower motionScoreShower;
ScoreShower audioScoreShower;
ScoreShower totalScoreShower;
/**
* Launch the application.
*
* @param args
*/
public static void main(String[] args) {
if (args.length == 1) {
String s = args[0];
String ss = s.substring(s.length() - 3, s.length());
if (ss.equals("wav")) {
audioFile = new File(s);
} else if (ss.equals("rgb")) {
videoFile = new File(s);
}
} else if (args.length == 2) {
for (int i = 0; i < 2; i++) {
String s = args[i];
String ss = s.substring(s.length() - 3, s.length());
if (ss.equals("wav")) {
audioFile = new File(s);
} else if (ss.equals("rgb")) {
videoFile = new File(s);
}
}
}
if(videoFile != null && !videoFile.exists()){
videoFile = null;
System.out.println("Video not found");
}
if(audioFile != null && !audioFile.exists()){
audioFile = null;
System.out.println("Audio not found");
}
AudioVideoQuery window = new AudioVideoQuery();
window.open();
}
/**
* Open the window.
*/
public void open() {
// set timer
queryDuration = 0;
matchDuration = 0;
ArrayList<ArrayList<Integer>> queryColorFeature = null;
ArrayList<ArrayList<Integer>> queryMotionFeature = null;
ArrayList<ArrayList<Integer>> queryAudioFeature = null;
if (videoFile != null) {
queryFrames = VideoLoader.load(videoFile);
// create feature file
File colorFile = new File(videoFile.getAbsolutePath() + ".color");
File motionFile = new File(videoFile.getAbsolutePath() + ".motion");
if(!colorFile.exists())
VideoColorExtractor.generateColorFeature(queryFrames, colorFile);
if(!motionFile.exists())
VideoMotionExtractor.generateMotionFeature(queryFrames, motionFile);
queryColorFeature = MatchScorer.parseFile(colorFile);
queryMotionFeature = MatchScorer.parseFile(motionFile);
}else{
// audio only
if(audioFile != null){
int[][] audioIntFrames = AudioLoader.loadInt(audioFile);
// create feature file
File fpFile = new File(audioFile.getAbsolutePath() + ".fp");
if(!fpFile.exists()){
AudioExtractor.generateAudioFeature(audioIntFrames, fpFile);
}
queryAudioFeature = MatchScorer.parseFile(fpFile);
}
}
// do analysis
percentageResult = new ArrayList<Integer>();
colorScores = new ArrayList<ArrayList<Integer>>();
motionScores = new ArrayList<ArrayList<Integer>>();
audioScores = new ArrayList<ArrayList<Integer>>();
totalScores = new ArrayList<ArrayList<Integer>>();
dataFilenames = new ArrayList<File>();
File dir = new File("dataset");
for (File file : dir.listFiles()) {
String filename = file.getName();
String ext = filename.substring(filename.length() - 4,
filename.length());
ArrayList<Integer> colorScore = null;
ArrayList<Integer> motionScore = null;
ArrayList<Integer> audioScore = null;
if (ext.equals(".rgb")) {
if(videoFile != null){
if(queryColorFeature != null){
File colorFile = new File(file.getAbsolutePath() + ".color");
ArrayList<ArrayList<Integer>> matchColorFeature = MatchScorer.parseFile(colorFile);
colorScore = MatchScorer.getHistScores(queryColorFeature, matchColorFeature);
int maxScore = Constants.IMAGE_HEIGHT*Constants.IMAGE_WIDTH*queryColorFeature.size();
int max = -1;
for(int i=0; i<colorScore.size(); i++){
int s2 = colorScore.get(i)*100/maxScore;
if(s2 < 0) s2 = 0;
colorScore.set(i, s2);
if(s2 > max)
max = s2;
}
colorScores.add(colorScore);
}
if(queryMotionFeature != null){
// compare motion feature
File motionFile = new File(file.getAbsolutePath() + ".motion");
ArrayList<ArrayList<Integer>> matchMotionFeature = MatchScorer.parseFile(motionFile);
motionScore = MatchScorer.getScores(queryMotionFeature, matchMotionFeature);
int maxError = VideoMotionExtractor.WORSTERROR*queryMotionFeature.size();
int max = -1;
for(int i=0; i<motionScore.size(); i++){
int s2 = (maxError - motionScore.get(i))*100/maxError;
if(s2 < 0) s2 = 0;
motionScore.set(i, s2);
if(s2 > max)
max = s2;
}
motionScores.add(motionScore);
}
if(colorScore != null && motionScore != null){
ArrayList<Integer> totalScore = MatchScorer.combineScore(colorScore, motionScore);
int max = -1;
for(int value:totalScore){
if(value > max)
max = value;
}
percentageResult.add(max);
totalScores.add(totalScore);
}
}
else{
// audio only
String fullPath = file.getAbsolutePath();
String name = fullPath.substring(0,
fullPath.length()-4) + ".wav";
File matchAudioFile = new File(name);
if(matchAudioFile.exists() && queryAudioFeature != null){
File fpFile = new File(matchAudioFile.getAbsolutePath() + ".fp");
ArrayList<ArrayList<Integer>> matchAudioFeature = MatchScorer.parseFile(fpFile);
audioScore = MatchScorer.getScores(queryAudioFeature, matchAudioFeature);
int maxScore = 32*queryAudioFeature.size();
int max = -1;
for(int i=0; i<audioScore.size(); i++){
int s2 = (maxScore-audioScore.get(i))*100/maxScore;
if(s2 < 0) s2 = 0;
audioScore.set(i, s2);
if(s2 > max)
max = s2;
}
audioScores.add(audioScore);
percentageResult.add(max);
// totalScores.add(audioScore);
}
}
dataFilenames.add(file);
}
}
stupidSorting();
Display display = Display.getDefault();
createContents();
showMatchList();
queryPauseButton.setEnabled(false);
matchPauseButton.setEnabled(false);
shell.open();
shell.layout();
queryPlayer = new VideoPlayer(queryComposite, queryProgressBar);
queryPlayer.start();
if (videoFile == null)
queryAudioPlayer = new AudioPlayer(queryProgressBar);
else
queryAudioPlayer = new AudioPlayer(null);
queryAudioPlayer.start();
matchPlayer = new VideoPlayer(matchComposite, matchProgressBar);
matchPlayer.start();
matchAudioPlayer = new AudioPlayer(null);
matchAudioPlayer.start();
initQueryPlayer();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
queryPlayer.dispose();
matchPlayer.dispose();
queryAudioPlayer.dispose();
matchAudioPlayer.dispose();
}
void stupidSorting(){
// selection sort
for(int i=0; i<percentageResult.size(); i++){
int max = Integer.MIN_VALUE;
int maxAt = -1;
for(int j=i; j<percentageResult.size(); j++){
int v = percentageResult.get(j);
if(v > max){
max = v;
maxAt = j;
}
}
// swap i and maxAt
swap(percentageResult, i, maxAt);
swap(colorScores, i, maxAt);
swap(motionScores, i, maxAt);
swap(audioScores, i, maxAt);
swap(totalScores, i, maxAt);
swap(dataFilenames, i, maxAt);
}
}
void swap(ArrayList list, int i, int j){
if(list == null || list.size() == 0)
return;
Object temp = list.get(i);
list.set(i, list.get(j));
list.set(j, temp);
}
void showMatchList() {
// should change later
for (int i = 0; i < percentageResult.size(); i++) {
String filename = dataFilenames.get(i).getName();
matchList.add(String.format("%3d%% : %s", percentageResult.get(i),
filename));
}
}
void initQueryPlayer() {
queryDuration = 0;
if (videoFile != null) {
byte[][] queryFrames = VideoLoader.load(videoFile);
queryPlayer.loadVideo(queryFrames);
}
if (audioFile != null) {
byte [][] audios = AudioLoader.load(audioFile);
queryAudioPlayer.loadAudio(audioFile, audios);
}
}
/**
* Create contents of the window.
*/
protected void createContents() {
shell = new Shell();
shell.setSize(760, 571+120);
shell.setText("SWT Application");
queryLabel = new Label(shell, SWT.NONE);
queryLabel.setBounds(10, 10, 208, 15);
queryLabel.setText("Query");
matchList = new List(shell, SWT.V_SCROLL | SWT.BORDER);
matchList.setBounds(382, 31, 352, 86);
matchList.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
// not used
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
if (!matchPlayButton.getEnabled()) {
matchPauseButton.setEnabled(false);
matchPlayButton.setEnabled(true);
if (matchPlayer != null) {
matchPlayer.stopVideo();
}
if (matchAudioPlayer != null) {
matchAudioPlayer.stopAudio();
}
}
matchDuration = 0;
int ind = matchList.getSelectionIndex();
byte[][] matchFrames = VideoLoader.load(dataFilenames.get(ind));
matchPlayer.loadVideo(matchFrames);
StringBuilder filename = new StringBuilder(dataFilenames.get(
ind).getName());
filename.delete(filename.length() - 3, filename.length());
filename.append("wav");
File audioFile = new File("dataset/" + filename.toString());
if (audioFile.exists()) {
byte [][] audios = AudioLoader.load(audioFile);
matchAudioPlayer.loadAudio(audioFile, audios);
}
else{
matchAudioPlayer.loadAudio(null, null);
}
// score shower
if(colorScoreShower == null)
colorScoreShower = new ScoreShower(colorScoreComposite, new Color(Display.getCurrent(), 255, 0, 0));
if(motionScoreShower == null)
motionScoreShower = new ScoreShower(motionScoreComposite, new Color(Display.getCurrent(), 0, 255, 0));
if(audioScoreShower == null){
audioScoreShower = new ScoreShower(audioScoreComposite, new Color(Display.getCurrent(), 0, 0, 255));
}
if(totalScoreShower == null)
totalScoreShower = new ScoreShower(totalScoreComposite, new Color(Display.getCurrent(), 100, 100, 100));
if(colorScores.size() != 0)
colorScoreShower.draw(colorScores.get(ind), matchFrames.length);
if(motionScores.size() != 0)
motionScoreShower.draw(motionScores.get(ind), matchFrames.length);
if(audioScores.size() != 0)
audioScoreShower.draw_audio(audioScores.get(ind), matchFrames.length);
if(totalScores.size() != 0)
totalScoreShower.draw(totalScores.get(ind), matchFrames.length);
}
});
queryComposite = new Composite(shell, SWT.NONE);
queryComposite.setBounds(10, 183+120, 352, 288);
matchComposite = new Composite(shell, SWT.NONE);
matchComposite.setBounds(382, 183+120, 352, 288);
queryPlayButton = new Button(shell, SWT.NONE);
queryPlayButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
queryPauseButton.setEnabled(true);
queryPlayButton.setEnabled(false);
queryPlayTime = System.currentTimeMillis();
if (queryPlayer != null) {
queryPlayer.playVideo(queryPlayTime, queryDuration);
}
if (queryAudioPlayer != null) {
queryAudioPlayer.playAudio(queryPlayTime, queryDuration);
}
}
});
queryPlayButton.setBounds(10, 498+120, 75, 25);
queryPlayButton.setText("Play");
queryStopButton = new Button(shell, SWT.NONE);
queryStopButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
queryPauseButton.setEnabled(false);
queryPlayButton.setEnabled(true);
queryDuration = 0;
if (queryPlayer != null) {
queryPlayer.stopVideo();
}
if (queryAudioPlayer != null) {
queryAudioPlayer.stopAudio();
}
}
});
queryStopButton.setBounds(172, 498+120, 75, 25);
queryStopButton.setText("Stop");
matchProgressBar = new Composite(shell, SWT.NONE);
matchProgressBar.setBounds(382, 162+120, 352, 15);
matchPlayButton = new Button(shell, SWT.NONE);
matchPlayButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
matchPauseButton.setEnabled(true);
matchPlayButton.setEnabled(false);
matchPlayTime = System.currentTimeMillis();
if (matchPlayer != null) {
matchPlayer.playVideo(matchPlayTime, matchDuration);
}
if (matchAudioPlayer != null) {
matchAudioPlayer.playAudio(matchPlayTime, matchDuration);
}
}
});
matchPlayButton.setBounds(382, 498+120, 75, 25);
matchPlayButton.setText("Play");
matchPauseButton = new Button(shell, SWT.NONE);
matchPauseButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
matchPauseButton.setEnabled(false);
matchPlayButton.setEnabled(true);
matchDuration += System.currentTimeMillis() - matchPlayTime;
if (matchPlayer != null) {
matchPlayer.pauseVideo();
}
if (matchAudioPlayer != null) {
matchAudioPlayer.pauseAudio();
}
}
});
matchPauseButton.setBounds(463, 498+120, 75, 25);
matchPauseButton.setText("Pause");
matchStopButton = new Button(shell, SWT.NONE);
matchStopButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
matchPauseButton.setEnabled(false);
matchPlayButton.setEnabled(true);
matchDuration = 0;
if (matchPlayer != null) {
matchPlayer.stopVideo();
}
if (matchAudioPlayer != null) {
matchAudioPlayer.stopAudio();
}
}
});
matchStopButton.setBounds(544, 498+120, 75, 25);
matchStopButton.setText("Stop");
queryPauseButton = new Button(shell, SWT.NONE);
queryPauseButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
queryPauseButton.setEnabled(false);
queryPlayButton.setEnabled(true);
queryDuration += System.currentTimeMillis() - queryPlayTime;
if (queryPlayer != null) {
queryPlayer.pauseVideo();
}
if (queryAudioPlayer != null) {
queryAudioPlayer.pauseAudio();
}
}
});
queryPauseButton.setBounds(91, 498+120, 75, 25);
queryPauseButton.setText("Pause");
lblMatchvideo = new Label(shell, SWT.NONE);
lblMatchvideo.setBounds(382, 10, 75, 15);
lblMatchvideo.setText("MatchVideos");
queryProgressBar = new Composite(shell, SWT.NONE);
queryProgressBar.setBounds(10, 162+120, 352, 15);
colorScoreComposite = new Composite(shell, SWT.NONE);
colorScoreComposite.setBounds(382, 162, 352, 20);
motionScoreComposite = new Composite(shell, SWT.NONE);
motionScoreComposite.setBounds(382, 162+30, 352, 20);
audioScoreComposite = new Composite(shell, SWT.NONE);
audioScoreComposite.setBounds(382, 162+60, 352, 20);
totalScoreComposite = new Composite(shell, SWT.NONE);
totalScoreComposite.setBounds(382, 162+90, 352, 20);
}
public Label getQueryLabel() {
return queryLabel;
}
public Composite getMatchComposite() {
return matchComposite;
}
public Composite getQueryComposite() {
return queryComposite;
}
public Button getQueryPauseButton() {
return queryPauseButton;
}
public Button getMatchPauseButton() {
return matchPauseButton;
}
public Composite getMatchProgressBar() {
return matchProgressBar;
}
public Button getQueryStopButton() {
return queryStopButton;
}
public Button getQueryPlayButton() {
return queryPlayButton;
}
public Button getMatchStopButton() {
return matchStopButton;
}
public Button getMatchPlayButton() {
return matchPlayButton;
}
public Label getLblMatchvideo() {
return lblMatchvideo;
}
public List getMatchList() {
return matchList;
}
public Composite getQueryProgressBar() {
return queryProgressBar;
}
}
| [
"rebecca.liu.usc@gmail.com"
] | rebecca.liu.usc@gmail.com |
b18f2825a550ed991a57735a90af9b32d1f5e4fe | 7f20b1bddf9f48108a43a9922433b141fac66a6d | /core3/impl/tags/impl-parent-3.0.0-alpha8/editor-impl/src/main/java/org/cytoscape/editor/internal/SIFInterpreterTaskFactory.java | a16bb3e59bce2d4a8dedb5440a05d48bb0f17f58 | [] | no_license | ahdahddl/cytoscape | bf783d44cddda313a5b3563ea746b07f38173022 | a3df8f63dba4ec49942027c91ecac6efa920c195 | refs/heads/master | 2020-06-26T16:48:19.791722 | 2013-08-28T04:08:31 | 2013-08-28T04:08:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 393 | java | package org.cytoscape.editor.internal;
import org.cytoscape.view.model.CyNetworkView;
import org.cytoscape.task.AbstractNetworkViewTaskFactory;
import org.cytoscape.work.TaskIterator;
public class SIFInterpreterTaskFactory extends AbstractNetworkViewTaskFactory {
public TaskIterator createTaskIterator(CyNetworkView view) {
return new TaskIterator(new SIFInterpreterTask(view));
}
}
| [
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] | mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5 |
5bcaf0998cb18404cadca55ab1866ac8b3b2856a | 8a61da6c0c15975c22d87a57a7a7eb5bbc250f5d | /src/main/java/com/tickettest/ticket/views/tiketstatus/TicketStatusFillGrid.java | 1cc8268b11553dd6b4a13b9cb2a5d71ef4ecdfca | [
"Unlicense"
] | permissive | luisrafaelinf/ticket-app | 32f3f2e7b7d448cdc6e416defbb6a846d54add43 | e37c350979c509f261fd08462a1fa5a2c12e0ee8 | refs/heads/master | 2023-01-08T03:59:30.505732 | 2019-12-22T18:46:07 | 2019-12-22T18:46:07 | 229,593,282 | 0 | 0 | Unlicense | 2023-01-07T13:06:55 | 2019-12-22T16:00:01 | Java | UTF-8 | Java | false | false | 1,343 | 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.tickettest.ticket.views.tiketstatus;
import com.tickettest.ticket.views.report.*;
import com.tickettest.ticket.backend.model.TicketEntry;
import com.tickettest.ticket.backend.model.TicketStatus;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.server.Command;
import java.util.List;
/**
*
* @author luisrafaelinf
*/
public final class TicketStatusFillGrid implements Command {
private List<TicketStatus> entries;
private TicketStatusGrid statusGrid;
public final static TicketStatusFillGrid of(List<TicketStatus> status, TicketStatusGrid reportGrid) {
return new TicketStatusFillGrid(status, reportGrid);
}
private TicketStatusFillGrid(List<TicketStatus> status, TicketStatusGrid statusGrid) {
this.entries = status;
this.statusGrid = statusGrid;
}
@Override
public void execute() {
statusGrid.setItems(this.entries);
final Grid.Column<TicketStatus> ticketColumn = statusGrid.getColumnByKey(TicketStatusGrid.DESCRIPTION);
ticketColumn.setFooter(String.format("Total: %d status", this.entries.size()));
}
}
| [
"luisrafaelinf@gmail.com"
] | luisrafaelinf@gmail.com |
8483bc31e82de53312f135a0f97c3c250bfe3db8 | 894a77a2bfbe009783c9f03efa360c0b134bdf94 | /src/main/java/com/uas/cloud/mall/admin/service/AdminService.java | 1a8d866c8237c0cae48efaee6d9a51af8c4cc572 | [] | no_license | DiyiWi/0526uas | 6b0aeb2dddc1252aac18edff59f4a9c21aefa376 | cffca7c4ddba995df0803d142f19c3d0da9df35c | refs/heads/master | 2021-01-22T05:47:20.811101 | 2017-05-26T09:43:43 | 2017-05-26T09:43:43 | 92,495,776 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,744 | java | package com.uas.cloud.mall.admin.service;
import org.springframework.stereotype.Service;
/**
* 后台管理服务
*
* @author yangck
* @create 2017-02-16 16:45
*/
@Deprecated
@Service
public class AdminService {
//private final Logger logger = LogManager.getLogger(getClass());
//
//@Autowired
//private RestTemplate restTemplate;
//
//@HystrixCommand(fallbackMethod = "saveCategoryFallback")
//public Category saveCategory(Category category) {
// ResponseEntity<Category> responseEntity = restTemplate.postForEntity("http://MALL-CATEGORY-SERVICE/category", Category.class, null);
// return responseEntity.getBody();
//}
//
//public Category saveCategoryFallback(Category category) {
// logger.error("MALL-CATEGORY-SERVICE unavailable");
// return new Category();
//}
//
//@HystrixCommand(fallbackMethod = "getCategoryFallback")
//public Category getCategory(Long id) {
// return restTemplate.getForEntity("http://MALL-CATEGORY-SERVICE/category/" + id, Category.class).getBody();
//}
//
//private Category getCategoryFallback(Long id) {
// // throw new ServiceUnavailableException("MALL-CATEGORY-SERVICE");
// logger.error("MALL-CATEGORY-SERVICE unavailable");
// return new Category();
//}
//
//@HystrixCommand(fallbackMethod = "getCarousels")
//public List<Carousel> getCarousels(String usedFor) {
// return restTemplate.getForEntity("http://MALL-CAROUSEL-SERVICE/carousels?usedFor=" + usedFor, List.class).getBody();
//}
//
//private List<Carousel> getCarousels() {
// logger.error("MALL-CAROUSEL-SERVICE unavailable");
// return new ArrayList<>();
//}
}
| [
"809290733@qq.com"
] | 809290733@qq.com |
968f30ce6cc7828a502afdf8605cd1e2cb39c50f | 91cc3593dbec3828efdb62bcff306af9fac136b1 | /clientTaskManager/src/main/java/com/gmail/sdima/command/task/TaskOpenCommand.java | fac761ad95f5df5054df32d326fdbbc13ada7349 | [] | no_license | thesolovey/TaskManager | eed4f891768e5a5a6834245bb66ce097dfa8c1db | 3376aeb362630271915b9dc6b5cdf15dc9377190 | refs/heads/master | 2020-04-15T21:38:40.601285 | 2019-03-29T09:32:40 | 2019-03-29T09:32:40 | 163,492,596 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,998 | java | package com.gmail.sdima.command.task;
import com.gmail.sdima.bootstrap.BootstrapClient;
import com.gmail.sdima.command.AbstractCommand;
import com.gmail.sdima.command.ReadFromConsole;
import com.gmail.sdima.endpoint.AccessForbiddenException_Exception;
import com.gmail.sdima.endpoint.Task;
import java.util.ArrayList;
import java.util.List;
public class TaskOpenCommand extends AbstractCommand {
public TaskOpenCommand(BootstrapClient bootstrap) {
super(bootstrap);
}
public TaskOpenCommand() { }
public void execute() {
System.out.println("[TASK OPEN]");
boolean checkTaskListIsEmpty = bootstrap.getEndpointTask().checkTaskListIsEmpty();
if (checkTaskListIsEmpty) {
System.out.println("!!! You don't have any Task !!!");
System.out.println("!!! Try com.gmail.sdima.command 'task-create' !!!");
} else {
final String nameTask = ReadFromConsole.readInputFromConsole("Enter Task you want open: ");
List<Task> taskListByName = new ArrayList<>();
try {
taskListByName = bootstrap.getEndpointTask().openTaskByName(BootstrapClient.getSessionCurrentUser(), nameTask);
} catch (AccessForbiddenException_Exception e) { e.printStackTrace(); }
for (Task task : taskListByName) {
System.out.println("Name Project for this Task: " + task.getProject().getName());
System.out.println("Name Task: " + task.getName());
System.out.println("Task ID: " + task.getId());
System.out.println("Task Date Begin: " + task.getDateBegin());
System.out.println("Task Date End: " + task.getDateEnd());
}
System.out.println("[OK]");
}
}
@Override
public boolean secure() { return false; }
@Override
public String getKeyWord() { return "task-open"; }
@Override
public String description() { return "Open selected Task"; }
}
| [
"sdima9999@gmail.com"
] | sdima9999@gmail.com |
78a0bee8c37201e6877fb27858d81e425869806d | b23dd45f700bc5685208d4b39736b3b49c7ec318 | /banking/src/main/java/me/abbah/eventsourcing/banking/BankingApplication.java | a4dbcd7bb1fee0eecfcab8c9d1acaf28a1994d0d | [] | no_license | anohabbah/event-sourcing | 5032ac3bf1e8573886c4011e94ce8c82a94836f0 | 0b0c5b8f1ca46090870b57d4e3894abc6552b530 | refs/heads/main | 2023-07-04T03:10:24.223322 | 2021-08-02T13:30:01 | 2021-08-02T13:30:01 | 391,961,395 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package me.abbah.eventsourcing.banking;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class BankingApplication {
public static void main(String[] args) {
SpringApplication.run(BankingApplication.class, args);
}
}
| [
"anohabbah@gmail.com"
] | anohabbah@gmail.com |
bbe0b64eac08d5832c13cf1e4296db06204b2f5b | 863acb02a064a0fc66811688a67ce3511f1b81af | /sources/p005cm/aptoide/p006pt/home/apps/C3561Lb.java | 89a8a6d875f3492bf81ef3b10f000a6ea031d315 | [
"MIT"
] | permissive | Game-Designing/Custom-Football-Game | 98d33eb0c04ca2c48620aa4a763b91bc9c1b7915 | 47283462b2066ad5c53b3c901182e7ae62a34fc8 | refs/heads/master | 2020-08-04T00:02:04.876780 | 2019-10-06T06:55:08 | 2019-10-06T06:55:08 | 211,914,568 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 526 | java | package p005cm.aptoide.p006pt.home.apps;
import p005cm.aptoide.p006pt.presenter.View.LifecycleEvent;
import p026rx.p027b.C0132p;
/* renamed from: cm.aptoide.pt.home.apps.Lb */
/* compiled from: lambda */
public final /* synthetic */ class C3561Lb implements C0132p {
/* renamed from: a */
public static final /* synthetic */ C3561Lb f6944a = new C3561Lb();
private /* synthetic */ C3561Lb() {
}
public final Object call(Object obj) {
return AppsPresenter.m8333q((LifecycleEvent) obj);
}
}
| [
"tusharchoudhary0003@gmail.com"
] | tusharchoudhary0003@gmail.com |
5a284f9c8a05dbff42c16529aa0590b49a9e474c | 2408fc3f64df9820a10b3893b94e169eaf6707e1 | /hadoopcase/src/myhadoop/recommend/getdata/GetTrainTest.java | 36d5afa2713b8d84605df148bb5e0f29beffd966 | [] | no_license | ysycloud/CollaborativeRecommend_Distributed | 47e6d30833be9a6f979d296d2ef16a51373d486f | 1440180d577b1b331151851a445e2e36fb98ce44 | refs/heads/master | 2021-01-10T01:09:12.592880 | 2015-10-06T03:24:11 | 2015-10-06T03:24:11 | 43,726,859 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,579 | java | package myhadoop.recommend.getdata;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.FileInputFormat;
import org.apache.hadoop.mapred.FileOutputFormat;
import org.apache.hadoop.mapred.JobClient;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.MapReduceBase;
import org.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reducer;
import org.apache.hadoop.mapred.Reporter;
import org.apache.hadoop.mapred.RunningJob;
import org.apache.hadoop.mapred.TextInputFormat;
import org.apache.hadoop.mapred.TextOutputFormat;
import myhadoop.hdfs.HdfsDAO;
public class GetTrainTest {
private static int out ;
public static class Step1_ToItemPreMapper extends MapReduceBase implements Mapper<Object, Text, IntWritable, Text> {
private final static IntWritable k = new IntWritable();
private final static Text v = new Text();
@Override
public void map(Object key, Text value, OutputCollector<IntWritable, Text> output, Reporter reporter) throws IOException {
String[] tokens = Recommend.DELIMITER.split(value.toString());
int userID = Integer.parseInt(tokens[0]);
String itemID = tokens[1];
String pref = tokens[2];
k.set(userID);
v.set(itemID + ":" + pref);
output.collect(k, v);
}
}
public static class Step1_ToUserVectorReducer extends MapReduceBase implements Reducer<IntWritable, Text, IntWritable, Text> {
private final static Text v = new Text();
@Override
public void reduce(IntWritable key, Iterator<Text> values, OutputCollector<IntWritable, Text> output, Reporter reporter) throws IOException {
StringBuilder sb = new StringBuilder();
Map<String, Float> map = new HashMap<String, Float>();
while(values.hasNext()) {
String[] tokens = values.next().toString().split(":");
map.put(tokens[0], Float.parseFloat(tokens[1]));
}
List<Entry<String, Float>> enList = new ArrayList<Entry<String, Float>>(map.entrySet());
for(int i = 0;i < enList.size();i++){
if(out == 1 ){
if(Float.parseFloat(new Integer((i+1)).toString())/enList.size() < 0.8){ //前80%当训练集
v.set(enList.get(i).getKey() + " " + enList.get(i).getValue());
output.collect(key, v);
System.out.println(key.toString()+" "+v.toString());
}
}else{
if(Float.parseFloat(new Integer((i+1)).toString())/enList.size() >= 0.8){ //后20%当测试集
v.set(enList.get(i).getKey() + " " + enList.get(i).getValue());
output.collect(key, v);
System.out.println((i+1)+" "+enList.size() +"________"+ key.toString()+" "+v.toString());
}
}
}
//键为用户ID,值为其打过分的所有用户的偏好
}
}
public static void run(Map<String, String> path ) throws IOException {
JobConf conf = Recommend.config();
String input1 = path.get("Input1");
String input2 = path.get("Input2");
out = Integer.parseInt(path.get("out"));
String output;
if(out == 1)
output = path.get("Output1");
else
output = path.get("Output2");
HdfsDAO hdfs = new HdfsDAO(Recommend.HDFS, conf);
hdfs.rmr(output);
hdfs.rmr(input1);
hdfs.mkdirs(input1);
hdfs.rmr(input2);
hdfs.mkdirs(input2);
hdfs.copyFile(path.get("data"), input1);
hdfs.copyFile(path.get("test"), input2);
conf.setMapOutputKeyClass(IntWritable.class);
conf.setMapOutputValueClass(Text.class);
conf.setOutputKeyClass(IntWritable.class);
conf.setOutputValueClass(Text.class);
conf.setMapperClass(Step1_ToItemPreMapper.class);
conf.setReducerClass(Step1_ToUserVectorReducer.class);
conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);
FileInputFormat.setInputPaths(conf, new Path(input1) , new Path(input2));
FileOutputFormat.setOutputPath(conf, new Path(output));
RunningJob job = JobClient.runJob(conf);
while (!job.isComplete()) {
job.waitForCompletion();
}
}
}
| [
"624533584@qq.com"
] | 624533584@qq.com |
9a1a2a34eeef06266bcd1fd252ada769e0fabab0 | e8196fae8c6f3c32aa6ec038d5bdb9697bb6ef73 | /src/main/java/com/cjt/trade/util/SqlMapUtil.java | 587ec349166326ee5a864dddba028ec73cf8ca54 | [] | no_license | wsyandy/trade | 42975b4abe63fbc690366368bbdc71cfae67fdae | 2e943c91bfa30473fcf7842f91bb6cec7be1bac4 | refs/heads/master | 2021-01-18T12:17:12.374254 | 2017-02-06T15:01:09 | 2017-02-06T15:01:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 387 | java | package com.cjt.trade.util;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class SqlMapUtil {
public Map<String, String> getMap(List<Map<String, String>> maps){
Map<String, String> map = new LinkedHashMap<String, String>();
for (Map<String, String> m : maps) {
map.put(m.get("key"), m.get("value"));
}
return map;
}
}
| [
"879309896@qq.com"
] | 879309896@qq.com |
0d909862a6a283ea8382c09e80267dd901d3b5f7 | 2c89bfc6e5ab8a1fcd6ef0ba026c53e3e6f2966d | /src/main/java/org/academiadecodigo/javabank/model/Model.java | 8670b40caf06929b2ee0be219363a61741e41c33 | [] | no_license | DiogoBett/JavaBank | c539cd26dbcd43d9e59fc0b2eb21c2ba511a6339 | 58cbc1828af2ab8d67b5d3f78be697f5e4ec6ee6 | refs/heads/master | 2020-05-07T20:22:42.691625 | 2019-04-11T18:47:12 | 2019-04-11T18:47:12 | 180,856,361 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 125 | java | package org.academiadecodigo.javabank.model;
public interface Model {
Integer getId();
void setId(Integer id);
}
| [
"diogobettencourt97@gmail.com"
] | diogobettencourt97@gmail.com |
af2ce5e1a614e034657612e02523d1ea8a6a9029 | b5e3059c7853a1375a51d9dab619a098bce5a8d2 | /MediaPlayer/src/main/java/config/sib/DongNhi.java | e9d5fcf4671d52c63190ff6fb793978f375f89f6 | [] | no_license | phongdv/Spring | a024760b31e22d81b3fce87d6a3ae7ef917bcbce | 4ba8d245337466899dd612d2e69ba2b5ab84a3cc | refs/heads/master | 2020-04-27T02:35:55.735966 | 2019-05-27T05:11:12 | 2019-05-27T05:11:12 | 186,938,785 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 237 | java | package config.sib;
import org.springframework.stereotype.Component;
import IPlayer.Disk;
@Component
public class DongNhi implements Disk {
@Override
public void play() {
System.out.println("Dong nhi boi roi khong tin");
}
}
| [
"pdoan4@dxc.com"
] | pdoan4@dxc.com |
2534f5c5b6af7f283663aa910dde130c047055c1 | 999cfc9b844148c8b68901bcce41dfb0f1ffc4f0 | /gen/com/steke72/webdigifun/R.java | 0a184c5c50d53119f38458340bdcb0be894425cd | [] | no_license | brunsky/Webdigifun | 47bae03a813a9752302ca53faf65435a3b45bd1b | d6d8fbd826a1df68ccc6525df337b405845e9f63 | refs/heads/master | 2021-01-10T18:58:03.238031 | 2012-11-30T07:14:42 | 2012-11-30T07:14:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,232 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.steke72.webdigifun;
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
public static final int ic_media_ff=0x7f020001;
public static final int ic_media_info=0x7f020002;
public static final int ic_media_next=0x7f020003;
public static final int ic_media_pause=0x7f020004;
public static final int ic_media_play=0x7f020005;
public static final int ic_media_previous=0x7f020006;
public static final int ic_media_rew=0x7f020007;
}
public static final class id {
public static final int InfoText=0x7f060002;
public static final int VideoView=0x7f060001;
public static final int ffwd=0x7f060005;
public static final int mediacontroller_progress=0x7f060007;
public static final int myLinearLayout=0x7f060000;
public static final int pause=0x7f060004;
public static final int rew=0x7f060003;
public static final int text=0x7f06000a;
public static final int time=0x7f060008;
public static final int time_current=0x7f060006;
public static final int toast_layout_root=0x7f060009;
}
public static final class layout {
public static final int main=0x7f030000;
public static final int media_controller=0x7f030001;
public static final int toast=0x7f030002;
}
public static final class raw {
public static final int story=0x7f040000;
}
public static final class string {
public static final int VideoView_error_button=0x7f050002;
public static final int VideoView_error_text_invalid_progressive_playback=0x7f050005;
public static final int VideoView_error_text_unknown=0x7f050004;
public static final int VideoView_error_title=0x7f050003;
public static final int app_name=0x7f050001;
public static final int hello=0x7f050000;
public static final int infotext=0x7f050006;
}
}
| [
"will.lien@gmail.com"
] | will.lien@gmail.com |
7bcb86698e55b8e0f6640ba3bfae2ecae468918e | 4aabf5c70f33c79ca45446af97447821b1b68084 | /Mycontacts/src/Model/MyContactsDAO.java | 09a0defab53c4fe192e57ea0f7974c10589d978b | [] | no_license | linoysimantov/My-Contacts | cdcaec695adaf1624e907e8db4eac6ff881160c2 | d9ae31cb266758013a7f666ffe30480eddf3c126 | refs/heads/master | 2020-03-21T02:26:38.071225 | 2018-06-20T08:03:39 | 2018-06-20T08:03:39 | 137,998,592 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 881 | java | package Model;
import java.util.List;
import Exception.MyContactsException;
/**
* This interface defines the options of the ToDoList application,
* for the user and it's items.
*
* @author Linoy
*
*/
public interface MyContactsDAO {
/**
* Adding a contact and saves it
* @param contact
* @throws MyContactsException
*/
public void addContact(Contact contact) throws MyContactsException;
/**
* returns list of contacts
* @param contact
* @return list of contacts
* @throws MyContactsException
*/
public List<Contact> getAllContacts() throws MyContactsException;
/**
* checking if contact is already exist
* @param contact
* @return true if contact is exist, false otherwise.
* @throws MyContactsException
*/
public boolean isContactExist(Contact contact) throws MyContactsException;
}
| [
"linoy15s@gmail.com"
] | linoy15s@gmail.com |
4c91d42ec57db7c304b1ccadb955696812ae5e37 | 43d43c65d859c35d4f3a53eec636992a56e03316 | /src/class6/collections/StudentGroupMapImplementation.java | 1257467221f6833655feeed4dbe024bcd05538f5 | [] | no_license | lanzeliu/INFO5100-Spring2019 | dc8b359794014f7f4e679d6b8fafc6daf4980d57 | b789b573d944f812c678381e23ec653d7cb10bca | refs/heads/master | 2022-05-02T10:38:49.086824 | 2019-04-05T22:57:40 | 2019-04-05T22:57:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 921 | java | package class6.collections;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class StudentGroupMapImplementation implements StudentGroup {
Map<Integer, Student> students = new HashMap<Integer, Student>();
@Override
public int getCount() {
return students.size();
}
@Override
public void addStudent(Student s) {
students.put(s.roll, s);
}
@Override
public Student findStudent(int roll) {
return students.get(roll);
}
@Override
public void deleteStudent(int roll) {
students.remove(roll);
}
@Override
public void modifyStudent(int roll, String name) {
Student s = students.get(roll);
if (s == null)
return;
s.name = name;
}
@Override
public void displayStudents() {
System.out.println(students.values());
}
@Override
public List<Student> getStudents() {
return new ArrayList<Student>(students.values());
}
}
| [
"sdosapati@indeed.com"
] | sdosapati@indeed.com |
f674230f937f89145a8bd7574ee7671b26a877b2 | f6d8407714b3b1adea615ac3507c648d915229a0 | /source/DBMSTrial/src/storekeeper/SK16.java | 62d9fba9801c145234d94d00a3fd5d962ee9a84a | [] | no_license | joshmagora/PFMO | e9d01f493d3fb2e19cb69568ec1cd8854d2c4e48 | 0ca456dfc6e75e5a8576de68bd652b46064039ed | refs/heads/master | 2021-01-18T15:40:52.391619 | 2017-08-15T14:19:31 | 2017-08-15T14:19:31 | 100,383,230 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,345 | 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 storekeeper;
import dbmstrial.ConnectTESTING;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
import javax.swing.table.TableModel;
import net.proteanit.sql.DbUtils;
import sectionhead.SH12;
/**
*
* @author Josh
*/
public class SK16 extends javax.swing.JPanel {
Connection conn = null;
ResultSet rs = null;
PreparedStatement ps = null;
SK161 sk161;
/**
* Creates new form SK16
*/
public SK16() {
initComponents();
tbl_bslip.repaint();
try{
conn = ConnectTESTING.Connect();
String str = "select bslip_no,bslip_date from pfmo.bslip"
+ " where status_code = 'P';";
ps = conn.prepareStatement(str);
rs = ps.executeQuery();
tbl_bslip.setModel(DbUtils.resultSetToTableModel(rs));
}
catch (Exception e) {
JOptionPane.showMessageDialog(null,e);
}
}
/**
* 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() {
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
tbl_bslip = new javax.swing.JTable();
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 15)); // NOI18N
jLabel7.setText("Approval of Borrowing Slip");
jLabel8.setFont(new java.awt.Font("Tahoma", 0, 15)); // NOI18N
jLabel8.setText("List of Borrowing Slip");
tbl_bslip.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
tbl_bslip.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null}
},
new String [] {
"Slip No.", "B.S. Date"
}
));
tbl_bslip.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
tbl_bslipMouseClicked(evt);
}
});
jScrollPane1.setViewportView(tbl_bslip);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(206, 206, 206)
.addComponent(jLabel7))
.addGroup(layout.createSequentialGroup()
.addGap(238, 238, 238)
.addComponent(jLabel8))
.addGroup(layout.createSequentialGroup()
.addGap(66, 66, 66)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 465, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(81, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(21, 21, 21)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel8)
.addGap(58, 58, 58)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(86, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
/* Open List of Tools Borrowed */
private void tbl_bslipMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbl_bslipMouseClicked
sk161 = new SK161();
int index = tbl_bslip.getSelectedRow();
TableModel model = tbl_bslip.getModel();
String bslip = model.getValueAt(index, 0).toString();
JOptionPane.showMessageDialog(null, bslip);
sk161.slipNum = bslip;
sk161.setVisible(true);
}//GEN-LAST:event_tbl_bslipMouseClicked
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable tbl_bslip;
// End of variables declaration//GEN-END:variables
}
| [
"joshmagora02@gmail.com"
] | joshmagora02@gmail.com |
e9a71eb7f899d4cf9b250ffcf6d3be9d88bb0fdf | 17217b4d3a4cea288a02896bcbdc5622f1bceb9d | /src/pc/kratess/TelegramBotAPI/Methods/Group/PromoteChatMember.java | d104088eaebe7beb5ea53810ac15ccedc511dfd7 | [] | no_license | kratess/TelegramBotAPI | 78f63ce43e5076789253a47c9f608419984c32a4 | 2459b33cfe3fb2a17ddddc3b8fd61bad713235cc | refs/heads/master | 2020-11-29T15:16:21.915041 | 2020-03-30T19:11:20 | 2020-03-30T19:11:20 | 230,148,684 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,374 | java | package pc.kratess.TelegramBotAPI.Methods.Group;
public class PromoteChatMember {
private long chat_id;
private int user_id;
private boolean canChangeInfo;
private boolean canPostMessages;
private boolean canEditMessages;
private boolean canDeleteMessages;
private boolean canInviteUsers;
private boolean canRestrictMembers;
private boolean canPinMessages;
private boolean canPromoteMembers;
public PromoteChatMember(long chat_id, int user_id) {
this.chat_id = chat_id;
this.user_id = user_id;
}
public PromoteChatMember canChangeInfo(boolean canChangeInfo) {
this.canChangeInfo = canChangeInfo;
return this;
}
public PromoteChatMember canPostMessages(boolean canPostMessages) {
this.canPostMessages = canPostMessages;
return this;
}
public PromoteChatMember canEditMessages(boolean canEditMessages) {
this.canEditMessages = canEditMessages;
return this;
}
public PromoteChatMember canDeleteMessages(boolean canDeleteMessages) {
this.canDeleteMessages = canDeleteMessages;
return this;
}
public PromoteChatMember canInviteUsers(boolean canInviteUsers) {
this.canInviteUsers = canInviteUsers;
return this;
}
public PromoteChatMember canPinMessages(boolean canPinMessages) {
this.canPinMessages = canPinMessages;
return this;
}
public PromoteChatMember canRestrictMembers(boolean canRestrictMembers) {
this.canRestrictMembers = canRestrictMembers;
return this;
}
public PromoteChatMember canPromoteMembers(boolean canPromoteMembers) {
this.canPromoteMembers = canPromoteMembers;
return this;
}
public String toString() {
return "promoteChatMember?chat_id=" + chat_id
+ "&user_id=" + user_id
+ "&can_change_info=" + canChangeInfo
+ "&can_post_messages=" + canPostMessages
+ "&can_edit_messages=" + canEditMessages
+ "&can_delete_messages=" + canDeleteMessages
+ "&can_invite_users=" + canInviteUsers
+ "&can_restrict_members=" + canRestrictMembers
+ "&can_pin_messages=" + canPinMessages
+ "&can_promote_members=" + canPromoteMembers;
}
}
| [
"parvudoruionut@yahoo.ro"
] | parvudoruionut@yahoo.ro |
369d225413808a09f2c9af0a5702d5919dc42f5f | f2d0270167fbcc21d210e037b726af9b45d272b5 | /ContactPicker/src/main/java/com/onegravity/contactpicker/core/ContactElementImpl.java | f6eccf562f70b19df74d368d8eee071b003cb25f | [] | no_license | AsUnDeRz/Scc-Management | 055be9a88bed83589362d522ef196bf506b6bc47 | e4b23d4e8fe29aea6653b186466e605ce6afbc83 | refs/heads/master | 2021-04-27T04:19:55.219384 | 2018-12-18T05:36:01 | 2018-12-18T05:36:01 | 122,729,752 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,203 | java | /*
* Copyright (C) 2015-2017 Emanuel Moecklin
*
* 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.onegravity.contactpicker.core;
import android.util.Log;
import com.onegravity.contactpicker.ContactElement;
import com.onegravity.contactpicker.Helper;
import com.onegravity.contactpicker.OnContactCheckedListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
/**
* The concrete but abstract implementation of ContactElement.
*/
abstract class ContactElementImpl implements ContactElement {
final private long mId;
private String mDisplayName;
private String mPhone;
transient private List<OnContactCheckedListener> mListeners = new ArrayList<>();
transient private boolean mChecked = false;
ContactElementImpl(long id, String displayName) {
mId = id;
mDisplayName = Helper.isNullOrEmpty(displayName) ? "---" : displayName;
}
@Override
public long getId() {
return mId;
}
@Override
public String getDisplayName() {
return mDisplayName != null ? mDisplayName : "";
}
protected void setDisplayName(String value) {
mDisplayName = value;
}
@Override
public String getPhone() {
return mPhone != null ? mPhone : "";
}
protected void setPhone(String value) {
mPhone = value;
}
@Override
public boolean isChecked() {
return mChecked;
}
@Override
public void setChecked(boolean checked, boolean suppressListenerCall) {
boolean wasChecked = mChecked;
mChecked = checked;
if (!mListeners.isEmpty() && wasChecked != checked && !suppressListenerCall) {
for (OnContactCheckedListener listener : mListeners) {
listener.onContactChecked(this, wasChecked, checked);
}
}
}
@Override
public void addOnContactCheckedListener(OnContactCheckedListener listener) {
mListeners.add(listener);
}
@Override
public boolean matchesQuery(String[] queryStrings) {
String dispName = getDisplayName();
String phone = getPhone();
Log.d("Contact","Phone Query ["+dispName+"]["+phone+"]");
if (Helper.isNullOrEmpty(dispName)) return false;
if (Helper.isNullOrEmpty(phone)) return false;
dispName = dispName.toLowerCase(Locale.getDefault());
for (String queryString : queryStrings) {
if (dispName.contains(queryString) || phone.contains(queryString)) {
return true;
}
}
return false;
}
@Override
public String toString() {
return mId + ": " + mDisplayName;
}
}
| [
"rerom2536@gmail.com"
] | rerom2536@gmail.com |
8f8e58f14fa36b242a9a3c17696614d2c4b0151a | 02e469dcc3300d1b799b671b1550040f6c1e52f3 | /upay-pg-caja-entities/src/main/java/com/upayments/pg/caja/api/io/soap/getclientbyrut/ClientData.java | 4df2af987e096933e8fc7e565acae7d8c34f2180 | [] | no_license | t2solutions/u-pay-pg-caja-procesador | a2ab50c4eb608b379ccfe18a467f9e6a0ad5b4a0 | 79ce0f9f71a9c9204741d9c7e8f1294329aa4ea4 | refs/heads/master | 2023-07-11T18:57:05.865693 | 2021-08-14T19:34:51 | 2021-08-14T19:34:51 | 151,475,932 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,036 | java | package com.upayments.pg.caja.api.io.soap.getclientbyrut;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@JsonPropertyOrder({ "IdentityCardNumber", "Name", "FullName", "ShortName", "FirstName",
"LastName", "Salutation", "Gender", "GenderDesc", "BirthDate", "Citizenship",
"CitizenshipDesc", "MaritalStatus", "MaritalStatusDesc", "CompanyName",
"Department", "Position", "ClientCategory", "ClientCategoryDesc",
"ClientType", "ClientTypeDesc"})
public class ClientData implements Serializable {
private static final long serialVersionUID = 1L;
private String identityCardNumber; //
private String name; //
private String fullName; //
private String shortName; //
private String firstName; //
private String lastName; //
private String salutation; //
private String gender; //
private String genderDesc; //
private String birthDate; //
private String citizenship; //
private String citizenshipDesc; //
private String maritalStatus; //
private String maritalStatusDesc; //
private String companyName; //
private String department; //
private String position; //
private String clientCategory; //
private String clientCategoryDesc; //
private String clientType; //
private String clientTypeDesc; //
public ClientData() {
super();
}
@JsonProperty("IdentityCardNumber")
@JsonInclude(Include.NON_DEFAULT)
public String getIdentityCardNumber() {
return identityCardNumber;
}
public void setIdentityCardNumber(String identityCardNumber) {
this.identityCardNumber = identityCardNumber;
}
@JsonProperty("Name")
@JsonInclude(Include.NON_DEFAULT)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@JsonProperty("FullName")
@JsonInclude(Include.NON_DEFAULT)
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
@JsonProperty("ShortName")
@JsonInclude(Include.NON_DEFAULT)
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
@JsonProperty("FirstName")
@JsonInclude(Include.NON_DEFAULT)
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@JsonProperty("LastName")
@JsonInclude(Include.NON_DEFAULT)
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
@JsonProperty("Salutation")
@JsonInclude(Include.NON_DEFAULT)
public String getSalutation() {
return salutation;
}
public void setSalutation(String salutation) {
this.salutation = salutation;
}
@JsonProperty("Gender")
@JsonInclude(Include.NON_DEFAULT)
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
@JsonProperty("GenderDesc")
@JsonInclude(Include.NON_DEFAULT)
public String getGenderDesc() {
return genderDesc;
}
public void setGenderDesc(String genderDesc) {
this.genderDesc = genderDesc;
}
@JsonProperty("BirthDate")
@JsonInclude(Include.NON_DEFAULT)
public String getBirthDate() {
return birthDate;
}
public void setBirthDate(String birthDate) {
this.birthDate = birthDate;
}
@JsonProperty("Citizenship")
@JsonInclude(Include.NON_DEFAULT)
public String getCitizenship() {
return citizenship;
}
public void setCitizenship(String citizenship) {
this.citizenship = citizenship;
}
@JsonProperty("CitizenshipDesc")
@JsonInclude(Include.NON_DEFAULT)
public String getCitizenshipDesc() {
return citizenshipDesc;
}
public void setCitizenshipDesc(String citizenshipDesc) {
this.citizenshipDesc = citizenshipDesc;
}
@JsonProperty("MaritalStatus")
@JsonInclude(Include.NON_DEFAULT)
public String getMaritalStatus() {
return maritalStatus;
}
public void setMaritalStatus(String maritalStatus) {
this.maritalStatus = maritalStatus;
}
@JsonProperty("MaritalStatusDesc")
@JsonInclude(Include.NON_DEFAULT)
public String getMaritalStatusDesc() {
return maritalStatusDesc;
}
public void setMaritalStatusDesc(String maritalStatusDesc) {
this.maritalStatusDesc = maritalStatusDesc;
}
@JsonProperty("CompanyName")
@JsonInclude(Include.NON_DEFAULT)
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
@JsonProperty("Department")
@JsonInclude(Include.NON_DEFAULT)
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
@JsonProperty("Position")
@JsonInclude(Include.NON_DEFAULT)
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
@JsonProperty("ClientCategory")
@JsonInclude(Include.NON_DEFAULT)
public String getClientCategory() {
return clientCategory;
}
public void setClientCategory(String clientCategory) {
this.clientCategory = clientCategory;
}
@JsonProperty("ClientCategoryDesc")
@JsonInclude(Include.NON_DEFAULT)
public String getClientCategoryDesc() {
return clientCategoryDesc;
}
public void setClientCategoryDesc(String clientCategoryDesc) {
this.clientCategoryDesc = clientCategoryDesc;
}
@JsonProperty("ClientType")
@JsonInclude(Include.NON_DEFAULT)
public String getClientType() {
return clientType;
}
public void setClientType(String clientType) {
this.clientType = clientType;
}
@JsonProperty("ClientTypeDesc")
@JsonInclude(Include.NON_DEFAULT)
public String getClientTypeDesc() {
return clientTypeDesc;
}
public void setClientTypeDesc(String clientTypeDesc) {
this.clientTypeDesc = clientTypeDesc;
}
}
| [
"tthoms@gmail.com"
] | tthoms@gmail.com |
3c6cbdebcdef1e4b544dbe90880d0dc68e669d96 | 411b8da211217ece056066aec5949e7d75ce2d1f | /app/src/main/java/net/plurry/station/websocket/HybiParser.java | 279dd895fad1f84300648cb438cf0a698e615c04 | [] | no_license | kwangkuk0821/plurry-station | 4b752fe9864ed30ce193cde972390b22d54de146 | e961c89ceaca3c2cc4ec6dcc75135e11456753e4 | refs/heads/master | 2021-01-10T08:01:18.791434 | 2015-10-15T01:42:13 | 2015-10-15T01:42:13 | 43,734,859 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 14,247 | java | //
// HybiParser.java: draft-ietf-hybi-thewebsocketprotocol-13 parser
//
// Based on code from the faye project.
// https://github.com/faye/faye-websocket-node
// Copyright (c) 2009-2012 James Coglan
//
// Ported from Javascript to Java by Eric Butler <eric@codebutler.com>
//
// (The MIT License)
//
// 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 net.plurry.station.websocket;
import android.util.Log;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.List;
public class HybiParser {
private static final String TAG = "HybiParser";
private WebSocketClient mClient;
private boolean mMasking = true;
private int mStage;
private boolean mFinal;
private boolean mMasked;
private int mOpcode;
private int mLengthSize;
private int mLength;
private int mMode;
private byte[] mMask = new byte[0];
private byte[] mPayload = new byte[0];
private boolean mClosed = false;
private ByteArrayOutputStream mBuffer = new ByteArrayOutputStream();
private static final int BYTE = 255;
private static final int FIN = 128;
private static final int MASK = 128;
private static final int RSV1 = 64;
private static final int RSV2 = 32;
private static final int RSV3 = 16;
private static final int OPCODE = 15;
private static final int LENGTH = 127;
private static final int MODE_TEXT = 1;
private static final int MODE_BINARY = 2;
private static final int OP_CONTINUATION = 0;
private static final int OP_TEXT = 1;
private static final int OP_BINARY = 2;
private static final int OP_CLOSE = 8;
private static final int OP_PING = 9;
private static final int OP_PONG = 10;
private static final List<Integer> OPCODES = Arrays.asList(
OP_CONTINUATION,
OP_TEXT,
OP_BINARY,
OP_CLOSE,
OP_PING,
OP_PONG
);
private static final List<Integer> FRAGMENTED_OPCODES = Arrays.asList(
OP_CONTINUATION, OP_TEXT, OP_BINARY
);
public HybiParser(WebSocketClient client) {
mClient = client;
}
private static byte[] mask(byte[] payload, byte[] mask, int offset) {
if (mask.length == 0) return payload;
for (int i = 0; i < payload.length - offset; i++) {
payload[offset + i] = (byte) (payload[offset + i] ^ mask[i % 4]);
}
return payload;
}
public void start(HappyDataInputStream stream) throws IOException {
while (true) {
if (stream.available() == -1) break;
switch (mStage) {
case 0:
parseOpcode(stream.readByte());
break;
case 1:
parseLength(stream.readByte());
break;
case 2:
parseExtendedLength(stream.readBytes(mLengthSize));
break;
case 3:
mMask = stream.readBytes(4);
mStage = 4;
break;
case 4:
mPayload = stream.readBytes(mLength);
emitFrame();
mStage = 0;
break;
}
}
mClient.getListener().onDisconnect(0, "EOF");
}
private void parseOpcode(byte data) throws ProtocolError {
boolean rsv1 = (data & RSV1) == RSV1;
boolean rsv2 = (data & RSV2) == RSV2;
boolean rsv3 = (data & RSV3) == RSV3;
if (rsv1 || rsv2 || rsv3) {
throw new ProtocolError("RSV not zero");
}
mFinal = (data & FIN) == FIN;
mOpcode = (data & OPCODE);
mMask = new byte[0];
mPayload = new byte[0];
if (!OPCODES.contains(mOpcode)) {
throw new ProtocolError("Bad opcode");
}
if (!FRAGMENTED_OPCODES.contains(mOpcode) && !mFinal) {
throw new ProtocolError("Expected non-final packet");
}
mStage = 1;
}
private void parseLength(byte data) {
mMasked = (data & MASK) == MASK;
mLength = (data & LENGTH);
if (mLength >= 0 && mLength <= 125) {
mStage = mMasked ? 3 : 4;
} else {
mLengthSize = (mLength == 126) ? 2 : 8;
mStage = 2;
}
}
private void parseExtendedLength(byte[] buffer) throws ProtocolError {
mLength = getInteger(buffer);
mStage = mMasked ? 3 : 4;
}
public byte[] frame(String data) {
return frame(data, OP_TEXT, -1);
}
public byte[] frame(byte[] data) {
return frame(data, OP_BINARY, -1);
}
private byte[] frame(byte[] data, int opcode, int errorCode) {
return frame((Object)data, opcode, errorCode);
}
private byte[] frame(String data, int opcode, int errorCode) {
return frame((Object)data, opcode, errorCode);
}
private byte[] frame(Object data, int opcode, int errorCode) {
if (mClosed) return null;
Log.d(TAG, "Creating frame for: " + data + " op: " + opcode + " err: " + errorCode);
byte[] buffer = (data instanceof String) ? decode((String) data) : (byte[]) data;
int insert = (errorCode > 0) ? 2 : 0;
int length = buffer.length + insert;
int header = (length <= 125) ? 2 : (length <= 65535 ? 4 : 10);
int offset = header + (mMasking ? 4 : 0);
int masked = mMasking ? MASK : 0;
byte[] frame = new byte[length + offset];
frame[0] = (byte) ((byte)FIN | (byte)opcode);
if (length <= 125) {
frame[1] = (byte) (masked | length);
} else if (length <= 65535) {
frame[1] = (byte) (masked | 126);
frame[2] = (byte) Math.floor(length / 256);
frame[3] = (byte) (length & BYTE);
} else {
frame[1] = (byte) (masked | 127);
frame[2] = (byte) (((int) Math.floor(length / Math.pow(2, 56))) & BYTE);
frame[3] = (byte) (((int) Math.floor(length / Math.pow(2, 48))) & BYTE);
frame[4] = (byte) (((int) Math.floor(length / Math.pow(2, 40))) & BYTE);
frame[5] = (byte) (((int) Math.floor(length / Math.pow(2, 32))) & BYTE);
frame[6] = (byte) (((int) Math.floor(length / Math.pow(2, 24))) & BYTE);
frame[7] = (byte) (((int) Math.floor(length / Math.pow(2, 16))) & BYTE);
frame[8] = (byte) (((int) Math.floor(length / Math.pow(2, 8))) & BYTE);
frame[9] = (byte) (length & BYTE);
}
if (errorCode > 0) {
frame[offset] = (byte) (((int) Math.floor(errorCode / 256)) & BYTE);
frame[offset+1] = (byte) (errorCode & BYTE);
}
System.arraycopy(buffer, 0, frame, offset + insert, buffer.length);
if (mMasking) {
byte[] mask = {
(byte) Math.floor(Math.random() * 256), (byte) Math.floor(Math.random() * 256),
(byte) Math.floor(Math.random() * 256), (byte) Math.floor(Math.random() * 256)
};
System.arraycopy(mask, 0, frame, header, mask.length);
mask(frame, mask, offset);
}
return frame;
}
public void ping(String message) {
mClient.send(frame(message, OP_PING, -1));
}
public void close(int code, String reason) {
if (mClosed) return;
mClient.send(frame(reason, OP_CLOSE, code));
mClosed = true;
}
private void emitFrame() throws IOException {
byte[] payload = mask(mPayload, mMask, 0);
int opcode = mOpcode;
if (opcode == OP_CONTINUATION) {
if (mMode == 0) {
throw new ProtocolError("Mode was not set.");
}
mBuffer.write(payload);
if (mFinal) {
byte[] message = mBuffer.toByteArray();
if (mMode == MODE_TEXT) {
mClient.getListener().onMessage(encode(message));
} else {
mClient.getListener().onMessage(message);
}
reset();
}
} else if (opcode == OP_TEXT) {
if (mFinal) {
String messageText = encode(payload);
mClient.getListener().onMessage(messageText);
} else {
mMode = MODE_TEXT;
mBuffer.write(payload);
}
} else if (opcode == OP_BINARY) {
if (mFinal) {
mClient.getListener().onMessage(payload);
} else {
mMode = MODE_BINARY;
mBuffer.write(payload);
}
} else if (opcode == OP_CLOSE) {
int code = (payload.length >= 2) ? 256 * payload[0] + payload[1] : 0;
String reason = (payload.length > 2) ? encode(slice(payload, 2)) : null;
Log.d(TAG, "Got close op! " + code + " " + reason);
mClient.getListener().onDisconnect(code, reason);
} else if (opcode == OP_PING) {
if (payload.length > 125) { throw new ProtocolError("Ping payload too large"); }
Log.d(TAG, "Sending pong!!");
mClient.sendFrame(frame(payload, OP_PONG, -1));
} else if (opcode == OP_PONG) {
String message = encode(payload);
// FIXME: Fire callback...
Log.d(TAG, "Got pong! " + message);
}
}
private void reset() {
mMode = 0;
mBuffer.reset();
}
private String encode(byte[] buffer) {
try {
return new String(buffer, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
private byte[] decode(String string) {
try {
return (string).getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
private int getInteger(byte[] bytes) throws ProtocolError {
long i = byteArrayToLong(bytes, 0, bytes.length);
if (i < 0 || i > Integer.MAX_VALUE) {
throw new ProtocolError("Bad integer: " + i);
}
return (int) i;
}
/**
* Copied from AOSP Arrays.java.
*/
/**
* Copies elements from {@code original} into a new array, from indexes start (inclusive) to
* end (exclusive). The original order of elements is preserved.
* If {@code end} is greater than {@code original.length}, the result is padded
* with the value {@code (byte) 0}.
*
* @param original the original array
* @param start the start index, inclusive
* @param end the end index, exclusive
* @return the new array
* @throws ArrayIndexOutOfBoundsException if {@code start < 0 || start > original.length}
* @throws IllegalArgumentException if {@code start > end}
* @throws NullPointerException if {@code original == null}
* @since 1.6
*/
private static byte[] copyOfRange(byte[] original, int start, int end) {
if (start > end) {
throw new IllegalArgumentException();
}
int originalLength = original.length;
if (start < 0 || start > originalLength) {
throw new ArrayIndexOutOfBoundsException();
}
int resultLength = end - start;
int copyLength = Math.min(resultLength, originalLength - start);
byte[] result = new byte[resultLength];
System.arraycopy(original, start, result, 0, copyLength);
return result;
}
private byte[] slice(byte[] array, int start) {
return copyOfRange(array, start, array.length);
}
public static class ProtocolError extends IOException {
public ProtocolError(String detailMessage) {
super(detailMessage);
}
}
private static long byteArrayToLong(byte[] b, int offset, int length) {
if (b.length < length)
throw new IllegalArgumentException("length must be less than or equal to b.length");
long value = 0;
for (int i = 0; i < length; i++) {
int shift = (length - 1 - i) * 8;
value += (b[i + offset] & 0x000000FF) << shift;
}
return value;
}
public static class HappyDataInputStream extends DataInputStream {
public HappyDataInputStream(InputStream in) {
super(in);
}
public byte[] readBytes(int length) throws IOException {
byte[] buffer = new byte[length];
int total = 0;
while (total < length) {
int count = read(buffer, total, length - total);
if (count == -1) {
break;
}
total += count;
}
if (total != length) {
throw new IOException(String.format("Read wrong number of bytes. Got: %s, Expected: %s.", total, length));
}
return buffer;
}
}
} | [
"kwangkuk0821@gmail.com"
] | kwangkuk0821@gmail.com |
15218875ae53259e83386d01038acc65245992ba | e584d7dbed6259d5224cf1ed9f271d93c4be9c31 | /gmall-mbg/src/main/java/com/atguigu/gmall/sms/service/HomeRecommendSubjectService.java | 87d236b8673626d2001ae812609656bbe22ebba5 | [] | no_license | james1106/mygmall | 99115ec7f32128ee0bcc7d46ffbd9e9cacdeacbe | 5b9e7914ea98ef93b307d2b6a072ab0ae9e42f2b | refs/heads/master | 2020-05-25T09:32:11.056635 | 2019-05-14T00:54:30 | 2019-05-14T00:54:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 345 | java | package com.atguigu.gmall.sms.service;
import com.atguigu.gmall.sms.entity.HomeRecommendSubject;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 首页推荐专题表 服务类
* </p>
*
* @author lxx
* @since 2019-05-09
*/
public interface HomeRecommendSubjectService extends IService<HomeRecommendSubject> {
}
| [
"3350499769@qq.com"
] | 3350499769@qq.com |
d751a482e9435f2b4c9c23276dc5d3e7d411ab05 | 6ddadb01d36631049ef14e0b680e313995e63a5b | /src/net/herozpvp/translateapi/server/Server.java | 11b4384264b18d777e1a3125426a46e634b7a754 | [
"MIT"
] | permissive | iHDeveloper/TranslateAPI | 5d674145e89066e387978ce876e373dcec375721 | d9160bb2ec8ca49872be811cacb9f95655e57699 | refs/heads/master | 2021-01-19T22:53:36.506075 | 2017-04-20T18:52:43 | 2017-04-20T18:52:43 | 88,884,547 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 635 | java | package net.herozpvp.translateapi.server;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import net.herozpvp.translateapi.until.Settings;
public class Server {
/*
* Server System :
*
* |>> On Accept:
* | 1- Add client with uuid
* */
private static ServerSocket server; //Host
//private static ByteArrayOutputStream out; //Send stream
//private static ByteArrayInputStream in; //Receive stream
public static void run() throws IOException{
server = new ServerSocket(Settings.getPort());
}
}
| [
"hamzadeveloper@hotmail.com"
] | hamzadeveloper@hotmail.com |
e6c9cfb62ffbdda8e570945f9874f6924089bf22 | 5ff89b7046345aebe64d71d0a283e5eb3b954067 | /poreskauprava/src/main/java/rs/edu/raf/poreskauprava/domain/dto/rate/interest/InterestRateRequestDTO.java | c4a197608e4624c02414f096b5c65e330d2e640a | [] | no_license | igoricelic/university_frontend | a8f993aa5c2c5261f151caf7d7bdfc4d94bcdd25 | d88cc2a10eead771f03e07ac64dae6d69cc8c8a8 | refs/heads/master | 2021-06-06T12:54:31.975183 | 2019-05-30T22:18:13 | 2019-05-30T22:18:13 | 156,462,663 | 0 | 0 | null | 2021-06-04T01:59:12 | 2018-11-06T23:32:02 | Java | UTF-8 | Java | false | false | 342 | java | package rs.edu.raf.poreskauprava.domain.dto.rate.interest;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class InterestRateRequestDTO {
private Long id;
private int year;
private double percentage;
}
| [
"igoricelic@outlook.com"
] | igoricelic@outlook.com |
6458fbe9d8b08d52c6e77e3c2ec8d0d65ae1319d | beee80354919f4579d7ad146581872cbc4e1cb33 | /app/src/main/java/activity/Login.java | 935d255c59a12f41c161bb6226978f0c5c8cc6b3 | [] | no_license | Ziad-Nadine-Maryam/SHOPPY | 72d960d1718a77bed9eebd3e2f1eeb94f900e7a1 | 8aab1331670bf259042c7143040b928911fab82e | refs/heads/master | 2023-01-05T16:48:44.163486 | 2020-11-05T16:36:01 | 2020-11-05T16:36:01 | 310,357,527 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,254 | java | package activity;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
import com.android.volley.Request.Method;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.example.shoppy.R;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.HashMap;
import java.util.Map;
import app.AppConfig;
import app.AppController;
import helper.SQLiteHandler;
import helper.SessionManager;
public class Login extends Activity {
private static final String TAG = Registration.class.getSimpleName();
private Button btnLogin;
private Button btnLinkToRegister;
private EditText inputEmail;
private EditText inputPassword;
private ProgressDialog pDialog;
private SessionManager session;
private SQLiteHandler db;
private ImageView imageview;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
inputEmail = (EditText) findViewById(R.id.email);
inputPassword = (EditText) findViewById(R.id.password);
btnLogin = (Button) findViewById(R.id.button2);
btnLinkToRegister = (Button) findViewById(R.id.btnLinkToRegisterScreen);
String uri = "@drawable/bbbb"; // where myresource (without the extension) is the file
int imageResource = getResources().getIdentifier(uri, null, getPackageName());
imageview= (ImageView)findViewById(R.id.imageView2);
Drawable res = getResources().getDrawable(imageResource);
imageview.setImageDrawable(res);
// Progress dialog
pDialog = new ProgressDialog(this);
pDialog.setCancelable(false);
// SQLite database handler
db = new SQLiteHandler(getApplicationContext());
// Session manager
session = new SessionManager(getApplicationContext());
// Check if user is already logged in or not
if (session.isLoggedIn()) {
// User is already logged in. Take him to main activity
Intent intent = new Intent(Login.this, MainActivity.class);
startActivity(intent);
finish();
}
// Login button Click Event
btnLogin.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
String email = inputEmail.getText().toString().trim();
String password = inputPassword.getText().toString().trim();
// Check for empty data in the form
if (!email.isEmpty() && !password.isEmpty()) {
checkLogin(email, password);
} else {
// Prompt user to enter credentials
Toast.makeText(getApplicationContext(),
"Please enter the credentials!", Toast.LENGTH_LONG)
.show();
}
}
});
// Link to Register Screen
btnLinkToRegister.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent i = new Intent(getApplicationContext(),
Registration.class);
startActivity(i);
finish();
}
});
}
/**
* function to verify login details in mysql db
*/
private void checkLogin(final String email, final String password) {
// Tag used to cancel the request
String tag_string_req = "req_login";
pDialog.setMessage("Logging in ...");
showDialog();
StringRequest strReq = new StringRequest(Method.POST,
AppConfig.URL_LOGIN, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Log.d(TAG, "Login Response: " + response.toString());
hideDialog();
try {
JSONObject jObj = new JSONObject(response);
boolean error = jObj.getBoolean("error");
// Check for error node in json
if (!error) {
// user successfully logged in
// Create login session
session.setLogin(true);
// Now store the user in SQLite
String uid = jObj.getString("unique_id");
JSONObject user = jObj.getJSONObject("users");
String name = user.getString("name");
String email = user.getString("email");
String created_at = user
.getString("created_at");
String phone=user.getString("phone_number");
String address=user.getString("address");
// Inserting row in users table
db.addUser(name,email, uid, created_at,phone,address);
// Launch main activity
Intent intent = new Intent(Login.this,
Registration.class);
startActivity(intent);
finish();
} else {
// Error in login. Get the error message
String errorMsg = jObj.getString("error_msg");
Toast.makeText(getApplicationContext(),
errorMsg, Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
// JSON error
e.printStackTrace();
Toast.makeText(getApplicationContext(), "Json error: " + e.getMessage(), Toast.LENGTH_LONG).show();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.e(TAG, "Login Error: " + error.getMessage());
Toast.makeText(getApplicationContext(),
error.getMessage(), Toast.LENGTH_LONG).show();
hideDialog();
}
}) {
@Override
protected Map<String, String> getParams() {
// Posting parameters to login url
Map<String, String> params = new HashMap<String, String>();
params.put("email", email);
params.put("password", password);
return params;
}
};
// Adding request to request queue
AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
}
private void showDialog() {
if (!pDialog.isShowing())
pDialog.show();
}
private void hideDialog() {
if (pDialog.isShowing())
pDialog.dismiss();
}
}
| [
"maryamahmed639@gmail.com"
] | maryamahmed639@gmail.com |
36f30251e61afcc1cb8321cfe8d84633c2361d1a | 60faa08b0f3c8c2053b1dce22b023e4f46d4a851 | /src/main/java/behavioral/memento/Game.java | c65dcf41b8ea686eab15eeec30c49a2fca9071ad | [] | no_license | maciekchojak/design-patterns | 01129c0f866308a9462c1200d0f4157cf3a615d0 | 163263de726ac68c188166ad95f45d2b85ea22d9 | refs/heads/master | 2021-02-18T19:50:53.673197 | 2019-07-28T10:35:19 | 2019-07-28T10:35:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 663 | java | package behavioral.memento;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
public class Game {
private int progress;
Map<String, GameState> saves;
public Game() {
this.saves = new HashMap<>();
}
public void loadState(String name) {
this.progress = saves.get(name).getProgress();
}
public void saveState(String name) {
GameState gameState = new GameState(LocalDateTime.now(), name, this.progress);
saves.put(name, gameState);
}
public void makeProgess() {
this.progress += 10;
}
public int getProgress() {
return progress;
}
}
| [
"piotr.papierski@harman.com"
] | piotr.papierski@harman.com |
ca69f50858d1ef75b9764763f3bc8c73da7ebf99 | e6d2e917a98c234695ca526af7152224b2a549bd | /springboot-elasticsearch/src/main/java/com/gc/elasticsearch/bean/News.java | f574489a21885f4ff52e68f91ab8e5e957aec0bf | [] | no_license | duanzhaoqian/spring-demo | 243ccbe6d16b1639632fbd61283ab6b4d7b0ecce | 471ee232ccd0db1047019733ebcd9d744eda50ea | refs/heads/master | 2023-04-07T16:59:06.023633 | 2021-01-06T05:27:03 | 2021-01-06T05:27:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 742 | java | package com.gc.elasticsearch.bean;
import io.searchbox.annotations.JestId;
public class News {
@JestId
private Integer id;
private String content;
public News() {
}
public News(Integer id, String content) {
this.id = id;
this.content = content;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public String toString() {
return "News{" +
"id=" + id +
", content='" + content + '\'' +
'}';
}
}
| [
"1595030095@qq.com"
] | 1595030095@qq.com |
a6d5812a28108ca03b2939e6d309687abae03012 | 5923c5f7eeec75bf81d3f150a95dfa84e089447f | /HocOOP_Enum/src/kyna/vn/model/SinhVien.java | 8f41c89fde6caa9c27caf6d1dcbf3aaacd7cff49 | [] | no_license | taidangit/laptrinhjava-tranduythanh | 100b0cd6e325d40bf2f1bb7c71ef68aedb400e70 | 8af741164f7b51b2467e316841003474c5fe20f0 | refs/heads/master | 2020-11-24T21:42:18.675103 | 2019-12-16T09:41:13 | 2019-12-16T09:42:40 | 228,351,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 922 | java | package kyna.vn.model;
public class SinhVien {
private int ma;
private String ten;
private double diemTB;
private XepLoai loai;
public SinhVien(int ma, String ten, double diemTB) {
super();
this.ma = ma;
this.ten = ten;
this.diemTB = diemTB;
this.loai= getLoai();
}
public int getMa() {
return ma;
}
public void setMa(int ma) {
this.ma = ma;
}
public String getTen() {
return ten;
}
public void setTen(String ten) {
this.ten = ten;
}
public double getDiemTB() {
return diemTB;
}
public void setDiemTB(double diemTB) {
this.diemTB = diemTB;
}
public XepLoai getLoai() {
if(this.diemTB>=8) {
loai=XepLoai.Gioi;
} else if(this.diemTB>=6.5) {
loai=XepLoai.Kha;
} else if(this.diemTB>=5) {
loai=XepLoai.TrungBinh;
} else {
loai=XepLoai.Yeu;
}
return loai;
}
@Override
public String toString() {
return ma+"-"+ten+"-"+diemTB+"=>"+loai.description();
}
}
| [
"dangphattai92@gmail.com"
] | dangphattai92@gmail.com |
7b342f4353f30b3ead79b59f4aa422216749555c | 3239c27556a2ada81fbcf3b064ab5787fa199240 | /fm-workbench/agree/com.rockwellcollins.atc.agree/src/com/rockwellcollins/atc/agree/AgreeAADLPropertyUtils.java | 8bf2da4cceb59c0d4ca299a942c2101587314c9b | [
"BSD-3-Clause"
] | permissive | ToppingXu/smaccm | 38e70b48a91905dd2ccfc05832f9804e28d77a59 | 5d69f5d5ccf53bee3c2a5f2ee8ee9299a7f13cf7 | refs/heads/master | 2021-05-04T20:46:50.822224 | 2017-12-22T14:50:23 | 2017-12-22T14:50:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,401 | java | package com.rockwellcollins.atc.agree;
import java.util.ArrayList;
import java.util.List;
import org.osate.aadl2.EnumerationLiteral;
import org.osate.aadl2.ListValue;
import org.osate.aadl2.NamedElement;
import org.osate.aadl2.Property;
import org.osate.aadl2.PropertyExpression;
import org.osate.aadl2.modelsupport.resources.OsateResourceUtil;
import org.osate.xtext.aadl2.properties.util.EMFIndexRetrieval;
import org.osate.xtext.aadl2.properties.util.PropertyUtils;
public class AgreeAADLPropertyUtils {
public static String getPropertyEnumString(NamedElement namedEl, String property){
Property prop = EMFIndexRetrieval.getPropertyDefinitionInWorkspace(
OsateResourceUtil.getResourceSet(), property);
EnumerationLiteral lit = PropertyUtils.getEnumLiteral(namedEl, prop);
return lit.getName();
}
public static List<PropertyExpression> getPropertyList(NamedElement namedEl, String property){
List<PropertyExpression> els = new ArrayList<>();
Property prop = EMFIndexRetrieval.getPropertyDefinitionInWorkspace(
OsateResourceUtil.getResourceSet(), property);
ListValue listExpr = (ListValue) PropertyUtils.getSimplePropertyListValue(namedEl, prop);
for(PropertyExpression propExpr : listExpr.getOwnedListElements()){
els.add(propExpr);
}
return els;
}
}
| [
"john.backes@rockwellcollins.com"
] | john.backes@rockwellcollins.com |
4596065efa438221ed95dc19850c41a330eec793 | 377e2482b6ac2f0264f85e8ba8d506c449abca78 | /src/test/java/com/mayh/blog/UnitTest.java | 9590803ac57fb7d018b72322b579277dd017b7e2 | [] | no_license | ITrover/MyBlog | 432a623a9dcd433d127feb6392a6635f9717a827 | 2224c22047707df9964825b05917135b867979f5 | refs/heads/master | 2022-07-14T09:18:49.858616 | 2019-12-03T13:27:05 | 2019-12-03T13:27:05 | 220,793,792 | 4 | 1 | null | 2022-06-21T02:22:03 | 2019-11-10T13:26:28 | JavaScript | UTF-8 | Java | false | false | 2,279 | java | package com.mayh.blog;
import com.mayh.blog.po.Comment;
import com.mayh.blog.service.CommentService;
import com.mayh.blog.service.CommentServiceImpl;
import com.mayh.blog.utils.MarkdownUtil;
import com.mayh.blog.utils.TitleExtract;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.junit4.SpringRunner;
import javax.swing.*;
import java.util.List;
@SpringBootTest
public class UnitTest {
@Autowired
private CommentService commentService;
@Test
public void test() {
String s = MarkdownUtil.markdown2Html("找出必要信息,拆分成小的信息列表(原子性数据),使易于查询\n" +
"\n" +
"原子性数据 #规则一 具有原子性数据的列中不会有多个类型相同的值 #规则二 具有原子性数据的表中不会有多个储存同类型的列\n" +
"\n" +
"#第一范式1NF FIRST NORMAL FORM 使用主键 人造主键 自然主键 规则 1.主键独一无 二。 2.创建记录时必须插入主键的值,主键不能为NULL。 3.主键不可以更改。\n" +
"\n" +
"#取得原来建表的SQL语句 SHOW CREATE TABLE MY_TABLE; //会有反撇号 SQL用于辨别列名,可以直接使用 #SHOW 的作用 SHOW COLUMNS FROM tablename //查看所有列 SHOW CRATE DATABASE databasename SHOW INDEX FROM tablename SHOW WARNINGS //取得确切的警告内容\n" +
"\n" +
"#添加主键 PRIMARY KEY (列名)\n" +
"\n" +
"#自动递增 AUTO_INCREMENT\n" +
"\n" +
"#ALTER ALTER TABLE tablename ADD COLUMN ......... //用于为现有的表添加新的列");
System.out.println(s);
}
@Test
public void test01() {
String s = "[wang[li]";
String[] split = s.split("\\[|\\]");
for (int i = 0; i < split.length; i++) {
System.out.println(split[i]);
}
}
@Test
public void CommentMethod() {
}
}
| [
"1172610139@qq.com"
] | 1172610139@qq.com |
df810ae8e41fc2b17edb3e47768690af0b8ebc77 | 17d8ee15e180b01846c8cb95605ee5afa152dcc8 | /app/src/main/java/net/msonic/testsyncdata/sync/SyncService.java | db52148b1b250520516d0cdeb30c45a21167665e | [] | no_license | mzegarras/SyncDataAndroid | 25b891fefc798ba2afbf8f718b8512c067b08b4e | 5a435eae2095c65efbd054c37543526d82f6bf2c | refs/heads/master | 2021-01-10T06:56:31.499190 | 2016-02-28T15:27:54 | 2016-02-28T15:27:54 | 51,570,068 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 829 | java | package net.msonic.testsyncdata.sync;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.support.annotation.Nullable;
import net.msonic.testsyncdata.CustomApplication;
import net.msonic.testsyncdata.sync.adapters.SyncAdapter;
import javax.inject.Inject;
/**
* Created by User01 on 25/02/2016.
*/
public class SyncService extends Service {
@Inject
SyncAdapter syncAdapter;
// Object to use as a thread-safe lock
private static final Object syncAdapterLock = new Object();
@Override
public void onCreate() {
super.onCreate();
((CustomApplication) getApplication()).getDiComponent().inject(this);
}
@Nullable
@Override
public IBinder onBind(Intent intent) {
return syncAdapter.getSyncAdapterBinder();
}
}
| [
"mzegarra@gmail.com"
] | mzegarra@gmail.com |
0fc925463b57ea8e4fa33dd8ad164e4a2ff7525f | eff66bd01aa6da98e3cb126910a74c7e232eee15 | /src/main/java/com/qian/app/ui/model/response/ErrorMessage.java | 8502b7012f050312a382a53411fd37a990eba0c5 | [] | no_license | Qianwang-us/UserWebService | 3217fcd11eacc12d763a90e3e1d9907717a6d520 | 71d6c98605a666c3c61410db4c66695f6c00a12c | refs/heads/main | 2023-01-19T10:00:17.179634 | 2020-11-23T16:04:12 | 2020-11-23T16:04:12 | 314,602,450 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 547 | java | package com.qian.app.ui.model.response;
import java.util.Date;
public class ErrorMessage {
private Date timestamp;
private String message;
public ErrorMessage() {}
public ErrorMessage(Date timestamp, String message) {
this.timestamp = timestamp;
this.message = message;
}
public Date getTimestamp() {
return timestamp;
}
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
| [
"qianwang.us@gmail.com"
] | qianwang.us@gmail.com |
f33208c8beaa78aef588befcbc03030afd90c8fd | b3c522b80cca6f4a6812f19105420e11884718ca | /src/test/java/test/Thread4/ConditionTest.java | b8320543c737fe0883c145865fef6db5751b8510 | [] | no_license | asdbaihu/WebMagicStudty | 532f7f8eb375d97e9a9c4f72b3adbdfc77764699 | a1853abbec32a181815a2a2b7ab16410c75e54c3 | refs/heads/master | 2020-07-10T02:32:37.543252 | 2018-01-08T09:28:44 | 2018-01-08T09:28:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,698 | java | package test.Thread4;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
class MyService3{
private Lock lock = new ReentrantLock();
private Condition condition = lock.newCondition();
public void await(){
try{
lock.lock();//加上锁
//await():使当前的执行线程进入了等待的状态
System.out.println("线程开始加入等待队列,当期时间是"+System.currentTimeMillis());
condition.await();//await()方法之前必定要先加锁
}catch (InterruptedException e){
e.printStackTrace();
}finally {
System.out.println("线程释放锁,时间为"+System.currentTimeMillis());
lock.unlock();//释放锁
}
}
public void signal(){
try{
lock.lock();
System.out.println("Signal时间为:" + System.currentTimeMillis());
condition.signal();//唤醒在等待的线程
}catch (Exception e){
e.printStackTrace();
}finally {
lock.unlock();
}
}
}
class ThreadA3 extends Thread{
private MyService3 service3;
public ThreadA3(MyService3 service3){
this.service3 = service3;
}
public void run(){
service3.await();
}
}
public class ConditionTest {
public static void main(String[] args) throws InterruptedException {
MyService3 service3 = new MyService3();
ThreadA3 threadA3 = new ThreadA3(service3);
threadA3.start();
Thread.sleep(3000);
service3.signal();//唤醒正在等待的线程
}
}
| [
"MARK.YI@CARGOSMART.COM"
] | MARK.YI@CARGOSMART.COM |
1536b09715e91301a9e01a2a6a760c92b5b4b6e4 | 6cc9ab5ae97de3bc9298737baeddd0c80ca16661 | /src/main/java/mariculture/core/helpers/MirrorHelper.java | dce5f61f1647f0878554f447c18988a09beca796 | [
"MIT"
] | permissive | mymagadsl/Mariculture | 099f89aa75cec949a2d247e037cf4c36f856d197 | 4ac1db6828d078e5fcc55538663917edfe567b4f | refs/heads/master | 2021-01-15T15:16:12.670933 | 2014-02-27T12:16:30 | 2014-02-27T12:16:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,075 | java | package mariculture.core.helpers;
import org.apache.logging.log4j.Level;
import mariculture.core.handlers.LogHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
public class MirrorHelper {
private static final MirrorHelper INSTANCE = new MirrorHelper();
public static MirrorHelper instance() {
return INSTANCE;
}
public ItemStack[] get(EntityPlayer player) {
if (!player.worldObj.isRemote) {
NBTTagCompound loader = player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG);
NBTTagList nbttaglist = loader.getTagList("mirrorContents", 10);
if (nbttaglist != null) {
ItemStack[] mirrorContents = new ItemStack[4];
for (int i = 0; i < nbttaglist.tagCount(); i++) {
NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.getCompoundTagAt(i);
byte byte0 = nbttagcompound1.getByte("Slot");
if (byte0 >= 0 && byte0 < mirrorContents.length) {
mirrorContents[byte0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
}
}
return mirrorContents;
}
}
return new ItemStack[4];
}
public void save(EntityPlayer player, ItemStack[] mirrorContents) {
if (!player.worldObj.isRemote) {
try {
NBTTagList nbttaglist = new NBTTagList();
for (int i = 0; i < 3; i++) {
if (mirrorContents[i] != null) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setByte("Slot", (byte) i);
mirrorContents[i].writeToNBT(nbttagcompound1);
nbttaglist.appendTag(nbttagcompound1);
}
}
if (!player.getEntityData().hasKey(EntityPlayer.PERSISTED_NBT_TAG)) {
player.getEntityData().setTag(EntityPlayer.PERSISTED_NBT_TAG, new NBTTagCompound());
}
player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).setTag("mirrorContents", nbttaglist);
} catch (Exception e) {
LogHandler.log(Level.WARN, "Mariculture had trouble saving Mirror Contents for " + player.getDisplayName());
}
}
}
}
| [
"joshjackwildman@gmail.com"
] | joshjackwildman@gmail.com |
8fcbbab53243aa7730599633ddc2148287bee3f2 | 310429f09dd0611296d642ee315dba8c2e782f15 | /api/src/main/java/com/example/demo/controller/AgenteController.java | ff1d406f41175c984360295b1433ed92d11697fa | [] | no_license | itzAngel/metropoli | 9aaf83e46859d7106107204f5d6f0a3114906951 | fde956d8878ac1aa97882ae7b9278312ad939b6b | refs/heads/main | 2023-04-19T04:39:54.726085 | 2021-04-15T16:02:06 | 2021-04-15T16:02:06 | 358,306,699 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,781 | java | package com.example.demo.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.example.demo.model.Agente;
import com.example.demo.service.MetroService;
@CrossOrigin(origins = "*", maxAge = 3600, methods= {RequestMethod.GET,RequestMethod.POST,RequestMethod.PUT,RequestMethod.DELETE})
@RestController
@RequestMapping({"/agente"})
public class AgenteController {
@Autowired
MetroService service;
@Autowired
private BCryptPasswordEncoder encoder;
@GetMapping
public List<Agente> listar(){
return service.listarAgente();
}
@PostMapping
public Agente agregar(@RequestBody Agente p) {
String contra = encoder.encode(p.getContrasena());
p.setContrasena(contra);
return service.addAgente(p);
}
@GetMapping("/{id}")
public Agente listarId(@PathVariable("id")String id){
return service.listarIdAgente(id);
}
@PutMapping
public Agente editar(@RequestBody Agente p) {
return service.editAgente(p);
}
@DeleteMapping("/{id}")
public Agente delete(@PathVariable("id")String id) {
return service.deleteAgente(id);
}
}
| [
"itzangelbc@gmail.com"
] | itzangelbc@gmail.com |
31582f766d599a86c180f6826d41284ffe4d6dcf | c1a1212ef7f9e535727c7a10ec0000a51323f900 | /das_rest_service/src/main/java/in/uskcorp/tool/das/controller/DiseasesController.java | fd623f434d3ebc7818123976750cdd33b7610c0d | [] | no_license | kiranuskcorp/das_rest_service | c25dfaf4682e2ad4b521928d6606268f666e6a58 | a7b40581fb487fbaca9db501da59513138f78eeb | refs/heads/master | 2020-12-03T00:16:24.638693 | 2017-07-28T04:16:49 | 2017-07-28T04:16:49 | 96,006,168 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 722 | java | package in.uskcorp.tool.das.controller;
import in.uskcorp.tool.das.domain.Diseases;
import in.uskcorp.tool.das.service.APIService;
import in.uskcorp.tool.das.service.DiseasesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(DASRestURIConstants.DISEASES)
public class DiseasesController extends APIController<Diseases> {
@Autowired
@Qualifier("diseasesServiceImpl")
DiseasesService diseasesService;
@Override
protected APIService<Diseases> getService() {
return diseasesService;
}
}
| [
"tsreenath1985@gmail.com"
] | tsreenath1985@gmail.com |
5c87d1fc6cbc86e431fa8bb587d49289a0bc42cc | cd322966b81d58d34b805cbb30f3c565070281c9 | /Lab_02/src/LAB/Main.java | afb427fd7cd67c95696d8826530ce5344c5338ce | [] | no_license | VinuriHemalka/lab02_paf | d87caa15b11a8b8453e3a49e98dddd44177774a0 | a34dd2f85755b85f2982a7feb96dee78a755771f | refs/heads/main | 2023-03-07T13:45:01.949957 | 2021-02-20T08:07:47 | 2021-02-20T08:07:47 | 340,596,183 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 132 | java | package LAB;
public class Main {
public static void main(String[] args) {
System.out.println("This is my first project");
}
}
| [
"hemalkavinuri123@gmail.com"
] | hemalkavinuri123@gmail.com |
2aa0fd34bedb3314ebf46eccb6978d2d438cbe0d | dcb33b5f7778952053d5a2f640f941ca8b6a724b | /src/main/java/com/app/model/ShippingDtl.java | 68c27c7e073034cbc71dfb69ffd43747a8be63d3 | [] | no_license | narendradasara99/WhareHouse-Project-Final-Code | 2da43f63b941eb8ea255ecc6f89c942153e98774 | 407f60677042fbd0e14580172d57b0038fc8a90b | refs/heads/master | 2023-03-03T19:01:15.691939 | 2022-02-15T07:03:16 | 2022-02-15T07:03:16 | 226,907,772 | 0 | 0 | null | 2023-02-22T07:38:04 | 2019-12-09T15:45:37 | Java | UTF-8 | Java | false | false | 1,869 | java | package com.app.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name="shipping_dtls")
public class ShippingDtl {
@Id
@GeneratedValue
private Integer id;
private String itemCode;
private Double baseCost;
private Integer qnty;
private Double itemVal;
/* Integrations. Parts */
@ManyToOne
@JoinColumn(name="shipIdfk")
private Shipping parent;
public ShippingDtl() {
super();
}
public ShippingDtl(Integer id) {
super();
this.id = id;
}
public ShippingDtl(String itemCode, Double baseCost, Integer qnty, Double itemVal) {
super();
this.itemCode = itemCode;
this.baseCost = baseCost;
this.qnty = qnty;
this.itemVal = itemVal;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public Double getBaseCost() {
return baseCost;
}
public void setBaseCost(Double baseCost) {
this.baseCost = baseCost;
}
public Integer getQnty() {
return qnty;
}
public void setQnty(Integer qnty) {
this.qnty = qnty;
}
public Double getItemVal() {
return itemVal;
}
public void setItemVal(Double itemVal) {
this.itemVal = itemVal;
}
public Shipping getParent() {
return parent;
}
public void setParent(Shipping parent) {
this.parent = parent;
}
@Override
public String toString() {
return "ShippingDtl [id=" + id + ", itemCode=" + itemCode + ", baseCost=" + baseCost + ", qnty=" + qnty
+ ", itemVal=" + itemVal + ", parent=" + parent + "]";
}
}
| [
"naren@Naren-PC"
] | naren@Naren-PC |
350853f133383d2e8dc218ece9c497cc4deda544 | adf17db410670120990c7a8e15882e2c3f1b542c | /src/main/java/bloods/common/dimenPizza/handler/chestLootHandler.java | e24fa7eeb7ad7b17d52ba0ebbae4bfed0b9e36e8 | [] | no_license | BloodMists/DimenzPizza | c253bcc6de76cc3b0ae062fdde202d8f8588bbb4 | 1eae2f2bf66acf9a80a3e52a22a169c5f8ab449c | refs/heads/master | 2016-09-01T06:26:18.430252 | 2015-06-21T18:32:19 | 2015-06-21T18:32:19 | 36,164,705 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 955 | java | package bloods.common.dimenPizza.handler;
import bloods.common.dimenPizza.Blooddp;
import bloods.common.dimenPizza.init.BDPItemsLoader;
import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks;
public class chestLootHandler
{
public static void init()
{
String c = ChestGenHooks.DUNGEON_CHEST;
if (configHandler.gGIsEnabled == true){
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(Blooddp.forgottenExo), 1, 1, 5));
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(Blooddp.leafBand), 1, 1, 5));
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(Blooddp.fancyBoots), 1, 1, 1));
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(Blooddp.platedWings), 1, 1, 1));
}
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(BDPItemsLoader.seed), 1, 4, 50));
}
}
| [
"bloodsmists@gmail.com"
] | bloodsmists@gmail.com |
bf0a890a090ceb789a4f89dcb0dfd7c7f528fefb | 7b52c2569f1c746c1f5204833fa9e6eddbd252ce | /第一阶段/DAY17(多线程)/src/work1/MyThread.java | d95df91b9592b314a37198022b96a093b49551ce | [] | no_license | lixiangyu-1998/HomeWork | 0a7dee9be0a157ef79e0e37e11f34b2e4d357ce5 | ecfc133e85bf34a5bea16ceb21e64cc0a4c6562c | refs/heads/main | 2023-05-07T20:09:46.831350 | 2021-05-24T09:24:45 | 2021-05-24T09:24:45 | 347,954,037 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,155 | java | package work1;
/**
* @author:LXY
* @className:MyThread
* @description:
* @date:2021/4/319:07
* @version:0.1
* @since:1.8
*/
public class MyThread implements Runnable {
public static void main(String[] args) {
MyThread t1=new MyThread();//此时有2个线程 1 2
MyThread t2=new MyThread();//但是 t2 t1 也是一个线程 即 主线程 (实际上MyThread没有继承Thread 其 实例化的对象也不能叫线程
new Thread(t1,"线程一").start();//三个线程共享资源(只是因为其对象在main内调用方法 所以是主线程来运行
new Thread(t1,"线程二").start();
t1.run();
//t2.run();
}
private static Integer count=0;
@Override
public void run() {
while (count<5){
this.count++;
synchronized(this){//同步锁
System.out.println("当前正在运行的线程是:"+Thread.currentThread().getName());
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
}
| [
"199889910@qq.com"
] | 199889910@qq.com |
3c95171950c54b50d6ab790932fffec8939a4fe2 | 120913c6af150aadba7cafa0d1366d9b190a60e6 | /src/main/java/es/apba/infra/esb/support/cxf/message/ExceptionMessageProvider.java | ed7dd40bbd7aa4ec446c507db7ee3ac222b8ee5e | [
"Apache-2.0"
] | permissive | adtapba/apba-support-cxf | 63e5ad888687e35dd809e09a9fec0a2828145707 | 4e4a6b5669e21fc41ddfe40be252ffefa0fa963d | refs/heads/master | 2022-04-20T00:50:56.298100 | 2020-04-21T13:18:20 | 2020-04-21T13:18:20 | 254,826,152 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 384 | java | package es.apba.infra.esb.support.cxf.message;
/**
* Interface for an exception message provider
*
* @author fsaucedo
*/
public interface ExceptionMessageProvider {
/**
* Produces an exception message applying the required format
*
* @param ex Exception
* @return Exception message
*/
String produceMessage(Exception ex);
}
| [
"fsaucedo@apba.es"
] | fsaucedo@apba.es |
8034fd616bc275cd44b5aebe846ae96a604180f2 | e62b79de476c7b524a3042cbfa2a0236bb9f11fa | /StoreAssistant/src/com/storeassistant/activity/home/fragment/FragmentPcenter.java | c0181d214d7143acc14ced20cfb51a73c135b544 | [] | no_license | codingtonyxy/storeassistant | fa6507ec3d0231c9df0139487f160ebfab2ba305 | e391b2ec64ba109c63cee6d27c2b922b5621079b | refs/heads/master | 2021-01-23T14:56:34.171977 | 2015-01-14T07:53:49 | 2015-01-14T07:53:49 | 27,466,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 854 | java | package com.storeassistant.activity.home.fragment;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.storeassistant.R;
public class FragmentPcenter extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_pcenter, container, false);
return view;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public void onStart() {
super.onStart();
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
}
| [
"Administrator@yongxiaoyang"
] | Administrator@yongxiaoyang |
29bc2e59e55a784ff7bb0af6ab08d30d9bb7d656 | d4b43537227d882c9e7ed24d43ede2c6798fd4c6 | /src/main/java/org/hare/http/simple/ByteArrayHttpRequest.java | 164be0e63b3905596cdfd62f3dfcf847b066705c | [] | no_license | jimmyxu1214/hare_http | 7fa44430f48746032a084c21197f79c751799115 | 7e87b1fbbf13b346938ec800dd7a9d1c1cb3d499 | refs/heads/master | 2021-06-30T13:14:45.641954 | 2017-09-20T08:37:09 | 2017-09-20T08:37:09 | 103,517,139 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 415 | java | package org.hare.http.simple;
import org.apache.http.client.ResponseHandler;
import org.hare.http.HttpRequest;
import org.hare.http.handler.ByteArrayResponseHandler;
public class ByteArrayHttpRequest extends HttpRequest<byte[]>{
public ByteArrayHttpRequest(String httpUrl) {
super(httpUrl);
}
@Override
public ResponseHandler<byte[]> getResponseHandler() {
return new ByteArrayResponseHandler();
}
}
| [
"xujimin@e-buychina.com.cn"
] | xujimin@e-buychina.com.cn |
a38fbe08003c1e2f15b0afcad95de186b72bcf72 | e082d9fa4d727a31e2079cf6c93c3fabca12acbe | /Q2-20210918T140606Z-001(Done)/Q2/Given/src/Course.java | f013b9437390e68af4b353309dc61d850571d429 | [] | no_license | minhbebong/Practice-PE-Pro | 1c813c07a8aaf819f58f4829a7af9ec14e6d5dd4 | 23e40f1921f4d0b5bfd2175d1aaecfa2bb466003 | refs/heads/master | 2023-08-12T16:03:02.034246 | 2021-10-16T16:55:09 | 2021-10-16T16:55:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 497 | java |
public class Course {
private double fee;
private String name;
public Course() {
}
//String name, double fee
public Course(String name, double fee) {
this.fee = fee;
this.name = name;
}
public String getName() {
return name;
}
//add and complete you other methods (if needed) here
public double getFee() {
return fee;
}
public void setFee(double fee) {
this.fee = fee;
}
}
| [
"hichic375@gmail.com"
] | hichic375@gmail.com |
cdf290a1410ae5992e632c28072139cac8ae8e44 | 06d0d9d42ab6abe303b921e0371df5fe39e204ea | /Cocoro/src/main/java/cocoro/search/domain/tagSuggestion.java | fee76b0d29f59b0335145a30f291ff963fd48e2b | [] | no_license | YEONJUOH/CocoroSpring | 3e00022f4bc76cfe173412697536ab36d7d3bdaa | fa1a5b3e4ce0b51da9e663e77ba70add81b286ab | refs/heads/master | 2020-02-26T16:04:32.133093 | 2016-06-19T10:18:39 | 2016-06-19T10:18:39 | 59,901,722 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 697 | java | package cocoro.search.domain;
import java.io.Serializable;
public class tagSuggestion implements Serializable{
private int rownum;
private int s_id;
private String s_name;
public int getRownum() {
return rownum;
}
public void setRownum(int rownum) {
this.rownum = rownum;
}
public int getS_id() {
return s_id;
}
public void setS_id(int s_id) {
this.s_id = s_id;
}
public String getS_name(){
return s_name;
}
public void setS_name(String s_name){
this.s_name = s_name;
}
@Override
public String toString(){
return "tagSuggestion [rownum=" + rownum + ", s_id=" + s_id
+ ", s_name=" + s_name + "]";
}
}
| [
"eorol2@naver.com"
] | eorol2@naver.com |
254fb70711237b7ad966e7fab7f6f7c04f664354 | 31ed44d15a9966d52d7e9d23763118a175706a80 | /src/com/scruffybeard/fequencyofcharacters/FerquencyOfCharacters.java | 41be78b592e6ea2b2cca23e6474ce3b66bb78d8c | [] | no_license | SirMcScruffybeard/Frequency-of-Characters | 9e940a1d7ec333e0dc75f39a5e8968958538bd79 | a455d30552d355b5dd7dd7a3f3321d55b264ce01 | refs/heads/master | 2020-04-04T18:37:59.499571 | 2018-11-05T06:33:49 | 2018-11-05T06:33:49 | 156,168,503 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,033 | java | package com.scruffybeard.fequencyofcharacters;
public class FerquencyOfCharacters {
public static void main(String[] args) {
String string = "Picture Perfect"; //String to be counted
int frequencyArray[] = new int[string.length()];
char stringArray[] = string.toCharArray(); //Array of characters
int i, j;
//Count characters
for (i = 0; i < string.length(); i++) {
frequencyArray[i] = 1;
for(j = i + 1; j < string.length(); j++) {
if(stringArray[i] == stringArray[j]) {
frequencyArray[i]++;
stringArray[j] = '0'; //To avoid revisiting a character
} //if equal
}// For j
}// For i
//Display results
System.out.println("Characters and their corresponding frequencies");
for (i = 0; i < frequencyArray.length; i++) {
if (stringArray[i] != ' ' && stringArray[i] != '0') {
System.out.println(stringArray[i] +"-" + frequencyArray[i]);
}//print if
}//Print loop
}// main()
}// Class
| [
"scruffybeardworks@gmail.com"
] | scruffybeardworks@gmail.com |
d2844d9b96195167f35886f210a3ddf516caf920 | b24931aac96f3b2890f5cef6a5a9da8fc5ea50e0 | /src/com/company/Product.java | 7724eeda62bd269ea4d80ac84c7c4c8906c9954c | [] | no_license | seppydat/ExamJavaOOP | a1fbb0ebf890b16399c6e52d9f751bfdf0d12ae5 | 09393b72a284470249dfacb2a00f34e9416ababf | refs/heads/master | 2023-06-30T13:37:57.855449 | 2021-08-08T16:26:57 | 2021-08-08T16:26:57 | 394,011,491 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,588 | java | package com.company;
public class Product {
int Id;
String Name;
Double Price;
int discount;
public Product() {
}
public Product(int id, String name, Double price, int discount) {
Id = id;
Name = name;
Price = price;
this.discount = discount;
}
public int getId() {
return Id;
}
public void setId(int id) {
Id = id;
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
public Double getPrice() {
return Price;
}
public void setPrice(Double price) {
Price = price;
}
public int getDiscount() {
return discount;
}
public void setDiscount(int discount) {
this.discount = discount;
}
public String Print() {
String content;
content = this.getId() + " - " + this.getName() + " - " + this.getPrice() + " - " + this.getDiscount();
return content;
}
public Double getRealPrice() {
return (this.getPrice()*this.getDiscount())/100;
}
public static Product[] sortByPrice(Product[] products) {
for (int i=0; i<products.length-1; i++) {
for (int j=i+1; j<products.length; j++) {
if (products[i].getPrice() > products[j].getPrice()) {
Product tmp;
tmp = products[j];
products[j] = products[i];
products[i] = tmp;
}
}
}
return products;
}
}
| [
"datdv@tigren.com"
] | datdv@tigren.com |
687d82476081bb0536561a3dc76d7682f2cf82a3 | aaabffe8bf55973bfb1390cf7635fd00ca8ca945 | /src/main/java/com/microsoft/graph/requests/generated/IBaseWorkbookFunctionsMroundRequest.java | 8474539cf041030abd3de482f0f5d0820d014fe4 | [
"MIT"
] | permissive | rgrebski/msgraph-sdk-java | e595e17db01c44b9c39d74d26cd925b0b0dfe863 | 759d5a81eb5eeda12d3ed1223deeafd108d7b818 | refs/heads/master | 2020-03-20T19:41:06.630857 | 2018-03-16T17:31:43 | 2018-03-16T17:31:43 | 137,648,798 | 0 | 0 | null | 2018-06-17T11:07:06 | 2018-06-17T11:07:05 | null | UTF-8 | Java | false | false | 1,847 | java | // ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.requests.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.models.extensions.*;
import com.microsoft.graph.models.generated.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.requests.extensions.*;
import com.microsoft.graph.requests.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.EnumSet;
import com.google.gson.JsonObject;
import com.google.gson.annotations.*;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The interface for the Base Workbook Functions Mround Request.
*/
public interface IBaseWorkbookFunctionsMroundRequest {
void post(final ICallback<WorkbookFunctionResult> callback);
WorkbookFunctionResult post() throws ClientException;
/**
* Sets the select clause for the request
*
* @param value the select clause
* @return the updated request
*/
IWorkbookFunctionsMroundRequest select(final String value) ;
/**
* Sets the top value for the request
*
* @param value the max number of items to return
* @return the updated request
*/
IWorkbookFunctionsMroundRequest top(final int value);
/**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/
IWorkbookFunctionsMroundRequest expand(final String value);
}
| [
"caitbal@microsoft.com"
] | caitbal@microsoft.com |
921d999a8d109c03ce85c8339e94bcaa6c351475 | 6811fd178ae01659b5d207b59edbe32acfed45cc | /jira-project/jira-components/jira-core/src/main/java/com/atlassian/jira/web/filters/gzip/JiraGzipFilter.java | ab3868ea59978685ec78db420385e76a9dbf722f | [] | no_license | xiezhifeng/mysource | 540b09a1e3c62614fca819610841ddb73b12326e | 44f29e397a6a2da9340a79b8a3f61b3d51e331d1 | refs/heads/master | 2023-04-14T00:55:23.536578 | 2018-04-19T11:08:38 | 2018-04-19T11:08:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,633 | java | /*
* Copyright (c) 2002-2007
* All rights reserved.
*/
package com.atlassian.jira.web.filters.gzip;
import java.io.IOException;
import com.atlassian.gzipfilter.GzipFilter;
import com.atlassian.gzipfilter.integration.GzipFilterIntegration;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.config.properties.APKeys;
import org.apache.log4j.Logger;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import static com.atlassian.jira.config.CoreFeatures.ON_DEMAND;
public class JiraGzipFilter extends GzipFilter
{
private static final Logger log = Logger.getLogger(JiraGzipFilter.class);
private static final String ALREADY_FILTERED = GzipFilter.class.getName() + "_already_filtered";
public JiraGzipFilter()
{
super(createGzipIntegration());
}
@Override
public void doFilter(final ServletRequest req, final ServletResponse res, final FilterChain chain)
throws IOException, ServletException
{
/**
*
* JRADEV-21029 : when an error occurs, there is made an internal redirection but request stays the same.
*
* This behaviour causes a situation when request is already marked as filtered with gzip filter, but response
* content is actually not gzipped.
* From the browser point of view it looks like corrupted content (header "Content-Encoding: gzip"
* with plain-text content )
*
* Here we are detecting that an error occured and un-marking filter as applied
*
*/
//
if ( req.getAttribute("javax.servlet.error.request_uri") != null && req.getAttribute(ALREADY_FILTERED) != null){
req.setAttribute(ALREADY_FILTERED, null);
}
super.doFilter(req, res, chain);
}
private static GzipFilterIntegration createGzipIntegration()
{
if (ON_DEMAND.isSystemPropertyEnabled())
{
return new JiraOnDemandGzipFilterIntegration();
}
return new JiraGzipFilterIntegration();
}
private static class JiraGzipFilterIntegration implements GzipFilterIntegration
{
public boolean useGzip()
{
try
{
// normally we would use GzipCompression here, but if we do that then we end up deadlocking inside
// ComponentAccessor when a web request comes in and JIRA is being restarted after XML import. sooooo,
// instead we do a bit of copy & paste to achieve the same effect.
//
// basically I fought the ComponentAccessor and the ComponentAccessor won.
return ComponentAccessor.getApplicationProperties().getOption(APKeys.JIRA_OPTION_WEB_USEGZIP);
}
catch (RuntimeException e)
{
log.debug("Cannot get application properties, defaulting to no GZip compression");
return false;
}
}
public String getResponseEncoding(HttpServletRequest httpServletRequest)
{
return ComponentAccessor.getApplicationProperties().getEncoding();
}
}
/**
* Forces GZIP to off in OnDemand: the content will be GZIPed by our proxy before it leave DC.
*/
private static class JiraOnDemandGzipFilterIntegration extends JiraGzipFilterIntegration
{
@Override
public boolean useGzip()
{
return false;
}
}
}
| [
"moink635@gmail.com"
] | moink635@gmail.com |
d6ec3d7fbb6ead2ebe8c7f4c9ca760a022cd9383 | 7b1e5bfd245ac10e023b29c574d94c3716e40f0d | /app/src/main/java/cz/bublik/testwidgetapp/utils/ViewUtils.java | 0cd233bd5c7378b13fed27199549fe7a43bfbb55 | [] | no_license | tomasbublik/android-widget-with-multi-views-list | a16ba11c8ee03ebec88289a67d6d474065d2a7e2 | 843f8da8354411859ed2ac79da544d2f7695f515 | refs/heads/master | 2020-12-27T07:49:20.759541 | 2020-02-10T06:51:37 | 2020-02-10T06:51:37 | 237,821,450 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,935 | java | package cz.bublik.testwidgetapp.utils;
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.os.Bundle;
import android.widget.RemoteViews;
import cz.bublik.testwidgetapp.R;
public class ViewUtils {
private ViewUtils() {}
public static RemoteViews getRemoteViewsForByOptions(Context context, AppWidgetManager appWidgetManager, int appWidgetId) {
// See the dimensions and
Bundle options = appWidgetManager.getAppWidgetOptions(appWidgetId);
// Get min width and height.
int minWidth = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH);
int minHeight = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT);
// Obtain appropriate widget and update it.
return getRemoteViews(context, minWidth, minHeight);
}
/**
* Determine appropriate view based on row or column provided.
*
* @param minWidth
* @param minHeight
* @return
*/
private static RemoteViews getRemoteViews(Context context, int minWidth, int minHeight) {
// First find out rows and columns based on width provided.
// int rows = getCellsForSize(minHeight);
int column = getCellsForSize(minWidth);
// Now you changing layout base on you column count
// In this code from 1 column to 4
// you can make code for more columns on your own.
return column >= 4 ? new RemoteViews(context.getPackageName(), R.layout.appwidget_provider_doubled_list) : new RemoteViews(context.getPackageName(), R.layout.appwidget_provider);
}
/**
* Returns number of cells needed for given size of the widget.
*
* @param size Widget size in dp.
* @return Size in number of cells.
*/
private static int getCellsForSize(int size) {
int n = 2;
while (70 * n - 30 < size) {
++n;
}
return n - 1;
}
}
| [
"tomas.bublik@gmail.com"
] | tomas.bublik@gmail.com |
9197ef8a6df02754b951f305b68df9298a7748a7 | 5741045375dcbbafcf7288d65a11c44de2e56484 | /reddit-decompilada/com/instabug/survey/cache/SurveysCacheManager.java | f4a25676e554338aab6a2f24b6ff5c8dfa753b67 | [] | no_license | miarevalo10/ReporteReddit | 18dd19bcec46c42ff933bb330ba65280615c281c | a0db5538e85e9a081bf268cb1590f0eeb113ed77 | refs/heads/master | 2020-03-16T17:42:34.840154 | 2018-05-11T10:16:04 | 2018-05-11T10:16:04 | 132,843,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,970 | java | package com.instabug.survey.cache;
import com.instabug.library.internal.storage.cache.Cache;
import com.instabug.library.internal.storage.cache.CacheManager;
import com.instabug.library.internal.storage.cache.CacheManager.KeyExtractor;
import com.instabug.library.internal.storage.cache.InMemoryCache;
import com.instabug.library.util.InstabugSDKLogger;
import com.instabug.survey.p027a.C1413c;
import java.util.ArrayList;
import java.util.List;
public class SurveysCacheManager {
public static final String SURVEYS_DISK_CACHE_FILE_NAME = "/surveys.cache";
public static final String SURVEYS_DISK_CACHE_KEY = "surveys_disk_cache";
public static final String SURVEYS_MEMORY_CACHE_KEY = "surveys_memory_cache";
static class C14151 extends KeyExtractor<Long, C1413c> {
C14151() {
}
public final /* synthetic */ Object extractKey(Object obj) {
return Long.valueOf(((C1413c) obj).f15571a);
}
}
static class C14162 extends KeyExtractor<String, C1413c> {
C14162() {
}
public final /* synthetic */ Object extractKey(Object obj) {
return String.valueOf(((C1413c) obj).f15571a);
}
}
public static InMemoryCache<Long, C1413c> getCache() throws IllegalArgumentException {
if (!CacheManager.getInstance().cacheExists(SURVEYS_MEMORY_CACHE_KEY)) {
StringBuilder stringBuilder = new StringBuilder("In-memory Surveys cache not found, loading it from disk ");
stringBuilder.append(CacheManager.getInstance().getCache(SURVEYS_MEMORY_CACHE_KEY));
InstabugSDKLogger.m8356d(SurveysCacheManager.class, stringBuilder.toString());
CacheManager.getInstance().migrateCache(SURVEYS_DISK_CACHE_KEY, SURVEYS_MEMORY_CACHE_KEY, new C14151());
Cache cache = CacheManager.getInstance().getCache(SURVEYS_MEMORY_CACHE_KEY);
if (cache != null) {
StringBuilder stringBuilder2 = new StringBuilder("In-memory Surveys cache restored from disk, ");
stringBuilder2.append(cache.size());
stringBuilder2.append(" elements restored");
InstabugSDKLogger.m8356d(SurveysCacheManager.class, stringBuilder2.toString());
}
}
InstabugSDKLogger.m8356d(SurveysCacheManager.class, "In-memory Surveys cache found");
return (InMemoryCache) CacheManager.getInstance().getCache(SURVEYS_MEMORY_CACHE_KEY);
}
public static void saveCacheToDisk() {
Cache cache = CacheManager.getInstance().getCache(SURVEYS_DISK_CACHE_KEY);
Cache cache2 = CacheManager.getInstance().getCache(SURVEYS_MEMORY_CACHE_KEY);
if (cache != null && cache2 != null) {
CacheManager.getInstance().migrateCache(cache2, cache, new C14162());
}
}
public static void addSurvey(C1413c c1413c) {
InMemoryCache cache = getCache();
if (cache != null) {
cache.put(Long.valueOf(c1413c.f15571a), c1413c);
}
}
public static void addSurveys(List<C1413c> list) {
for (C1413c addSurvey : list) {
addSurvey(addSurvey);
}
}
public static List<C1413c> getSurveys() {
InMemoryCache cache = getCache();
if (cache != null) {
return cache.getValues();
}
return new ArrayList();
}
public static List<C1413c> getNotAnsweredSurveys() {
List<C1413c> arrayList = new ArrayList();
InMemoryCache cache = getCache();
if (cache != null) {
for (C1413c c1413c : cache.getValues()) {
if ((c1413c.f15572b == null || String.valueOf(c1413c.f15572b).equals("null")) && !c1413c.f15578h) {
arrayList.add(c1413c);
StringBuilder stringBuilder = new StringBuilder("survey id: ");
stringBuilder.append(c1413c.f15571a);
InstabugSDKLogger.m8356d(SurveysCacheManager.class, stringBuilder.toString());
}
}
}
StringBuilder stringBuilder2 = new StringBuilder("NotAnsweredSurveys size: ");
stringBuilder2.append(arrayList.size());
InstabugSDKLogger.m8356d(SurveysCacheManager.class, stringBuilder2.toString());
return arrayList;
}
public static List<C1413c> getAnsweredAndNotSubmittedSurveys() {
List<C1413c> arrayList = new ArrayList();
InMemoryCache cache = getCache();
if (cache != null) {
List<C1413c> values = cache.getValues();
StringBuilder stringBuilder = new StringBuilder("size: ");
stringBuilder.append(values.size());
InstabugSDKLogger.m8356d(SurveysCacheManager.class, stringBuilder.toString());
for (C1413c c1413c : values) {
if (c1413c.f15578h && !c1413c.f15579i) {
arrayList.add(c1413c);
}
}
}
return arrayList;
}
}
| [
"mi.arevalo10@uniandes.edu.co"
] | mi.arevalo10@uniandes.edu.co |
432db62500a6d6d701f4dc99986626a551ba1664 | 8f14b90a8b4d03e910b3bf13aec15ac1e0d67fe6 | /src/test/java/info/earthquake/domain/MetaDataDTOTest.java | a0558978838d7372c4131113e97c88fca9630668 | [] | no_license | gauravDublin/ict-nearby-earthquakes-gaurav-kapoor | 95f228b3dc06fc3399db5cd1f984857959609057 | aae9826eb2c7747f20ec2fe4e52e75b2d1fc670f | refs/heads/master | 2020-06-06T17:04:55.614487 | 2019-07-15T15:18:21 | 2019-07-15T15:18:21 | 192,800,139 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 412 | java | package info.earthquake.domain;
import org.junit.Test;
import pl.pojo.tester.api.assertion.Assertions;
import pl.pojo.tester.api.assertion.Method;
public class MetaDataDTOTest {
private static final Class<MetaDataDTO> metaDataDTOClass = MetaDataDTO.class;
@Test
public void testPojo() {
Assertions.assertPojoMethodsFor(metaDataDTOClass).testing(Method.GETTER).areWellImplemented();
}
} | [
"Irish2017#"
] | Irish2017# |
ab2cd7afebf6dc7a72f4c32213b4594c984ad004 | 857e4a79b67cbd7314c6d710e45323930b0c8061 | /src/com/lw/ui/activity/SettingActivity.java | a4eb2d18d48eaf522a16dfbc94d6f67da9ec1902 | [] | no_license | liu149339750/NovelReader | 6460d58aea37eaed5be38e3f82979dfe8a9dfc41 | f6dc7d051f218d90ec293320890c46bf2606462d | refs/heads/master | 2021-01-19T19:22:46.582037 | 2018-05-14T13:19:26 | 2018-05-14T13:19:26 | 88,413,841 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,657 | java | package com.lw.ui.activity;
import com.lw.novel.utils.AppUtils;
import com.lw.novel.utils.SettingUtil;
import com.lw.novelreader.R;
import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
public class SettingActivity extends PreferenceActivity implements OnPreferenceChangeListener{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.setting_preference);
findPreference(SettingUtil.PULL_UPDATE_NOVEL_NUM).setOnPreferenceChangeListener(this);
}
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
// TODO Auto-generated method stub
return super.onPreferenceTreeClick(preferenceScreen, preference);
}
public static void startSettingActivity() {
Intent intent = new Intent();
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(AppUtils.getAppContext(), SettingActivity.class);
AppUtils.getAppContext().startActivity(intent);
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
if(SettingUtil.PULL_UPDATE_NOVEL_NUM.equals(key)) {
SettingUtil.setPullUpdateNovelNum(Integer.parseInt(newValue.toString()));
}
return true;
}
}
| [
"liuwei6@huaqin.com"
] | liuwei6@huaqin.com |
eaecc7762c3d52ba39f30139f544fb367f5b3975 | 90d25922d92d450b8cb9591612e18346542e4375 | /20180529generic1/src/Box.java | 11fc55c19cda7dca42820c3b39aeb085acf195c1 | [] | no_license | cocoro24/oop2011440105 | d720b24a1d6391a636537709ea0a83522f53b955 | e23dfdf3e50c5e2066458c96bbbfe9074bbe6435 | refs/heads/master | 2020-03-06T15:15:16.734447 | 2018-06-12T07:28:16 | 2018-06-12T07:28:16 | 126,952,433 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 186 | java |
public class Box {
private Object data;
//Object Class는 모든 객체의 조상
public void set(Object data) {
this.data = data;
}
public Object get(){
return data;
}
}
| [
"cocoro24@naver.com"
] | cocoro24@naver.com |
d1312f416ceb3098792415f6b02fcc474cd1e70d | fe6edf99601d73808744a3d87ecd6c4d28ccfde7 | /app/src/test/java/ir/smrahmadi/storecellphone/ExampleUnitTest.java | bda06433e1a0592161fba57260328ab0ac426a33 | [] | no_license | RepoZero/StoreCellPhone | dbe8872186708b573a060017d7bef60bb27aa833 | 9492b86eb0a04cd0ebf6f356bdd5dae143ad8cdb | refs/heads/master | 2021-04-29T17:24:16.200299 | 2018-02-15T18:59:50 | 2018-02-15T18:59:50 | 121,669,035 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 405 | java | package ir.smrahmadi.storecellphone;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"smrahmadi12@gmail.com"
] | smrahmadi12@gmail.com |
3e6eaa49644687b7ca92e5b168a5d59a81be4797 | 3ee1c41f1fc133d77ac2681842bc9eefebad38ae | /openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/test/java/org/openecomp/sdc/vendorlicense/impl/EntitlementPoolTest.java | 178d05e6c87ece96801aa40cd435ceacf3b284fe | [
"Apache-2.0"
] | permissive | onapdemo/sdc | b225395934e07b36f96ba46ab04be533d755c521 | 3f1fee2ca76332b48e6f36662b32f2b5096c25e7 | refs/heads/master | 2020-03-17T21:17:00.804170 | 2018-05-21T06:47:17 | 2018-05-21T06:47:17 | 133,952,212 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 36,431 | java | /*-
* ============LICENSE_START=======================================================
* SDC
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
*/
package org.openecomp.sdc.vendorlicense.impl;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.Spy;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDao;
import org.openecomp.sdc.vendorlicense.dao.LimitDao;
import org.openecomp.sdc.vendorlicense.dao.types.*;
import org.openecomp.sdc.vendorlicense.errors.VendorLicenseErrorCodes;
import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacade;
import org.openecomp.sdc.versioning.dao.types.Version;
import org.openecomp.sdc.versioning.types.VersionInfo;
import org.openecomp.sdc.versioning.types.VersionableEntityAction;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.verify;
public class EntitlementPoolTest {
//JUnit Test Cases using Mockito
private final String USER1 = "epTestUser1";
private final String EP1_NAME = "EP1 name";
private final String EP2_NAME = "EP2 name";
private final String LT1_NAME = "LT1 name";
private static String vlm1_id = "vlm1_id";
private static String ep1_id = "ep1_id";
private static String ep2_id = "ep2_id";
public static final Version VERSION01 = new Version(0, 1);
@Mock
private VendorLicenseFacade vendorLicenseFacade;
@Mock
private EntitlementPoolDao entitlementPoolDao;
@Mock
private LimitDao limitDao;
@InjectMocks
@Spy
private VendorLicenseManagerImpl vendorLicenseManagerImpl;
public EntitlementPoolEntity createEntitlementPool(String vlmId, Version version,String id,
String name, String desc, int threshold,
ThresholdUnit thresholdUnit,
EntitlementMetric entitlementMetricChoice,
String entitlementMetricOther,
String increments,
AggregationFunction aggregationFunctionChoice,
String aggregationFunctionOther,
Set<OperationalScope> operationalScopeChoices,
String operationalScopeOther,
EntitlementTime timeChoice,
String timeOther, String sku) {
EntitlementPoolEntity entitlementPool = new EntitlementPoolEntity();
entitlementPool.setVendorLicenseModelId(vlmId);
entitlementPool.setId(id);
entitlementPool.setVersion(version);
entitlementPool.setName(name);
entitlementPool.setDescription(desc);
entitlementPool.setThresholdValue(threshold);
entitlementPool.setThresholdUnit(thresholdUnit);
entitlementPool.setIncrements(increments);
entitlementPool.setOperationalScope(
new MultiChoiceOrOther<>(operationalScopeChoices, operationalScopeOther));
return entitlementPool;
}
@BeforeMethod
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
}
@Test
public void createTest() {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity ep2 =
createEntitlementPool("vlm1Id", null, ep1_id,EP1_NAME, "EP2 dec", 70, ThresholdUnit
.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
ep2.setStartDate(LocalDate.now().format(formatter));
ep2.setExpiryDate(LocalDate.now().plusDays(1L).format(formatter));
vendorLicenseManagerImpl.createEntitlementPool(ep2, USER1);
verify(vendorLicenseFacade).createEntitlementPool(ep2,USER1);
}
@Test(expectedExceptions = CoreException.class, expectedExceptionsMessageRegExp = "Vendor " +
"license model with id vlm1_id has invalid date range.")
public void createWithInvalidStartExpiryDateTest() {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity ep2 =
createEntitlementPool("vlm2Id", null, ep1_id,EP1_NAME, "EP2 dec", 70,
ThresholdUnit.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
ep2.setStartDate(LocalDate.now().format(formatter));
ep2.setExpiryDate(LocalDate.now().minusDays(2L).format(formatter));
ep2.setVendorLicenseModelId(vlm1_id);
vendorLicenseManagerImpl.createEntitlementPool(ep2, USER1).getId();
Assert.fail();
}
@Test(expectedExceptions = CoreException.class, expectedExceptionsMessageRegExp = "Vendor " +
"license model with id vlm1_id has invalid date range.")
public void createWithoutStartDateTest() {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity ep2 =
createEntitlementPool("vlm3Id", null, ep1_id,EP1_NAME, "EP2 dec", 70,
ThresholdUnit.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
ep2.setExpiryDate(LocalDate.now().plusDays(2L).format(formatter));
ep2.setVendorLicenseModelId(vlm1_id);
vendorLicenseManagerImpl.createEntitlementPool(ep2, USER1).getId();
Assert.fail();
}
@Test(expectedExceptions = CoreException.class, expectedExceptionsMessageRegExp = "Vendor " +
"license model with id vlm1_id has invalid date range.")
public void createWithSameStartExpiryDateTest() {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity ep2 =
createEntitlementPool("vlm4Id", null, ep1_id,EP1_NAME, "EP2 dec", 70,
ThresholdUnit.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
ep2.setStartDate(LocalDate.now().format(formatter));
ep2.setExpiryDate(LocalDate.now().format(formatter));
ep2.setVendorLicenseModelId(vlm1_id);
vendorLicenseManagerImpl.createEntitlementPool(ep2, USER1).getId();
Assert.fail();
}
@Test
public void testUpdate() {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity ep2 =
createEntitlementPool(vlm1_id, VERSION01, ep1_id,EP1_NAME, "EP2 dec", 70,
ThresholdUnit
.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
ep2.setStartDate(LocalDate.now().minusDays(3L).format(formatter));
ep2.setExpiryDate(LocalDate.now().minusDays(2L).format(formatter));
VersionInfo info = new VersionInfo();
info.getViewableVersions().add(VERSION01);
info.setActiveVersion(VERSION01);
doReturn(info).when(vendorLicenseFacade).getVersionInfo(anyObject(),anyObject(),anyObject());
vendorLicenseManagerImpl.updateEntitlementPool(ep2, USER1);
verify(vendorLicenseFacade).updateEntitlementPool(ep2,USER1);
verify(vendorLicenseFacade).updateVlmLastModificationTime(vlm1_id,VERSION01);
}
@Test(expectedExceptions = CoreException.class, expectedExceptionsMessageRegExp = "Vendor " +
"license model with id vlm1_id has invalid date range.")
public void updateWithInvalidStartExpiryDateTest() {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity ep2 =
createEntitlementPool("vlm2Id", null, ep1_id,EP1_NAME, "EP2 dec", 70,
ThresholdUnit.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
ep2.setStartDate(LocalDate.now().format(formatter));
ep2.setExpiryDate(LocalDate.now().minusDays(2L).format(formatter));
ep2.setVendorLicenseModelId(vlm1_id);
vendorLicenseManagerImpl.updateEntitlementPool(ep2, USER1);
Assert.fail();
}
@Test
public void updateWithoutStartDateTest() {
try {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity ep2 =
createEntitlementPool("vlm3Id", null, ep1_id,EP1_NAME, "EP2 dec", 70,
ThresholdUnit.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
ep2.setExpiryDate(LocalDate.now().plusDays(2L).format(formatter));
vendorLicenseManagerImpl.updateEntitlementPool(ep2, USER1);
Assert.fail();
} catch (CoreException exception) {
Assert.assertEquals(exception.code().id(), VendorLicenseErrorCodes.DATE_RANGE_INVALID);
}
}
@Test
public void updateWithSameStartExpiryDateTest() {
try {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity ep2 =
createEntitlementPool("vlm4Id", null, ep1_id,EP1_NAME, "EP2 dec", 70,
ThresholdUnit.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
ep2.setStartDate(LocalDate.now().format(formatter));
ep2.setExpiryDate(LocalDate.now().format(formatter));
vendorLicenseManagerImpl.updateEntitlementPool(ep2, USER1);
Assert.fail();
} catch (CoreException exception) {
Assert.assertEquals(exception.code().id(), VendorLicenseErrorCodes.DATE_RANGE_INVALID);
}
}
@Test
public void deleteEntitlementPoolTest() {
VersionInfo versionInfo = new VersionInfo();
versionInfo.setActiveVersion(VERSION01);
versionInfo.setLockingUser(USER1);
ArrayList<Version> viewable = new ArrayList<Version>();
viewable.add(VERSION01);
versionInfo.setViewableVersions(viewable);
doReturn(versionInfo).when(vendorLicenseManagerImpl).getVersionInfo(vlm1_id,
VersionableEntityAction.Write, USER1);
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity entitlementPool =
createEntitlementPool(vlm1_id,VERSION01, ep1_id,EP1_NAME, "EP2 dec", 70,
ThresholdUnit.Absolute,EntitlementMetric.Other, "exception metric2", "inc2",
AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
entitlementPool.setStartDate(LocalDate.now().format(formatter));
entitlementPool.setExpiryDate(LocalDate.now().plusDays(1L).format(formatter));
doReturn(entitlementPool).when(entitlementPoolDao).get(anyObject());
doNothing().when(vendorLicenseManagerImpl).deleteChildLimits(vlm1_id,VERSION01,ep1_id,USER1);
doNothing().when(vendorLicenseManagerImpl).deleteUniqueName(anyObject(),anyObject(),
anyObject(),anyObject());
vendorLicenseManagerImpl.deleteEntitlementPool(entitlementPool, USER1);
verify(entitlementPoolDao).delete(entitlementPool);
verify(vendorLicenseFacade).updateVlmLastModificationTime(vlm1_id,VERSION01);
}
@Test
public void testGetEntitlementPool(){
VersionInfo versionInfo = new VersionInfo();
versionInfo.setActiveVersion(VERSION01);
versionInfo.setLockingUser(USER1);
ArrayList<Version> viewable = new ArrayList<Version>();
viewable.add(VERSION01);
versionInfo.setViewableVersions(viewable);
versionInfo.setActiveVersion(VERSION01);
doReturn(versionInfo).when(vendorLicenseManagerImpl).getVersionInfo(vlm1_id,
VersionableEntityAction.Read, USER1);
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity entitlementPool =
createEntitlementPool(vlm1_id,VERSION01, ep1_id,EP1_NAME, "EP2 dec", 70,
ThresholdUnit.Absolute,EntitlementMetric.Other, "exception metric2", "inc2",
AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy'T'HH:mm:ss'Z'");
entitlementPool.setStartDate(LocalDateTime.now().format(formatter));
entitlementPool.setExpiryDate(LocalDateTime.now().plusDays(1L).format(formatter));
doReturn(entitlementPool).when(entitlementPoolDao).get(anyObject());
EntitlementPoolEntity retrived = vendorLicenseManagerImpl.getEntitlementPool
(entitlementPool,USER1);
Assert.assertEquals(retrived.getId(),entitlementPool.getId());
Assert.assertEquals(retrived.getVendorLicenseModelId(),entitlementPool.getVendorLicenseModelId());
Assert.assertEquals(retrived.getVersion(),entitlementPool.getVersion());
}
@Test
public void testListEntitlmentPool(){
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
doReturn(Arrays.asList(
createEntitlementPool(vlm1_id,VERSION01, ep1_id, EP1_NAME,"EP1 dec", 70,
ThresholdUnit.Absolute,EntitlementMetric.Other, "exception metric1",
"inc1", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time1", "sku1"),
createEntitlementPool(vlm1_id,VERSION01, ep2_id, EP2_NAME,"EP2 dec", 70,
ThresholdUnit.Absolute,EntitlementMetric.Other, "exception metric2",
"inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2")))
.when(vendorLicenseFacade).listEntitlementPools(vlm1_id, VERSION01, USER1);
Collection<EntitlementPoolEntity> EPs =
vendorLicenseManagerImpl.listEntitlementPools(vlm1_id, VERSION01, USER1);
verify(vendorLicenseFacade).listEntitlementPools(vlm1_id, VERSION01, USER1);
Assert.assertEquals(EPs.size(), 2);
EPs.forEach(ep -> Assert.assertTrue(ep.getId().matches(ep1_id + "|" + ep2_id)));
}
/* @Test
public void deleteEntitlementPoolTest() {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity entitlementPool =
createEntitlementPool("vlm1Id", null, EP1_NAME, "EP2 dec", 70, ThresholdUnit.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
entitlementPool.setStartDate(LocalDate.now().format(formatter));
entitlementPool.setExpiryDate(LocalDate.now().plusDays(1L).format(formatter));
VersionInfo info = new VersionInfo();
Version version = new Version();
info.getViewableVersions().add(version);
info.setActiveVersion(version);
doReturn(info).when(vendorLicenseFacade).getVersionInfo(anyObject(),anyObject(),anyObject());
LimitEntity limitEntity = LimitTest.createLimitEntity(LT1_NAME,LimitType.Vendor,"string",version,
"Core",AggregationFunction.Average,10,"Hour");
ArrayList<LimitEntity> limitEntityList = new ArrayList();
limitEntityList.add(limitEntity);
doReturn(entitlementPool).when(entitlementPoolDao).get(anyObject());
doReturn(limitEntityList).when(vendorLicenseFacade).listLimits(anyObject(), anyObject(), anyObject(), anyObject());
doReturn(true).when(limitDao).isLimitPresent(anyObject());
doReturn(limitEntity).when(limitDao).get(anyObject());
try {
Field limitField = VendorLicenseManagerImpl.class.getDeclaredField("limitDao");
limitField.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(limitField, limitField.getModifiers() & ~Modifier.FINAL);
limitField.set(null, limitDao);
Field epField = VendorLicenseManagerImpl.class.getDeclaredField("entitlementPoolDao");
epField.setAccessible(true);
modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(epField, epField.getModifiers() & ~Modifier.FINAL);
epField.set(null, entitlementPoolDao);
} catch(NoSuchFieldException | IllegalAccessException e)
{
Assert.fail();
}
vendorLicenseManagerImpl.deleteEntitlementPool(entitlementPool, USER1);
verify(limitDao).delete(anyObject());
}
@Test
public void deleteEntitlementPoolInvalidTest() {
try {
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity entitlementPool =
createEntitlementPool("vlm1Id", null, EP1_NAME, "EP2 dec", 70, ThresholdUnit.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
entitlementPool.setStartDate(LocalDate.now().format(formatter));
entitlementPool.setExpiryDate(LocalDate.now().plusDays(1L).format(formatter));
VersionInfo info = new VersionInfo();
Version version = new Version();
info.getViewableVersions().add(version);
info.setActiveVersion(version);
doReturn(info).when(vendorLicenseFacade).getVersionInfo(anyObject(),anyObject(),anyObject());
LimitEntity limitEntity = LimitTest.createLimitEntity(LT1_NAME,LimitType.Vendor,"string",version,
"Core",AggregationFunction.Average,10,"Hour");
ArrayList<LimitEntity> limitEntityList = new ArrayList();
limitEntityList.add(limitEntity);
doReturn(entitlementPool).when(entitlementPoolDao).get(anyObject());
doReturn(limitEntityList).when(vendorLicenseFacade).listLimits(anyObject(), anyObject(), anyObject(), anyObject());
doReturn(false).when(limitDao).isLimitPresent(anyObject());
try {
Field limitField = VendorLicenseManagerImpl.class.getDeclaredField("limitDao");
limitField.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(limitField, limitField.getModifiers() & ~Modifier.FINAL);
limitField.set(null, limitDao);
Field epField = VendorLicenseManagerImpl.class.getDeclaredField("entitlementPoolDao");
epField.setAccessible(true);
modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(epField, epField.getModifiers() & ~Modifier.FINAL);
epField.set(null, entitlementPoolDao);
} catch(NoSuchFieldException | IllegalAccessException e)
{
Assert.fail();
}
vendorLicenseManagerImpl.deleteEntitlementPool(entitlementPool, USER1);
} catch (CoreException exception) {
Assert.assertEquals(exception.code().id(), VersioningErrorCodes.VERSIONABLE_SUB_ENTITY_NOT_FOUND);
}
} */
/* private static final String USER1 = "epTestUser1";
private static final String USER2 = "epTestUser2";
private static final String EP1_V01_DESC = "EP1 desc";
private static final Version VERSION01 = new Version(0, 1);
private static final Version VERSION03 = new Version(0, 3);
private static final String EP1_NAME = "EP1 name";
private static final String EP2_NAME = "EP2 name";
private static VendorLicenseManager vendorLicenseManager = new VendorLicenseManagerImpl();
private static EntitlementPoolDao entitlementPoolDao;
private static String vlm1Id;
private static String vlm2Id;
private static String ep1Id;
private static String ep2Id;
public static EntitlementPoolEntity createEntitlementPool(String vlmId, Version version,
String name, String desc, int threshold,
ThresholdUnit thresholdUnit,
EntitlementMetric entitlementMetricChoice,
String entitlementMetricOther,
String increments,
AggregationFunction aggregationFunctionChoice,
String aggregationFunctionOther,
Set<OperationalScope> operationalScopeChoices,
String operationalScopeOther,
EntitlementTime timeChoice,
String timeOther, String sku) {
EntitlementPoolEntity entitlementPool = new EntitlementPoolEntity();
entitlementPool.setVendorLicenseModelId(vlmId);
entitlementPool.setVersion(version);
entitlementPool.setName(name);
entitlementPool.setDescription(desc);
entitlementPool.setThresholdValue(threshold);
entitlementPool.setThresholdUnit(thresholdUnit);
entitlementPool
.setEntitlementMetric(new ChoiceOrOther<>(entitlementMetricChoice, entitlementMetricOther));
entitlementPool.setIncrements(increments);
entitlementPool.setAggregationFunction(
new ChoiceOrOther<>(aggregationFunctionChoice, aggregationFunctionOther));
entitlementPool.setOperationalScope(
new MultiChoiceOrOther<>(operationalScopeChoices, operationalScopeOther));
entitlementPool.setTime(new ChoiceOrOther<>(timeChoice, timeOther));
return entitlementPool;
}
private static void assertEntitlementPoolsEquals(EntitlementPoolEntity actual,
EntitlementPoolEntity expected) {
Assert.assertEquals(actual.getVendorLicenseModelId(), expected.getVendorLicenseModelId());
Assert.assertEquals(actual.getVersion(), expected.getVersion());
Assert.assertEquals(actual.getId(), expected.getId());
Assert.assertEquals(actual.getName(), expected.getName());
Assert.assertEquals(actual.getDescription(), expected.getDescription());
Assert.assertEquals(actual.getThresholdValue(), expected.getThresholdValue());
Assert.assertEquals(actual.getThresholdUnit(), expected.getThresholdUnit());
Assert.assertEquals(actual.getEntitlementMetric(), expected.getEntitlementMetric());
Assert.assertEquals(actual.getIncrements(), expected.getIncrements());
Assert.assertEquals(actual.getAggregationFunction(), expected.getAggregationFunction());
Assert.assertEquals(actual.getOperationalScope(), expected.getOperationalScope());
Assert.assertEquals(actual.getTime(), expected.getTime());
}
@BeforeClass
private void init() {
entitlementPoolDao = EntitlementPoolDaoFactory.getInstance().createInterface();
vlm1Id = vendorLicenseManager.createVendorLicenseModel(VendorLicenseModelTest
.createVendorLicenseModel("vendor1 name " + CommonMethods.nextUuId(), "vlm1 dec", "icon1"),
USER1).getId();
vlm2Id = vendorLicenseManager.createVendorLicenseModel(VendorLicenseModelTest
.createVendorLicenseModel("vendor2 name " + CommonMethods.nextUuId(), "vlm2 dec", "icon2"),
USER1).getId();
}
@Test
public void emptyListTest() {
Collection<EntitlementPoolEntity> entitlementPools =
vendorLicenseManager.listEntitlementPools(vlm1Id, null, USER1);
Assert.assertEquals(entitlementPools.size(), 0);
}
@Test(dependsOnMethods = "emptyListTest")
public void createTest() {
ep1Id = testCreate(vlm1Id, EP1_NAME);
Set<OperationalScope> opScopeChoices;
opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Core);
opScopeChoices.add(OperationalScope.CPU);
opScopeChoices.add(OperationalScope.Network_Wide);
EntitlementPoolEntity ep2 =
createEntitlementPool(vlm1Id, null, EP2_NAME, "EP2 dec", 70, ThresholdUnit.Absolute,
EntitlementMetric.Other, "exception metric2", "inc2", AggregationFunction.Average, null,
opScopeChoices, null, EntitlementTime.Other, "time2", "sku2");
ep2Id = vendorLicenseManager.createEntitlementPool(ep2, USER1).getId();
ep2.setId(ep2Id);
}
private String testCreate(String vlmId, String name) {
Set<OperationalScope> opScopeChoices = new HashSet<>();
opScopeChoices.add(OperationalScope.Other);
EntitlementPoolEntity ep1 =
createEntitlementPool(vlmId, null, name, EP1_V01_DESC, 80, ThresholdUnit.Percentage,
EntitlementMetric.Core, null, "inc1", AggregationFunction.Other, "agg func1",
opScopeChoices, "op scope1", EntitlementTime.Other, "time1", "sku1");
String ep1Id = vendorLicenseManager.createEntitlementPool(ep1, USER1).getId();
ep1.setId(ep1Id);
EntitlementPoolEntity loadedEp1 = entitlementPoolDao.get(ep1);
Assert.assertTrue(loadedEp1.equals(ep1));
return ep1Id;
}
@Test(dependsOnMethods = {"createTest"})
public void testCreateWithExistingName_negative() {
testCreateWithExistingName_negative(vlm1Id, EP1_NAME);
}
@Test(dependsOnMethods = {"createTest"})
public void testCreateWithExistingNameUnderOtherVlm() {
testCreate(vlm2Id, EP1_NAME);
}
@Test(dependsOnMethods = {"testCreateWithExistingName_negative"})
public void updateAndGetTest() {
EntitlementPoolEntity emptyEp1 = new EntitlementPoolEntity(vlm1Id, VERSION01, ep1Id);
EntitlementPoolEntity ep1 = entitlementPoolDao.get(emptyEp1);
ep1.setEntitlementMetric(new ChoiceOrOther<>(EntitlementMetric.Other, "exception metric1 updated"));
ep1.setAggregationFunction(new ChoiceOrOther<>(AggregationFunction.Other, "agg func1 updated"));
vendorLicenseManager.updateEntitlementPool(ep1, USER1);
EntitlementPoolEntity loadedEp1 = vendorLicenseManager.getEntitlementPool(emptyEp1, USER1);
assertEntitlementPoolsEquals(loadedEp1, ep1);
}
@Test(dependsOnMethods = {"updateAndGetTest"})
public void testGetNonExistingVersion_negative() {
try {
vendorLicenseManager
.getEntitlementPool(new EntitlementPoolEntity(vlm1Id, new Version(48, 83), ep1Id), USER1);
Assert.assertTrue(false);
} catch (CoreException exception) {
Assert.assertEquals(exception.code().id(), VersioningErrorCodes.REQUESTED_VERSION_INVALID);
}
}
@Test(dependsOnMethods = {"updateAndGetTest"})
public void testGetOtherUserCandidateVersion_negative() {
vendorLicenseManager.checkin(vlm1Id, USER1);
vendorLicenseManager.checkout(vlm1Id, USER2);
try {
vendorLicenseManager
.getEntitlementPool(new EntitlementPoolEntity(vlm1Id, new Version(0, 2), ep1Id), USER1);
Assert.assertTrue(false);
} catch (CoreException exception) {
Assert.assertEquals(exception.code().id(), VersioningErrorCodes.REQUESTED_VERSION_INVALID);
}
}
@Test(dependsOnMethods = {"testGetOtherUserCandidateVersion_negative"})
public void testGetCandidateVersion() {
EntitlementPoolEntity ep = new EntitlementPoolEntity(vlm1Id, new Version(0, 2), ep1Id);
ep.setDescription("updated!");
vendorLicenseManager.updateEntitlementPool(ep, USER2);
EntitlementPoolEntity actualEp = vendorLicenseManager.getEntitlementPool(ep, USER2);
EntitlementPoolEntity expectedEp = entitlementPoolDao.get(ep);
Assert.assertEquals(actualEp.getDescription(), ep.getDescription());
assertEntitlementPoolsEquals(actualEp, expectedEp);
}
@Test(dependsOnMethods = {"testGetCandidateVersion"})
public void testGetOldVersion() {
vendorLicenseManager.checkin(vlm1Id, USER2);
EntitlementPoolEntity actualEp = vendorLicenseManager
.getEntitlementPool(new EntitlementPoolEntity(vlm1Id, new Version(0, 1), ep1Id), USER2);
Assert.assertEquals(actualEp.getDescription(), EP1_V01_DESC);
}
@Test(dependsOnMethods = {"testGetOldVersion"})
public void listTest() {
Collection<EntitlementPoolEntity> loadedEps =
vendorLicenseManager.listEntitlementPools(vlm1Id, null, USER1);
Assert.assertEquals(loadedEps.size(), 2);
int existingCounter = 0;
for (EntitlementPoolEntity loadedEp : loadedEps) {
if (ep2Id.equals(loadedEp.getId()) || ep1Id.equals(loadedEp.getId())) {
existingCounter++;
}
}
Assert.assertEquals(existingCounter, 2);
}
@Test(dependsOnMethods = {"listTest"})
public void deleteTest() {
vendorLicenseManager.checkout(vlm1Id, USER1);
EntitlementPoolEntity emptyEp1 = new EntitlementPoolEntity(vlm1Id, null, ep1Id);
vendorLicenseManager.deleteEntitlementPool(emptyEp1, USER1);
emptyEp1.setVersion(VERSION03);
EntitlementPoolEntity loadedEp1 = entitlementPoolDao.get(emptyEp1);
Assert.assertEquals(loadedEp1, null);
Collection<EntitlementPoolEntity> loadedEps =
entitlementPoolDao.list(new EntitlementPoolEntity(vlm1Id, VERSION03, null));
Assert.assertEquals(loadedEps.size(), 1);
Assert.assertEquals(loadedEps.iterator().next().getId(), ep2Id);
}
@Test(dependsOnMethods = "deleteTest")
public void listOldVersionTest() {
Collection<EntitlementPoolEntity> loadedEps =
vendorLicenseManager.listEntitlementPools(vlm1Id, VERSION01, USER1);
Assert.assertEquals(loadedEps.size(), 2);
}
@Test(dependsOnMethods = "deleteTest")
public void testCreateWithRemovedName() {
testCreate(vlm1Id, EP1_NAME);
}
@Test(dependsOnMethods = "deleteTest")
public void testCreateWithExistingNameAfterCheckout_negative() {
testCreateWithExistingName_negative(vlm1Id, EP2_NAME);
}
private void testCreateWithExistingName_negative(String vlmId, String epName) {
try {
EntitlementPoolEntity ep1 =
createEntitlementPool(vlmId, null, epName, EP1_V01_DESC, 80, ThresholdUnit.Percentage,
EntitlementMetric.Core, null, "inc1", AggregationFunction.Other, "agg func1",
Collections.singleton(OperationalScope.Other), "op scope1", EntitlementTime.Other,
"time1", "sku1");
vendorLicenseManager.createEntitlementPool(ep1, USER1).getId();
Assert.fail();
} catch (CoreException exception) {
Assert.assertEquals(exception.code().id(), UniqueValueUtil.UNIQUE_VALUE_VIOLATION);
}
}
*/
}
| [
"Sudhakar.reddy@amdocs.com"
] | Sudhakar.reddy@amdocs.com |
c8af9823957fd1e72fcfcffb04bca224d429b112 | 40890ea623f6838c2b45da98f584c32bde7179c4 | /Java/src/Chapter10/StringGetBytesExample.java | 50b9b9baaa215c28678f420504e7bb67a12c9be6 | [] | no_license | woghwjs1/JavaStudy | dc5f33a77c142d0b1a679aa04acb43ec17f226b7 | 760cf9407e4f5ed53e3b8483d069a4008915cd85 | refs/heads/master | 2021-05-02T09:48:31.416252 | 2018-03-11T13:07:44 | 2018-03-11T13:07:44 | 120,783,659 | 1 | 0 | null | null | null | null | UHC | Java | false | false | 996 | java | package Chapter10;
public class StringGetBytesExample {
//바이트 배열로 변환
public static void main(String[] args) {
String str = "안녕하세요";
//기본 문자셋으로 인코딩과 디코딩
byte[] byte1 = str.getBytes();
System.out.println("byte1.length: " + byte1.length);
String str1 = new String(byte1);
System.out.println("byte1 -> String: " + str1);
try {
//EUC-KR을 이용해서 인코딩 및 디코딩
byte[] byte2 = str.getBytes("EUC-KR");
System.out.println("byte2.length: " + byte2.length);
String str2 = new String(byte2, "EUC-KR");
System.out.println("byte2 -> String: " + str2);
//UTF-8을 이용해서 인코딩 및 디코딩
byte[] byte3 = str.getBytes("UTF-8");
System.out.println("byte3.length: " + byte3.length);
String str3 = new String(byte3, "UTF-8");
System.out.println("byte2 -> String: " + str3);
} catch (Exception e) {
e.getStackTrace();
}
}
}
| [
"Administrator@052"
] | Administrator@052 |
804df9c7bdf4ade27db7e43ed9670c318ac948c2 | 05c3a19d731fab5f2e5bc6db2c31789e3210bc5c | /app/src/test/java/com/videotaking/ExampleUnitTest.java | 16c383527f705174ce8295a8c3a3ce22135cd165 | [] | no_license | zhanglu1994/VideoTaking | 21505871482deae9459cb2d39370d6fc5a7bbf58 | 65d2b9018a5037d238549ed96cbd27cfb4ecea8e | refs/heads/master | 2021-01-20T01:45:57.839625 | 2017-04-25T06:45:40 | 2017-04-25T06:45:40 | 89,326,891 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 405 | java | package com.videotaking;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"547700324@qq.com"
] | 547700324@qq.com |
94db5f517e678996e301f0041b03711975201e8b | 39b3a9e464b9a3b7272c673e9b396df0fdba8d76 | /imooc-ad-service/ad-search/src/main/java/com/imooc/ad/dump/table/AdPlanTable.java | 511c5300064ad54ed5a79da0a1c782da0c1d8b81 | [] | no_license | MSZheng20/imoocad | c060c8c255b439b4d88ef7de3960b0afbfc0e746 | b3d9ffdad5ce9757df8e6f5208879eb3b399a8ad | refs/heads/master | 2022-07-12T18:15:46.120436 | 2019-07-17T08:56:33 | 2019-07-17T08:56:33 | 193,685,690 | 0 | 0 | null | 2022-06-21T01:29:45 | 2019-06-25T10:21:23 | Java | UTF-8 | Java | false | false | 395 | java | package com.imooc.ad.dump.table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @author zms
* @data 2019/7/9
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AdPlanTable {
private Long id;
private Long userId;
private Integer planStatus;
private Date startDate;
private Date endDate;
}
| [
"751007878@qq.com"
] | 751007878@qq.com |
e7acc48b3aa43c9f523f2796445026f99324739a | decec3e4899d9fefef54bee84c41120b9c3ddf18 | /electronic-parent/electronic-console/src/main/java/com/sydl/console/service/SysRoleService.java | ba4e6660d607a61bf95e6d87b3f7d834097fab40 | [
"Apache-2.0"
] | permissive | 278363011/intelligence-electronic | e142f82cd312c1db64bfca0781643c41052d239a | 6da7fe554b3d40b10fd1c1986adbe0699e655eb7 | refs/heads/main | 2022-12-31T16:25:42.341915 | 2020-10-09T13:14:11 | 2020-10-09T13:14:11 | 301,914,530 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 281 | java | package com.sydl.console.service;
import com.sydl.console.model.SysRole;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author codebaobao
* @since 2020-10-09
*/
public interface SysRoleService extends IService<SysRole> {
}
| [
"278363011@qq.com"
] | 278363011@qq.com |
98c7eb7a974c86b0a0a9a0ea41b357ea07039af1 | 939eae6be335a70fddb1e10071169b63667829f4 | /server/src/test/java/org/engineer365/common/service/ServiceTestBase.java | af3ee97435e9a8c8d48e89ac0e1e6c5e20956652 | [
"MIT"
] | permissive | cyylog/cloud-native-micro-service-engineering | 45398abd29787b62d5e77c3f86fa36e6bbdb04f5 | 7d468b5ca8b001309e6d8ae112b4cf1aaea57639 | refs/heads/main | 2023-01-29T21:00:19.840143 | 2020-12-08T13:32:16 | 2020-12-08T13:32:16 | 319,637,519 | 1 | 0 | MIT | 2020-12-08T12:51:24 | 2020-12-08T12:51:23 | null | UTF-8 | Java | false | false | 2,822 | java | /*
* MIT License
*
* Copyright (c) 2020 engineer365.org
*
* 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 org.engineer365.common.service;
import org.engineer365.common.error.GenericError;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.mockito.ArgumentMatchers;
import org.mockito.MockitoAnnotations;
import org.opentest4j.AssertionFailedError;
import org.junit.jupiter.api.function.Executable;
import org.junit.jupiter.api.BeforeEach;
/**
*/
@Disabled
public abstract class ServiceTestBase {
@BeforeEach
public void beforeEach() {
MockitoAnnotations.openMocks(this);
}
public static boolean matchBoolean(boolean that) {
return ArgumentMatchers.booleanThat(b -> {
Assertions.assertEquals(Boolean.valueOf(that), b);
return true;
});
}
public static String matchString(String that) {
return ArgumentMatchers.argThat((String actual) -> that.equals(actual));
}
public static int matchInt(int that) {
return ArgumentMatchers.intThat(i -> {
Assertions.assertEquals(Integer.valueOf(that), i);
return true;
});
}
@SuppressWarnings("unchecked")
public static <T extends GenericError> T assertThrows (Class<T> expectedType, Enum<?> code, Executable executable) {
try {
executable.execute();
} catch (Throwable actualException) {
if (expectedType.isInstance(actualException)) {
return (T) actualException;
}
// UnrecoverableExceptions.rethrowIfUnrecoverable(actualException);
throw new AssertionFailedError("caught unexpected exception", expectedType, actualException.getClass(), actualException);
}
throw new AssertionFailedError("no expected exception throw", expectedType, "null");
}
}
| [
"qiangyt@wxcount.com"
] | qiangyt@wxcount.com |
87a6d291602782c743aa503ca788d3052ef8760a | 1cd53b58d27776e0961dd57c56aa3d9afac5ce08 | /app/co/fr8/terminal/base/ActivityResponse.java | f310f80a12379c79a520457b1e8be3bcab217a4e | [] | no_license | Fr8org/Fr8Java | 65a1c6b19dbc521eed44ed7f65a4d89eefb73f91 | 98532624d1a0c933bf8d2fa3849875917ac89720 | refs/heads/master | 2020-04-10T14:16:26.918476 | 2016-08-17T10:22:37 | 2016-08-17T10:22:37 | 62,140,682 | 2 | 0 | null | 2016-08-17T09:58:00 | 2016-06-28T12:56:26 | Java | UTF-8 | Java | false | false | 914 | java | package co.fr8.terminal.base;
/**
* TODO: DOCUMENT
*/
public enum ActivityResponse {
NULL("Null", 0),
SUCCESS("Success", 1),
ERROR("Error", 2),
REQUEST_TERMINATE("RequestTerminate", 3),
REQUEST_SUSPEND("RequestSuspend", 4),
SKIP_CHILDREN("SkipChildren", 5),
REPROCESS_CHILDREN("ReprocessChildren", 6),
EXECUTE_CLIENT_ACTIVITY("ExecuteClientActivity", 7),
SHOW_DOCUMENTATION("ShowDocumentation", 8),
JUMP_TO_ACTIVITY("JumpToActivity", 9),
JUMP_TO_SUBPLAN("JumpToSubplan", 10),
LAUNCH_ADDITIONAL_PLAN("LaunchAdditionalPlan", 11),
CALL_AND_RETURN("CallAndReturn", 12),
BREAK("Break", 13);
private final String friendlyName;
private final int code;
ActivityResponse(String friendlyName, int code) {
this.friendlyName = friendlyName;
this.code = code;
}
public String getFriendlyName() {
return friendlyName;
}
public int getCode() {
return code;
}
}
| [
"charles@fr8.co"
] | charles@fr8.co |
065fa62d508a7c55404dd08624c0469daab04f64 | 3fa9396c3f4f98dd1a9938d710a7153778f336d5 | /CS122B/WEB-INF/classes/SearchController.java | 61c8d4204ed12a268814cf7c73c0ab6604321ea6 | [
"Apache-2.0"
] | permissive | JasmineMou/UCI | 62f8e8f447defff188fc26cd4a3b36a44e37f012 | 006c61ae669943c465649f9e7c777ad49a536097 | refs/heads/master | 2021-01-13T12:43:57.550718 | 2016-11-01T17:50:42 | 2016-11-01T17:50:42 | 72,560,471 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,397 | java |
/* A servlet to display the contents of the MySQL movieDB database */
import java.io.*;
import java.net.*;
import java.sql.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.ArrayList.*;
public class SearchController extends HttpServlet
{
private static Connection connection;
private static Statement action1;
private static Statement action2;
private static Statement action3;
public String getServletInfo()
{
return "Servlet connects to MySQL database and displays result of a SELECT";
}
// Use http GET
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
String loginUser = "root";
String loginPasswd = "";
String loginUrl = "jdbc:mysql://localhost:3306/moviedb";
response.setContentType("text/html"); // Response mime type
// Output stream to STDOUT
PrintWriter out = response.getWriter();
HttpSession session = request.getSession();
ArrayList previousItems = (ArrayList)session.getAttribute("previousItems");
try
{
//Class.forName("org.gjt.mm.mysql.Driver");
Class.forName("com.mysql.jdbc.Driver").newInstance();
out.println("<HTML>" +
"<HEAD><TITLE>" +
"MovieDB: Error" +
"</TITLE></HEAD>\n<BODY>" +
"<P>SQL error in doGet: ");
Connection dbcon = DriverManager.getConnection(loginUrl, loginUser, loginPasswd);
// Declare our statement
Statement action1 = dbcon.createStatement();
String input = request.getParameter("input");
String title = request.getParameter("title");
String year = request.getParameter("year");
String director = request.getParameter("director");
String starFN = request.getParameter("starFN");
String starLN = request.getParameter("starLN");
String sql = null;
if(year=="")
{
sql = "SELECT movies.id "+ "FROM (stars_in_movies INNER JOIN stars ON stars_in_movies.star_id=stars.id) "
+ "INNER JOIN movies ON stars_in_movies.movie_id=movies.id "
+ "WHERE movies.title LIKE '%"+title+"%' AND movies.director LIKE '%"+director+"%' "
+ "AND stars.first_name LIKE '%"+starFN+"%' AND stars.last_name LIKE '%"+starLN+"%'";
}
else
{
sql = "SELECT movies.id "
+ "FROM (stars_in_movies INNER JOIN stars ON stars_in_movies.star_id=stars.id) "
+ "INNER JOIN movies ON stars_in_movies.movie_id=movies.id "
+ "WHERE movies.title LIKE '%"+title+"%' AND movies.year="+year+" AND movies.director LIKE '%"+director+"%' "
+ "AND stars.first_name LIKE '%"+starFN+"%' AND stars.last_name LIKE '%"+starLN+"%'";
}
ArrayList<Integer> movie_ids = new ArrayList();
ResultSet result1 = action1.executeQuery(sql);
while(result1.next())
{
movie_ids.add(result1.getInt(1));
}
result1.close();
action1.close();
dbcon.close();
session.setAttribute("PageNo", 0);
session.setAttribute("display", 10);
session.setAttribute("Movielist", movie_ids);
response.sendRedirect("/fabflix/Movielist.jsp");
}
catch (SQLException ex) {
while (ex != null) {
System.out.println ("SQL Exception: " + ex.getMessage ());
ex = ex.getNextException ();
} // end while
} // end catch SQLException
catch(java.lang.Exception ex)
{
out.println("<HTML>" +
"<HEAD><TITLE>" +
"MovieDB: Error" +
"</TITLE></HEAD>\n<BODY>" +
"<P>SQL error in doGet: " +
ex.getMessage() + "</P></BODY></HTML>");
return;
}
out.close();
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
doGet(request, response);
}
public static ArrayList<Integer> GetMovieIDsByTitle(String title, Statement action1) throws Exception
{
ArrayList<Integer> movie_ids = new ArrayList<>();
ResultSet result = action1.executeQuery("SELECT id FROM movies WHERE title LIKE '%"+title+"%';");
while(result.next())
{
movie_ids.add(result.getInt(1));
}
result.close();
return movie_ids;
}
public static ArrayList<Integer> GetMovieIDsByYear(int year) throws Exception
{
ArrayList<Integer> movie_ids = new ArrayList<>();
ResultSet result = action1.executeQuery("SELECT id FROM movies WHERE year="+year+";");
while(result.next())
{
movie_ids.add(result.getInt(1));
}
result.close();
return movie_ids;
}
public static ArrayList<Integer> GetMovieIDsByDirector(String director) throws Exception
{
ArrayList<Integer> movie_ids = new ArrayList();
ResultSet result = action1.executeQuery("SELECT id FROM movies WHERE director LIKE '%"+director+"%';");
while(result.next())
{
movie_ids.add(result.getInt(1));
}
result.close();
return movie_ids;
}
public static ArrayList<Integer> GetMovieIDsByCombination(String title, String year, String director, String starFN, String starLN,Statement action1) throws Exception
{
ArrayList<Integer> movie_ids = new ArrayList();
String sql = "SELECT movies.id "
+ "FROM (stars_in_movies INNER JOIN stars ON stars_in_movies.star_id=stars.id) "
+ "INNER JOIN movies ON stars_in_movies.movie_id=movies.id "
+ "WHERE movies.title LIKE '%"+title+"%' AND movies.year="+year+" AND movies.director LIKE '%"+director+"%' "
+ "AND stars.first_name LIKE '%"+starFN+"%' AND stars.last_name LIKE '%"+starLN+"%'";
ResultSet result1 = action1.executeQuery(sql);
while(result1.next())
{
movie_ids.add(result1.getInt(1));
}
result1.close();
return movie_ids;
}
public static ArrayList<Integer> GetMovieIDsByStarsFirstName(String firstname) throws Exception
{
ArrayList<Integer> movie_ids = new ArrayList();
ResultSet result1 = action1.executeQuery("SELECT id FROM stars WHERE first_name LIKE '%"+firstname+"%';");
ResultSet result2 = null;
while(result1.next())
{
result2 = action2.executeQuery("SELECT movie_id FROM stars_in_movies where star_id='"+Integer.toString(result1.getInt(1))+"';");
while(result2.next())
{
movie_ids.add(result2.getInt(1));
}
result2.close();
}
result1.close();
return movie_ids;
}
} | [
"JasmineMou@users.noreply.github.com"
] | JasmineMou@users.noreply.github.com |
c835be40310d40525e5dff4dc0abad5c98be581c | e0d52bbf5d1b657afb07795bf456e8e680302980 | /Educ/DesignPattern-Facade/src/first/History.java | 8f2b5c9de6eb974b597c987c5e883e436777391e | [] | no_license | youp911/modelibra | acc391da16ab6b14616cd7bda094506a05414b0f | 00387bd9f1f82df3b7d844650e5a57d2060a2ec7 | refs/heads/master | 2021-01-25T09:59:19.388394 | 2011-11-24T21:46:26 | 2011-11-24T21:46:26 | 42,008,889 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 926 | java | package first;
import java.util.ArrayList;
public class History implements IHistory {
private ArrayList<IAction> actions = new ArrayList<IAction>();
private int cursor = 0;
public void add(IAction action) {
if (!actions.contains(action)) {
removeRightOfCursor();
actions.add(action);
moveCursorForward();
}
}
public boolean undo() {
boolean undone = false;
if (actions.size() > 0) {
moveCursorBackward();
Action action = (Action) actions.get(cursor);
if (action.getStatus().equals("executed") && action.undo()) {
undone = true;
}
}
return undone;
}
private void removeRightOfCursor() {
for (int i = actions.size() - 1; i >= cursor; i--) {
actions.remove(i);
}
}
private void moveCursorForward() {
cursor++;
}
private void moveCursorBackward() {
if (cursor == 0) {
return;
} else {
cursor--;
}
}
}
| [
"dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d"
] | dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d |
7773652274376ff820a331ff3ccbe6c64782b937 | b90dac4e738ecb0f251b3a01fecdabab222625e2 | /src/main/java/com/course/apisecurity/api/filter/GlobalCorsFilter.java | 7d38d97f5e334ca63d70636ebb81e2ebe765fb78 | [] | no_license | vladimiriusIT/spring-boot-security-api | 1d5ac170eb18fff3d9db99f253ba5a9ec8c94101 | 1b213b57e5f8af5b590bf6f5404783840385d8c0 | refs/heads/main | 2023-04-09T09:45:10.946962 | 2021-04-21T05:41:30 | 2021-04-21T05:41:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 860 | java | package com.course.apisecurity.api.filter;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
//@Component
//@Order(Ordered.HIGHEST_PRECEDENCE)
public class GlobalCorsFilter extends CorsFilter {
public GlobalCorsFilter() {
super(corsConfiguration());
}
private static UrlBasedCorsConfigurationSource corsConfiguration() {
var config = new CorsConfiguration();
config.setAllowCredentials(true);
config.addAllowedOrigin("http://127.0.0.1:8080");
config.addAllowedOrigin("http://192.168.0.13:8080");
config.addAllowedHeader("*");
config.addAllowedMethod("*");
var source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", config);
return source;
}
}
| [
"vladistratiev@vladis-mac.local"
] | vladistratiev@vladis-mac.local |
13cd7732cefc0d45d35b5d8eed26a880d4f10136 | 7c97bb7dc0d2486d6e9e0b34d943aeb9808cebc2 | /app/src/main/java/tcc/usjt/felix113/View/ViewProfissional/TelaProfissionalCadastraTecnologia.java | 7438b7fabc054a5fb76ece2088cd4b40ede13e11 | [] | no_license | madruguinh4/Felix1.1.3 | 4110d8209aa04dad374270990a4cefa178a93458 | e602496638f4358d81b755ca8b3c0250bd35eb1b | refs/heads/master | 2021-08-28T10:59:30.180178 | 2017-12-12T02:02:38 | 2017-12-12T02:02:38 | 100,615,591 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,061 | java | package tcc.usjt.felix113.View.ViewProfissional;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import java.util.ArrayList;
import tcc.usjt.felix113.R;
import static android.R.layout.simple_list_item_1;
public class TelaProfissionalCadastraTecnologia extends AppCompatActivity {
ListView listView;
ArrayAdapter<String> adapter;
String [] servicos = {"Animação ", "Desenvolvimento Java", "Audio e Video ","Ilustruação", "Marketing Online","Moldelagem 2D e 3D"};
String tecnologia = "Tecnologia";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tela_profissional_cadastra_tecnologia);
final ArrayList<String> servicos = preencherDados();
listView = (ListView) findViewById(R.id.ListViewProfTecnologia);
adapter = new ArrayAdapter<String>(this, simple_list_item_1, servicos);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(TelaProfissionalCadastraTecnologia.this, TelaFinalizandoCadastroProfissional.class );
intent.putExtra("subCategoria", servicos.get(position).toString() );
intent.putExtra("Categoria", tecnologia );
startActivity(intent);
}
});
}
private ArrayList<String> preencherDados() {
ArrayList<String> dados = new ArrayList<String>();
dados.add("Animação");
dados.add("Desenvolvimento Java");
dados.add("Audio e Video");
dados.add("Ilustruação");
dados.add("Marketing Online");
dados.add("Moldelagem 2D e 3D");
return dados;
}
}
| [
"alan02david@hotmail.com"
] | alan02david@hotmail.com |
c618c6bf5e3a3e7b8aa15a49953bc5526bbb9b1f | bf2966abae57885c29e70852243a22abc8ba8eb0 | /aws-java-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/FaceDetection.java | f1bd9961cdb9f6656223eebfcb22048d227cb025 | [
"Apache-2.0"
] | permissive | kmbotts/aws-sdk-java | ae20b3244131d52b9687eb026b9c620da8b49935 | 388f6427e00fb1c2f211abda5bad3a75d29eef62 | refs/heads/master | 2021-12-23T14:39:26.369661 | 2021-07-26T20:09:07 | 2021-07-26T20:09:07 | 246,296,939 | 0 | 0 | Apache-2.0 | 2020-03-10T12:37:34 | 2020-03-10T12:37:33 | null | UTF-8 | Java | false | false | 5,606 | java | /*
* Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.rekognition.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
* <p>
* Information about a face detected in a video analysis request and the time the face was detected in the video.
* </p>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FaceDetection implements Serializable, Cloneable, StructuredPojo {
/**
* <p>
* Time, in milliseconds from the start of the video, that the face was detected.
* </p>
*/
private Long timestamp;
/**
* <p>
* The face properties for the detected face.
* </p>
*/
private FaceDetail face;
/**
* <p>
* Time, in milliseconds from the start of the video, that the face was detected.
* </p>
*
* @param timestamp
* Time, in milliseconds from the start of the video, that the face was detected.
*/
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
/**
* <p>
* Time, in milliseconds from the start of the video, that the face was detected.
* </p>
*
* @return Time, in milliseconds from the start of the video, that the face was detected.
*/
public Long getTimestamp() {
return this.timestamp;
}
/**
* <p>
* Time, in milliseconds from the start of the video, that the face was detected.
* </p>
*
* @param timestamp
* Time, in milliseconds from the start of the video, that the face was detected.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FaceDetection withTimestamp(Long timestamp) {
setTimestamp(timestamp);
return this;
}
/**
* <p>
* The face properties for the detected face.
* </p>
*
* @param face
* The face properties for the detected face.
*/
public void setFace(FaceDetail face) {
this.face = face;
}
/**
* <p>
* The face properties for the detected face.
* </p>
*
* @return The face properties for the detected face.
*/
public FaceDetail getFace() {
return this.face;
}
/**
* <p>
* The face properties for the detected face.
* </p>
*
* @param face
* The face properties for the detected face.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FaceDetection withFace(FaceDetail face) {
setFace(face);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getTimestamp() != null)
sb.append("Timestamp: ").append(getTimestamp()).append(",");
if (getFace() != null)
sb.append("Face: ").append(getFace());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof FaceDetection == false)
return false;
FaceDetection other = (FaceDetection) obj;
if (other.getTimestamp() == null ^ this.getTimestamp() == null)
return false;
if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false)
return false;
if (other.getFace() == null ^ this.getFace() == null)
return false;
if (other.getFace() != null && other.getFace().equals(this.getFace()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode());
hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode());
return hashCode;
}
@Override
public FaceDetection clone() {
try {
return (FaceDetection) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.rekognition.model.transform.FaceDetectionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}
| [
""
] | |
7c793fc6ed4ae4907df9e59ddd2ce7149a50a565 | d88eb900e813fe82be64b0fe5fd0a7ff3844626c | /FRQ/2018/FrogSimulation/FrogSimulation.java | 44031eabd183be212afda043227a82088d7636ea | [] | no_license | marktheawesome/APCS-A | 7f810b518e3d6ab18b1f1d5b1cfb5437b7845479 | 0c5c4398bbcbfd3b629ac7981aac714b55addaee | refs/heads/master | 2020-07-07T14:51:29.555669 | 2020-01-15T19:51:42 | 2020-01-15T19:51:42 | 203,380,789 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 949 | java |
public class FrogSimulation{
private int goalDistance;
private int maxHops;
public FrogSimulation(int dist, int numHops){
this.goalDistance = dist;
this.maxHops = numHops;
}
private int hopDistance(){
int dis = ((int)(Math.random() * 10));
if (Math.random() < 0.15){dis*=-1;}
return dis;
}
public boolean simulate(){
int count = 0;
int position = 0;
while(count < maxHops && position >= 0){
if(position >= this.goalDistance){
return true;
}
position += hopDistance();
count++;
}
return false;
}
public double rumsimulation(int num){
double good = 0;
for(int i = 0; i <= num; i++){
boolean outcome = simulate();
System.out.println(outcome);
if(outcome){good++;}
}
return (good/num);
}
} | [
"markgyomory@outlook.com"
] | markgyomory@outlook.com |
8c4dc9a5edb01746b2ad7d5577e526b6fb2135ef | 42d9fa2b33c12ae2db8d5473fe67e0efdec10b25 | /4JVA_SUPFriends/4JVA_SUPFriends-war/src/java/com/supinfo/supfriends/web/api/model/GroupModel.java | c834715340211acd8e9f9dd96c2de870afe1ce10 | [] | no_license | alvinmeimoun/SUPINFO_4JVA_SUPFriends | d6be65ba4d5c579a903eb0c31e395ab861c5d5c1 | e62350800c99ecd811b4311882560a747e1b2f20 | refs/heads/master | 2021-01-16T21:46:40.111734 | 2016-05-13T08:24:30 | 2016-05-13T08:24:30 | 61,037,162 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 631 | 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.supinfo.supfriends.web.api.model;
public class GroupModel
{
private Long id;
private String name;
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;
}
} | [
"alvin.meimoun@gmail.com"
] | alvin.meimoun@gmail.com |
ec1da4ff794f290576da689d700b3d3eb56e7f00 | 103b626c4944f3a66320c26d7f2cae56901abb66 | /clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/ReceiptRegistrationContract.java | a083aad3aaf5b2fffc698b99c04a3a3891598d56 | [] | no_license | kevinmost/clover-android-sdk | f184045316e577715863b589d7836aaf25c6392d | a86167f0a62dddd0b6cf407b778cf9b965a18212 | refs/heads/master | 2020-12-24T16:24:55.323771 | 2015-08-22T04:53:03 | 2015-08-22T04:56:41 | 41,191,184 | 0 | 0 | null | 2015-08-22T04:48:08 | 2015-08-22T04:48:07 | null | UTF-8 | Java | false | false | 2,227 | java | /*
* Copyright (C) 2015 Clover Network, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.clover.sdk.v1.printer;
import android.accounts.Account;
import android.net.Uri;
import android.provider.BaseColumns;
public final class ReceiptRegistrationContract {
public static final String PARAM_ACCOUNT_NAME = "account_name";
public static final String PARAM_ACCOUNT_TYPE = "account_type";
public static final String AUTHORITY = "com.clover.receipt_registration";
public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY);
public interface RegistrationColumns {
public static final String PACKAGE = "package";
public static final String URI = "uri";
}
public static final class Registration implements BaseColumns, RegistrationColumns {
public static final String CONTENT_DIRECTORY = "registration";
public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/registration";
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/registration";
/**
* URI builder for registration.
*/
public static class UriBuilder {
private Account account = null;
public UriBuilder account(Account account) {
this.account = account;
return this;
}
public Uri build() {
Uri.Builder builder = Registration.CONTENT_URI.buildUpon();
if (account != null) {
builder.appendQueryParameter(PARAM_ACCOUNT_NAME, account.name);
builder.appendQueryParameter(PARAM_ACCOUNT_TYPE, account.type);
}
return builder.build();
}
}
}
}
| [
"duane.moore@ieee.org"
] | duane.moore@ieee.org |
300c5dc7562757ebdf00ce40ebe3ef45798ecd16 | 8a8254c83cc2ec2c401f9820f78892cf5ff41384 | /baseline/Travel-Mate/Android/app/src/main/java/baseline/io/github/project_travel_mate/roompersistence/ViewModelFactory.java | cb00add2dfb1e7bfff80ea653620316d2487fbe9 | [
"MIT"
] | permissive | VU-Thesis-2019-2020-Wesley-Shann/subjects | 46884bc6f0f9621be2ab3c4b05629e3f6d3364a0 | 14a6d6bb9740232e99e7c20f0ba4ddde3e54ad88 | refs/heads/master | 2022-12-03T05:52:23.309727 | 2020-08-19T12:18:54 | 2020-08-19T12:18:54 | 261,718,101 | 0 | 0 | null | 2020-07-11T12:19:07 | 2020-05-06T09:54:05 | Java | UTF-8 | Java | false | false | 761 | java | package baseline.io.github.project_travel_mate.roompersistence;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;
import androidx.annotation.NonNull;
/**
* Factory for ViewModels
*/
public class ViewModelFactory implements ViewModelProvider.Factory {
private final ChecklistDataSource mDataSource;
public ViewModelFactory(ChecklistDataSource dataSource) {
mDataSource = dataSource;
}
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
if (modelClass.isAssignableFrom(ChecklistViewModel.class)) {
return (T) new ChecklistViewModel(mDataSource);
}
throw new IllegalArgumentException("Unknown ViewModel class");
}
}
| [
"sshann95@outlook.com"
] | sshann95@outlook.com |
2c4475d8d995a5a811c7cfaf31fc2d8cc88dc69a | 80ba559b681ded56506c2f7967d39e9276719e63 | /src/main/java/io/lettuce/core/event/Event.java | b6978090e4b909f4eb5ce4812a0de2582cfc5bae | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | addb-swstarlab/addb-lettuce | b6b16f63bdc7548de44ad77f72141bc3364738a5 | cdeeb375d110f8bb61889e1d1a02fcd713c32e7d | refs/heads/master | 2022-08-10T18:19:25.353999 | 2019-08-21T07:36:59 | 2019-08-21T07:36:59 | 201,862,778 | 30 | 0 | Apache-2.0 | 2021-04-30T20:32:07 | 2019-08-12T05:20:07 | Java | UTF-8 | Java | false | false | 801 | java | /*
* Copyright 2011-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.lettuce.core.event;
/**
*
* Marker-interface for events that are published over the event bus.
*
* @author Mark Paluch
* @since 3.4
*/
public interface Event {
}
| [
"arbc139@gmail.com"
] | arbc139@gmail.com |
8a8b1c06ec9acbeb93edca377bf428e5383db45f | c57a87dbf4d0f2b51ad3c22f40c5a88c79e828ce | /MyAide/okhttputils/src/main/java/com/zhy/http/okhttp/log/LoggerInterceptor.java | 1e647d9706dfd2cfd28a4e66f6632a6a5246f173 | [
"Apache-2.0"
] | permissive | a616707902/aide | bc46aebfa8a4882ba218e31d7764ff43d1a6cf8b | c7ee14aa939cc88c67eedf9409d3fbf688148a0a | refs/heads/master | 2021-01-20T00:47:08.915471 | 2017-10-16T01:13:17 | 2017-10-16T01:13:17 | 89,188,299 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,226 | java | package com.zhy.http.okhttp.log;
import android.text.TextUtils;
import android.util.Log;
import java.io.IOException;
import okhttp3.Headers;
import okhttp3.Interceptor;
import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okio.Buffer;
/**
* Created by zhy on 16/3/1.
*/
public class LoggerInterceptor implements Interceptor
{
public static final String TAG = "OkHttpUtils";
private String tag;
private boolean showResponse;
public LoggerInterceptor(String tag, boolean showResponse)
{
if (TextUtils.isEmpty(tag))
{
tag = TAG;
}
this.showResponse = showResponse;
this.tag = tag;
}
public LoggerInterceptor(String tag)
{
this(tag, false);
}
@Override
public Response intercept(Chain chain) throws IOException
{
Request request = chain.request();
logForRequest(request);
Response response = chain.proceed(request);
return logForResponse(response);
}
private Response logForResponse(Response response)
{
try
{
//===>response log
Log.e(tag, "========response'log=======");
Response.Builder builder = response.newBuilder();
Response clone = builder.build();
Log.e(tag, "url : " + clone.request().url());
Log.e(tag, "code : " + clone.code());
Log.e(tag, "protocol : " + clone.protocol());
if (!TextUtils.isEmpty(clone.message()))
Log.e(tag, "message : " + clone.message());
if (showResponse)
{
ResponseBody body = clone.body();
if (body != null)
{
MediaType mediaType = body.contentType();
if (mediaType != null)
{
Log.e(tag, "responseBody's contentType : " + mediaType.toString());
if (isText(mediaType))
{
String resp = body.string();
Log.e(tag, "responseBody's content : " + resp);
body = ResponseBody.create(mediaType, resp);
return response.newBuilder().body(body).build();
} else
{
Log.e(tag, "responseBody's content : " + " maybe [file part] , too large too print , ignored!");
}
}
}
}
Log.e(tag, "========response'log=======end");
} catch (Exception e)
{
// e.printStackTrace();
}
return response;
}
private void logForRequest(Request request)
{
try
{
String url = request.url().toString();
Headers headers = request.headers();
Log.e(tag, "========request'log=======");
Log.e(tag, "method : " + request.method());
Log.e(tag, "url : " + url);
if (headers != null && headers.size() > 0)
{
Log.e(tag, "headers : " + headers.toString());
}
RequestBody requestBody = request.body();
if (requestBody != null)
{
MediaType mediaType = requestBody.contentType();
if (mediaType != null)
{
Log.e(tag, "requestBody's contentType : " + mediaType.toString());
if (isText(mediaType))
{
Log.e(tag, "requestBody's content : " + bodyToString(request));
} else
{
Log.e(tag, "requestBody's content : " + " maybe [file part] , too large too print , ignored!");
}
}
}
Log.e(tag, "========request'log=======end");
} catch (Exception e)
{
// e.printStackTrace();
}
}
private boolean isText(MediaType mediaType)
{
if (mediaType.type() != null && mediaType.type().equals("text"))
{
return true;
}
if (mediaType.subtype() != null)
{
if (mediaType.subtype().equals("json") ||
mediaType.subtype().equals("xml") ||
mediaType.subtype().equals("html") ||
mediaType.subtype().equals("webviewhtml")
)
return true;
}
return false;
}
private String bodyToString(final Request request)
{
try
{
final Request copy = request.newBuilder().build();
final Buffer buffer = new Buffer();
copy.body().writeTo(buffer);
return buffer.readUtf8();
} catch (final IOException e)
{
return "something error when show requestBody.";
}
}
}
| [
"616707902@qq.com"
] | 616707902@qq.com |
b2c94c0fc983042fbffc982ecc0702eb108d0133 | a4971405f6dc5cd4b872737cc4632fbedd8ba255 | /src/com/stimasoft/obiectivecva/adapters/AutoCompleteBenefAdapter.java | 9d1d92641dc66948981d905d2d43a92302a8ceb2 | [] | no_license | florin-b/OCVPRD | c5c92eb4971938bed35deeeed4811cacae1060dd | 23e1b9655bd4d2d7e5cb4a346fb295f0292bca7a | refs/heads/master | 2020-07-08T10:33:04.752801 | 2017-03-16T09:29:11 | 2017-03-16T09:29:11 | 66,371,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,510 | java | package com.stimasoft.obiectivecva.adapters;
import android.content.Context;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.util.List;
/**
* Feeds suggestion information to the beneficiary AutoCompleteTextViews
*/
public class AutoCompleteBenefAdapter extends ArrayAdapter<Pair<Integer, String>> {
public AutoCompleteBenefAdapter(Context context, int resource, List<Pair<Integer, String>> objects) {
super(context, resource, objects);
}
@Override
public View getView(int pos, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(parent.getContext())
.inflate(android.R.layout.simple_dropdown_item_1line, parent, false);
}
TextView nameText = (TextView) convertView.findViewById(android.R.id.text1);
nameText.setText(getItem(pos).second);
return convertView;
}
@Override
public View getDropDownView(int position, View convertView,
ViewGroup parent) {
if (convertView == null) {
convertView = View.inflate(getContext(), android.R.layout.simple_dropdown_item_1line, null);
}
TextView label = (TextView) convertView.findViewById(android.R.id.text1);
label.setText(getItem(position).first);
return label;
}
} | [
"gflorinb@yahoo.com"
] | gflorinb@yahoo.com |
6d26cc6f8c4dbe2ef940dfbec373751b34ecbf04 | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/JxPath-18/org.apache.commons.jxpath.ri.axes.AttributeContext/default/7/org/apache/commons/jxpath/ri/axes/AttributeContext_ESTest_scaffolding.java | 716ec35e7f76daa6ff19ed91d3090529f299fa34 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 18,691 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Jul 30 09:59:00 GMT 2021
*/
package org.apache.commons.jxpath.ri.axes;
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;
@EvoSuiteClassExclude
public class AttributeContext_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 = "org.apache.commons.jxpath.ri.axes.AttributeContext";
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();
}
@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("user.dir", "/experiment");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(AttributeContext_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.jxpath.Variables",
"org.apache.commons.jxpath.ri.Compiler",
"org.apache.commons.jxpath.JXPathBeanInfo",
"org.apache.commons.jxpath.ri.axes.ChildContext",
"org.apache.commons.jxpath.BasicVariables",
"org.apache.commons.jxpath.ri.axes.UnionContext",
"org.apache.commons.jxpath.ri.model.dynabeans.DynaBeanPointerFactory",
"org.apache.commons.jxpath.JXPathInvalidSyntaxException",
"org.apache.commons.jxpath.JXPathAbstractFactoryException",
"org.apache.commons.jxpath.JXPathInvalidAccessException",
"org.apache.commons.jxpath.ri.compiler.CoreOperationEqual",
"org.apache.commons.jxpath.ri.model.beans.PropertyPointer",
"org.apache.commons.jxpath.ri.model.beans.BeanPointer",
"org.jdom.Document",
"org.apache.commons.jxpath.ri.model.NodePointer",
"org.apache.commons.jxpath.ri.model.VariablePointer$1",
"org.apache.commons.jxpath.ri.compiler.CoreOperation",
"org.apache.commons.jxpath.ri.model.dynamic.DynamicPointer",
"org.apache.commons.jxpath.ri.model.VariablePointerFactory$VariableContextWrapper",
"org.apache.commons.jxpath.ri.model.beans.BeanAttributeIterator",
"org.apache.commons.jxpath.ri.model.VariablePointer",
"org.apache.commons.jxpath.Functions",
"org.apache.commons.jxpath.ri.axes.NodeSetContext",
"org.apache.commons.jxpath.ri.model.container.ContainerPointer",
"org.apache.commons.jxpath.ri.model.dynamic.DynamicPointerFactory",
"org.apache.commons.jxpath.ri.model.beans.BeanPointerFactory",
"org.apache.commons.jxpath.ri.JXPathContextFactoryReferenceImpl",
"org.apache.commons.jxpath.ri.model.NodeIterator",
"org.apache.commons.jxpath.JXPathContextFactory",
"org.apache.commons.jxpath.ri.axes.RootContext",
"org.apache.commons.jxpath.ri.axes.InitialContext",
"org.apache.commons.jxpath.ri.compiler.CoreOperationCompare",
"org.apache.commons.jxpath.ExpressionContext",
"org.apache.commons.jxpath.ri.model.jdom.JDOMNodePointer",
"org.apache.commons.beanutils.DynaBean",
"org.apache.commons.jxpath.ri.QName",
"org.apache.commons.jxpath.MapDynamicPropertyHandler",
"org.apache.commons.jxpath.ri.compiler.NodeTypeTest",
"org.apache.commons.jxpath.ri.model.beans.CollectionPointer",
"org.jdom.Parent",
"org.apache.commons.jxpath.ri.JXPathContextReferenceImpl",
"org.apache.commons.jxpath.CompiledExpression",
"org.apache.commons.jxpath.BasicNodeSet",
"org.apache.commons.jxpath.NodeSet",
"org.apache.commons.jxpath.IdentityManager",
"org.apache.commons.jxpath.ri.axes.AttributeContext",
"org.apache.commons.jxpath.util.ValueUtils",
"org.apache.commons.jxpath.ri.model.beans.PropertyIterator",
"org.apache.commons.jxpath.JXPathContext",
"org.apache.commons.jxpath.ri.compiler.TreeCompiler",
"org.apache.commons.jxpath.JXPathException",
"org.apache.commons.jxpath.JXPathNotFoundException",
"org.jdom.Comment",
"org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer",
"org.apache.commons.jxpath.ri.model.beans.NullPointer",
"org.apache.commons.jxpath.ri.axes.DescendantContext",
"org.apache.commons.jxpath.PackageFunctions",
"org.apache.commons.jxpath.ri.model.beans.LangAttributePointer",
"org.jdom.Content",
"org.apache.commons.jxpath.JXPathIntrospector",
"org.apache.commons.jxpath.ri.compiler.NodeTest",
"org.apache.commons.jxpath.ri.model.VariablePointerFactory",
"org.apache.commons.jxpath.ri.model.dom.DOMPointerFactory",
"org.apache.commons.jxpath.JXPathBasicBeanInfo$1",
"org.apache.commons.jxpath.KeyManager",
"org.apache.commons.jxpath.JXPathContextFactoryConfigurationError",
"org.jdom.DocType",
"org.apache.commons.jxpath.JXPathTypeConversionException",
"org.apache.commons.jxpath.JXPathBasicBeanInfo",
"org.apache.commons.jxpath.ri.compiler.NameAttributeTest",
"org.apache.commons.jxpath.ri.JXPathContextReferenceImpl$1",
"org.apache.commons.jxpath.DynamicPropertyHandler",
"org.apache.commons.jxpath.ri.compiler.ProcessingInstructionTest",
"org.jdom.ProcessingInstruction",
"org.apache.commons.jxpath.ri.EvalContext",
"org.apache.commons.jxpath.JXPathFunctionNotFoundException",
"org.apache.commons.jxpath.Container",
"org.apache.commons.jxpath.ri.model.NodePointerFactory",
"org.apache.commons.jxpath.ri.model.container.ContainerPointerFactory",
"org.apache.commons.jxpath.ri.compiler.NodeNameTest",
"org.apache.commons.jxpath.ri.NamespaceResolver",
"org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer",
"org.apache.commons.jxpath.Pointer",
"org.apache.commons.jxpath.ri.axes.ParentContext",
"org.apache.commons.jxpath.ri.model.dom.DOMNodePointer",
"org.apache.commons.jxpath.AbstractFactory",
"org.apache.commons.jxpath.ri.compiler.Expression",
"org.apache.commons.jxpath.ri.compiler.Operation",
"org.jdom.ContentList",
"org.jdom.IllegalAddException",
"org.apache.commons.jxpath.ri.model.dynabeans.DynaBeanPointer",
"org.apache.commons.jxpath.ri.model.jdom.JDOMPointerFactory",
"org.apache.commons.jxpath.Function",
"org.apache.commons.jxpath.ri.model.beans.CollectionPointerFactory",
"org.jdom.Element",
"org.apache.commons.jxpath.ri.model.beans.NullPropertyPointer"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(AttributeContext_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.jxpath.ri.EvalContext",
"org.apache.commons.jxpath.ri.axes.AttributeContext",
"org.apache.commons.jxpath.ri.compiler.NodeTest",
"org.apache.commons.jxpath.ri.compiler.NodeNameTest",
"org.apache.commons.jxpath.PackageFunctions",
"org.apache.commons.jxpath.JXPathContext",
"org.apache.commons.jxpath.JXPathContextFactory",
"org.apache.commons.jxpath.ri.JXPathContextFactoryReferenceImpl",
"org.apache.commons.jxpath.ri.QName",
"org.apache.commons.jxpath.ri.compiler.TreeCompiler",
"org.apache.commons.jxpath.ri.model.beans.CollectionPointerFactory",
"org.apache.commons.jxpath.ri.model.beans.BeanPointerFactory",
"org.apache.commons.jxpath.ri.model.dynamic.DynamicPointerFactory",
"org.apache.commons.jxpath.ri.model.VariablePointerFactory",
"org.apache.commons.jxpath.ri.model.dom.DOMPointerFactory",
"org.jdom.Document",
"org.apache.commons.jxpath.ri.model.jdom.JDOMPointerFactory",
"org.apache.commons.jxpath.ri.model.dynabeans.DynaBeanPointerFactory",
"org.apache.commons.jxpath.ri.model.container.ContainerPointerFactory",
"org.apache.commons.jxpath.ri.JXPathContextReferenceImpl$1",
"org.apache.commons.jxpath.ri.JXPathContextReferenceImpl",
"org.apache.commons.jxpath.ri.model.NodePointer",
"org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer",
"org.apache.commons.jxpath.ri.model.beans.NullPointer",
"org.apache.commons.jxpath.ri.NamespaceResolver",
"org.apache.commons.jxpath.BasicVariables",
"org.apache.commons.jxpath.ri.model.VariablePointer",
"org.apache.commons.jxpath.util.ValueUtils",
"org.apache.commons.jxpath.JXPathBasicBeanInfo",
"org.apache.commons.jxpath.JXPathIntrospector",
"org.apache.commons.jxpath.ri.model.beans.BeanPointer",
"org.apache.commons.jxpath.ri.axes.InitialContext",
"org.apache.commons.jxpath.ri.axes.RootContext",
"org.apache.commons.jxpath.BasicNodeSet",
"org.apache.commons.jxpath.ri.compiler.ProcessingInstructionTest",
"org.apache.commons.jxpath.ri.compiler.NodeTypeTest",
"org.apache.commons.jxpath.ri.axes.NamespaceContext",
"org.apache.commons.jxpath.ri.axes.NodeSetContext",
"org.apache.commons.jxpath.ri.axes.UnionContext",
"org.apache.commons.jxpath.ri.axes.ParentContext",
"org.apache.commons.jxpath.ri.model.VariablePointerFactory$VariableContextWrapper",
"org.apache.commons.jxpath.ri.axes.AncestorContext",
"org.apache.commons.jxpath.ri.axes.SelfContext",
"org.apache.commons.jxpath.ri.axes.ChildContext",
"org.apache.commons.jxpath.ri.axes.PrecedingOrFollowingContext",
"org.apache.commons.jxpath.ri.axes.PredicateContext",
"org.apache.commons.jxpath.FunctionLibrary",
"org.apache.commons.jxpath.ri.compiler.Expression",
"org.apache.commons.jxpath.ri.compiler.VariableReference",
"org.apache.commons.jxpath.ri.compiler.Step",
"org.apache.commons.jxpath.ri.compiler.Path",
"org.apache.commons.jxpath.ri.compiler.LocationPath",
"org.apache.commons.jxpath.ri.compiler.Operation",
"org.apache.commons.jxpath.ri.compiler.CoreOperation",
"org.apache.commons.jxpath.ri.compiler.CoreOperationUnion",
"org.apache.commons.jxpath.ri.compiler.ExtensionFunction",
"org.apache.commons.jxpath.ri.compiler.Constant",
"org.apache.commons.jxpath.ri.compiler.CoreOperationOr",
"org.apache.commons.jxpath.ri.compiler.CoreOperationNegate",
"org.apache.commons.jxpath.ri.compiler.CoreOperationSubtract",
"org.apache.commons.jxpath.ri.compiler.ExpressionPath",
"org.apache.commons.jxpath.ri.compiler.CoreFunction",
"org.apache.commons.jxpath.JXPathException",
"org.apache.commons.jxpath.ri.model.beans.PropertyIterator",
"org.apache.commons.jxpath.ri.model.beans.BeanAttributeIterator",
"org.apache.commons.jxpath.ri.model.beans.PropertyPointer",
"org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer",
"org.apache.commons.jxpath.JXPathBasicBeanInfo$1",
"org.apache.commons.jxpath.ri.model.beans.CollectionPointer",
"org.apache.commons.jxpath.ri.parser.XPathParser",
"org.apache.commons.jxpath.ri.parser.SimpleCharStream",
"org.apache.commons.jxpath.ri.parser.XPathParserTokenManager",
"org.apache.commons.jxpath.ri.parser.Token",
"org.apache.commons.jxpath.ri.parser.XPathParser$JJCalls",
"org.apache.commons.jxpath.ri.Parser",
"org.apache.commons.jxpath.ri.parser.ParseException",
"org.apache.commons.jxpath.ri.parser.XPathParserConstants",
"org.apache.commons.jxpath.JXPathInvalidSyntaxException",
"org.apache.commons.jxpath.ri.parser.TokenMgrError",
"org.apache.commons.jxpath.ri.model.beans.NullPropertyPointer",
"org.apache.commons.jxpath.ri.compiler.Expression$ValueIterator",
"org.apache.commons.jxpath.ri.compiler.Expression$PointerIterator",
"org.apache.commons.jxpath.ri.axes.DescendantContext",
"org.apache.commons.jxpath.ri.model.VariablePointer$1",
"org.apache.commons.jxpath.ri.compiler.CoreOperationRelationalExpression",
"org.apache.commons.jxpath.ri.compiler.CoreOperationGreaterThan",
"org.apache.commons.jxpath.ri.compiler.CoreOperationDivide",
"org.apache.commons.jxpath.ri.compiler.CoreOperationAdd",
"org.apache.commons.jxpath.ri.compiler.CoreOperationMod",
"org.apache.commons.jxpath.ri.compiler.CoreOperationGreaterThanOrEqual",
"org.apache.commons.jxpath.ri.compiler.CoreOperationCompare",
"org.apache.commons.jxpath.ri.compiler.CoreOperationNotEqual",
"org.apache.commons.jxpath.ri.compiler.CoreOperationEqual",
"org.apache.commons.jxpath.ri.compiler.CoreOperationLessThanOrEqual",
"org.apache.commons.jxpath.ri.compiler.CoreOperationLessThan",
"org.apache.commons.jxpath.ri.InfoSetUtil",
"org.apache.commons.jxpath.ri.compiler.CoreOperationAnd",
"org.apache.commons.jxpath.ri.compiler.CoreOperationMultiply",
"org.apache.commons.jxpath.ri.axes.SimplePathInterpreter",
"org.apache.commons.jxpath.JXPathNotFoundException",
"org.apache.commons.jxpath.ri.compiler.NameAttributeTest",
"org.apache.commons.jxpath.util.ReverseComparator",
"org.apache.commons.jxpath.ri.JXPathCompiledExpression",
"org.apache.commons.jxpath.JXPathInvalidAccessException",
"org.apache.commons.jxpath.JXPathFunctionNotFoundException",
"org.apache.commons.jxpath.ClassFunctions",
"org.apache.commons.jxpath.util.BasicTypeConverter",
"org.apache.commons.jxpath.util.TypeUtils$1",
"org.apache.commons.jxpath.util.TypeUtils",
"org.apache.commons.jxpath.util.MethodLookupUtils",
"org.apache.commons.jxpath.ri.model.beans.CollectionNodeIterator",
"org.apache.commons.jxpath.ri.model.beans.CollectionAttributeNodeIterator",
"org.apache.commons.jxpath.ri.model.beans.CollectionChildNodeIterator",
"org.jdom.IllegalAddException",
"org.apache.commons.beanutils.ConvertUtils",
"org.apache.commons.beanutils.ConvertUtilsBean",
"org.apache.commons.beanutils.ContextClassLoaderLocal",
"org.apache.commons.beanutils.BeanUtilsBean$1",
"org.apache.commons.beanutils.BeanUtilsBean",
"org.apache.commons.collections.FastHashMap",
"org.apache.commons.logging.impl.Jdk14Logger",
"org.apache.commons.beanutils.converters.BigDecimalConverter",
"org.apache.commons.beanutils.converters.BigIntegerConverter",
"org.apache.commons.beanutils.converters.BooleanConverter",
"org.apache.commons.beanutils.converters.AbstractArrayConverter",
"org.apache.commons.beanutils.converters.BooleanArrayConverter",
"org.apache.commons.beanutils.converters.ByteConverter",
"org.apache.commons.beanutils.converters.ByteArrayConverter",
"org.apache.commons.beanutils.converters.CharacterConverter",
"org.apache.commons.beanutils.converters.CharacterArrayConverter",
"org.apache.commons.beanutils.converters.ClassConverter",
"org.apache.commons.beanutils.converters.DoubleConverter",
"org.apache.commons.beanutils.converters.DoubleArrayConverter",
"org.apache.commons.beanutils.converters.FloatConverter",
"org.apache.commons.beanutils.converters.FloatArrayConverter",
"org.apache.commons.beanutils.converters.IntegerConverter",
"org.apache.commons.beanutils.converters.IntegerArrayConverter",
"org.apache.commons.beanutils.converters.LongConverter",
"org.apache.commons.beanutils.converters.LongArrayConverter",
"org.apache.commons.beanutils.converters.ShortConverter",
"org.apache.commons.beanutils.converters.ShortArrayConverter",
"org.apache.commons.beanutils.converters.StringConverter",
"org.apache.commons.beanutils.converters.StringArrayConverter",
"org.apache.commons.beanutils.converters.SqlDateConverter",
"org.apache.commons.beanutils.converters.SqlTimeConverter",
"org.apache.commons.beanutils.converters.SqlTimestampConverter",
"org.apache.commons.beanutils.converters.FileConverter",
"org.apache.commons.beanutils.converters.URLConverter",
"org.apache.commons.beanutils.PropertyUtilsBean",
"org.apache.commons.beanutils.PropertyUtils",
"org.apache.commons.beanutils.BeanUtils",
"org.apache.commons.jxpath.JXPathTypeConversionException"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
5a5c4cff4e036c05d772c9eb4471ee8040c4ba7d | ec29cf6fb77d58bd9e5f71483654da827fb1e25c | /src/practice/Fazer.java | e1b67bff2a35976dc3bb3cbcfb70a67b51cab508 | [] | no_license | RaviKumarChitturu/JavaBasics | 0165221a3121d4daf403519e4dc82e22d20bfbe7 | e8e81480e466b447fafccd3062140116c8cc2d0e | refs/heads/master | 2020-06-21T07:41:21.368912 | 2019-12-04T07:32:03 | 2019-12-04T07:32:03 | 197,385,180 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 507 | java | package practice;
public class Fazer extends Bike_Abstraction{
@Override
void setColor() {
// TODO Auto-generated method stub
System.out.println("Set color to Bike");
}
@Override
void setModel() {
// TODO Auto-generated method stub
System.out.println("here write code to generate the modle Number");
}
@Override
void assembledParts() {
// TODO Auto-generated method stub
System.out.println("Wirte code here to assemble all the parts as per design");
}
}
| [
"cravi@XHLT0154.xeno.com"
] | cravi@XHLT0154.xeno.com |
e56bc3ab4367193d68fee962220d49507df1ac67 | 97ba5ea7136dfae41f5cd777a4655cef8ad4770e | /src/main/java/com/doarte/repository/Usuarios.java | 0b5f409de08dca05b8cf4fc5b72a5ae0d935a585 | [] | no_license | julianocampao/doacao | 95bb41b748940c26c34daf21e1040246ab720966 | 6299112088ef44bd602464ac4894fc5b9ccf594f | refs/heads/master | 2021-05-07T20:51:01.993185 | 2017-11-29T03:42:36 | 2017-11-29T03:42:36 | 108,939,157 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 259 | java | package com.doarte.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.doarte.model.Usuario;
@Repository
public interface Usuarios extends JpaRepository<Usuario, Long> {
}
| [
"juliano@DESKTOP-ND16D3U"
] | juliano@DESKTOP-ND16D3U |
7642f0766023bf2873abc62630ee8136f0e7a5e7 | 86385842f9d949de5bc6c03e36fad08fb2b98671 | /oa/src/main/java/com/oa/web/PropertyController.java | 069f17947e41c7400d03c20793cd414744dc2cde | [] | no_license | ls979012169/oa | 3baf0e0d18c356cbfdda61de7b953d08f66e6ae0 | 4403e6111a5aeb444101eab1befa19deae1ed388 | refs/heads/master | 2022-12-21T21:38:17.003580 | 2019-11-12T08:12:58 | 2019-11-12T08:12:58 | 221,164,159 | 0 | 0 | null | 2022-12-16T01:42:27 | 2019-11-12T08:11:04 | Java | UTF-8 | Java | false | false | 5,993 | java | package com.oa.web;
import java.sql.Date;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.oa.pojo.Gh_apply;
import com.oa.pojo.Ly_apply;
import com.oa.pojo.Property;
import com.oa.service.Gh_applyService;
import com.oa.service.Ly_applyService;
import com.oa.service.PropertyService;
import com.oa.vo.Gh_applyVO;
import com.oa.vo.Ly_applyVO;
/**
* @author Song
* @category 库存台账控制器
*/
@Controller
public class PropertyController {
Logger log = Logger.getLogger(PropertyController.class);
@Autowired
private PropertyService propertyservice;
@Autowired
private Ly_applyService ly_applyService;
@Autowired
private Gh_applyService gh_applyService;
/**
* 查询出当前所有可用资产
*
* @return
*/
@RequestMapping("/showProperty")
public @ResponseBody List<Property> showProperty() {
List<Property> propertys = propertyservice.findAll();
return propertys;
}
/**
* 资产采购
*
* @param property
* @return
*/
@RequestMapping("/addProperty")
public @ResponseBody String addProperty(Property property) {
Boolean flag = propertyservice.addProperty(property);
String result = null;
if (flag) {
result = "添加成功!";
} else {
result = "添加失败!";
}
return result;
}
/**
* 查询出当前所有待审的的领用申请
*
* @return
*/
@RequestMapping("/showLyapplyToAudit")
public @ResponseBody List<Ly_applyVO> showLyapplyToAudit() {
List<Ly_applyVO> ly_applyVOs = ly_applyService.findByState(1);
return ly_applyVOs;
}
/**
* 提交领用申请
*
* @param ly_apply
* @return
*/
@RequestMapping("/addLyapply")
public @ResponseBody String addLyapply(Ly_apply ly_apply) {
ly_apply.setApdate(new Date(System.currentTimeMillis()));
ly_apply.setSta_id(1);
boolean flag = ly_applyService.addLy_apply(ly_apply);
String result = null;
if (flag) {
result = "提交成功!";
} else {
result = "提交失败!";
}
return result;
}
/**
* 审核领用申请
*
* @param apid
* @param sta_id
* @return
*/
@RequestMapping("/auditLyapply")
public @ResponseBody String auditLyapply(Integer apid, Integer sta_id) {
boolean flag = ly_applyService.changeState(apid, sta_id);
String result = null;
if (flag) {
result = "审核通过!";
} else {
result = "提交失败!";
}
return result;
}
/**
* 查询出所有待审核的的归还申请
*
* @return
*/
@RequestMapping("/showGhapplyToAudit")
public @ResponseBody List<Gh_applyVO> showGhapplyToAudit() {
List<Gh_applyVO> gh_applyVOs = gh_applyService.findByState(1);
return gh_applyVOs;
}
/**
* 提交归还申请
*
* @param ly_apply
* @return
*/
@RequestMapping("/addGhapply")
public @ResponseBody String addGhapply(Gh_apply gh_apply) {
gh_apply.setGhdatetime(new Date(System.currentTimeMillis()));
gh_apply.setSid(1);
boolean flag = gh_applyService.addGh_apply(gh_apply);
String result = null;
if (flag) {
result = "提交成功!";
} else {
result = "提交失败!";
}
return result;
}
/**
* 审核归还申请
*
* @param apid
* @param sta_id
* @return
*/
@RequestMapping("/auditGhapply")
public @ResponseBody String auditGhapply(Integer id, Integer sid) {
boolean flag = gh_applyService.changeState(id, sid);
String result = null;
if (flag) {
result = "审核通过!";
} else {
result = "提交失败!";
}
return result;
}
/**
* 查询出所有的已经被审核的领用申请
*
* @return
*/
@RequestMapping("/showLyapplyAudited")
public @ResponseBody List<Ly_applyVO> showLyapplyAudited() {
List<Ly_applyVO> ly_applyVOs = ly_applyService.findByState(2);
List<Ly_applyVO> ly_applyVOs2 = ly_applyService.findByState(3);
List<Ly_applyVO> ly_applyVOs3 = new ArrayList<Ly_applyVO>();
for (Ly_applyVO ly_applyVO : ly_applyVOs) {
ly_applyVOs3.add(ly_applyVO);
}
for (Ly_applyVO ly_applyVO : ly_applyVOs2) {
ly_applyVOs3.add(ly_applyVO);
}
return ly_applyVOs3;
}
/**
* 查询出所有的已经被审核的归还申请
*
* @return
*/
@RequestMapping("/showGhapplyAudited")
public @ResponseBody List<Gh_applyVO> showGhapplyAudited() {
List<Gh_applyVO> gh_applyVOs = gh_applyService.findByState(2);
List<Gh_applyVO> gh_applyVOs2 = gh_applyService.findByState(3);
List<Gh_applyVO> gh_applyVOs3 = new ArrayList<Gh_applyVO>();
for (Gh_applyVO gh_applyVO : gh_applyVOs) {
gh_applyVOs3.add(gh_applyVO);
}
for (Gh_applyVO gh_applyVO : gh_applyVOs2) {
gh_applyVOs3.add(gh_applyVO);
}
return gh_applyVOs3;
}
/**
* 资产审核通过
*
* @param iid
* @param inumber
* @return
*/
@RequestMapping("/lyProperty")
public @ResponseBody String lyProperty(Integer iid, Integer inumber) {
boolean flag = propertyservice.updateNumber(iid, 0 - inumber);
String result = null;
if (flag) {
result = "领用成功!";
} else {
result = "领用失败!";
}
return result;
}
/**
* 资产归还审核通过
*
* @param iid
* @param inumber
* @return
*/
@RequestMapping("/ghProperty")
public @ResponseBody String ghProperty(Integer iid, Integer inumber) {
boolean flag = propertyservice.updateNumber(iid, inumber);
String result = null;
if (flag) {
result = "领用成功!";
} else {
result = "领用失败!";
}
return result;
}
}
| [
"Administrator@169.254.201.147"
] | Administrator@169.254.201.147 |
b3e46630a82b350f22f63453d224eac7c3afa7e7 | f1e386447d6a9ab018f47d7a93842da2cc9d8a4d | /src/main/java/com/mjoker73/demo/annotation/WrappedParameter.java | 43153048036c6d37e79149df3d207e8bb8e0e334 | [] | no_license | jackgo73/demo-annotation | 24604c3ab8404b06b8f0b7da4f2d82cb103a8bd2 | 1aeda8a3f9badc5234247c9fe8ea0ec854a86d25 | refs/heads/master | 2022-12-26T22:08:57.390519 | 2020-04-01T08:21:05 | 2020-04-01T08:21:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 710 | java | package com.mjoker73.demo.annotation;
import com.mjoker73.demo.validators.IParameterValidator;
public class WrappedParameter {
private ParameterA parameterA;
private ParameterB parameterB;
public WrappedParameter(ParameterA parameterA) {
this.parameterA = parameterA;
}
public WrappedParameter(ParameterB parameterB) {
this.parameterB = parameterB;
}
public ParameterA getParameterA() {
return parameterA;
}
public ParameterB getParameterB() {
return parameterB;
}
public Class<? extends IParameterValidator>[] validateWith() {
return parameterA != null ? parameterA.validateWith() : parameterB.validateWith();
}
}
| [
"jackgo73@outlook.com"
] | jackgo73@outlook.com |
41455d7e815b7f0144095b7da5c3c2be27ee90a2 | 41aaf4b060f12e16f82e4b9be10d66d73147551a | /hw01/WelcomeClass.java | 2623226e06ce0be245ebe225e366499eba668d63 | [] | no_license | WaddleDeee/CSE2 | 3e103bc750f19dcf268c642c2f05c7c839b4b435 | e6b5166d2e6997280ec6cf66604eabbef3187daa | refs/heads/master | 2020-08-04T11:04:34.980613 | 2014-10-01T01:03:37 | 2014-10-01T01:03:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 914 | java | //////////////////////////////////////////////////////////
//Daniel Korab
//Homework 1
//
// compile the program
// javac WelcomeClass.java
// run the program
// java WelcomeClass
//
// define a class
public class WelcomeClass {
// add main method
public static void main(String[ ] args) {
// print the message below
// to print "\" you must type"\\" or else java will treat it as an escape sequence
System.out.println(" -----------");
System.out.println(" | WELCOME |");
System.out.println(" -----------");
System.out.println(" ^ ^ ^ ^ ^ ^");
System.out.println(" / \\/ \\/ \\/ \\/ \\/ \\");
System.out.println("|-D--A--K--3--1--8-|");
System.out.println(" \\ /\\ /\\ /\\ /\\ /\\ /");
System.out.println(" v v v v v v");
System.out.println("This summer I worked at my parent's deli as a cashier and store clerk.");
System.out.println("test");
}
}
| [
"waddledeee@gmail.com"
] | waddledeee@gmail.com |
a2f69d78130d8bf80c7ecfc096b8039fee29263d | 1e276a24233ad3c9f605bec3db98d7d8404f23c1 | /backend/src/main/java/com/devsuperior/dslearnbds/entities/Resource.java | 7af16cb7fe790a69467092dc3d4b2da2090f9be4 | [] | no_license | wjdsantos/bds-dslearn | 0e2f5c172256aab63e1daf48abef4bf544ba14d3 | d5fc69eb46d4ef6a47634ba487dd4d60dd72424f | refs/heads/main | 2023-03-20T02:09:34.494698 | 2021-03-17T13:47:58 | 2021-03-17T13:47:58 | 347,155,939 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,649 | java | package com.devsuperior.dslearnbds.entities;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.devsuperior.dslearnbds.entities.enums.ResourceType;
@Entity
@Table(name = "tb_resource")
public class Resource implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String title;
private String description;
private Integer position;
private String imgUri;
private ResourceType type;
@ManyToOne
@JoinColumn(name = "offer_id")
private Offer offer;
@OneToMany(mappedBy = "resource")
private List<Section> sections = new ArrayList<>();
public Resource() {
}
public Resource(Long id, String title, String description, Integer position, String imgUri, ResourceType type,
Offer offer) {
super();
this.id = id;
this.title = title;
this.description = description;
this.position = position;
this.imgUri = imgUri;
this.type = type;
this.offer = offer;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Integer getPosition() {
return position;
}
public void setPosition(Integer position) {
this.position = position;
}
public String getImgUri() {
return imgUri;
}
public void setImgUri(String imgUri) {
this.imgUri = imgUri;
}
public ResourceType getType() {
return type;
}
public void setType(ResourceType type) {
this.type = type;
}
public Offer getOffer() {
return offer;
}
public void setOffer(Offer offer) {
this.offer = offer;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Resource other = (Resource) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}
| [
"walter4asantos@gmail.com"
] | walter4asantos@gmail.com |
d139194a42c64534fa85ee966c23d684e65251ff | fa3d4f600f99323775788713c6cbd20faa785fe4 | /simulator/src/main/java/msp/simulator/groundStation/package-info.java | e6c2bb92c5ab9f9b51323262cba6fee13851bb98 | [] | no_license | JmcRobbie/FS_numerical-simulation | 95c9e21211dd96a9bba7c0c8e595cba3ebb502d6 | 7ca0bbd041c721a1da8de376f45fe0229db7e8fa | refs/heads/master | 2020-08-01T03:37:47.120859 | 2019-09-25T13:04:10 | 2019-09-25T13:04:10 | 210,843,819 | 1 | 0 | null | 2019-09-25T13:04:11 | 2019-09-25T12:49:45 | null | UTF-8 | Java | false | false | 774 | java | /* Copyright 20017-2018 Melbourne Space Program
* 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.
*/
/**
* This package simulate the Ground Station in the overall system.
*
* @author Florian CHAUBEYRE <chaubeyre.f@gmail.com>
*/
package msp.simulator.groundStation; | [
"chaubeyre.f@gmail.com"
] | chaubeyre.f@gmail.com |
669c73f0dd49cb507de661ddd2f2ff54b266740f | 4e4b62415ccf5c99b939364c4e1365d0f91895b2 | /androidcat/src/main/java/com/androidcat/catlibs/flyco/animation/BounceEnter/BounceLeftEnter.java | 965555a99516d8debc7c5bf2aebe187f1ca26fb5 | [] | no_license | androidneko/DeviceCollector | 7503fced9158eaa33d18b8d1bc661a94747f13b6 | d7fb25721a2baf9e49e0f54bd47ec345a2b6d825 | refs/heads/main | 2023-07-15T04:51:56.180324 | 2021-08-25T11:15:59 | 2021-08-25T11:15:59 | 399,787,780 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 629 | java | package com.androidcat.catlibs.flyco.animation.BounceEnter;
import android.animation.ObjectAnimator;
import android.util.DisplayMetrics;
import android.view.View;
import com.androidcat.catlibs.flyco.animation.BaseAnimatorSet;
public class BounceLeftEnter extends BaseAnimatorSet {
public BounceLeftEnter() {
duration = 1000;
}
@Override
public void setAnimation(View view) {
DisplayMetrics dm = view.getContext().getResources().getDisplayMetrics();
animatorSet.playTogether(ObjectAnimator.ofFloat(view, "alpha", 0, 1, 1, 1),//
ObjectAnimator.ofFloat(view, "translationX", -250 * dm.density, 30, -10, 0));
}
}
| [
"androidcat@126.com"
] | androidcat@126.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.