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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ce233beaa910ed73bf5842673bc71eb8ccaa8450 | 2a6dc20826d961ef28dc94d3320fb0a15a505a3d | /src/main/java/com/riadh/samples/MyCustomIOException.java | 94e31dba7b8d5f077c40272db75b1960138ea375 | [] | no_license | riadh-mnasri/unit-testing-demo | 10e50f2d7b611cfff00717cb117bc2ef2d361ebe | 6ab23285bfbdf2f14d662e59ff705f4a47527af1 | refs/heads/master | 2021-01-02T08:47:28.780055 | 2013-05-14T15:12:19 | 2013-05-14T15:12:19 | 10,040,516 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 647 | java | package com.riadh.samples;
/**
* @author Riadh MNASRI
*
*/
public class MyCustomIOException extends Exception {
private static final long serialVersionUID = 1L;
public MyCustomIOException() {
}
/**
* @param message
*/
public MyCustomIOException(String message) {
super(message);
}
/**
* @param cause
*/
public MyCustomIOException(Throwable cause) {
super(cause);
}
/**
* @param message
* @param cause
*/
public MyCustomIOException(String message, Throwable cause) {
super(message, cause);
}
}
| [
"riadh.mnasri@yahoo.fr"
] | riadh.mnasri@yahoo.fr |
d7d6ffcb63daba10c80dab41659c6c3a4d4df87c | 6bd982b493c692c537e6ea6e041d9c16eed11a8e | /Forelesning02/PlayingWithIntents/app/src/main/java/no/hiof/larseknu/playingwithintents/MainActivity.java | 94c3f6fe145db76d391ec8a0db1f4e160b1ddda3 | [] | no_license | larseknu/android_programmering_h2017 | 38f0cfec2c15a17e5390b5b1af3a412cfc113f44 | 4131a3331bb74233ef6f9ec004fb6d09398b59e5 | refs/heads/master | 2021-01-19T15:17:21.025024 | 2017-10-26T06:38:12 | 2017-10-26T06:38:12 | 100,956,501 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 2,216 | java | package no.hiof.larseknu.playingwithintents;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
public class MainActivity extends Activity {
private int counter = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void startOtherActivity(View view) {
// Call OtherActivity with an explicit intent
Intent intent = new Intent(this, OtherActivity.class);
startActivity(intent);
}
public void implicitlyStartOtherActivity(View view) {
// Call OtherActivity with an implicit intent
Intent intent = new Intent("no.hiof.larseknu.playingwithintents.action.OTHER_ACTIVITY");
startActivity(intent);
}
public void showTime(View view) {
// Show date with an implicit intent
Intent intent = new Intent("no.hiof.larseknu.playingwithintents.action.SHOW_TIME");
// Sets a flag that the opened activity should be deleted from the history stack when the user navigates away from it
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
startActivity(intent);
}
public void showDate(View view) {
// Show time with an implicit intent
Intent intent = new Intent("no.hiof.larseknu.playingwithintents.action.SHOW_DATE");
startActivity(intent);
}
public void openWebsite(View view) {
// Create an intent that we want to view something
Intent intent = new Intent("android.intent.action.VIEW");
// This is what we want to view
Uri uri = Uri.parse("http://www.hiof.no");
intent.setData(uri);
startActivity(intent);
}
public void runServiceJob(View view) {
// We want to send a different number to the service each time
counter++;
// We want to produce Android clones... or kittens
String product = "Android clones";
if (counter % 2 == 0)
product = "Kittens";
// Start our service
MyIntentService.startActionProduce(this, product, counter);
}
} | [
"larsemil87@gmail.com"
] | larsemil87@gmail.com |
25498f239d1ca54df49011e77cbaacc7f973d9c3 | 7410044d3fb74321e40979fcb60363cd2eda340e | /springaop/src/main/java/com/neuedu/ttc/bean/Dept.java | c258b5a75852c06726cc5624df1564bfa11d864b | [] | no_license | a981899115/repo2 | 68188ce420af8a23b66c64d19f46c93cccaeb5c4 | 078cf72099c81232dc77a68234f9294404de618c | refs/heads/master | 2022-12-26T14:32:00.319427 | 2019-12-09T07:47:16 | 2019-12-09T07:47:16 | 226,813,761 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 448 | java | package com.neuedu.ttc.bean;
public class Dept {
private int deptno;
private String dname;
private String loc;
public int getDeptno() {
return deptno;
}
public void setDeptno(int deptno) {
this.deptno = deptno;
}
public String getDname() {
return dname;
}
public void setDname(String dname) {
this.dname = dname;
}
public String getLoc() {
return loc;
}
public void setLoc(String loc) {
this.loc = loc;
}
}
| [
"981899115@qq.com"
] | 981899115@qq.com |
108d955c0544d373716d67c3ffd791ca499e0c12 | 4ef1b972593f699a71e4eca7ee1010aa231f52cc | /app/src/main/java/com/hotniao/video/model/bean/HnLiveNoticeBean.java | 93ddd84a6844bfa4013c762ce0f5985b6a4f8973 | [] | no_license | LoooooG/youyou | e2e8fb0f576a6e2daf614d1186303ec7ce7bdf4a | 5bff0de57159ab3dda075343b83ff4a461df66e2 | refs/heads/master | 2020-12-03T12:52:00.462951 | 2020-02-17T10:29:59 | 2020-02-17T10:29:59 | 231,321,844 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,351 | java | package com.hotniao.video.model.bean;
import java.util.List;
/**
* Copyright (C) 2017,深圳市红鸟网络科技股份有限公司 All rights reserved.
* 项目名称:youbo
* 类描述:开播设置用户列表数据
* 创建人:mj
* 创建时间:2017/9/7 18:04
* 修改人:
* 修改时间:
* 修改备注:
* Version: 1.0.0
*/
public class HnLiveNoticeBean {
/**
* follows : {"items":[{"anchor_level":"0","is_remind":"Y","user_avatar":"http://static.greenlive.1booker.com//upload/image/20171017/1508229933469682.png","user_id":"9","user_intro":"卡拉卡拉吧","user_level":"0","user_nickname":"天行哈哈"}],"next":2,"page":1,"pagesize":1,"pagetotal":2,"prev":1,"total":2}
* remind_total : 2
*/
private FollowsBean follows;
private String remind_total;
private String is_remind;// 全部提醒设置,Y:开启,N:关闭
public String getIs_remind() {
return is_remind;
}
public void setIs_remind(String is_remind) {
this.is_remind = is_remind;
}
public FollowsBean getFollows() {
return follows;
}
public void setFollows(FollowsBean follows) {
this.follows = follows;
}
public String getRemind_total() {
return remind_total;
}
public void setRemind_total(String remind_total) {
this.remind_total = remind_total;
}
public static class FollowsBean {
/**
* items : [{"anchor_level":"0","is_remind":"Y","user_avatar":"http://static.greenlive.1booker.com//upload/image/20171017/1508229933469682.png","user_id":"9","user_intro":"卡拉卡拉吧","user_level":"0","user_nickname":"天行哈哈"}]
* next : 2
* page : 1
* pagesize : 1
* pagetotal : 2
* prev : 1
* total : 2
*/
private int next;
private int page;
private int pagesize;
private int pagetotal;
private int prev;
private int total;
private List<ItemsBean> items;
public int getNext() {
return next;
}
public void setNext(int next) {
this.next = next;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getPagesize() {
return pagesize;
}
public void setPagesize(int pagesize) {
this.pagesize = pagesize;
}
public int getPagetotal() {
return pagetotal;
}
public void setPagetotal(int pagetotal) {
this.pagetotal = pagetotal;
}
public int getPrev() {
return prev;
}
public void setPrev(int prev) {
this.prev = prev;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public List<ItemsBean> getItems() {
return items;
}
public void setItems(List<ItemsBean> items) {
this.items = items;
}
public static class ItemsBean {
/**
* anchor_level : 0
* is_remind : Y
* user_avatar : http://static.greenlive.1booker.com//upload/image/20171017/1508229933469682.png
* user_id : 9
* user_intro : 卡拉卡拉吧
* user_level : 0
* user_nickname : 天行哈哈
*/
private String anchor_level;
private String is_remind;
private String user_avatar;
private String user_id;
private String user_intro;
private String user_level;
private String user_nickname;
public String getAnchor_level() {
return anchor_level;
}
public void setAnchor_level(String anchor_level) {
this.anchor_level = anchor_level;
}
public String getIs_remind() {
return is_remind;
}
public void setIs_remind(String is_remind) {
this.is_remind = is_remind;
}
public String getUser_avatar() {
return user_avatar;
}
public void setUser_avatar(String user_avatar) {
this.user_avatar = user_avatar;
}
public String getUser_id() {
return user_id;
}
public void setUser_id(String user_id) {
this.user_id = user_id;
}
public String getUser_intro() {
return user_intro;
}
public void setUser_intro(String user_intro) {
this.user_intro = user_intro;
}
public String getUser_level() {
return user_level;
}
public void setUser_level(String user_level) {
this.user_level = user_level;
}
public String getUser_nickname() {
return user_nickname;
}
public void setUser_nickname(String user_nickname) {
this.user_nickname = user_nickname;
}
}
}
}
| [
"53099003@qq.com"
] | 53099003@qq.com |
3a23e56937b465adbc8ec1f089a1190deda000f4 | b9e1f1cbd070e910488db9851f5f787c648c88d6 | /cometride-server/src/main/java/utdallas/ridetrackers/server/datatypes/TimeRange.java | 9396bab0e05f862708d50a4cd0c55c2b296e7b82 | [] | no_license | mLautz/cometride | c7a98d69ca298081ca98039abd5cafb956f0a56e | 9e52d1115ac26545e6727864c9f8e0f8f8c5c2ea | refs/heads/master | 2020-04-16T11:32:01.706890 | 2015-04-29T11:06:31 | 2015-04-29T11:06:31 | 32,052,753 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 608 | java | package utdallas.ridetrackers.server.datatypes;
import org.omg.CORBA.TRANSACTION_MODE;
/**
* Created by matt lautz on 4/9/2015.
*/
public class TimeRange {
private String start;
private String end;
public TimeRange() {}
public TimeRange(String start, String end) {
this.start = start;
this.end = end;
}
public String getStart() {
return start;
}
public void setStart(String start) {
this.start = start;
}
public String getEnd() {
return end;
}
public void setEnd(String end) {
this.end = end;
}
}
| [
"lautz8920@gmail.com"
] | lautz8920@gmail.com |
49c5f8b10dc8e1be12e4c9dae40da319d6615dab | 35016cb55dcbebef7393c8751ec3d2c9b260d5f6 | /TRSoa-master/TRSoa-master/TRSoa/target/generated-sources/archetype/src/main/resources/archetype-resources/src/main/java/dao/ProjectDAO.java | 1887aa55d5d72c3c68151b12117a832c70e11627 | [] | no_license | chaosssliu/practice | 6a5f13448d113260b9b08c42e132a4a3808c043d | da091688dfeb125fed06e031195ab76d9707e54e | refs/heads/master | 2022-06-24T14:20:38.213285 | 2022-06-10T21:40:50 | 2022-06-10T21:40:50 | 96,723,079 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 391 | java | #set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.dao;
import ${package}.entity.Project;
import ${package}.vo.ProjectVO;
import java.util.List;
/**
* Created by Dawei on 9/1/16.
*/
public interface ProjectDAO {
Project saveProject(Project project);
List<Project> getProject();
List<ProjectVO> getProjectNameList();
}
| [
"liushashiwr@gmail.com"
] | liushashiwr@gmail.com |
5e7396358ff54ceea9354a0335c03d707932c9df | 66308199f3e6025b2e54b2efe4b40420534f3a66 | /Slackpad.java | ef02a21c5c34f71dea61d32c39decb886bbccef0 | [] | no_license | mattss/slackerpad | 9117e8787dae3eab6f887f874515d9e7493c2d7e | d82db2cd72922d8effdd225da076090f52108dd6 | refs/heads/master | 2020-12-06T07:41:59.219377 | 2016-09-07T15:07:57 | 2016-09-07T15:07:57 | 67,614,777 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,684 | java | /* Matthew Sital-Singh
ms1473
COMS12100 Assignment: Scene
*/
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.filechooser.*;
/** Slackpad.java
Slackpad is a work-avoidance tool which simulates
a normal text editor.
However, when in 'Slacker mode', the program
will respond to keystrokes by printing out the contents
of the file last 'opened'.
**/
public class Slackpad extends JFrame {
/** Main constructor
Draws GUI components to the frame
and makes it visible
*/
public Slackpad() {
note = this;
Container panel = getContentPane();
GridBagLayout gbl = new GridBagLayout();
panel.setLayout(gbl);
GridBagConstraints gbc = new GridBagConstraints();
gbc.weightx = 1.0;
gbc.weighty = 1.0;
gbc.gridx = 0;
gbc.gridy = 1;
gbc.gridwidth = 1;
gbc.fill = GridBagConstraints.BOTH;
panel.add(scrollview, gbc);
ImageIcon icon = getMyImage("slack.gif");
setIconImage(icon.getImage());
setSize(800, 600);
setTitle("Slackpad");
addWindowListener(new CloseWindow());
setJMenuBar(mainBar);
mainBar.setLayout(new BorderLayout());
mainBar.add(menuBar, BorderLayout.NORTH);
menuBar.add(fileMenu);
fileMenu.setMnemonic('F');
fileMenu.add(newMenuItem);
fileMenu.add(openMenuItem);
fileMenu.add(exitMenuItem);
menuBar.add(toolsMenu);
toolsMenu.setMnemonic('T');
toolsMenu.add(modeCheckBox);
toolsMenu.add(setTitleMenuItem);
toolsMenu.add(skipMenuItem);
menuBar.add(helpMenu);
helpMenu.setMnemonic('H');
helpMenu.add(aboutMenuItem);
helpMenu.add(readmeMenuItem);
Ears menuEars = new Ears();
String[] tmp = lib.getNames();
for (int i=0; i < tmp.length; i++) {
StoryMenuItem smi = new StoryMenuItem(tmp[i]);
smi.addActionListener(menuEars);
storyMenuItem.add(smi);
}
toolsMenu.add(storyMenuItem);
newButton = new JButton(getMyImage("new.gif"));
openButton = new JButton(getMyImage("open.gif"));
newButton.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
mainBar.add(buttonBar, BorderLayout.SOUTH);
buttonBar.add(newButton);
openButton.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
buttonBar.add(openButton);
newMenuItem.addActionListener(menuEars);
openMenuItem.addActionListener(menuEars);
exitMenuItem.addActionListener(menuEars);
modeCheckBox.addActionListener(menuEars);
setTitleMenuItem.addActionListener(menuEars);
skipMenuItem.addActionListener(menuEars);
aboutMenuItem.addActionListener(menuEars);
readmeMenuItem.addActionListener(menuEars);
newButton.addActionListener(menuEars);
openButton.addActionListener(menuEars);
contents.setText(lib.getReadme());
setVisible(true);
}
/** Connects the 'source' buffer to a file
specified by the string
@param filename the file to 'open'
*/
private boolean getFile(String filename) {
try {
FileReader fr = new FileReader(filename);
source = new BufferedReader(fr);
cFilename = filename;
usingFile = true;
} catch (Exception e) {
//e.printStackTrace();
errorMessage("Could not open file \'" + filename + "\'");
return false;
}
return true;
}
/** Connects the 'source' buffer to a predefined
String contained in the Slackwords class
@param story name of the 'story' to find
*/
private void getStoryString(String story) {
StringReader sr = new StringReader(lib.getStory(story));
source = new BufferedReader(sr);
cStory = story;
usingFile = false;
}
/** 'Reloads' the current contents - effectively
pointing the source to the beginning of the buffer
*/
private void reloadPage() {
if (usingFile) getFile(cFilename);
else getStoryString(cStory);
}
/** Gets an image
@param location where to find the image
*/
private ImageIcon getMyImage(String loc) {
return new ImageIcon(note.getClass().getResource(loc));
//return new ImageIcon(loc);
}
/** Shows an error message dialog
@param message error to display
*/
private void errorMessage(String message) {
infoMessage("Error", message);
}
/** Shows an information dialog
@param title the title of the dialog
@param message the message to display
*/
private void infoMessage(String title, String message) {
JOptionPane.showMessageDialog(note, message, title,
JOptionPane.INFORMATION_MESSAGE);
}
/** SlackpadTextArea class which overrides
the 'processKeyEvent' method of JTextArea
so that keypresses can be captured and
dealt with
*/
private class SlackpadTextArea extends JTextArea {
public SlackpadTextArea(int width, int height) {
super(width, height);
}
protected void processKeyEvent(KeyEvent key) {
if (editing) {
super.processKeyEvent(key);
}
else {
if (key.getID() == KeyEvent.KEY_TYPED) {
setCaretPosition(getText().length());
try {
char tmp = (char)source.read();
append("" + tmp);
} catch (Exception e) {
//e.printStackTrace();
}
}
}
}
}
/**
Main action listener to capture events from the buttons
and carry out the appropriate action
*/
private class Ears implements ActionListener {
public void actionPerformed(ActionEvent e) {
Object clicked = e.getSource();
if (clicked == exitMenuItem) {
System.exit(0);
}
else if (clicked == modeCheckBox) {
editing = !modeCheckBox.isSelected();
}
else if (clicked == newMenuItem ||
clicked == newButton) {
contents.setText("");
reloadPage();
}
else if (clicked == openMenuItem ||
clicked == openButton) {
JFileChooser chooser = new JFileChooser();
chooser.addChoosableFileFilter(new TextFilter());
int returnVal = chooser.showOpenDialog(note);
if(returnVal == JFileChooser.APPROVE_OPTION) {
getFile(chooser.getSelectedFile().getPath());
}
}
else if (clicked == setTitleMenuItem) {
String inputValue =
JOptionPane.showInputDialog((JFrame)note,
"Set title",
"Document 1 - Microsoft Word",
JOptionPane.INFORMATION_MESSAGE);
if (inputValue != null)
note.setTitle(inputValue);
}
else if (clicked == skipMenuItem) {
boolean isInt = false;
int lines = 0;
String inputValue =
JOptionPane.showInputDialog((JFrame)note,
"Skip n lines (max 1000)",
"10",
JOptionPane.INFORMATION_MESSAGE);
try {
lines = Integer.parseInt(inputValue);
isInt = true;
} catch (Exception ie) {
isInt = false;
errorMessage("Invalid number of lines");
}
if (isInt) {
String tmp = "";
try {
if (lines <= 1000) {
for (int i=0; i<lines; i++) {
if ((tmp = source.readLine()) != null)
contents.append(tmp + "\n");
}
}
else {
errorMessage("Invalid number of lines");
}
} catch (Exception re) {
// Do nothing
}
}
}
else if (clicked instanceof StoryMenuItem) {
getStoryString(((StoryMenuItem)clicked).getText());
}
else if (clicked == aboutMenuItem) {
infoMessage("About",
"Slackpad 2003 (v1.0)\n\n"
+ "A program by Matthew Sital-Singh");
}
else if (clicked == readmeMenuItem) {
contents.setText(lib.getReadme());
}
}
}
/** Custom FileFilter to show only .txt files
*/
private class TextFilter extends javax.swing.filechooser.FileFilter {
public boolean accept(File f) {
if (f.isDirectory()) {
return true;
}
String extension = null;
String s = f.getName();
int i = s.lastIndexOf('.');
if (i > 0 && i < s.length() - 1) {
extension = s.substring(i+1).toLowerCase();
}
if (extension != null) {
if (extension.equals("txt")) {
return true;
} else {
return false;
}
}
return false;
}
public String getDescription() {
return "Text files (*.txt)";
}
}
/** Extra class to differentiate the Story menu items
from normal menu items
*/
private class StoryMenuItem extends JMenuItem {
public StoryMenuItem(String name) {
super(name);
}
}
/**
Causes the program to exit when the main
window is closed
*/
private class CloseWindow extends WindowAdapter {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
/** Main method
Creates a new instance of Slackpad
*/
public static void main(String[] args) {
Slackpad np = new Slackpad();
}
/** The slackpad */
private Slackpad note;
/** Library */
private Slackwords lib = new Slackwords();
/** The menu bar */
private JMenuBar mainBar = new JMenuBar();
private JMenuBar menuBar = new JMenuBar();
private JMenuBar buttonBar = new JMenuBar();
private JMenu fileMenu = new JMenu("File");
private JMenuItem newMenuItem = new JMenuItem("New...");
private JMenuItem openMenuItem = new JMenuItem("Open...");
private JMenuItem exitMenuItem = new JMenuItem("Exit");
private JMenu toolsMenu = new JMenu("Tools");
private JCheckBoxMenuItem modeCheckBox = new JCheckBoxMenuItem("Slacker mode");
private JMenuItem setTitleMenuItem = new JMenuItem("Set title...");
private JMenuItem skipMenuItem = new JMenuItem("Skip lines...");
private JMenu storyMenuItem = new JMenu("Load auto-text");
private JMenu helpMenu = new JMenu("Help");
private JMenuItem aboutMenuItem = new JMenuItem("About...");
private JMenuItem readmeMenuItem = new JMenuItem("View readme");
/** The buttons */
private JButton newButton;
private JButton openButton;
/** Text area and scrollpane */
private SlackpadTextArea contents = new SlackpadTextArea(800, 1000);
private JScrollPane scrollview = new JScrollPane (contents);
/** File IO stuff */
private BufferedReader source;
/** Mode */
private boolean editing = true;
private boolean usingFile = false;
private String cFilename;
private String cStory;
}
| [
"mattss@netsight.co.uk"
] | mattss@netsight.co.uk |
516a481c2b081af61a8f6eabc0bf99b75a4efef5 | 992f90e5dac36f9b08ade49db8b1f465a337c337 | /springboot-caffeine/src/main/java/org/dante/springboot/SpringbootCaffeineApplication.java | a9262167d6c42771d72d3b72027e795604a17574 | [] | no_license | dante7qx/springboot | 03d0b9089d96aa967a21f20b46a368027549cc83 | a1ba1b05bbc7e7c495729d2aa803cd537e6037b0 | refs/heads/master | 2023-08-16T15:57:22.602187 | 2023-03-24T06:59:50 | 2023-03-24T06:59:50 | 92,372,653 | 2 | 2 | null | 2023-07-12T14:11:46 | 2017-05-25T06:30:47 | JavaScript | UTF-8 | Java | false | false | 410 | java | package org.dante.springboot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
@EnableCaching
@SpringBootApplication
public class SpringbootCaffeineApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootCaffeineApplication.class, args);
}
}
| [
"sunchao.0129@163.comm"
] | sunchao.0129@163.comm |
cb24dfa1b4210389810d05234e4817c3d99c6ab4 | a747308a571b7111083dcac51b7cbb4c9de1c89e | /regular-expression-engine/src/main/java/domain/SymbolTransition.java | 92f3b28d0988009048ce06660367d9cc3460c094 | [
"MIT"
] | permissive | strajama/regular-expression-engine | b4410890082afbd8865b912205241b00abe2d2e0 | d4cccfa41ff18c82438f1d2cabd99c65f5574a0b | refs/heads/master | 2020-04-29T04:23:29.867410 | 2019-05-05T11:38:47 | 2019-05-05T11:38:47 | 175,845,684 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,341 | java | package domain;
/**
* SymbolTransition implements Transition-interface
*
* @author strajama
*/
public class SymbolTransition implements Transition {
private State from;
private State to;
private char symbol;
/**
* Creates new SymbolTransition
*
* @param from - state where the transition begins
* @param to - state where transition ends
* @param symbol - symbol that is needed for using transition
*/
public SymbolTransition(State from, State to, char symbol) {
this.from = from;
this.to = to;
this.symbol = symbol;
}
/**
* Gives the information about transitions beginning state
*
* @return - state where the transition begins
*/
public State getFrom() {
return from;
}
/**
* Gives the information about the transitions end state
*
* @return - state where the transition ends
*/
public State getTo() {
return to;
}
/**
* Gives the information which symbol that is needed for using transition
*
* @return symbol-character
*/
public char getSymbol() {
return symbol;
}
/**
* Gives the information if state is symbol transition
*
* @return true
*/
public boolean hasSymbol() {
return true;
}
}
| [
"strajama@gmail.com"
] | strajama@gmail.com |
8c5e7abf6b4b88f30de3546eade322633d028eb7 | 4041fdf47e68750ca3e102ad2012fba9aca0a0f2 | /src/main/java/API_testing/json_parsing.java | 7e4c45582e157abf6b91eb561759e8f7c7429776 | [] | no_license | lokesh0138/API | e76620edeb975444547e07854037e253dc2d0762 | a1c32dd65113cff888bd334be35c71bdbc91efc5 | refs/heads/master | 2023-07-09T08:21:22.071986 | 2021-08-13T09:32:20 | 2021-08-13T09:32:20 | 395,593,709 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,161 | java | package API_testing;
import static org.testng.Assert.assertEquals;
import org.testng.Assert;
import org.testng.annotations.AfterTest;
import org.testng.annotations.Test;
import io.restassured.path.json.JsonPath;
public class json_parsing {
// Print No of courses returned by API
static JsonPath js=new JsonPath(add_palce.sumvalidate());
@Test(priority=1)
public void coursecount()
{
//JsonPath js=new JsonPath(add_palce.sumvalidate());
int count=js.getInt("courses.size()");
System.out.println(count);
}
//Print Purchase Amount
@Test(priority=2)
public void purchaseamount()
{
//JsonPath js=new JsonPath(add_palce.sumvalidate());
int purchaseamount=js.getInt("dashboard.purchaseAmount");
System.out.println(purchaseamount);
}
//Print Title of the first course
@Test(priority=3)
public void firsttitle()
{
System.out.println(js.get("courses[0].title").toString());
//JsonPath js=new JsonPath(add_palce.sumvalidate());
}
//Print All course titles and their respective Prices
@Test(priority=4)
public void allcourse_tile()
{
//int count=json_parsing.coursecount();
//json_parsing jp=new json_parsing();
//int count=jp.coursecount();
int count=js.getInt("courses.size()");
for(int i=0;i<count;i++)
{
System.out.println(js.get("courses["+i+"].title"));
System.out.println(js.getInt("courses["+i+"].price"));
}
}
//Print no of copies sold by RPA Course
@Test(priority=5)
public void RPA_copies()
{
int count=js.getInt("courses.size()");
for(int i=0;i<count;i++)
{
String title=js.get("courses["+i+"].title").toString();
if(title.equalsIgnoreCase("RPA"))
{
int copies=js.getInt("courses["+i+"].copies");
System.out.println(copies);
break;
}
}
}
//SumValidation
@Test(priority=6)
public void sumvalidation()
{
int purchaseamount=js.getInt("dashboard.purchaseAmount");
int sum=0;
int count=js.getInt("courses.size()");
for(int i=0;i<count;i++)
{
int price=js.getInt("courses["+i+"].price");
int copies=js.getInt("courses["+i+"].copies");
int amount=price*copies;
sum=sum+amount;
}
Assert.assertEquals(sum, purchaseamount);
}
}
| [
"lokeshganesan0138@gmail.com"
] | lokeshganesan0138@gmail.com |
51c741ee95f50e135249f84f202e25f6b32f2ae3 | f66e2ad3fc0f8c88278c0997b156f5c6c8f77f28 | /Android/GooglePlay/app/src/main/java/com/mwqi/http/HttpRetry.java | 188e4c032994277340cca2445526fac695989bc7 | [
"Apache-2.0"
] | permissive | flyfire/Programming-Notes-Code | 3b51b45f8760309013c3c0cc748311d33951a044 | 4b1bdd74c1ba0c007c504834e4508ec39f01cd94 | refs/heads/master | 2020-05-07T18:00:49.757509 | 2019-04-10T11:15:13 | 2019-04-10T11:15:13 | 180,750,568 | 1 | 0 | Apache-2.0 | 2019-04-11T08:40:38 | 2019-04-11T08:40:38 | null | UTF-8 | Java | false | false | 2,821 | java | package com.mwqi.http;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.HashSet;
import javax.net.ssl.SSLHandshakeException;
import org.apache.http.NoHttpResponseException;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.HttpRequestRetryHandler;
import org.apache.http.protocol.ExecutionContext;
import org.apache.http.protocol.HttpContext;
import android.os.SystemClock;
public class HttpRetry implements HttpRequestRetryHandler {
// 重试休息的时间
private static final int RETRY_SLEEP_TIME_MILLIS = 1000;
// 网络异常,继续
private static HashSet<Class<?>> exceptionWhitelist = new HashSet<Class<?>>();
// 用户异常,不继续(如,用户中断线程)
private static HashSet<Class<?>> exceptionBlacklist = new HashSet<Class<?>>();
static {
// 以下异常不需要重试,这样异常都是用于造成或者是一些重试也无效的异常
exceptionWhitelist.add(NoHttpResponseException.class);// 连上了服务器但是没有Response
exceptionWhitelist.add(UnknownHostException.class);// host出了问题,一般是由于网络故障
exceptionWhitelist.add(SocketException.class);// Socket问题,一般是由于网络故障
// 以下异常可以重试
exceptionBlacklist.add(InterruptedIOException.class);// 连接中断,一般是由于连接超时引起
exceptionBlacklist.add(SSLHandshakeException.class);// SSL握手失败
}
private final int maxRetries;
public HttpRetry(int maxRetries) {
this.maxRetries = maxRetries;
}
@Override
public boolean retryRequest(IOException exception, int executionCount, HttpContext context) {
boolean retry = true;
// 请求是否到达
Boolean b = (Boolean) context.getAttribute(ExecutionContext.HTTP_REQ_SENT);
boolean sent = (b != null && b.booleanValue());
if (executionCount > maxRetries) {
// 尝试次数超过用户定义的测试
retry = false;
} else if (exceptionBlacklist.contains(exception.getClass())) {
// 线程被用户中断,则不继续尝试
retry = false;
} else if (exceptionWhitelist.contains(exception.getClass())) {
// 出现的异常需要被重试
retry = true;
} else if (!sent) {
// 请求没有到达
retry = true;
}
// 如果需要重试
if (retry) {
// 获取request
HttpUriRequest currentReq = (HttpUriRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);
// POST请求难道就不需要重试?
//retry = currentReq != null && !"POST".equals(currentReq.getMethod());
retry = currentReq != null;
}
if (retry) {
// 休眠1秒钟后再继续尝试
SystemClock.sleep(RETRY_SLEEP_TIME_MILLIS);
} else {
exception.printStackTrace();
}
return retry;
}
} | [
"ztiany3@gmail.com"
] | ztiany3@gmail.com |
2ea17201c46218a0a75d9548241ed8b0243043a4 | 8982c38c298225ad7e29627e11a9b1e08d1cd1a9 | /src/main/java/com/aerothinker/plandb/config/package-info.java | e06e6722086603c3c1260aed8a219dbc2a46a6f8 | [] | no_license | bigjungle/example-multitenancy | 4e49b110e4909d7f5945337f286740df36662cdf | 6c42d8f0832f90e2b8f63c1d4aeeadc6d670ffb1 | refs/heads/master | 2020-04-16T22:30:14.949844 | 2019-03-19T03:40:16 | 2019-03-19T03:40:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 88 | java | /**
* Spring Framework configuration files.
*/
package com.aerothinker.plandb.config;
| [
"ccpitcmp@outlook.com"
] | ccpitcmp@outlook.com |
7c431310f4a6ed09d7262f2d487615abeb8d2726 | a4a17277c6faf61713b46063ce9b4456ac73928a | /app/src/main/java/com/bytedance/xly/util/LogUtil.java | 823b01f9db0363581d7b9fbbb524cddf866010ec | [] | no_license | guoziren/techtrainingcamp-client-5 | 024e784187a46460f483069245420986a7ca78cf | e026bb60397de4973f14872b231acbcdcc352c5d | refs/heads/master | 2022-11-06T01:40:23.038553 | 2020-06-23T12:21:54 | 2020-06-23T12:21:54 | 266,136,606 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,339 | java | package com.bytedance.xly.util;
import android.util.Log;
/*
* 包名: com.blts.himalaya.utils
* 文件名: LogUtil
* 创建时间: 2020/4/7 1:27 PM
*
*/
public class LogUtil {
public static String sTAG = "LogUtil";
//控制是否要输出log
public static boolean sIsRelease = false;
/**
* 如果是要发布了,可以在application里面把这里release一下,这样子就没有log输出了
*/
public static void init(String baseTag, boolean isRelease) {
sTAG = baseTag;
sIsRelease = isRelease;
}
public static void d(String TAG, String content) {
if (!sIsRelease) {
Log.d("[" + sTAG + "]" + TAG, content);
}
}
public static void v(String TAG, String content) {
if (!sIsRelease) {
Log.v("[" + sTAG + "]" + TAG, content);
}
}
public static void i(String TAG, String content) {
if (!sIsRelease) {
Log.i("[" + sTAG + "]" + TAG, content);
}
}
public static void w(String TAG, String content) {
if (!sIsRelease) {
Log.w("[" + sTAG + "]" + TAG, content);
}
}
public static void e(String TAG, String content) {
if (!sIsRelease) {
Log.e("[" + sTAG + "]" + TAG, content);
}
}
}
| [
"234917515@qq.com"
] | 234917515@qq.com |
b643e0fb3a1c0570215ef36089e5f4dc7b3bc358 | c4ff86f81a68084f7c406fdf7c0d1487672f5fa4 | /src/main/java/com/raaldi/banker/repository/CurrencyRepository.java | bb08b1f335b530bdc4aceda5a3fe0d107d678de8 | [] | no_license | RaalDi/banker | a48140b476a763ff7c47e5471f4230f976cd0832 | 7feb1dc42835d88b4c68c830b7fd598c181ae932 | refs/heads/master | 2021-05-04T10:35:35.097041 | 2016-12-24T03:58:46 | 2016-12-24T03:58:46 | 54,799,488 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 304 | java | package com.raaldi.banker.repository;
import com.raaldi.banker.model.Currency;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository("currencyRepository")
public interface CurrencyRepository extends CrudRepository<Currency, Long> {
}
| [
"rafael.alexander.diaz@gmail.com"
] | rafael.alexander.diaz@gmail.com |
de40b7387326663beb2c9e0680057fc83cda6ea9 | eadca070d221e93595f4fde112a73b7439c9a24a | /wiki-src/net/hillsdon/reviki/vc/ChangeNotificationDispatcher.java | 335720a5507e122731b8b74b9bfc80fc22a1701d | [
"Apache-2.0"
] | permissive | CoreFiling/reviki | fcbee0dcb66ad71ab0d3bddf194ab3aa2148fc9f | 37f53c5396bf7720183c7b808d769884c576e858 | refs/heads/master | 2023-03-17T13:12:37.692458 | 2023-03-14T18:00:55 | 2023-03-14T18:00:55 | 17,807,727 | 7 | 7 | null | 2017-04-06T17:10:24 | 2014-03-16T19:53:07 | Java | UTF-8 | Java | false | false | 803 | java | /**
* Copyright 2008 Matthew Hillsdon
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.hillsdon.reviki.vc;
import java.io.IOException;
public interface ChangeNotificationDispatcher {
void sync() throws PageStoreAuthenticationException, PageStoreException, IOException;
}
| [
"matt@hillsdon.net"
] | matt@hillsdon.net |
694caabb0be0dc425374c4374a84eaf90a745c0d | 07cf6b36c2008e94cc07261de389070c97b5b6b3 | /app/src/main/java/id/web/setoelkahfi/top10downloader/MainActivity.java | 7ece391d0fa3b6345aa59b55cade46709cde24f6 | [] | no_license | setoelkahfi/Top-10-Downloader | 0ac9b74a191a32c935aed77af0dfca27de2cfa48 | 740590724cac465752d771901da193a25b7dae3a | refs/heads/master | 2021-01-10T04:16:21.247151 | 2016-01-20T03:07:45 | 2016-01-20T03:07:45 | 50,000,588 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,268 | java | package id.web.setoelkahfi.top10downloader;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class MainActivity extends AppCompatActivity {
private String mFileContents;
private Button buttonParse;
private ListView listApps;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
buttonParse = (Button) findViewById(R.id.buttonParse);
buttonParse.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ParseApplications parseApplications = new ParseApplications(mFileContents);
parseApplications.process();
ArrayAdapter<Application> arrayAdapter = new ArrayAdapter<Application>(
MainActivity.this, R.layout.list_item, parseApplications.getApplications());
listApps.setAdapter(arrayAdapter);
}
});
listApps = (ListView) findViewById(R.id.listApps);
DownloadData downloadData = new DownloadData();
downloadData.execute("http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topfreeapplications/limit=10/xml");
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
private class DownloadData extends AsyncTask<String, Void, String> {
@Override
protected String doInBackground(String... strings) {
mFileContents = downloadXMLFile(strings[0]);
if (mFileContents == null) {
Log.d("DownloadData", "Error downloading data.");
}
return mFileContents;
}
@Override
protected void onPostExecute(String result) {
super.onPostExecute(result);
Log.d("DownloadData","Result was: " + result);
}
private String downloadXMLFile(String urlPath) {
StringBuilder tempBuffer = new StringBuilder();
try {
URL url = new URL(urlPath);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
int response = connection.getResponseCode();
Log.d("DownloadData", "The response code was " + response);
InputStream inputStream = connection.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
int characterRead;
char[] inputBuffer = new char[500];
while (true) {
characterRead = inputStreamReader.read(inputBuffer);
if (characterRead <= 0) break;
tempBuffer.append(String.copyValueOf(inputBuffer, 0, characterRead));
}
return tempBuffer.toString();
} catch (IOException e) {
Log.d("DownloadData", "IO Exception reading data: " + e.getMessage());
} catch (SecurityException e) {
Log.d("DownloadData", "Security exception. Needs permissions? Permission denied " + e.getMessage());
}
return null;
}
}
}
| [
"setoelkahfi@gmail.com"
] | setoelkahfi@gmail.com |
7b4bc412d2816af6d747b0a85a9a3bcaa9450fe3 | e037de4eb12225f77ac3d8d64ef38dd021e61348 | /EntregaSegundoExamen/TstWSProdPojo/build/generated-sources/jax-ws/wsprod/FindAllResponse.java | 0b368ae07c156fd235ef3697f8f26caedf30c571 | [] | no_license | FAltamiranoZ/SistemasDeComercioElectronico | 7a63ad6219cae066fea2c5b8c98628f000daef24 | cd26c5dde33d99ea1b3bbd78560c7088d42bf097 | refs/heads/main | 2023-02-13T13:25:35.758588 | 2021-01-04T00:31:56 | 2021-01-04T00:31:56 | 326,528,240 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,816 | java |
package wsprod;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Clase Java para findAllResponse complex type.
*
* <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
*
* <pre>
* <complexType name="findAllResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="return" type="{http://wsProd/}product" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "findAllResponse", propOrder = {
"_return"
})
public class FindAllResponse {
@XmlElement(name = "return")
protected List<Product> _return;
/**
* Gets the value of the return property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the return property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getReturn().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Product }
*
*
*/
public List<Product> getReturn() {
if (_return == null) {
_return = new ArrayList<Product>();
}
return this._return;
}
}
| [
"francisco.altamiranozevallos@gmail.com"
] | francisco.altamiranozevallos@gmail.com |
d502378a5515faa7f15d241e410881f82224c430 | d48cfe7bb65c3169dea931f605d62b4340222d75 | /chinahrd-hrbi/base/src/main/java/net/chinahrd/module/SysMenuDefine.java | b53da3b4035cb9eae40808ca0ac433b0c0407efa | [] | no_license | a559927z/doc | 7b65aeff1d4606bab1d7f71307d6163b010a226d | 04e812838a5614ed78f8bbfa16a377e7398843fc | refs/heads/master | 2022-12-23T12:09:32.360591 | 2019-07-15T17:52:54 | 2019-07-15T17:52:54 | 195,972,411 | 0 | 0 | null | 2022-12-16T07:47:50 | 2019-07-09T09:02:38 | JavaScript | UTF-8 | Java | false | false | 459 | java | /**
*net.chinahrd.cache
*/
package net.chinahrd.module;
import net.chinahrd.core.menu.MenuRegisterAbstract;
/**
* @author htpeng
*2016年10月11日下午11:52:52
*/
public class SysMenuDefine extends MenuRegisterAbstract{
/* (non-Javadoc)
* @see net.chinahrd.core.menu.MenuRegisterAbstract#getFileInputSteam()
*/
@Override
protected String getXmlPath() {
// TODO Auto-generated method stub
return "menu.xml";
}
}
| [
"a559927z@163.com"
] | a559927z@163.com |
e54759c2bc50338606310b4ecb1261e2eeef25ec | 77fa526a7b4cf490a2ceab66d5eb6831a3750776 | /java/org/apache/tomcat/jni/Time.java | ad19dd1089ac7d6699e40c39b551e0836e81a84f | [
"Apache-2.0",
"LicenseRef-scancode-unknown"
] | permissive | srividyac09/tomcat-native | 5390308a74ebe31be357e18e145100048cce5d0a | 4f52ed907f44b2a400f79f137e3021e7e7f8cad5 | refs/heads/main | 2023-06-27T16:29:53.038445 | 2021-07-23T04:49:38 | 2021-07-23T04:49:38 | 388,088,489 | 0 | 0 | Apache-2.0 | 2021-07-21T11:03:04 | 2021-07-21T11:03:03 | null | UTF-8 | Java | false | false | 2,640 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tomcat.jni;
/** Time
*
* @author Mladen Turk
*
* @deprecated The scope of the APR/Native Library will be reduced in Tomcat
* 10.1.x / Tomcat Native 2.x onwards to only include those
* components required to provide OpenSSL integration with the NIO
* and NIO2 connectors.
*/
@Deprecated
public class Time {
/** number of microseconds per second */
public static final long APR_USEC_PER_SEC = 1000000L;
/** number of milliseconds per microsecond */
public static final long APR_MSEC_PER_USEC = 1000L;
/**
* @param t The time
* @return apr_time_t as a second
*/
public static long sec(long t)
{
return t / APR_USEC_PER_SEC;
}
/**
* @param t The time
* @return apr_time_t as a msec
*/
public static long msec(long t)
{
return t / APR_MSEC_PER_USEC;
}
/**
* number of microseconds since 00:00:00 January 1, 1970 UTC
* @return the current time
*/
public static native long now();
/**
* Formats dates in the RFC822
* format in an efficient manner.
* @param t the time to convert
* @return the formatted date
*/
public static native String rfc822(long t);
/**
* Formats dates in the ctime() format
* in an efficient manner.
* Unlike ANSI/ISO C ctime(), apr_ctime() does not include
* a \n at the end of the string.
* @param t the time to convert
* @return the formatted date
*/
public static native String ctime(long t);
/**
* Sleep for the specified number of micro-seconds.
* <br><b>Warning :</b> May sleep for longer than the specified time.
* @param t desired amount of time to sleep.
*/
public static native void sleep(long t);
}
| [
"markt@apache.org"
] | markt@apache.org |
b4d2ee8f2c40a1cb345a19e7cced5773f71b06dc | 545d1aa7075c423ac22d5057684d444c72d9a8c2 | /codes/1417-Reformat-The-String/Java/main1.java | 75347eb0823816f472e4e3f790ee1f329253eb12 | [] | no_license | Stackingrule/LeetCode-Solutions | da9420953b0e56bb76f026f5c1a4a48cd404641d | 3f7d22dd94eef4e47f3c19c436b00c40891dc03b | refs/heads/main | 2023-08-28T00:43:37.871877 | 2021-10-14T02:55:42 | 2021-10-14T02:55:42 | 207,331,384 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 855 | java | class Solution {
public String reformat(String s) {
List<Character> digits = new ArrayList<>();
List<Character> characters = new ArrayList<>();
for (char c : s.toCharArray()) {
if (Character.isDigit(c)) {
digits.add(c);
} else {
characters.add(c);
}
}
if (Math.abs(digits.size() - characters.size()) >= 2) {
return "";
}
StringBuilder sb = new StringBuilder();
boolean digit = (digits.size() >= characters.size() ? true : false);
for (int i = 0; i < s.length(); i++) {
if (digit) {
sb.append(digits.remove(0));
} else {
sb.append(characters.remove(0));
}
digit = !digit;
}
return sb.toString();
}
} | [
"38368554+Stackingrule@users.noreply.github.com"
] | 38368554+Stackingrule@users.noreply.github.com |
c63cb72fae07344895ba4219b4fdee2942325a4b | 1bf8e0a65acb4159ce24747ef7fec95f9c73a5c9 | /src/main/java/com/ssm/rwsxx/dao/RwsxxDao.java | 792e0c918aff0dcb5ade6679e0881e2ac9fad582 | [] | no_license | sunshuaiqi888/sunshuaiqi_SSM | 12f9b41b1d5ee7d5c0836bfb43868fce27839c0a | 488787fd68eebc1f0c801e5a02610646fc21f92c | refs/heads/master | 2022-11-30T20:25:10.765015 | 2020-08-20T09:37:16 | 2020-08-20T09:37:16 | 285,792,782 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 268 | java | package com.ssm.rwsxx.dao;
import com.ssm.rwsxx.bean.RwsBean;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Created by sunsq on 2020/8/6.
*/
@Repository
public interface RwsxxDao {
List<RwsBean> rwslist() throws Exception;
}
| [
"sunshuaiqi@jsb5.com"
] | sunshuaiqi@jsb5.com |
0ac759fa216e8ed2455dfaf08a12a0fae2fd3f59 | 8f92e60b825c768bfd7d51b08f3383726c57c3b4 | /atcrowdfunding-manager-impl/src/main/java/com/atguigu/atcrowdfunding/manager/service/impl/RoleServiceImpl.java | 6efa3cc5ac5d2b4a68cc1f329bc90ffef5367a25 | [] | no_license | McChakLeung/atcrowdfunding-maven | 2f60aac960ed458c4f26e20e59dbeb883ef64cdc | 3cd909e63de185ae1a8dfe47329b7df1cb5a2c37 | refs/heads/master | 2022-12-22T18:41:35.361797 | 2019-08-28T09:45:05 | 2019-08-28T09:45:05 | 195,016,023 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,369 | java | package com.atguigu.atcrowdfunding.manager.service.impl;
import com.atguigu.atcrowdfunding.bean.Permission;
import com.atguigu.atcrowdfunding.bean.Role;
import com.atguigu.atcrowdfunding.bean.RolePermission;
import com.atguigu.atcrowdfunding.manager.dao.RoleMapper;
import com.atguigu.atcrowdfunding.manager.service.RoleService;
import com.atguigu.atcrowdfunding.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Service
public class RoleServiceImpl implements RoleService {
@Autowired
private RoleMapper roleMapper;
@Override
public Page<Role> queryRoleListByParams(Map<String, Object> params) {
//初始化Page对象
Page<Role> page = new Page((Integer) params.get("pageno"),(Integer)params.get("pagesize"));
//根据初始化Page类对象获得起始行的值
Integer startline = page.getStartline();
//将startline存入到参数集合中
params.put("startline",startline);
//将数据库中查询出来的Role数据查询出来并存放到page对象中,将page对象返回给控制器
List<Role> roleList = roleMapper.queryRoleListByParams(params);
page.setDatalist(roleList);
return page;
}
@Override
public List<Permission> queryPermissionByRoleID(Integer roleId) {
return roleMapper.queryPermissionByRoleID(roleId);
}
@Override
public Integer processAssignPermission(Integer roleId, List<Integer> ids) {
//删除roleId对应的权限
roleMapper.deletePermissionByRoleID(roleId);
//组装RolePermission类,否则无法插入到数据库中
List<RolePermission> rolePermissionList = new ArrayList<>();
for (Integer permissionID: ids) {
RolePermission rolePermission = new RolePermission();
rolePermission.setRoleid(roleId);
rolePermission.setPermissionid(permissionID);
rolePermissionList.add(rolePermission);
}
//保存需要修改的数据到中间表
Integer count = roleMapper.saveRolePermission(rolePermissionList);
return count;
}
@Override
public List queryRoleInfo(Integer id) {
return roleMapper.queryRoleInfo(id);
}
}
| [
"441337516@qq.com"
] | 441337516@qq.com |
4f729b04229401dc43dfc141c693fd29690619a3 | a74087db2120fc58671f6887ac00447882a52ef9 | /app/src/main/java/home/smart/fly/animations/utils/AppUtils.java | 4d98727c6fc27a52a9724f35ab021bd47ad8e101 | [
"Apache-2.0"
] | permissive | silexcorp/AndroidAnimationExercise | 308087657305b80d493722cfa72045718b08b242 | 26c039436ce0c5c7a89782092203c04e5e284db4 | refs/heads/master | 2020-08-26T22:35:09.736013 | 2019-10-23T02:25:34 | 2019-10-23T02:25:34 | 217,169,115 | 1 | 0 | Apache-2.0 | 2019-10-23T23:06:42 | 2019-10-23T23:06:42 | null | UTF-8 | Java | false | false | 3,426 | java | package home.smart.fly.animations.utils;
/**
* @author: zhuyongging
* @since: 2019-02-24
*/
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
public class AppUtils {
/**
* 获取应用程序名称
*/
public static synchronized String getAppName(Context context) {
try {
PackageManager packageManager = context.getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(
context.getPackageName(), 0);
int labelRes = packageInfo.applicationInfo.labelRes;
return context.getResources().getString(labelRes);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* [获取应用程序版本名称信息]
*
* @param context
* @return 当前应用的版本名称
*/
public static synchronized String getVersionName(Context context) {
try {
PackageManager packageManager = context.getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(
context.getPackageName(), 0);
return packageInfo.versionName;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* [获取应用程序版本名称信息]
*
* @param context
* @return 当前应用的版本名称
*/
public static synchronized int getVersionCode(Context context) {
try {
PackageManager packageManager = context.getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(
context.getPackageName(), 0);
return packageInfo.versionCode;
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
/**
* [获取应用程序版本名称信息]
*
* @param context
* @return 当前应用的版本名称
*/
public static synchronized String getPackageName(Context context) {
try {
PackageManager packageManager = context.getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(
context.getPackageName(), 0);
return packageInfo.packageName;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 获取图标 bitmap
*
* @param context
*/
public static synchronized Bitmap getBitmap(Context context) {
PackageManager packageManager = null;
ApplicationInfo applicationInfo = null;
try {
packageManager = context.getApplicationContext()
.getPackageManager();
applicationInfo = packageManager.getApplicationInfo(
context.getPackageName(), 0);
} catch (PackageManager.NameNotFoundException e) {
applicationInfo = null;
}
Drawable d = packageManager.getApplicationIcon(applicationInfo); //xxx根据自己的情况获取drawable
BitmapDrawable bd = (BitmapDrawable) d;
Bitmap bm = bd.getBitmap();
return bm;
}
}
| [
"yingkongshi11@gmail.com"
] | yingkongshi11@gmail.com |
3e31db2f9cc8d020a1d9937315be1942d2d5ab17 | 164ff372cfc8d6177c210367501869008c0479e9 | /app/src/main/java/activities/Person.java | 1e800743ef580a713946b669c9473659d1e4ce1d | [] | no_license | javadi92/Document | 8dbd91b6ed0ad124674d0b45bd6d4e4d7b0c7f3b | a6f4e51388f327529db8d3605aec25be2e009191 | refs/heads/master | 2020-05-01T05:56:52.742330 | 2019-04-08T21:04:05 | 2019-04-08T21:04:05 | 177,316,663 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,539 | java | package activities;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.farhad_javadi.drawerlayout.App;
import com.example.farhad_javadi.drawerlayout.MainActivity;
import com.example.farhad_javadi.drawerlayout.R;
public class Person extends AppCompatActivity {
ImageView imgPerson;
TextView tvPersonName,tvDocumentNumber;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.person_page);
//initialize views
imgPerson=(ImageView)findViewById(R.id.img_person);
tvPersonName=(TextView)findViewById(R.id.tv_person);
tvDocumentNumber=(TextView)findViewById(R.id.tv_document_number);
//get image,name and document number from selected item in persons page
Cursor cursor=App.dbHelper.personsGetDataById(MainActivity.id+"");
if(cursor.moveToFirst()){
do{
tvPersonName.setText(cursor.getString(1));
tvDocumentNumber.setText("تعداد پرونده: "+cursor.getInt(2));
byte[] bitmapdata=cursor.getBlob(3);
Bitmap bitmap = BitmapFactory.decodeByteArray(bitmapdata, 0, bitmapdata.length);
imgPerson.setImageBitmap(bitmap);
}while (cursor.moveToNext());
}
}
}
| [
"farhad.javadi1371@yahoo.com"
] | farhad.javadi1371@yahoo.com |
7e5baad1af43808686b85516ab5bf3207070e071 | d77964aa24cfdca837fc13bf424c1d0dce9c70b9 | /spring-boot/src/main/java/org/springframework/boot/context/logging/ClasspathLoggingApplicationListener.java | d3319aca3b55182d614872bf492326aa7a5f3f6e | [] | no_license | Suryakanta97/Springboot-Project | 005b230c7ebcd2278125c7b731a01edf4354da07 | 50f29dcd6cea0c2bc6501a5d9b2c56edc6932d62 | refs/heads/master | 2023-01-09T16:38:01.679446 | 2018-02-04T01:22:03 | 2018-02-04T01:22:03 | 119,914,501 | 0 | 1 | null | 2022-12-27T14:52:20 | 2018-02-02T01:21:45 | Java | UTF-8 | Java | false | false | 3,158 | java | /*
* Copyright 2012-2018 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 org.springframework.boot.context.logging;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.boot.context.event.ApplicationFailedEvent;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.GenericApplicationListener;
import org.springframework.context.event.SmartApplicationListener;
import org.springframework.core.ResolvableType;
import java.net.URLClassLoader;
import java.util.Arrays;
/**
* A {@link SmartApplicationListener} that reacts to
* {@link ApplicationEnvironmentPreparedEvent environment prepared events} and to
* {@link ApplicationFailedEvent failed events} by logging the classpath of the thread
* context class loader (TCCL) at {@code DEBUG} level.
*
* @author Andy Wilkinson
* @since 2.0.0
*/
public final class ClasspathLoggingApplicationListener
implements GenericApplicationListener {
private static final int ORDER = LoggingApplicationListener.DEFAULT_ORDER + 1;
private static final Log logger = LogFactory
.getLog(ClasspathLoggingApplicationListener.class);
@Override
public void onApplicationEvent(ApplicationEvent event) {
if (logger.isDebugEnabled()) {
if (event instanceof ApplicationEnvironmentPreparedEvent) {
logger.debug("Application started with classpath: " + getClasspath());
} else if (event instanceof ApplicationFailedEvent) {
logger.debug(
"Application failed to start with classpath: " + getClasspath());
}
}
}
@Override
public int getOrder() {
return ORDER;
}
@Override
public boolean supportsEventType(ResolvableType resolvableType) {
Class<?> type = resolvableType.getRawClass();
if (type == null) {
return false;
}
return ApplicationEnvironmentPreparedEvent.class.isAssignableFrom(type)
|| ApplicationFailedEvent.class.isAssignableFrom(type);
}
@Override
public boolean supportsSourceType(Class<?> sourceType) {
return true;
}
private String getClasspath() {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader instanceof URLClassLoader) {
return Arrays.toString(((URLClassLoader) classLoader).getURLs());
}
return "unknown";
}
}
| [
"suryakanta97@github.com"
] | suryakanta97@github.com |
9c126a9edd7d51ed3f01b187c5d47c5178fd57f1 | b2d4f0155af651294890b7695ffbd061d575d85c | /contactapp/src/main/java/com/nana/contactapp/command/LoginCommand.java | 62f418854c51c5581d27e1d1504c9b20d82a2a8d | [] | no_license | nfebrian13/contactapp | f1561bfc9cd2f60bdeb219ff5ab32e8bbf0bc8bd | c0b97ff65b06ec22dc75e0da42312dfd87e2ff3e | refs/heads/master | 2020-04-16T09:26:07.744508 | 2019-01-28T04:28:48 | 2019-01-28T04:28:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 411 | java | package com.nana.contactapp.command;
public class LoginCommand {
private String loginName;
private String password;
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
| [
"DEVELOPER@DESKTOP-4NJBGC4.localdomain"
] | DEVELOPER@DESKTOP-4NJBGC4.localdomain |
d8612397394769cf6cc598025b113317b80b4d8b | 7faee5eb3e19209460d06b1aae3ff0f3b98f24df | /src/test/java/org/fastquery/bean/PManager.java | 3db457262816ef134d44b11783151fe9cb133caf | [
"Apache-2.0"
] | permissive | adian98/fastquery | e70b918d50bf67923f24b5351ce8a87547405fa3 | a934426bb81f2900ddc4aa574bdd2e2a9d26bf63 | refs/heads/master | 2020-05-04T15:14:15.450303 | 2019-04-03T02:47:28 | 2019-04-03T02:47:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,988 | java | /*
* Copyright (c) 2016-2088, fastquery.org and/or its affiliates. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information, please see http://www.fastquery.org/.
*
*/
package org.fastquery.bean;
import java.util.ArrayList;
import java.util.List;
import org.fastquery.core.Id;
/**
*
* @author xixifeng (fastquery@126.com)
*/
public class PManager {
@Id
private Long pmuid; // 物管员帐号ID
private Long punitId; // 物业单位ID
private String mobile; // 唯一约束,登录帐号
private String password;// 密码
private Byte isActive = 0;// 是否激活 0未激活,1激活
private Byte isdm = 0; // 是否是设备管理员(0否,1是)可管理门禁,蓝牙设备
private Byte isReg = 0; // 是否可进行人员登记(0:否,1:是,默认:0) 可操作people
private Byte pmRole = 0; // 物管员角色
// (0:其他,1:物业主任,2:保安经理,3:保安队长,4:保安,88:维修人员/技工)
private String realName; // 真实姓名
private Byte gender = 0; // 性别(0:保密,1:男,2:女)
private String head; // 头像
private Byte isOnline = 0; // 是否在线 (0:否,1:是,默认:0)
private String hxuser; // 环信帐号(用于门禁呼叫)
private String hxpass; // 环信密码(用于门禁呼叫)
private String hxRoomId; // 环信聊天房间Id(用于对讲广播)
private Long createUid = 0L;// 默认:0 创建人UID
private Long lastUpdateUid;// 默认:0 最后修改人UID --云平台
private int[] ins = new int[] {};
private List<String> lists = new ArrayList<>();
public PManager() {
}
public PManager(Long punitId, String mobile, String password, Byte isdm, Byte isReg, Byte pmRole, String realName, Byte gender) {
this.punitId = punitId;
this.mobile = mobile;
this.password = password;
this.isdm = isdm;
this.isReg = isReg;
this.pmRole = pmRole;
this.realName = realName;
this.gender = gender;
}
public Long getPmuid() {
return pmuid;
}
public Long getPunitId() {
return punitId;
}
public String getMobile() {
return mobile;
}
public String getPassword() {
return password;
}
public Byte getIsActive() {
return isActive;
}
public Byte getIsdm() {
return isdm;
}
public Byte getIsReg() {
return isReg;
}
public Byte getPmRole() {
return pmRole;
}
public String getRealName() {
return realName;
}
public Byte getGender() {
return gender;
}
public String getHead() {
return head;
}
public Byte getIsOnline() {
return isOnline;
}
public String getHxuser() {
return hxuser;
}
public String getHxpass() {
return hxpass;
}
public String getHxRoomId() {
return hxRoomId;
}
public Long getCreateUid() {
return createUid;
}
public Long getLastUpdateUid() {
return lastUpdateUid;
}
public void setPmuid(Long pmuid) {
this.pmuid = pmuid;
}
public void setPunitId(Long punitId) {
this.punitId = punitId;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public void setPassword(String password) {
this.password = password;
}
public void setIsActive(Byte isActive) {
this.isActive = isActive;
}
public void setIsdm(Byte isdm) {
this.isdm = isdm;
}
public void setIsReg(Byte isReg) {
this.isReg = isReg;
}
public void setPmRole(Byte pmRole) {
this.pmRole = pmRole;
}
public void setRealName(String realName) {
this.realName = realName;
}
public void setGender(Byte gender) {
this.gender = gender;
}
public void setHead(String head) {
this.head = head;
}
public void setIsOnline(Byte isOnline) {
this.isOnline = isOnline;
}
public void setHxuser(String hxuser) {
this.hxuser = hxuser;
}
public void setHxpass(String hxpass) {
this.hxpass = hxpass;
}
public void setHxRoomId(String hxRoomId) {
this.hxRoomId = hxRoomId;
}
public void setCreateUid(Long createUid) {
this.createUid = createUid;
}
public void setLastUpdateUid(Long lastUpdateUid) {
this.lastUpdateUid = lastUpdateUid;
}
public int[] getIns() {
return ins;
}
public void setIns(int[] ins) {
this.ins = ins;
}
public List<String> getLists() {
return lists;
}
public void setLists(List<String> lists) {
this.lists = lists;
}
}
| [
"fastquery@126.com"
] | fastquery@126.com |
b3a7ba1184d326f44e7bee6ebd9b478946722a2f | 70912919587fdc8c1ffe9d91c768fb5bac5a2bcd | /src/main/java/com/vodafone/charging/accountservice/dto/client/TransactionInfo.java | 3a38a7de05bf4ced994e33773a8edc7def7dddc3 | [] | no_license | jazzdup/vf-account-service | 76905cf07a8b097c08ce7ee63472fc0f43d99865 | 5c22b5fe6b0fb35a8f57bcf876472d8f44bbaaa7 | refs/heads/master | 2021-09-12T02:00:41.368672 | 2018-04-13T13:25:47 | 2018-04-13T13:25:47 | 129,400,957 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 347 | java | package com.vodafone.charging.accountservice.dto.client;
import lombok.Builder;
import lombok.Getter;
import lombok.NonNull;
import lombok.ToString;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
@Component
@Builder
@Getter
@ToString
public class TransactionInfo {
@NonNull
private BigDecimal amount;
}
| [
"ravi.aghera@vodafone.com"
] | ravi.aghera@vodafone.com |
e110eb23214189a0b34e4795928220b5fa3b2fbb | 13cbb329807224bd736ff0ac38fd731eb6739389 | /com/sun/xml/internal/bind/v2/model/core/TypeInfoSet.java | 4c5e104794ef015bd975de0334b06407dc77cf49 | [] | no_license | ZhipingLi/rt-source | 5e2537ed5f25d9ba9a0f8009ff8eeca33930564c | 1a70a036a07b2c6b8a2aac6f71964192c89aae3c | refs/heads/master | 2023-07-14T15:00:33.100256 | 2021-09-01T04:49:04 | 2021-09-01T04:49:04 | 401,933,858 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,450 | java | package com.sun.xml.internal.bind.v2.model.core;
import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import java.util.Map;
import javax.xml.bind.JAXBException;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
public interface TypeInfoSet<T, C, F, M> {
Navigator<T, C, F, M> getNavigator();
NonElement<T, C> getTypeInfo(T paramT);
NonElement<T, C> getAnyTypeInfo();
NonElement<T, C> getClassInfo(C paramC);
Map<? extends T, ? extends ArrayInfo<T, C>> arrays();
Map<C, ? extends ClassInfo<T, C>> beans();
Map<T, ? extends BuiltinLeafInfo<T, C>> builtins();
Map<C, ? extends EnumLeafInfo<T, C>> enums();
ElementInfo<T, C> getElementInfo(C paramC, QName paramQName);
NonElement<T, C> getTypeInfo(Ref<T, C> paramRef);
Map<QName, ? extends ElementInfo<T, C>> getElementMappings(C paramC);
Iterable<? extends ElementInfo<T, C>> getAllElements();
Map<String, String> getXmlNs(String paramString);
Map<String, String> getSchemaLocations();
XmlNsForm getElementFormDefault(String paramString);
XmlNsForm getAttributeFormDefault(String paramString);
void dump(Result paramResult) throws JAXBException;
}
/* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\com\sun\xml\internal\bind\v2\model\core\TypeInfoSet.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.0.7
*/ | [
"michael__lee@yeah.net"
] | michael__lee@yeah.net |
6624647431993b8d33e79c47ce898cb60d93fba0 | d33e9f808a2f57de2ef5824b1eb39d44ee9fb43c | /year2/semester2/mpp/java/TripClientServer/TripCommon/src/main/java/net/Response.java | 5607f47744447125cadb491f9ab5272c81fb48f4 | [] | no_license | maria-lazar/education | 8e494ec0dd004cae9d0006464a396b0de2c4f447 | 6eb3ebff507209f8216b47bad97138f0208c4806 | refs/heads/master | 2021-08-29T07:17:14.014286 | 2021-08-09T15:54:30 | 2021-08-09T15:54:30 | 253,291,675 | 0 | 0 | null | 2021-08-09T15:56:47 | 2020-04-05T17:25:35 | Java | UTF-8 | Java | false | false | 1,013 | java | package net;
import java.io.Serializable;
public class Response implements Serializable {
private ResponseType type;
private Object data;
private Response(){};
public ResponseType type(){
return type;
}
public Object data(){
return data;
}
private void type(ResponseType type){
this.type=type;
}
private void data(Object data){
this.data=data;
}
@Override
public String toString(){
return "Response{" +
"type='" + type + '\'' +
", data='" + data + '\'' +
'}';
}
public static class Builder{
private Response response=new Response();
public Builder type(ResponseType type) {
response.type(type);
return this;
}
public Builder data(Object data) {
response.data(data);
return this;
}
public Response build() {
return response;
}
}
}
| [
"maria.daria.lazar@gmail.com"
] | maria.daria.lazar@gmail.com |
48d89a01a3aa5e339090c8b585b18a9d1fb06201 | 789693570586cf0b92eb8af9a10daef25e298eb6 | /Server/DVServer/src/com/avci/dvserver/connection/UDPServer.java | b4f750937487d4ba5ae289263a711ac3195deab6 | [] | no_license | mavci/Dehset-ul-Vahset | 6782d6d0bce030bc2ad71bdec9483fac9a117d62 | e12e8bc6c74b99df0d6ce646b4a3a88a0cd3c298 | refs/heads/master | 2021-01-17T05:39:01.723678 | 2012-03-23T16:55:39 | 2012-03-23T16:55:39 | 3,761,574 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,479 | java | package com.avci.dvserver.connection;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import com.avci.dvserver.DVServer;
public class UDPServer {
public static DatagramSocket socket;
static byte[] receiveData = new byte[1024];
static byte[] sendData;
static HashMap<String, Client> clients = new HashMap<String, Client>();
private UDPDataRecerviedListener listener;
public UDPServer(final int port) {
new Thread() {
public void run() {
try {
socket = new DatagramSocket(port);
while (true) {
DatagramPacket receivePacket = new DatagramPacket(receiveData, 1024);
socket.receive(receivePacket);
readPacket(receivePacket);
}
} catch (SocketException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}.start();
}
private void readPacket(final DatagramPacket receivePacket)
throws IOException {
new Thread(new Runnable() {
@Override
public void run() {
final String data = new String(receivePacket.getData()).substring(0, receivePacket.getLength());
InetAddress IP = receivePacket.getAddress();
int port = receivePacket.getPort();
String key = IP.toString() + ":" + port;
final Client client;
if (clients.containsKey(key)) {
client = clients.get(key);
} else {
client = addClient(IP, port);
}
client.timeout = System.currentTimeMillis() / 1000L;
new Thread() {
public void run() {
listener.UDPDataRecervied(data, client);
}
}.start();
}
}).start();
}
public void echo(String data, Client client) {
synchronized (clients) {
for (Iterator<Entry<String, Client>> itr = clients.entrySet().iterator(); itr.hasNext();) {
Entry<String, Client> entry = itr.next();
Client c = entry.getValue();
if (c.equals(client) || c.id == 0 || DVServer.users.get(c.id) == null || !DVServer.users.get(c.id).ready)
continue;
if (c.timeout < (System.currentTimeMillis() / 1000L) - 60) {
itr.remove();
continue;
}
c.send(data);
}
}
}
public Client addClient(InetAddress IP, int port) {
System.out.println("+++ " + IP.toString() + ":" + port);
Client client = new Client(IP, port);
clients.put(IP.toString() + ":" + port, client);
return client;
}
public class Client {
static final int IDLE = 0;
static final int LOGGED = 1;
InetAddress IP;
public int port, id = 0;
long timeout;
public int state = IDLE;
public String name, phoneKey, key;
public Client(InetAddress IP, int port) {
this.IP = IP;
this.port = port;
this.timeout = System.currentTimeMillis() / 1000L;
this.key = IP.toString() + ":" + port;
}
public void send(String data) {
sendData = data.getBytes();
DatagramPacket sendPacket = new DatagramPacket(sendData,
sendData.length, IP, port);
try {
socket.send(sendPacket);
} catch (IOException e) {
e.printStackTrace();
}
}
}
public void setListener(UDPDataRecerviedListener listener) {
this.listener = listener;
}
public interface UDPDataRecerviedListener {
public void UDPDataRecervied(String data, UDPServer.Client c);
}
}
| [
"strefrextor@gmail.com"
] | strefrextor@gmail.com |
2a358dd27287a0c11ddc7d60ce403163a63fbb12 | 36c0a0e21f3758284242b8d2e40b60c36bd23468 | /src/main/java/com/datasphere/engine/manager/resource/consumer/log/LogSqlBuilder.java | dc7a8c7d57cb5cd1b073be914e7c605aa85fe0aa | [
"LicenseRef-scancode-mulanpsl-1.0-en"
] | permissive | neeeekoooo/datasphere-service | 0185bca5a154164b4bc323deac23a5012e2e6475 | cb800033ba101098b203dbe0a7e8b7f284319a7b | refs/heads/master | 2022-11-15T01:10:05.530442 | 2020-02-01T13:54:36 | 2020-02-01T13:54:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,099 | java | /*
* Copyright 2019, Huahuidata, Inc.
* DataSphere is licensed under the Mulan PSL v1.
* You can use this software according to the terms and conditions of the Mulan PSL v1.
* You may obtain a copy of Mulan PSL v1 at:
* http://license.coscl.org.cn/MulanPSL
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
* PURPOSE.
* See the Mulan PSL v1 for more details.
*/
package com.datasphere.engine.manager.resource.consumer.log;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import com.datasphere.engine.manager.resource.common.NoSuchConsumerException;
import com.datasphere.engine.manager.resource.model.Consumer;
import com.datasphere.engine.manager.resource.model.ConsumerBuilder;
import com.datasphere.engine.manager.resource.model.Registration;
@Component
public class LogSqlBuilder implements ConsumerBuilder {
@Value("${consumers.log.enable}")
private boolean enabled;
private static LogSqlConsumer _instance;
@Override
public String getType() {
return LogSqlConsumer.TYPE;
}
@Override
public String getId() {
return LogSqlConsumer.ID;
}
@Override
public Set<String> listProperties() {
return new HashSet<String>();
}
@Override
public boolean isAvailable() {
return enabled;
}
@Override
public Consumer build() throws NoSuchConsumerException {
if (!enabled) {
throw new NoSuchConsumerException();
}
// use singleton
if (_instance == null) {
_instance = new LogSqlConsumer();
// explicitly call init() since @postconstruct won't work here
_instance.init();
}
return _instance;
}
@Override
public Consumer build(Map<String, Serializable> properties) throws NoSuchConsumerException {
return build();
}
@Override
public Consumer build(Registration reg) throws NoSuchConsumerException {
return build();
}
}
| [
"jack_r_ge@126.com"
] | jack_r_ge@126.com |
e9954c2ac7876ecad7c7ce8a39c446c81d088c31 | 4aafcb824f7c10002a439200b783ccda3d6f383f | /Matthieu/ProjetCPA/src/main/ConnectionMySQL.java | 1654265b7b23b7fdbd9ad3146989e8bb030d5b43 | [] | no_license | MAMCSD/MAMCSD-DEVELOPMENT-CPA-PROJET | 45d8b463480b7c7a89a9a9572874ecee806fd950 | 82e277744e0424f464ab62ed9b3da26f21929609 | refs/heads/master | 2021-01-20T09:36:41.136648 | 2017-06-30T10:31:20 | 2017-06-30T10:31:20 | 90,265,760 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 1,502 | java | package main;
import java.sql.*;
/**
*
* @author Stéphane
* Cette classe permet de réaliser la liaison avec la base de donnée
*
*/
public class ConnectionMySQL {
private Connection connection = null;
private String user, host;
private static boolean driverLoaded = false;
public static boolean isDriverLoaded(){
return driverLoaded;
}
public static void init() throws ClassNotFoundException, IllegalAccessException, InstantiationException{
if(!driverLoaded){
//Chargement du pilote
Class.forName("com.mysql.jdbc.Driver").newInstance();
driverLoaded = true;
}
}
public ConnectionMySQL() {
if(!driverLoaded){
throw new IllegalStateException("Cannot instantiate if driver is not loaded. Please call "+getClass().getName()+".init() method before invoking this constructor.");
}
}
public ConnectionMySQL(String host, String user) {
this();
this.host = "127.0.0.1";
this.user = "root";
}
public void connect() throws SQLException{
//Connexion a la base de données
//System.out.println("Connexion à la base de données");
String dBurl = "jdbc:mysql://"+host+"/auto_concept";
connection = DriverManager.getConnection(dBurl, user,"admin");
}
public ResultSet execute(String requete) throws SQLException{
//System.out.println("creation et execution de la requête :"+requete);
Statement stmt = connection.createStatement();
return stmt.executeQuery(requete);
}
public void close() throws SQLException{
connection.close();
}
} | [
"matthieu.camurat@viacesi.fr"
] | matthieu.camurat@viacesi.fr |
8c966f71274bfa2b17656d8b14f79251fae1ddc8 | 82de1e98e30a0836b892f00e07bfcc0954dbc517 | /hotcomm-data/hotcomm-data-service/src/main/java/com/hotcomm/data/web/controller/comm/BaseController.java | 97e1df152f1a310efb90756519a4a0b63137e863 | [] | no_license | jiajiales/hangkang-qingdao | ab319048b61f6463f8cf1ac86ac5c74bd3df35d7 | 60a0a4b1d1fb9814d8aa21188aebbf72a1d6b25d | refs/heads/master | 2020-04-22T17:07:34.569613 | 2019-02-13T15:14:07 | 2019-02-13T15:14:07 | 170,530,164 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,284 | java | package com.hotcomm.data.web.controller.comm;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.hotcomm.data.bean.vo.sys.MemberResource;
import com.hotcomm.data.bean.vo.sys.MemberVO;
import com.hotcomm.framework.utils.PropertiesHelper;
import com.hotcomm.framework.utils.RedisHelper;
import com.hotcomm.framework.web.exception.HKException;
@Component
public class BaseController {
@Resource
HttpServletRequest request;
@Resource
private RedisHelper redisHelper;
protected MemberVO getLoginMember() {
MemberVO result = null;
try {
String token = request.getParameter("token");
if (PropertiesHelper.devModel.equals("test")&&token==null) {
result = new MemberVO();
result.setMemberName("admin");
return result;
}
String userJson = redisHelper.get(token);
ObjectMapper mapper = new ObjectMapper();
MemberResource memberResource = mapper.readValue(userJson, MemberResource.class);
result = memberResource.getMember();
} catch (Exception e) {
throw new HKException("USER_TOKEN_001", "获取当前登入用户信息失败");
}
return result;
}
}
| [
"562910919@qq.com"
] | 562910919@qq.com |
4d102ec3c04016d93f69049d875e947b7c42ed13 | 4f1a952eae22bd06d178ee19c53579f24cee94ea | /src/main/java/com/example/cinema/service/CinemaInitServiceImpl.java | 72be5f63d3f09965d5241ba8dea3ba26c107e81d | [] | no_license | ElMehdiMoqtad/Cinema_project_JEE | d3aa001738d1ceb8a7041a66c607c55a09176599 | ef078db119c58766066cca63434bcbe7e3a80381 | refs/heads/main | 2023-06-09T03:37:58.839826 | 2021-06-29T22:02:08 | 2021-06-29T22:02:08 | 381,501,403 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,530 | java | package com.example.cinema.service;
import com.example.cinema.Entity.*;
import com.example.cinema.dao.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Random;
import java.util.stream.Stream;
@Transactional
@Service
public class CinemaInitServiceImpl implements ICinemaInitService{
@Autowired
private VilleRepository villeRepository;
@Autowired
private CinemaRepository cinemaRepository;
@Autowired
private SalleRepository salleRepository;
@Autowired
private PlaceRepository placeRepository;
@Autowired
private SeanceRepository seanceRepository;
@Autowired
private CategoryRepository categoryRepository;
@Autowired
private FilmRepository filmRepository;
@Autowired
private ProjectionRepository projectionRepository;
@Autowired
private TicketRepository ticketRepository;
@Override
public void initVilles() {
Stream.of("Casablanca","Marrakech","Rabat","Tanger").forEach(nameVille->{
Ville ville = new Ville();
ville.setName(nameVille);
villeRepository.save(ville);
});
}
@Override
public void initCinemas() {
villeRepository.findAll().forEach(ville->{
Stream.of("Megarama","Imax","Founon","Chahrazad","Daouliz").forEach(nameCinema->{
Cinema cinema=new Cinema();
cinema.setName(nameCinema);
cinema.setVille(ville);
cinema.setNombreSalles(3+(int)(Math.random()*7));
cinemaRepository.save(cinema);
});
});
}
@Override
public void initSeances() {
DateFormat dateFormat= new SimpleDateFormat("HH:mm");
Stream.of("12:00","14:00","16:00","18:00","20:00").forEach(s ->{
Seance seance = new Seance();
try{
seance.setHeureDebut(dateFormat.parse(s));
seanceRepository.save(seance);
}catch(ParseException e ){
e.printStackTrace();
}
});
}
@Override
public void initTickets() {
projectionRepository.findAll().forEach(p->{
p.getSalle().getPlaces().forEach(place -> {
Ticket ticket = new Ticket();
ticket.setPlace(place);
ticket.setPrix(p.getPrix());
ticket.setProjection(p);
ticket.setReserve(false);
ticketRepository.save(ticket);
});
});
}
@Override
public void initSalles() {
cinemaRepository.findAll().forEach(cinema ->{
for(int i=0;i<cinema.getNombreSalles();i++){
Salle salle = new Salle();
salle.setName("Salle"+(i+1));
salle.setCinema(cinema);
salle.setNombreplace(15+(int)(Math.random()*10));
salleRepository.save(salle);
}
});
}
@Override
public void initProjections() {
double[] prices=new double[] {30,45,60,70,85,100};
List<Film> films=filmRepository.findAll();
villeRepository.findAll().forEach(ville->{
ville.getCinemas().forEach(cinema -> {
cinema.getSalles().forEach(salle->{
int index=new Random().nextInt(films.size());
Film film=films.get(index);
seanceRepository.findAll().forEach(seance -> {
Projection projection =new Projection();
projection.setDateProjection(new Date());
projection.setFilm(film);
projection.setPrix(prices[new Random().nextInt(prices.length)]);
projection.setSalle(salle);
projection.setSeance(seance);
projectionRepository.save(projection);
});
});
});
});
};
@Override
public void initFilms() {
double[] durees=new double[] {1,2,1,3,1,2};
List<Category> categories=categoryRepository.findAll();
Stream.of("Inception","Papillon","Hacksaw Ridge","WrathofMan","NoBody","Lansky").forEach(titrefilm->{
Film film = new Film();
film.setTitre(titrefilm);
film.setDuree(durees[new Random().nextInt(durees.length)]);
film.setPhoto(titrefilm.replaceAll(" ","")+".jpg");
film.setCategory(categories.get(new Random().nextInt(categories.size())));
filmRepository.save(film);
});
}
@Override
public void initCategories() {
Stream.of("Histoire","Action","Drama","Horreur").forEach(cat->{
Category categorie = new Category();
categorie.setName(cat);
categoryRepository.save(categorie);
});
}
@Override
public void initPlaces() {
salleRepository.findAll().forEach(salle -> {
for(int i = 0 ; i< salle.getNombreplace(); i++){
Place place = new Place();
place.setNumero(i+1);
place.setSalle(salle);
placeRepository.save(place);
}
});
}
}
| [
"mehdimoqtad@gmail.com"
] | mehdimoqtad@gmail.com |
75a65ca53f4fd4cd4035b8331a80f1dbfba6b484 | 49ee07d374e6f7c2b956442a41068b40d1e0d036 | /DopeWarsClassic/src/com/dopewarsplus/Item.java | 5470367c668a5fef878705bc45226747d394c00f | [] | no_license | Tubbz-alt/DopeWars-4 | 3b617c15bba792fe72b3c1b331e7a445ab1c4ed2 | 346d6acedcd535141edd9780f8ea16ed90f78045 | refs/heads/master | 2021-05-28T06:27:22.128239 | 2014-06-12T20:08:17 | 2014-06-12T20:08:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 443 | java | package com.dopewarsplus;
/**
* Items are purchasable things a player can buy, such as guns, bullet proof jackets etc
*/
public abstract class Item {
public final String name;
public final int value;
public final int size; // number of pockets the item occupies, may be 0
public Item(String name, int value, int size) {
this.name = name;
this.value = value;
this.size = size;
}
}
| [
"johnleewilson4@gmail.com"
] | johnleewilson4@gmail.com |
a2389712aee5343a7a4415040da1f83f372b08d8 | 0cce680f4d8eeb10a411ed73371f6e2e4976bf33 | /rosjava/src/main/java/org/ros/internal/transport/tcp/TcpServerHandshakeHandler.java | 2cc2af91ec1e14afbc45fc153192667f2bd9a7cd | [] | no_license | fabiancook/faybecook-clone | e47fa7d5af5cb2a5290cf70608f38a296cdbf606 | 8f1d00e5e4d388943ac1fc3ba8f77c51e8f66e7a | refs/heads/master | 2021-01-10T22:11:50.561195 | 2012-05-02T13:13:38 | 2012-05-02T13:13:38 | 32,115,654 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,151 | java | /*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.ros.internal.transport.tcp;
import com.google.common.base.Preconditions;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelHandler;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
import org.ros.exception.RosRuntimeException;
import org.ros.internal.node.server.NodeIdentifier;
import org.ros.internal.node.service.DefaultServiceServer;
import org.ros.internal.node.service.ServiceManager;
import org.ros.internal.node.service.ServiceResponseEncoder;
import org.ros.internal.node.topic.DefaultPublisher;
import org.ros.internal.node.topic.SubscriberIdentifier;
import org.ros.internal.node.topic.TopicIdentifier;
import org.ros.internal.node.topic.TopicParticipantManager;
import org.ros.internal.transport.ConnectionHeader;
import org.ros.internal.transport.ConnectionHeaderFields;
import org.ros.namespace.GraphName;
import java.util.Map;
/**
* A {@link ChannelHandler} which will process the TCP server handshake.
*
* @author damonkohler@google.com (Damon Kohler)
* @author kwc@willowgarage.com (Ken Conley)
*/
public class TcpServerHandshakeHandler extends SimpleChannelHandler {
private final TopicParticipantManager topicParticipantManager;
private final ServiceManager serviceManager;
public TcpServerHandshakeHandler(TopicParticipantManager topicParticipantManager,
ServiceManager serviceManager) {
this.topicParticipantManager = topicParticipantManager;
this.serviceManager = serviceManager;
}
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
ChannelBuffer incomingBuffer = (ChannelBuffer) e.getMessage();
ChannelPipeline pipeline = e.getChannel().getPipeline();
Map<String, String> incomingHeader = ConnectionHeader.decode(incomingBuffer);
if (incomingHeader.containsKey(ConnectionHeaderFields.SERVICE)) {
handleServiceHandshake(e, pipeline, incomingHeader);
} else {
handleSubscriberHandshake(ctx, e, pipeline, incomingHeader);
}
super.messageReceived(ctx, e);
}
private void handleServiceHandshake(MessageEvent e, ChannelPipeline pipeline,
Map<String, String> incomingHeader) {
GraphName serviceName = new GraphName(incomingHeader.get(ConnectionHeaderFields.SERVICE));
Preconditions.checkState(serviceManager.hasServer(serviceName));
DefaultServiceServer<?, ?> serviceServer = serviceManager.getServer(serviceName);
e.getChannel().write(serviceServer.finishHandshake(incomingHeader));
String probe = incomingHeader.get(ConnectionHeaderFields.PROBE);
if (probe != null && probe.equals("1")) {
e.getChannel().close();
} else {
pipeline.replace(TcpServerPipelineFactory.LENGTH_FIELD_PREPENDER, "ServiceResponseEncoder",
new ServiceResponseEncoder());
pipeline.replace(this, "ServiceRequestHandler", serviceServer.newRequestHandler());
}
}
private void handleSubscriberHandshake(ChannelHandlerContext ctx, MessageEvent e,
ChannelPipeline pipeline, Map<String, String> incomingHeader) throws InterruptedException,
Exception {
Preconditions.checkState(incomingHeader.containsKey(ConnectionHeaderFields.TOPIC),
"Handshake header missing field: " + ConnectionHeaderFields.TOPIC);
GraphName topicName = new GraphName(incomingHeader.get(ConnectionHeaderFields.TOPIC));
Preconditions.checkState(topicParticipantManager.hasPublisher(topicName),
"No publisher for topic: " + topicName);
DefaultPublisher<?> publisher = topicParticipantManager.getPublisher(topicName);
ChannelBuffer outgoingBuffer = publisher.finishHandshake(incomingHeader);
Channel channel = ctx.getChannel();
ChannelFuture future = channel.write(outgoingBuffer).await();
if (!future.isSuccess()) {
throw new RosRuntimeException(future.getCause());
}
String nodeName = incomingHeader.get(ConnectionHeaderFields.CALLER_ID);
publisher.addSubscriber(new SubscriberIdentifier(NodeIdentifier.forName(nodeName),
new TopicIdentifier(topicName)), channel);
// Once the handshake is complete, there will be nothing incoming on the
// channel. So, we replace the handshake handler with a handler which will
// drop everything.
pipeline.replace(this, "DiscardHandler", new SimpleChannelHandler());
}
}
| [
"damonkohler@google.com"
] | damonkohler@google.com |
3f26d56fb1cbb05390bbce8ed697e9a426580345 | bb159b1aa013cebe1dac778246953ea41732d468 | /gostCaseStudy/src/test/java/com/cucumber/gost/StepDefinitions/TestRunner.java | fd7de5f5d45c07c4b77438d3064f42775af92e35 | [] | no_license | karthik289/cc_Automation_Poc | fafcd7aa89e57811333b09f78c12395c7bd1cd20 | c95fdc3d3f3b17849c6d5c50df6a66020a743ec2 | refs/heads/master | 2021-03-12T20:45:05.649602 | 2017-05-16T13:17:52 | 2017-05-16T13:17:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 389 | java | package com.cucumber.gost.StepDefinitions;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = "json:target/cucumber-report.json", features = "src/test/java", glue = "com.cucumber.gost.StepDefinitions", format = {
"pretty", "html:target/cucumber" })
public class TestRunner {
}
| [
"aruna.boddu@SHVLSP2066F1L.SLS.ads.valuelabs.net"
] | aruna.boddu@SHVLSP2066F1L.SLS.ads.valuelabs.net |
053d77d76494e3e6b1d9c97e1ebb51a5811c8ab5 | 8ee782eab105471611b64c6ecef9ea69dbad949d | /typeofdatas/readwritefields/exercicios/Teste1.java | 0566764f140c75433dd4cf5d97d16fe2dc0d3b78 | [] | no_license | jonatasrd/javaprogrammer | cb1a8020bf2cf677677929c0dcd500fa31cf2968 | ebb56cae2d9650fc2fdb7e9a2caebf858422e8a7 | refs/heads/master | 2021-04-06T09:11:06.904775 | 2018-06-22T11:31:46 | 2018-06-22T11:31:46 | 124,649,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 303 | java | package typeofdatas.readwritefields.exercicios;
class B{
int c;
void c(int c) {
c = c;
}
}
class Teste1 {
public static void main(String[] args) {
B b = new B();
b.c = 10;
System.out.println(b.c);
b.c(30);
System.out.println(b.c);
}
} | [
"jonatasrd@gmail.com"
] | jonatasrd@gmail.com |
5d32dad4a6a7c47b764dcc10a62886b400cbaae5 | c019b4a9d9700ae168d5574df8b569dcc310112b | /src/main/java/project/BlockClusterNonogramMinDom_LB.java | a70a72bc83c26b17ae31785a231a90f4cd1ce4e0 | [] | no_license | palmieri-anthony/Nonogram | d61851d1cc3ce0d24812b512189720d04f58a742 | d8d0ad46e85e6354f1ec4e639753b5dd97248ea8 | refs/heads/master | 2021-01-01T05:41:11.264936 | 2015-03-09T10:03:10 | 2015-03-09T10:03:10 | 30,118,047 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,829 | java | package project;
import java.util.Collection;
import java.util.List;
import solver.Solver;
import solver.constraints.Constraint;
import solver.constraints.ICF;
import solver.constraints.IntConstraintFactory;
import solver.constraints.LCF;
import solver.constraints.nary.automata.FA.FiniteAutomaton;
import solver.constraints.nary.automata.FA.IAutomaton;
import solver.search.strategy.IntStrategyFactory;
import solver.variables.BoolVar;
import solver.variables.IntVar;
import solver.variables.VariableFactory;
import util.tools.ArrayUtils;
public class BlockClusterNonogramMinDom_LB extends AbstractNonogrammProblem {
public BlockClusterNonogramMinDom_LB(int line, int column) {
super(line, column);
}
public BlockClusterNonogramMinDom_LB(String pathNono, String pathCsv) {
super(pathNono, pathCsv);
}
/**
* representing the nonogramm form square[i][j]=1 <=> the j pixel of row i
* is painted . 0 otherwise.
*/
BoolVar[][] square;
/**
* placement of row cluster. rowCluster[i][t]=k <=> the cluster t has the
* leftmost pixel on row i, column k.
* Remark, the second dimension will be adjust according to the number of block
*/
IntVar [][] rowCluster ;
/**
* placement of column cluster. columnCluster[i][t]=k <=> the cluster t has the
* leftmost pixel on column i, row k.
* Remark, the second dimension will be adjust according to the number of block
*/
IntVar [][] columnCluster ;
@Override
protected void buildConstraint() {
square= new BoolVar[line][column];
rowCluster = new IntVar[line][1];
columnCluster = new IntVar [this.column][1] ;
square = VariableFactory
.boolMatrix("c", this.line, this.column, solver);
buildCluster(rowCluster,lineData,column,"row");
buildCluster(columnCluster,columnData,line,"column");
//sens xij => cluster ik <=> j
initInblockVarRow();
initInblockVarColumn();
for (int j = 0; j < line; j++) {
solver.post(ICF.sum(square[j], VariableFactory.fixed(this.sumLine.get(j), solver)));
}
for (int i = 0; i < column; i++) {
BoolVar[] col = ArrayUtils.getColumn(square, i);
solver.post(ICF.sum(col, VariableFactory.fixed(this.sumColumn.get(i), solver)));
}
}
private void initInblockVarRow() {
//pour chaque ligne
for (int i = 0; i < square.length; i++) {
//pour chaque element de la ligne
for (int j = 0; j < square[i].length; j++) {
//si il existe un cluster > 0
if(lineData.get(i).size()>0){
//si x[i][j]=1 alors .... sinon ...
solver.post(LCF.ifThenElse(square[i][j], LCF.or(createOrConstraintXij1(i,j,square[i][j],rowCluster,this.lineData)),
LCF.and(createOrConstraintXij0(i,j,square[i][j],rowCluster,this.lineData))));
}
}
}
}
private void initInblockVarColumn() {
//pour chaque ligne
BoolVar[][] transpose = ArrayUtils.transpose(square);
for (int i = 0; i < transpose.length; i++) {
//pour chaque cluster
for (int j = 0; j < transpose[i].length; j++) {
//si il existe un cluster > 0
if(columnData.get(i).size()>0){
//si x[i][j]=1 alors .... sinon ...
solver.post(LCF.ifThenElse(transpose[i][j], LCF.or(createOrConstraintXij1(i,j,transpose[i][j],columnCluster,this.columnData)),
LCF.and(createOrConstraintXij0(i,j,transpose[i][j],columnCluster,this.columnData))));
}
}
}
}
private Constraint[] createOrConstraintXij1(int line, int column, BoolVar boolVar, IntVar[][] cluster,
List<List<Integer>> data) {
//need as much as number of row cluster to ensure that the variable is in a block.
Constraint[] tabConstraint = new Constraint[cluster[line].length];
for (int k = 0; k < cluster[line].length; k++) {
Constraint supConstraint = ICF.arithm(cluster[line][k],"<=", column);
Constraint lessConstraint = ICF.arithm(cluster[line][k],">", column-data.get(line).get(k));
tabConstraint[k]=supConstraint;
tabConstraint[k]=LCF.and(supConstraint,lessConstraint);
}
return tabConstraint;
}
private Constraint[] createOrConstraintXij0(int line, int column, BoolVar boolVar, IntVar[][] cluster,
List<List<Integer>> lineData) {
//need as much as number of row cluster to ensure that the variable is in a block.
Constraint[] tabConstraint = new Constraint[cluster[line].length];
for (int k = 0; k < cluster[line].length; k++) {
Constraint supConstraint = ICF.arithm(cluster[line][k],">", column);
Constraint lessConstraint = ICF.arithm(cluster[line][k],"<=", column-lineData.get(line).get(k));
tabConstraint[k]=LCF.or(supConstraint,lessConstraint);
}
return tabConstraint;
}
private void buildCluster(IntVar[][] cluster, List<List<Integer>> data, int n,String qualifier) {
for(int i=0;i<cluster.length;i++){
//creation du tableau contenant les clusters
cluster[i]= new IntVar[data.get(i).size()];
//pour chaque cluster de chaque ensemble(ligne colonne)
for (int j = 0; j < data.get(i).size(); j++) {
//create (left|top)most cluster variable
cluster[i][j]= VariableFactory.integer(qualifier+"cluster["+i+"]["+j+"]", 0, n-data.get(i).get(j), solver);
//si il existe plusieurs cluster alors on introduit un ordre
if(j>0){
//get a blank
//ensure position of next cluster is next the previous + size of previous + 1 for a blank.
solver.post(ICF.arithm(cluster[i][j], "-", cluster[i][j-1], ">", (data.get(i).get(j-1))));
}
}
}
}
@Override
public void configureSearch() {
for(int i=0;i<rowCluster.length;i++){
solver.set(IntStrategyFactory.minDom_LB(this.rowCluster[i]));
}
for (int i = 0; i < columnCluster.length; i++) {
solver.set(IntStrategyFactory.minDom_LB(this.columnCluster[i]));
}
}
@Override
public void prettyOut() {
// for (int i = 0; i < line; i++) {
// for (int j = 0; j < column; j++) {
// System.out.print(square[i][j].getValue() + ", ");
//
// }
// System.out.println();
// }
//
//
// for (int i = 0; i < square.length; i++) {
// checkSequence(square[i],lineData.get(i));
// }
// BoolVar[][] transpose= ArrayUtils.transpose(square);
// for (int j = 0; j< transpose.length; j++) {
// checkSequence(transpose[j],columnData.get(j));
// }
}
// private void checkSequence(BoolVar[] boolVars, List<Integer> list) {
// int cmptContigous=0;
// int cmptCluster=0;
// for (BoolVar var : boolVars) {
// cmptContigous+=var.getValue();
// if(v+(n-k) -1ar.getValue()==0){
// if (cmptContigous>0) {
// assert list.get(cmptCluster)==cmptContigous;
// cmptContigous=0;
// cmptCluster++;
// }
// }
// }
// if (cmptContigous>0) {
// assert list.get(cmptCluster)==cmptContigous;
// }
//
// }
@Override
public void solve() {
level=level.SILENT;
solver.findSolution();
writeResult();
}
public static void main(String[] args) {
new BlockClusterNonogramMinDom_LB(args[1],args[3]).execute(args);
}
}
| [
"anthony.palmieri@outlook.fr"
] | anthony.palmieri@outlook.fr |
722e72703a50652953bc059ec891435abae20c2a | 35ced6eed4c0089f46aa57570e4cd5f6a86ff6a6 | /app/src/main/java/sprotecc/com/example/easyhealth/eh_sprotecc/MySportData/Model/MySportDataModel.java | 1f1bd617d3d1899e4bccbd28a4a0fb580cbc2c76 | [] | no_license | lyl090425/gem-Ecc | 75e8c0ea3ccd10cf8182bf8c6224549950f5d8e0 | 7bca8ba13e45b988b1fd594c1b4bba056652f2f8 | refs/heads/master | 2021-05-01T17:14:05.359175 | 2017-01-19T01:00:40 | 2017-01-19T01:00:40 | 79,400,877 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 931 | java | package sprotecc.com.example.easyhealth.eh_sprotecc.MySportData.Model;
import com.ruite.gem.modal.人员信息.UserInfo;
import com.ruite.gem.modal.运动健康.运动.SportRank;
import java.util.Date;
import java.util.List;
/**
* Created by adminHjq on 2016/12/16.
*/
public interface MySportDataModel {
//用户信息相关
public void startGetUserInfoThread(String usercode);
public void callbackUserInfo(UserInfo userInfo);
public void storeUserInfo(List<UserInfo> list);//单个用户也采用List.
public UserInfo getUserInfo(String code);
//打卡相关
public void startPushCardThread(String code, Date date);
public void callbackPushCard(UserInfo userInfo,Date date );
public void storePushCardInfo(UserInfo userInfo,Date date);//单个用户也采用List.
//运动数据上传
public void startUploadSportThread();
public void callbackUploadSport(boolean b);
}
| [
"1045478315@qq.com"
] | 1045478315@qq.com |
ec67e4ae078679703e4287f945185d1e2fb84e8f | 6aa8173702d8d196a3d1884a8e03ecbdaee56f6d | /src/main/java/io/naztech/jobharvestar/scraper/JanusHendersonEmea.java | 9ff2d80762d05ed293b4a04277ce99026b8cacb8 | [] | no_license | armfahim/Job-Harvester | df762053cf285da87498faa705ec7a099fce1ea9 | 51dbc836a60b03c27c52cb38db7c19db5d91ddc9 | refs/heads/master | 2023-08-11T18:30:56.842891 | 2020-02-27T09:16:56 | 2020-02-27T09:16:56 | 243,461,410 | 3 | 0 | null | 2023-07-23T06:59:54 | 2020-02-27T07:48:57 | Java | UTF-8 | Java | false | false | 901 | java | package io.naztech.jobharvestar.scraper;
import org.springframework.stereotype.Service;
import io.naztech.jobharvestar.crawler.ShortName;
import io.naztech.talent.model.SiteMetaData;
/**
* JANUS HENDERSON INVESTORS EMEA/APAC<br>
* URL: https://career8.successfactors.com/career?company=Janus&career_ns=job_listing_summary&navBarLevel=JOB_SEARCH
*
* @author tanbirul.hashan
* @since 2019-02-20
*/
@Service
public class JanusHendersonEmea extends AbstractSuccessfactors {
private static final String SITE = ShortName.JANUS_HENDERSON_INVESTORS_EMEA;
private String baseUrl;
@Override
public void setBaseUrl(SiteMetaData site) {
this.baseUrl = site.getUrl().substring(0, 34);
}
@Override
public String getSiteName() {
return SITE;
}
@Override
protected String getBaseUrl() {
return this.baseUrl;
}
@Override
protected String getNextAnchorId() {
return "45:_next";
}
}
| [
"armfahim4010@gmail.com"
] | armfahim4010@gmail.com |
54d4a74b26b47f50c3378ca0a07f661ab17aaf22 | 72bb6bbdded8809ba9aefc0ce65d90a0708392fa | /src/org/overload1/CompanyInfo.java | fefbaeb3b24b4756dd04188d60d048fa8336e7d0 | [] | no_license | balajigithub003/Jan7am | 60179e9715d7cc388d2ed4186fe02654c05bbac8 | 8db0096df97b8f0d7040f0370d14fb9dab657a9d | refs/heads/master | 2023-06-08T06:45:06.674773 | 2023-05-30T15:56:01 | 2023-05-30T15:56:01 | 232,458,534 | 0 | 0 | null | 2023-05-30T16:00:52 | 2020-01-08T02:18:07 | Java | UTF-8 | Java | false | false | 841 | java | package org.overload1;
//Description
//You have to overload the method companyName() based on different Number of arguments.
public class CompanyInfo {
//method implement
public void companyName(int comId, String comName) {
System.out.println("The company details are "+ comId+comName);
}
public void companyName(int comId,String comName,float comNetwort) {
System.out.println("The company details are"+comId+comName+comNetwort);
}
public void companyName(int comId,String comName,float comNetwort,char comRank ) {
System.out.println("The company details are "+comId+comName+comNetwort+comRank);
}
public static void main(String[] args) {
CompanyInfo com = new CompanyInfo();
com.companyName(3377, "Hexaware");
com.companyName(3377, "Hexaware",35.000f );
com.companyName(3377, "Hexaware", 35.000f, 'A');
}
}
| [
"balajikrishnan003@gmail.com"
] | balajikrishnan003@gmail.com |
bae625aa6f707835c4a2401c01cbe970f3d0201f | 9d118916a2f6529e7b91875914dc57f6255437fb | /app/src/main/java/com/comers/shenwu/instant_run/android/tools/ir/common/ProtocolConstants.java | 62a8b0fdb203ab6415c919225d648a3bf3445493 | [] | no_license | comerss/NewFrame | 0db8555bc1907463cb17649fb276d0852d214ef8 | 264209a312c009e7f96825a2041536917b1263b3 | refs/heads/master | 2020-03-19T20:46:49.898026 | 2019-10-30T14:49:43 | 2019-10-30T14:49:43 | 136,916,331 | 11 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,125 | java | package com.comers.shenwu.instant_run.android.tools.ir.common;
public abstract interface ProtocolConstants
{
public static final long PROTOCOL_IDENTIFIER = 890269988L;
public static final int PROTOCOL_VERSION = 4;
public static final int MESSAGE_PATCHES = 1;
public static final int MESSAGE_PING = 2;
public static final int MESSAGE_PATH_EXISTS = 3;
public static final int MESSAGE_PATH_CHECKSUM = 4;
public static final int MESSAGE_RESTART_ACTIVITY = 5;
public static final int MESSAGE_SHOW_TOAST = 6;
public static final int MESSAGE_EOF = 7;
public static final int MESSAGE_SEND_FILE = 8;
public static final int MESSAGE_SHELL_COMMAND = 9;
public static final int UPDATE_MODE_NONE = 0;
public static final int UPDATE_MODE_HOT_SWAP = 1;
public static final int UPDATE_MODE_WARM_SWAP = 2;
public static final int UPDATE_MODE_COLD_SWAP = 3;
}
/* Location: /Volumes/Work/works/Diooto/app/build/intermediates/incremental-runtime-classes/debug/instant-run.jar!/com/android/tools/ir/common/ProtocolConstants.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"yeqinghua@donews.com"
] | yeqinghua@donews.com |
4a1b675bd4971a1a196a0b38efecea6054a49a26 | c79021ef201a8a784929f0c6337ccba305d02389 | /src/test/java/com/github/springbootdemotest/SpringbootDemoTestApplicationTests.java | f10ab4d67a93a78497a11153298f0cc12fd28fd3 | [] | no_license | li-zhang-yu/springboot-demo-test | 8c28ff77f4fcb3004aac0d13dfbff81d645e26b5 | 83263fb589c57e23d5766d732e90d4ffc2ac607c | refs/heads/master | 2020-06-01T23:10:19.944963 | 2019-06-11T14:27:14 | 2019-06-11T14:27:14 | 190,961,601 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 367 | java | package com.github.springbootdemotest;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringbootDemoTestApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"1641189550@qq.com"
] | 1641189550@qq.com |
fb8c49a7fd0bc0e6f716b3057d3142dd9ad3f9db | ee3e30a6d5990432657214fedd81b2083c26ab28 | /hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/CqifRecommendationStrengthEnumFactory.java | d3019d5cb270227be442375ece5c540e9fa33c7b | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | herimakil/hapi-fhir | 588938b328e3c83809617b674ff25903c1541bab | 15cc76600069af8f3d7419575d4cfb9e4b613db0 | refs/heads/master | 2021-01-19T20:43:57.911661 | 2017-04-14T15:27:37 | 2017-04-14T15:27:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,643 | java | package org.hl7.fhir.dstu3.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sat, Mar 4, 2017 06:58-0500 for FHIR v1.9.0
import org.hl7.fhir.dstu3.model.EnumFactory;
public class CqifRecommendationStrengthEnumFactory implements EnumFactory<CqifRecommendationStrength> {
public CqifRecommendationStrength fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("strong".equals(codeString))
return CqifRecommendationStrength.STRONG;
if ("weak".equals(codeString))
return CqifRecommendationStrength.WEAK;
throw new IllegalArgumentException("Unknown CqifRecommendationStrength code '"+codeString+"'");
}
public String toCode(CqifRecommendationStrength code) {
if (code == CqifRecommendationStrength.STRONG)
return "strong";
if (code == CqifRecommendationStrength.WEAK)
return "weak";
return "?";
}
public String toSystem(CqifRecommendationStrength code) {
return code.getSystem();
}
}
| [
"jamesagnew@gmail.com"
] | jamesagnew@gmail.com |
21d2b46c12d6c329448879e5a1a9a3cf8c745d6e | 7351dfffc2fcf3dbe708168ef51c55c756f4b68f | /src/main/java/ru/demi/interview/preparation/arrays/NewYearChaos.java | 05529cbb2e71c6a38e8f9f2139f921ff1a0f4074 | [] | no_license | dmitry-izmerov/hackerrank | 87e63090b50fa6a80a8d5705f24041cb8af0f5d5 | d38ef6713bba068e49c2724bf2abd656b42f8a29 | refs/heads/master | 2021-04-03T06:18:08.376959 | 2019-09-13T18:51:39 | 2019-09-13T18:51:39 | 124,564,879 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,291 | java | package ru.demi.interview.preparation.arrays;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;
/**
* Complete the function which must print an integer representing the minimum number of bribes necessary,
* or Too chaotic if the line configuration is not possible.
*/
public class NewYearChaos {
private static final String BAD_CASE_MESSAGE = "Too chaotic";
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
for (int tItr = 0; tItr < t; tItr++) {
int n = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
int[] q = new int[n];
String[] qItems = scanner.nextLine().split(" ");
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
for (int i = 0; i < n; i++) {
int qItem = Integer.parseInt(qItems[i]);
q[i] = qItem;
}
minimumBribes(q);
}
scanner.close();
}
private static void minimumBribes(int[] ar) {
List<Integer> nums = Arrays.stream(ar).boxed().collect(Collectors.toList());
Map<Integer, Integer> swapCounter = new HashMap<>();
int numSwaps = 0;
int numSwapsPerIteration;
do {
numSwapsPerIteration = 0;
for (int i = 0; i < ar.length - 1; i++) {
Integer left = nums.get(i);
Integer right = nums.get(i + 1);
if (left > right) {
if (swapCounter.getOrDefault(left, 0) == 2) {
System.out.println(BAD_CASE_MESSAGE);
return;
}
swapCounter.computeIfPresent(left, (k, v) -> v + 1);
swapCounter.putIfAbsent(left, 1);
nums.set(i + 1, left);
nums.set(i, right);
++numSwapsPerIteration;
}
}
numSwaps += numSwapsPerIteration;
} while (numSwapsPerIteration != 0);
System.out.println(numSwaps);
}
}
| [
"idd90i@gmail.com"
] | idd90i@gmail.com |
b56f5dc8c825446194dd4013f38f75ad6c4ce4cd | 183d0698836ffbd70f74d85e657b9d6b83cfdd4a | /test/sk/kosickaakademia/lenart/person/PersonTest.java | 16bb3fcfaef2736393b6be69a609acc2845ca6f7 | [] | no_license | SamuelLenart/TicTacToeV0.2 | 220f48a23d03f348068556f0788aabbdb37acc9e | c4ccc15ed4d007ff0ee7e8412dedfe966552d783 | refs/heads/main | 2023-04-26T00:37:51.975782 | 2021-06-04T07:43:57 | 2021-06-04T07:43:57 | 370,985,221 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 620 | java | package sk.kosickaakademia.lenart.person;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class PersonTest {
@Test
void testHashCode() {
var person = new Person("Samo", "Rozsypany", 'm', 20);
assertEquals(10, person.hashCode());
person = new Person("Silvia", "Novakova", 'm', 25);
assertEquals(37, person.hashCode());
person = new Person ("David", "Rusniak", 'f', 20);
assertEquals(31, person.hashCode());
person = new Person ("Janka", "Mrkvickova", 'f', 20);
assertEquals(31, person.hashCode());
}
} | [
"samuel.lenart@kosickaakademia.sk"
] | samuel.lenart@kosickaakademia.sk |
acc5bf0e6d505a76bcc8adb1444779af79da268b | 51fd89bdeb4e16d2092d4a0b353e5db4a7823327 | /user_service/src/main/java/ba/unsa/etf/nwt/user_service/config/SecurityConfig.java | f2c660b94df0919b00f27f31f776b75bac653c96 | [] | no_license | SamraMujcinovic/PetCare | d5366c149e37019feb000df1bc545d7ad05b43c6 | 95b29ad509e76891081bac33fead2ceef0f318c3 | refs/heads/master | 2023-07-02T18:00:24.322271 | 2021-07-13T16:32:51 | 2021-07-13T16:32:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,101 | java | package ba.unsa.etf.nwt.user_service.config;
import ba.unsa.etf.nwt.user_service.security.CustomUserDetailsService;
import ba.unsa.etf.nwt.user_service.security.JwtAuthenticationEntryPoint;
import ba.unsa.etf.nwt.user_service.security.JwtAuthenticationFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.BeanIds;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(
securedEnabled = true,
jsr250Enabled = true,
prePostEnabled = true
)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private CustomUserDetailsService customUserDetailsService;
@Autowired
private JwtAuthenticationEntryPoint unauthorizedHandler;
@Bean
public JwtAuthenticationFilter jwtAuthenticationFilter() {
return new JwtAuthenticationFilter();
}
@Override
public void configure(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {
authenticationManagerBuilder
.userDetailsService(customUserDetailsService)
.passwordEncoder(passwordEncoder());
}
@Bean(BeanIds.AUTHENTICATION_MANAGER)
@Override
public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean();
}
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.cors()
.and()
.csrf()
.disable()
.exceptionHandling()
.authenticationEntryPoint(unauthorizedHandler)
.and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeRequests()
.antMatchers("/",
"/favicon.ico",
"/**/*.png",
"/**/*.gif",
"/**/*.svg",
"/**/*.jpg",
"/**/*.html",
"/**/*.css",
"/**/*.js")
.permitAll()
.antMatchers("/api/auth/**", "/swagger-ui.html", "/swagger-resources/**",
"/v2/**", "/webjars/**", "/recovery/**", "/email/**")
.permitAll()
.antMatchers("/user/usernameCheck", "/user/emailCheck")
.permitAll()
.antMatchers(HttpMethod.GET, "/questions", "/eureka/**", "/login/token",
"/user/{username}", "/auth/load/**")
.permitAll()
.antMatchers(HttpMethod.POST)
.permitAll()
.anyRequest()
.authenticated();
// Add our custom JWT security filter
http.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);
}
}
| [
"alakovic1@etf.unsa.ba"
] | alakovic1@etf.unsa.ba |
003a3127eb8c6d24476495a295a00590cd54a14e | 9b8c6cbeb07c074a667ee687a9fb2b3707396fd4 | /test-case/springboot-rabbitmq/src/main/java/com/redcode/workbench/springbootrabbitmq/listener/TopicMsgRec1.java | f1ae7fb711f89dc39fd7e6070f25ffdea772e275 | [] | no_license | simplezzy/red_workbench | b1ba4b9bebb929c29b903b2f7632765bd8e84be8 | ac01bf6a2345f10a6009ebbca7baf5929eb587dd | refs/heads/master | 2020-04-05T13:07:16.406101 | 2017-07-03T10:43:57 | 2017-07-03T10:43:57 | 95,100,023 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 384 | java | package com.redcode.workbench.springbootrabbitmq.listener;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
@Component
public class TopicMsgRec1 {
@RabbitListener(queues = "topic.message")
public void onMessage(String msg) {
System.out.println("topicMessageReceiver1: " + msg);
}
}
| [
"simple_yu@sjtu.edu.cn"
] | simple_yu@sjtu.edu.cn |
1f310ee776f4fe2ea1e57f5d233151dee6b76fe3 | ba8c312d46cd8836fe4cf543c6ce0ebfa150a624 | /src/main/java/com/group/FakeMyspace/models/Friend.java | b404de348be06b426ff3dc6fd4ddd0eb7064cc91 | [] | no_license | renchong1993/MySpace | 7dd6516ec78b40d1bc16b03a296704e8c991e206 | e1cfcd2f319d72b59c7ba820f47faddc34460920 | refs/heads/main | 2023-08-12T07:26:18.427845 | 2021-09-28T04:11:18 | 2021-09-28T04:11:18 | 411,132,540 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,404 | java | package com.group.FakeMyspace.models;
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
import javax.persistence.Table;
@Entity
//@TypeConverter(name="booleanToInteger", boolean = Integer.class) <-Try to convery boolean to int
@Table(name="friends")
public class Friend {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
private boolean approve; //default as 0 and change to 1 if receiver approves, the all friend list show only the approve.Ture
@Column(updatable=false)
private Date createAt;
private Date updatedAt;
@PrePersist
protected void onCreate() {
this.createAt = new Date();
}
@PreUpdate
protected void onUpdate() {
this.updatedAt = new Date();
}
//================ Relationship =================//
//===== M21 User&Frienfds =====//
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="user_id")
private User owner;
//===== 121 Friend&User =====//
@OneToOne(mappedBy="oneFriend", cascade=CascadeType.ALL, fetch=FetchType.LAZY)
private User oneUser;
//================ Constructor =================//
public Friend() {
}
public Friend(User owner, User oneUser) {
this.owner = owner;
this.oneUser = oneUser;
}
//================ Getter&Setter =================//
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public User getOwner() {
return owner;
}
public void setOwner(User owner) {
this.owner = owner;
}
public User getOneUser() {
return oneUser;
}
public void setOneUser(User oneUser) {
this.oneUser = oneUser;
}
public Date getCreateAt() {
return createAt;
}
public void setCreateAt(Date createAt) {
this.createAt = createAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public boolean isApprove() {
return approve;
}
public void setApprove(boolean approve) {
this.approve = approve;
}
}
| [
"renchong1993@gmail.com"
] | renchong1993@gmail.com |
2568aced417db733b70d31a8e4a4d676f7d60401 | 56708835a5f176075230ba0c0b936c0a67f5c76c | /componentlib/src/test/java/com/example/cheers/componentlib/ExampleUnitTest.java | 3848a3abb3db48fa94d423146cda6756ed707f8a | [] | no_license | clxr59/ComponentDemo | f70fa78ee9eda1b41ca34ec818fd9a296b03c126 | 89f6677f79952201e747bc9f21d820cb68eee802 | refs/heads/master | 2020-04-25T02:24:03.338281 | 2019-02-25T06:09:38 | 2019-02-25T06:09:38 | 172,437,770 | 10 | 1 | null | null | null | null | UTF-8 | Java | false | false | 392 | java | package com.example.cheers.componentlib;
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() {
assertEquals(4, 2 + 2);
}
} | [
"11764640253@qq.com"
] | 11764640253@qq.com |
273eb69f386f92b9a02fa1b60d9f19328fd28cf1 | 1e109337f4a2de0d7f9a33f11f029552617e7d2e | /jcatapult-mvc/tags/1.0.17/src/java/main/org/jcatapult/mvc/validation/EmailValidator.java | baefb88e322dabaf7a01d219325db80f53b674c8 | [] | no_license | Letractively/jcatapult | 54fb8acb193bc251e5984c80eba997793844059f | f903b78ce32cc5468e48cd7fde220185b2deecb6 | refs/heads/master | 2021-01-10T16:54:58.441959 | 2011-12-29T00:43:26 | 2011-12-29T00:43:26 | 45,956,606 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,746 | java | /*
* Copyright (c) 2001-2007, JCatapult.org, 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.
*/
package org.jcatapult.mvc.validation;
import java.util.regex.Pattern;
import org.jcatapult.mvc.validation.annotation.Email;
/**
* <p>
* This class verifies that the value is an email address using a relaxed regex
* (because the all two letter TLDs are allowed).
* </p>
*
* @author Brian Pontarelli
*/
public class EmailValidator implements Validator<Email> {
public static final Pattern emailPattern = Pattern.compile("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+(?:[a-z]{2}|aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel)");
/**
* @param annotation Not used.
* @param container Not used.
* @param value The value to check.
* @return True if the value matches the pattern, false otherwise.
*/
public boolean validate(Email annotation, Object container, Object value) {
if (value == null) {
return true;
}
String email = value.toString();
return emailPattern.matcher(email.toLowerCase()).matches();
}
} | [
"bpontarelli@b10e9645-db3f-0410-a6c5-e135923ffca7"
] | bpontarelli@b10e9645-db3f-0410-a6c5-e135923ffca7 |
3db0addf7fef92d61d806145e512db85c4c0fee2 | be45dc2a1e60564770de12de9c4fcd909bf4132e | /displayjokeslibrary/src/androidTest/java/com/pklein/displayjokeslibrary/ExampleInstrumentedTest.java | c41601d324adf69c8aaa93ad1e187c7b8fed55dc | [] | no_license | PaulineKlein/BuildItBigger | e5affb8351ed686220ed4c92f932bf2daa026adf | 0944c5ae57f0cf1d55de11550b0a1794933b3fee | refs/heads/master | 2020-03-19T02:23:03.821807 | 2018-06-07T18:56:33 | 2018-06-07T18:56:33 | 135,624,011 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 766 | java | package com.pklein.displayjokeslibrary;
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.pklein.displayjokeslibrary.test", appContext.getPackageName());
}
}
| [
"klein.pauline67@gmail.com"
] | klein.pauline67@gmail.com |
ca20abc0b0a7d7cba72fa1a8fc9bbe0780f97f19 | e562fd1103e2c5d8ac50d53d83ed8dd96ffb1948 | /app/src/main/java/org/geometerplus/android/fbreader/SelectionBookmarkAction.java | 078d42de1c0b29cf4c0de6af1515d78268a23a29 | [] | no_license | nobady/BookReader | 1ba21eecc6d9214d77f1211a5fc6dd2788765df5 | c41ced8f2449693fc7480536dc58516293e8731b | refs/heads/master | 2020-07-27T14:34:55.754992 | 2016-08-25T15:33:07 | 2016-08-25T15:33:07 | 65,986,301 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,365 | java | /*
* Copyright (C) 2007-2013 Geometer Plus <contact@geometerplus.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
package org.geometerplus.android.fbreader;
import android.content.Intent;
import org.geometerplus.zlibrary.core.resources.ZLResource;
import org.geometerplus.fbreader.book.Bookmark;
import org.geometerplus.fbreader.book.SerializerUtil;
import org.geometerplus.fbreader.fbreader.FBReaderApp;
import org.geometerplus.android.fbreader.style.StyleListActivity;
import org.geometerplus.android.util.UIUtil;
public class SelectionBookmarkAction extends FBAndroidAction {
SelectionBookmarkAction(FBReader baseApplication, FBReaderApp fbreader) {
super(baseApplication, fbreader);
}
@Override
protected void run(Object... params) {
final boolean existingBookmark;
final Bookmark bookmark;
if (params.length != 0) {
existingBookmark = true;
bookmark = (Bookmark) params[0];
} else {
existingBookmark = false;
bookmark = Reader.addSelectionBookmark();
UIUtil.showMessageText(
BaseActivity,
ZLResource.resource("selection").getResource("bookmarkCreated").getValue()
.replace("%s", bookmark.getText())
);
}
final Intent intent =
new Intent(BaseActivity.getApplicationContext(), StyleListActivity.class);
intent.putExtra(FBReader.BOOKMARK_KEY, SerializerUtil.serialize(bookmark));
intent.putExtra(StyleListActivity.EXISTING_BOOKMARK_KEY, existingBookmark);
OrientationUtil.startActivity(BaseActivity, intent);
}
}
| [
"1374966541@qq.com"
] | 1374966541@qq.com |
4a0d5d65f989411c0d8a86c33e8bac11d08eed49 | c30beecbe25d811e252a62e89c38b929e8601282 | /src/main/java/com/raymor/kpi/db/web/rest/ClientForwardController.java | 45256574d28a356618819b848f6e5e4607f44d7c | [] | no_license | alfonsomarquez1/kpi-db-raymor | e7ef431a29386bfdabd2ed8eb3d304ac88c3e42f | d6c5ec6911924fb6c6359a189b9effbe36a07c65 | refs/heads/master | 2022-11-30T20:17:10.095544 | 2020-08-16T17:53:45 | 2020-08-16T17:53:45 | 287,995,847 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 484 | java | package com.raymor.kpi.db.web.rest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class ClientForwardController {
/**
* Forwards any unmapped paths (except those containing a period) to the client {@code index.html}.
* @return forward to client {@code index.html}.
*/
@GetMapping(value = "/**/{path:[^\\.]*}")
public String forward() {
return "forward:/";
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
5b53eda2f954cb6554cb2312b7c87ba0bf53bd7e | 9d8376bc433b807eb6839adbe6c946436bad16c0 | /src/java_chobo2/ch10/DateToCalendarEx.java | 81cb65eed58dc0383d45c348ddd0c92ca5c1e213 | [] | no_license | mywns123/java_chobo2 | 96238611714c9b6672636cd9b5ae6e44924177ee | ae5f6b94bc4b88bd700e0b8e168fc4c4245bc59a | refs/heads/master | 2023-03-21T23:03:26.493958 | 2021-03-09T07:47:35 | 2021-03-09T07:47:35 | 341,818,610 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,033 | java | package java_chobo2.ch10;
import java.util.Calendar;
import java.util.Date;
public class DateToCalendarEx {
@SuppressWarnings("deprecation")
public static void main(String[] args) {
Calendar cal = Calendar.getInstance();
cal.clear();
cal.set(2020, 0, 1);
System.out.println(cal.get(Calendar.YEAR) + "-" + (cal.get(Calendar.MONTH) + 1) + "-" + cal.get(Calendar.DATE));
Date d = new Date();
d.setYear(19);
d.setMonth(0);
d.setDate(1);
System.out.printf("%tF %n", d);
convCalToDate(cal);
convDateToCal(d);
}
private static void convCalToDate(Calendar cal) {
System.out.println("convert Calendar To Date()");
Date d = new Date(cal.getTimeInMillis());
System.out.printf("%tF %n", d);
}
private static void convDateToCal(Date d) {
System.out.println("convDateToCal()");
Calendar cal = Calendar.getInstance();
cal.setTime(d);
System.out.println(cal.get(Calendar.YEAR) + "-" + (cal.get(Calendar.MONTH) + 1) + "-" + cal.get(Calendar.DATE));
}
}
| [
"wnsduq2000@naver.com"
] | wnsduq2000@naver.com |
89a921c23ee368471d840e835a116e6335e880bb | c9dc3ffd69dc60ad20bfbc2c56c63fe553809ac2 | /src/main/java/com/example/demo/CommentApplication.java | 69b1e121323bb65b2142ea1f8002aa6c17856f8f | [] | no_license | shensongpeng/comment | d359f5677897fae6187adecb27d8acd088882c11 | 9adcf7f87bf8ea28d4d183422a15ad6559e92563 | refs/heads/master | 2023-01-31T02:18:11.943280 | 2020-12-11T07:10:03 | 2020-12-11T07:10:03 | 320,489,626 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 323 | java | package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class CommentApplication {
public static void main(String[] args) {
SpringApplication.run(CommentApplication.class, args);
}
}
| [
"1054282887@qq.com"
] | 1054282887@qq.com |
568a87f3761d87ea9fe70080bc8ec5eda52fc9c1 | 229a32b4cc0d0bafc2286159c31c6e12306bc8ca | /src/main/java/com/lin/missyou/vo/CategoriesAllVO.java | ea9b6b67c908d1afca5b188d3f816c88575adc38 | [] | no_license | Jamboy/mpApiDemo | 1a66ac808a6effcbaa26a677a3b9b9f2e9dd8d39 | 46fb820573a1c8367f3e6d348fe9e903f327be8f | refs/heads/main | 2023-06-15T00:00:24.355957 | 2021-07-08T03:04:55 | 2021-07-08T03:04:55 | 383,980,597 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 911 | java | /**
* @作者 7七月
* @微信公号 林间有风
* @开源项目 $ http://7yue.pro
* @免费专栏 $ http://course.7yue.pro
* @我的课程 $ http://imooc.com/t/4294850
* @创建时间 2020-03-09 19:11
*/
package com.lin.missyou.vo;
import com.lin.missyou.model.Category;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Getter
@Setter
public class CategoriesAllVO {
private List<CategoryPureVO> roots;
private List<CategoryPureVO> subs;
public CategoriesAllVO(Map<Integer, List<Category>> map) {
// List<Category> roots = map.get(1);
this.roots = map.get(1).stream()
.map(CategoryPureVO::new)
.collect(Collectors.toList());
this.subs = map.get(2).stream()
.map(CategoryPureVO::new)
.collect(Collectors.toList());
}
}
| [
"jamboylive@gmail.com"
] | jamboylive@gmail.com |
1dbb5133eee675406141c014053611a32547415b | 167dbd0e892e63f2e21b06d879c2264d9add00ad | /src/main/java/com/github/turchev/carrepairshop/view/UiException.java | 3b7eae877dac6f1362b24026798163f17615ecce | [] | no_license | turchev/car-repair-shop | 81b4264ea09826a989e18c031db8addb3a74c9a7 | 83af7b5c3ce854d431848db01513a940ee60f5d4 | refs/heads/master | 2022-02-06T14:58:07.561816 | 2021-12-15T06:33:50 | 2021-12-15T06:33:50 | 144,964,598 | 0 | 1 | null | 2022-01-04T16:32:45 | 2018-08-16T09:11:02 | Java | UTF-8 | Java | false | false | 244 | java | package com.github.turchev.carrepairshop.view;
public class UiException extends Exception {
public UiException(Throwable throwable) {
super(throwable);
}
public UiException(String string) {
super(string);
}
}
| [
"turchev@gmail.com"
] | turchev@gmail.com |
993859de7e5b5ddb0ca48359ace74d18f26aadba | 15b9da747ef461c8d6c1e1e285424e921dbe9a40 | /wonDemo/DemoAop2/src/main/java/com/example/Interceptor.java | d507a8f69f6e2c0ea364d6d5d402bbd379179479 | [] | no_license | wonhoLee/wonStudy | 2e3d6757bfc4434071c5d416a73bf189078cc122 | e206597be598aa16811ed050e65bc5d582c3bf62 | refs/heads/master | 2023-01-24T21:26:41.003290 | 2021-01-16T13:57:40 | 2021-01-16T13:57:40 | 148,777,648 | 0 | 0 | null | 2023-01-06T01:36:16 | 2018-09-14T11:09:19 | Java | UTF-8 | Java | false | false | 2,282 | java | package com.example;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
@Aspect
@ConfigurationProperties("interceptor")
public class Interceptor {
private static final Logger logger = LoggerFactory.getLogger(Interceptor.class);
/**
* Message to print on startup
*/
private String message = "Startup";
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
// @Around("execution(* *(..)) && !within(com.example.Interceptor)"
// + " && (within(org.springframework.context.annotation.Condition+) || within(com.example..*))")
// public Object intercept(ProceedingJoinPoint joinPoint) throws Throwable {
// Object result = joinPoint.proceed();
// logger.debug("AspectJ intercept: " + joinPoint.toShortString() + ": " + result);
// return result;
// }
@Around("execution(* *(..)) && within(com.example..*) && !within(com.example.Interceptor+)")
public Object stack(ProceedingJoinPoint joinPoint) throws Throwable {
logger.debug("AspectJ stack: " + joinPoint.toShortString());
return joinPoint.proceed();
}
@Pointcut("@annotation(MaskingAnno)")
public void callAt(MaskingAnno secured) {
}
@Around("callAt(MaskingAnno)")
public Object around(ProceedingJoinPoint pjp,
MaskingAnno secured) throws Throwable {
logger.info("WON!!!!!!!!!!!!!");
return pjp.proceed();
}
@Pointcut("@annotation(MaskingFieldAnno)")
public void callAt2(MaskingFieldAnno secured) {
}
@Around("callAt2(MaskingFieldAnno)")
public Object around2(ProceedingJoinPoint pjp,
MaskingFieldAnno secured) throws Throwable {
logger.info(pjp.toShortString());
logger.info("WON2222222222");
return pjp.proceed();
}
@EventListener
public void started(ContextRefreshedEvent event) {
logger.debug("AspectJ started: " + message + ": " + event);
}
}
| [
"lwonho@hotmail.com"
] | lwonho@hotmail.com |
8017fc0c7677c02dfbaff89f13415469519cd815 | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.socialplatform-base/sources/com/oculus/messengervr/oc/$$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42.java | 9c23e3cc7b3d114fa0a759317b60d9c700935f00 | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 606 | java | package com.oculus.messengervr.oc;
import X.AbstractC12851yS;
/* renamed from: com.oculus.messengervr.oc.-$$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42 reason: invalid class name */
public final /* synthetic */ class $$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42 implements AbstractC12851yS {
public static final /* synthetic */ $$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42 INSTANCE = new $$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42();
@Override // X.AbstractC12851yS
public final void accept(Object obj) {
}
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
ce03d269642432a0bf5f1e80541738a8404ce2fe | 26895eb9bb0923eca390157e2742d2c08bce63a9 | /HomeWork2/src/Tasks/Shape.java | 2c07fa278820cf66faf45cab07da14cdd317b2f1 | [] | no_license | Jack1Life/Java | 9bf2ad32536ba637f33e79fd862e5db7eca39a7e | 4e9000cff4212bb52d8e7656270570647ca13c61 | refs/heads/master | 2020-06-30T02:24:04.170299 | 2019-08-27T13:35:59 | 2019-08-27T13:35:59 | 200,691,936 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 136 | java | package Tasks;
public abstract class Shape {
abstract double getPerimetr();
abstract double getArea();
abstract String getInfo();
}
| [
"eugen.gorbul@gmail.com"
] | eugen.gorbul@gmail.com |
c69ff61341f1d8306e944548f1519dc08f569e20 | ff6ea8c42b894a7224c842193ef5bd10e332ea33 | /app/src/main/java/iit2/app/settingpage.java | d4e382f4bd97f24c577be7cdd2a646108639d021 | [] | no_license | Sidhanthsur/MTC_APP | 4fca5c4fc41771df16772c37a9fd2839b82a0b25 | d3af4fa1a0b78ab31e946002bcadd346c02769f7 | refs/heads/master | 2016-08-05T20:46:05.803259 | 2015-01-10T18:49:43 | 2015-01-10T18:49:43 | 29,066,738 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,129 | java | package iit2.app;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
public class settingpage extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settingpage);
//This opens a link
TextView mLink = (TextView) findViewById(R.id.helpoption);
if (mLink != null) {
mLink.setMovementMethod(LinkMovementMethod.getInstance());
}
}
//Function called when Feedback is pressed
public void sendfeedback(View view) {
Intent email = new Intent(android.content.Intent.ACTION_SEND);
email.setType("text/html");
// email.putExtra(Intent.EXTRA_CC,new String[]{"Your CC Mail ID"});
//CHange Id here
email.putExtra(Intent.EXTRA_EMAIL, new String[]{"tchinmai7@gmail.com"});
email.putExtra(android.content.Intent.EXTRA_SUBJECT, "FeedBack");
startActivity(email);
}
//THis function creates an intent to bind 'settings' and 'about' activites
public void openaboutpage(View view)
{
Intent intent = new Intent();
intent.setClass(this,aboutpage.class);
startActivity(intent);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
// getMenuInflater().inflate(R.menu.settingpage, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"sidhanth.surana12@gmail.com"
] | sidhanth.surana12@gmail.com |
5ea8d24ae1c87fc8f8612c12ebfb1fe9a74e8ae6 | 3c7abb96bc7754e003849b0736d8113d0cdf0dab | /JReviewBoardApi/src/com/reviewboard/api/model/diffcomment/Links.java | eb7c5cc91bf4bafd5c04bde58d57b2e62b936cbc | [] | no_license | shaikidris/jreviewboardapi | 4198e1cddec9a8fca06900a435958ffca20257f3 | 7fcb943531fdc49705ef3ade927007a2410cd2d3 | refs/heads/master | 2021-01-01T17:28:13.216406 | 2012-06-04T16:46:24 | 2012-06-04T16:46:24 | 41,742,731 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,726 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2011.09.26 at 08:02:07 PM BRT
//
package com.reviewboard.api.model.diffcomment;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{}user" minOccurs="0"/>
* <element ref="{}self"/>
* <choice>
* <element ref="{}create"/>
* <sequence>
* <element ref="{}filediff"/>
* <element ref="{}update"/>
* <element ref="{}delete"/>
* </sequence>
* </choice>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"user",
"self",
"create",
"filediff",
"update",
"delete"
})
@XmlRootElement(name = "links")
public class Links {
protected User user;
@XmlElement(required = true)
protected Self self;
protected Create create;
protected Filediff filediff;
protected Update update;
protected Delete delete;
/**
* Gets the value of the user property.
*
* @return
* possible object is
* {@link User }
*
*/
public User getUser() {
return user;
}
/**
* Sets the value of the user property.
*
* @param value
* allowed object is
* {@link User }
*
*/
public void setUser(User value) {
this.user = value;
}
/**
* Gets the value of the self property.
*
* @return
* possible object is
* {@link Self }
*
*/
public Self getSelf() {
return self;
}
/**
* Sets the value of the self property.
*
* @param value
* allowed object is
* {@link Self }
*
*/
public void setSelf(Self value) {
this.self = value;
}
/**
* Gets the value of the create property.
*
* @return
* possible object is
* {@link Create }
*
*/
public Create getCreate() {
return create;
}
/**
* Sets the value of the create property.
*
* @param value
* allowed object is
* {@link Create }
*
*/
public void setCreate(Create value) {
this.create = value;
}
/**
* Gets the value of the filediff property.
*
* @return
* possible object is
* {@link Filediff }
*
*/
public Filediff getFilediff() {
return filediff;
}
/**
* Sets the value of the filediff property.
*
* @param value
* allowed object is
* {@link Filediff }
*
*/
public void setFilediff(Filediff value) {
this.filediff = value;
}
/**
* Gets the value of the update property.
*
* @return
* possible object is
* {@link Update }
*
*/
public Update getUpdate() {
return update;
}
/**
* Sets the value of the update property.
*
* @param value
* allowed object is
* {@link Update }
*
*/
public void setUpdate(Update value) {
this.update = value;
}
/**
* Gets the value of the delete property.
*
* @return
* possible object is
* {@link Delete }
*
*/
public Delete getDelete() {
return delete;
}
/**
* Sets the value of the delete property.
*
* @param value
* allowed object is
* {@link Delete }
*
*/
public void setDelete(Delete value) {
this.delete = value;
}
}
| [
"gonella@gmail.com"
] | gonella@gmail.com |
51c563e3d5e8975ed6d9838455f48775d53ff2fe | a76da95806a21c60d2b2f5377f3e09b6b4df010d | /HomeWork/src/day06/Test04.java | 5746967e38a2c2d315a32cb0af7471526d97c8dc | [] | no_license | Threkt/HomeWork | 1b0900dae360e5cf9e2232140e4c02bbea78d31a | 647003964d3302ca8789e8292ff7047ed5ad0377 | refs/heads/master | 2022-11-28T02:42:29.307772 | 2020-08-12T12:32:10 | 2020-08-12T12:32:10 | 281,938,477 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 427 | java | package day06;
import org.junit.Test;
import java.io.File;
/**
* 获取并输出当前目录下的所有文件和目录的名字
* @author Bonnie
*
*/
public class Test04 {
@Test
public void Test01() {
File file = new File(".");
System.out.println(file.getAbsoluteFile());
String[] list = file.list();
for (String s : list) {
System.out.println(s);
}
}
}
| [
"541068349@qq.com"
] | 541068349@qq.com |
05cd432a90b08fac45466b659e3bd6e10d3ca5c8 | c25164c5176f4fb9534463ce6647697692ba6ff9 | /prototype/src/net/ircubic/eventmap/ConflictResolution.java | 2cb02919dd8585a490e59e51ef1036c9e368351e | [] | no_license | ircubic/School-project--Plandroid | 2df70a859b234713b8f2b15acd5ab4a40eb47e54 | 15f546f3d96479c355863b32c62e4886d1e44f10 | refs/heads/master | 2016-09-06T16:56:42.968751 | 2011-07-25T11:21:00 | 2011-07-25T11:21:00 | 2,100,549 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,858 | java | package net.ircubic.eventmap;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Random;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
public class ConflictResolution extends ListActivity
{
public static final int RESOLVE = 0;
private FriendConflictAdapter adapter;
private final ArrayList<FriendConflict> conflicts = new ArrayList<FriendConflict>();
@Override
protected void onCreate(final Bundle savedInstanceState)
{
final Intent data = getIntent();
final Serializable x = data.getSerializableExtra("conflicts");
if (x != null) {
@SuppressWarnings("unchecked")
final ArrayList<Long> ids = (ArrayList<Long>)x;
if (ids.size() > 0) {
final String where = String.format("%s IN (%s)",
FriendProvider.KEY_ID, TextUtils.join(",", ids));
final Cursor c = managedQuery(FriendProvider.CONTENT_URI, null,
where, null, FriendProvider.KEY_NAME + " ASC");
final String[] events = {"Wedding", "Birthday party",
"Movie evening", "Dinner", "Lunch", "Get-together",
"Going to nightclub", "Family night", "Game-night",
"Date"};
final Random rand = new Random();
while (c.moveToNext()) {
final Long id = c.getLong(0);
final String name = c.getString(1);
final String message = events[rand.nextInt(events.length)];
conflicts.add(new FriendConflict(id, name, message));
}
}
}
if (conflicts.size() == 0) {
final Toast toast = Toast.makeText(getApplicationContext(),
"Tried to handle a zero-conflict", Toast.LENGTH_LONG);
toast.show();
finish();
}
final TextView desctext = new TextView(this);
desctext.setText(R.string.conflict_description);
getListView().addHeaderView(desctext);
final Button finish = new Button(this);
finish.setText(R.string.conflict_finish_button);
finish.setOnClickListener(new OnClickListener() {
public void onClick(final View v)
{
finishResolving();
}
});
getListView().addFooterView(finish);
adapter = new FriendConflictAdapter(this, conflicts);
setListAdapter(adapter);
setTitle(R.string.title_resolve_conflict);
super.onCreate(savedInstanceState);
}
protected void finishResolving()
{
// TODO Finish resolving
setResult(RESULT_OK);
finish();
}
public void removeClicked(final View v)
{
final ImageButton removeButton = (ImageButton)v;
final View parent = (View)removeButton.getParent();
final FriendConflict f = (FriendConflict)parent
.getTag(R.id.conflict_position);
conflicts.remove(f);
adapter.notifyDataSetChanged();
}
}
| [
"ircubic@gmail.com"
] | ircubic@gmail.com |
911fd3d1eb0f24a41c101e7d9d3bd28ede005a6e | 61b4787bf43b0a2a97f20387c5aad27ca929716c | /JokeGenerator/app/src/main/java/com/example/jokegenerator/SearchHistoryActivity.java | 0d42f3a21f43f6304f4d5dad866e791416aa0554 | [] | no_license | TheMattMan04/Joke-Generator | f9d0289dcdf62f0294d1a3f79cee4efb16a2e544 | 38c6436d311fb0b7aab8a133451418632036e255 | refs/heads/master | 2020-06-13T04:53:47.035454 | 2020-06-03T13:25:54 | 2020-06-03T13:25:54 | 194,542,694 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,452 | java | package com.example.jokegenerator;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
import java.util.ArrayList;
public class SearchHistoryActivity extends AppCompatActivity implements AdapterView.OnItemClickListener {
private ListView listView;
private ArrayAdapter<String> adapter;
private ArrayList<String> jokesHistory;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_joke_list);
listView = (ListView)findViewById(R.id.jokeList);
adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);
jokesHistory = getIntent().getStringArrayListExtra("jokesList");
for (String joke : jokesHistory) {
adapter.add(joke);
}
listView.setAdapter(adapter);
listView.setOnItemClickListener(this);
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
String joke = adapter.getItem(i);
Intent intent = new Intent(SearchHistoryActivity.this, JokeViewActivity.class);
intent.putExtra("joke", joke);
startActivity(intent);
}
} | [
"matthew.augustine@dariel.co.za"
] | matthew.augustine@dariel.co.za |
2d19a1e01bf4a525c6853ad4e249702466923383 | fb3a98008a5b1e1e9aaa12bef1d1a5be333b0534 | /src/com/kgmyshin/ideaplugin/eventbus3/ReceiverFilter.java | 553dc4ee441ed93a45141e5feeb203230b6069dc | [
"Apache-2.0"
] | permissive | stanleyguevara/eventbus3-intellij-plugin | b1296c9a2fb829c21b206a1b40b917fd5a59215f | 146b51c6915e4df510bc3d97266ac43d9f196d29 | refs/heads/master | 2021-01-20T02:57:38.844926 | 2018-01-24T14:04:36 | 2018-01-24T14:04:36 | 89,476,976 | 1 | 1 | null | 2018-01-24T14:04:37 | 2017-04-26T12:14:16 | Java | UTF-8 | Java | false | false | 1,109 | java | package com.kgmyshin.ideaplugin.eventbus3;
import com.intellij.psi.*;
import com.intellij.usages.Usage;
import com.intellij.usages.UsageInfo2UsageAdapter;
/**
* Created by kgmyshin on 2015/06/07.
*/
public class ReceiverFilter implements Filter {
@Override
public boolean shouldShow(Usage usage) {
PsiElement element = ((UsageInfo2UsageAdapter) usage).getElement();
if (element instanceof PsiJavaCodeReferenceElement) {
if ((element = element.getParent()) instanceof PsiTypeElement) {
if ((element = element.getParent()) instanceof PsiParameter) {
if ((element = element.getParent()) instanceof PsiParameterList) {
if ((element = element.getParent()) instanceof PsiMethod) {
PsiMethod method = (PsiMethod) element;
if (PsiUtils.isEventBusReceiver(method)) {
return true;
}
}
}
}
}
}
return false;
}
}
| [
"kgmyshin82@gmail.com"
] | kgmyshin82@gmail.com |
352a21876ec8b19207654add29476f94cd5e04a1 | 1ab35450de23d891cceb2a0affc98f3218927724 | /src/FileOpUtils.java | eddf0eec802c405bae3eead11f8c21960aef1334 | [] | no_license | adamwitzel/Edifice | 91615e6e2cea6728d2ea1a84b91ae788015cb0bf | 8c1b874bbad8dbeca191e96cf6e3b3064195a107 | refs/heads/master | 2021-05-19T18:56:08.152820 | 2020-04-05T01:44:18 | 2020-04-05T01:44:18 | 252,073,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,321 | java | import java.io.File;
import java.io.FilenameFilter;
import javax.swing.JFileChooser;
public class FileOpUtils {
public static String[] getFilesInDirectory(String directory)
{
File folder = new File(directory);
String[] files = folder.list();
return files;
}
public static String[] getSubdirectories(String directory)
{
File file = new File(directory);
String[] directories = file.list(new FilenameFilter()
{
@Override
public boolean accept(File current, String name) {
return new File(current, name).isDirectory();
}
});
return directories;
}
public static boolean renameFileName(String oldName, String newName)
{
File oldFile = new File(oldName);
String newNameString = oldFile.getParent() + "\\" + newName;
File newFile = new File(newNameString);
if(oldFile.renameTo(newFile)){
return true;
}else{
return false;
}
}
/*
public static boolean renameFileFull(String oldName, String newName)
{
File oldFile = new File(oldName);
File newFile = new File(newName);
if(oldFile.renameTo(newFile)){
return true;
}else{
return false;
}
}
*/
public static String selectFile()
{
JFileChooser chooser = new JFileChooser();
chooser.setCurrentDirectory(new java.io.File("E:\\Downloads\\jdown"));
chooser.setDialogTitle("Select File");
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
chooser.setAcceptAllFileFilterUsed(false);
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
return chooser.getSelectedFile().toString();
} else {
System.out.println("No Selection ");
return "No Selection ";
}
}
public static String selectDirectory(String startLocation)
{
JFileChooser chooser = new JFileChooser();
chooser.setCurrentDirectory(new java.io.File(startLocation));
chooser.setDialogTitle("Select Directory");
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.setAcceptAllFileFilterUsed(false);
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
return chooser.getSelectedFile().toString();
} else {
System.out.println("No Selection ");
return "No Selection ";
}
}
}
| [
"yalatede@gmail.com"
] | yalatede@gmail.com |
aea9bc768b715b4cf42d4fbadb9ec8618c8d70f2 | 4968c5642c5e5261b635d3f31e1890fba7277868 | /fav/frontend/src/main/java/org/express/common/bean/FieldMeta.java | 75bdfe2df17e0c5af8613b5215cdfb7abdaf6633 | [] | no_license | cllcsh/collectionplus | 01116dc8594e0be6e5a10623e3db2ec9d103d2c2 | 4a62418d73745a9136d4163527d532e2d3e8b483 | refs/heads/master | 2016-08-11T16:16:24.556377 | 2016-04-21T07:51:03 | 2016-04-21T07:51:03 | 54,613,229 | 0 | 0 | null | 2016-03-24T14:39:53 | 2016-03-24T03:55:39 | null | UTF-8 | Java | false | false | 1,008 | java | package org.express.common.bean;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* bean注解类
* @author Rei Ayanami
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.METHOD})
public @interface FieldMeta {
/**
* 是否为主键
* @return
*/
boolean isPrimary() default false;
/**
* 字段名称
* @return
*/
String name() default "";
/**
* 是否可编辑
* @return
*/
boolean editable() default true;
/**
* 是否显示
* @return
*/
boolean display() default true;
/**
* 字段描述
* @return
*/
String description() default "";
/**
* 排序字段
* @return
*/
int order() default 0;
/**
* 是否原生属性
* @return
*/
boolean isNative() default true;
}
| [
"cllc@cllc.me"
] | cllc@cllc.me |
79e4e844756abf842453ebf02b5031944e861147 | 4438e0d6d65b9fd8c782d5e13363f3990747fb60 | /mobile-dto/src/main/java/com/cencosud/mobile/dto/users/EstadoCumpleResumenDTO.java | 882d44723c0caee27631eda85ed036ad668a5cb8 | [] | no_license | cencosudweb/mobile | 82452af7da189ed6f81637f8ebabea0dbd241b4a | 37a3a514b48d09b9dc93e90987715d979e5414b6 | refs/heads/master | 2021-09-01T21:41:24.713624 | 2017-12-28T19:34:28 | 2017-12-28T19:34:28 | 115,652,291 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 793 | java | package com.cencosud.mobile.dto.users;
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
*
* @author jose
*
*/
public class EstadoCumpleResumenDTO implements Serializable {
private static final long serialVersionUID = 3657265432071279059L;
private Long id;
private String description;
public EstadoCumpleResumenDTO() {
}
public EstadoCumpleResumenDTO(Long id) {
this.id = id;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
public Long getId() {
return id;
}
public String getDescription() {
return description;
}
public void setId(Long id) {
this.id = id;
}
public void setDescription(String description) {
this.description = description;
}
}
| [
"cencosudweb.panel@gmail.com"
] | cencosudweb.panel@gmail.com |
422ac08146834854c15e758d526dd62d22aa7607 | e2d5deb56c9161cbed7d05624a62185110afec40 | /VideoManager/src/main/java/io/github/appuhafeez/video/repository/FileMetadataRepo.java | f8f8bff5d4cc7b37deb64639469f4b0711ff5296 | [] | no_license | appuhafeez/video-player | 00db018defc1dd2a23db4ed7ce79c0a0311316de | ed83e5daad5687418254613e5e1597c68378f34b | refs/heads/master | 2021-07-09T16:48:14.420451 | 2020-03-14T13:15:02 | 2020-03-14T13:15:02 | 233,349,721 | 0 | 0 | null | 2021-03-31T21:40:38 | 2020-01-12T06:37:42 | Java | UTF-8 | Java | false | false | 2,011 | java | package io.github.appuhafeez.video.repository;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import io.github.appuhafeez.video.entity.FileMetaData;
import io.github.appuhafeez.video.enums.SearchCriteria;
@Repository
public class FileMetadataRepo{
@Autowired
private EntityManager entityManager;
@Transactional
public void save(FileMetaData data) {
entityManager.persist(data);
}
public List<FileMetaData> searchList(String searchString, int startIndex, int endIndex, SearchCriteria criteria){
Query query = getSearchQuery(criteria);
query.setParameter("searchString","%"+searchString+"%");
query.setFirstResult(startIndex);
query.setMaxResults(endIndex);
return query.getResultList();
}
private Query getSearchQuery(SearchCriteria criteria) {
Query query = null;
if(criteria.equals(SearchCriteria.HEADING)) {
query = entityManager.createQuery("from FileMetaData fd where fd.heading LIKE :searchString");
}else if(criteria.equals(SearchCriteria.DESCRIPTION)) {
query = entityManager.createQuery("from FileMetaData fd where fd.description LIKE :searchString");
}else if(criteria.equals(SearchCriteria.HASHTAGS)) {
query = entityManager.createQuery("from FileMetaData fd where fd.hashtags LIKE :searchString");
}
return query;
}
public int getCount(String searchString, SearchCriteria criteria) {
return getAllData(searchString, criteria).size();
}
public List<FileMetaData> getAllData(String searchString, SearchCriteria criteria){
Query query = getSearchQuery(criteria);
query.setParameter("searchString","%"+searchString+"%");
return query.getResultList();
}
public FileMetaData getFileMetadata(String id) {
return entityManager.find(FileMetaData.class, id);
}
public void update(FileMetaData data) {
entityManager.merge(data);
}
}
| [
"sahrooappu@gmail.com"
] | sahrooappu@gmail.com |
db427302493b727fda13acfbf8f89feb736841b9 | c3b473fadf4227084bcf5b0006d23a7acdcab182 | /src/main/java/com/antuansoft/mongodb/connection/UserRepository.java | ae8b045109b26732edcccb3307a29151969ee64b | [] | no_license | amitchaulagain/multi-tenant-app | 93591c54be6834dcfeccd03504f43bd6a96af925 | 2d6e83c039679a112ae2f072bad604afcb68419b | refs/heads/master | 2020-07-06T13:38:39.231098 | 2016-08-27T22:44:02 | 2016-08-27T22:44:02 | 66,738,470 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,406 | java | package com.antuansoft.mongodb.connection;
import com.antuansoft.mongodb.domain.Order;
import org.jongo.Jongo;
import org.jongo.MongoCollection;
import org.jongo.MongoCursor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
/**
* Created by amit on 5/6/16.
*/
public class UserRepository extends MongoConnection {
// DBCollection collection;
MongoCollection collection;
public UserRepository(HttpServletRequest request) throws UnknownHostException {
super(request);
setCollection();
}
@Override
public void setCollection() throws UnknownHostException {
Jongo jongo = new Jongo(getMongoConnection());
//collection = getMongoConnection().getCollection("order");
collection=jongo.getCollection("order");
}
public List<Order> findAll() throws IOException {
MongoCursor<Order> all = collection.find().as(Order.class);
List<Order> orders = new ArrayList<Order>();
while (all.hasNext()) {
orders.add(all.next());
}
return orders;
}
}
| [
"achaulagain123@gmail.com"
] | achaulagain123@gmail.com |
6ab95d08c8fd41c655b0c97e6023fff5c79f71e1 | c9acf52748532cc5081675a3362c4f8c13b26e4f | /src/main/java/org/xmlsoap/schemas/soap/encoding/ShortDocument.java | 43ca900014abce0b2ee5c1bb2a214e92c9243662 | [] | no_license | Malandru/BanjikoService | 751874798e7175f23c64a3e86edee637d8221837 | ae9211dcdc8c64e4794b51de0662b06af2d6ced8 | refs/heads/master | 2020-08-26T21:44:27.114382 | 2019-10-24T14:14:32 | 2019-10-24T14:14:32 | 217,157,714 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,558 | java | /*
* An XML document type.
* Localname: short
* Namespace: http://schemas.xmlsoap.org/soap/encoding/
* Java type: org.xmlsoap.schemas.soap.encoding.ShortDocument
*
* Automatically generated - do not modify.
*/
package org.xmlsoap.schemas.soap.encoding;
/**
* A document containing one short(@http://schemas.xmlsoap.org/soap/encoding/) element.
*
* This is a complex type.
*/
public interface ShortDocument extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ShortDocument.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s5C152683714F7B99C44842EF24EA444A").resolveHandle("shorta940doctype");
/**
* Gets the "short" element
*/
org.xmlsoap.schemas.soap.encoding.Short getShort();
/**
* Sets the "short" element
*/
void setShort(org.xmlsoap.schemas.soap.encoding.Short xshort);
/**
* Appends and returns a new empty "short" element
*/
org.xmlsoap.schemas.soap.encoding.Short addNewShort();
/**
* A factory class with static methods for creating instances
* of this type.
*/
public static final class Factory
{
public static org.xmlsoap.schemas.soap.encoding.ShortDocument newInstance() {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument newInstance(org.apache.xmlbeans.XmlOptions options) {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
/** @param xmlAsString the string value to parse */
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
/** @param file the file from which to load an xml document */
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.xmlsoap.schemas.soap.encoding.ShortDocument parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.xmlsoap.schemas.soap.encoding.ShortDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
private Factory() { } // No instance of this class allowed
}
}
| [
"andre.mtzd07@gmail.com"
] | andre.mtzd07@gmail.com |
7b80d417f895215bcffbca600e5809b64421710c | 166a311278883254eab2bad60c4883d6f5648bfc | /[new]JavaEclipseProject/src/officeEntities/Group.java | 0132021f2156dea239d5accdf26070b2ad3265ce | [] | no_license | chawk073uofc/sisyphus-1-room-allocation | 9818ee522ea43715074ac732d97435b6d08483e1 | 10f6c6c05c8d3f1ec32714dd61a312dbfc48e405 | refs/heads/master | 2021-03-19T07:29:30.332861 | 2017-06-24T05:21:16 | 2017-06-24T05:21:16 | 94,376,110 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,940 | java | package officeEntities;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeSet;
/**
* This class represents a group in the office allocation problem. It includes a list of the group's
* members and heads along with methods to add members and to check membership.
* @author Branko Bajic
*
*/
import cpsc433.Entity;
/**
*
* @author chrishawk_MacBookAir
*
*/
public class Group extends Entity {
private static Map<String, Group> groups =new HashMap<>(); //All instances of class Group currently instantiated.
private Map<String, Person> members = new HashMap<>();
private Map<String, Person> groupHeads = new HashMap<>();
/**
* Constructor for class Group. Creates a group with the given name.
* @param groupName
*/
public Group(String groupName) {
super(groupName);
if (!exists(groupName)){
groups.put(groupName, this);
}
}
/**
* Constructor for class Group. Creates a group with the given name and assigns the given person
* to the group's list of people.
* @param groupName name of the group
* @param person name of the person
*/
public Group(String groupName, Person person) {
super(groupName);
if(!groups.containsKey(this.getName())){ //O(1)
groups.put(groupName, this); //O(1)
}
members.put(person.getName(), person);
}
/**
* Returns an object representing a group with a given name , if such group exists.
* @param name the name of a group which may or may not exist
* @return the group object which has the given name
* @throws NoSuchGroupException if a group by the given name is not found
*/
public static Group getEntityWithName(String groupName) throws NoSuchGroupException{
Group g = groups.get(groupName); //O(1)
if (g == null)
throw new NoSuchGroupException();
return g;
}
/**
* Returns true if this group has a member by the name given.
* @param personName
* @return
*/
public boolean hasMember(String personName) {
return members.containsKey(personName);//O(1)
}
/**
* Assigns the person with the given name to be the head of this group. Creates a person
* object with the given name if one does not already exist.
* @param personName
*/
public void setGroupHead(String personName) {
Person personObj;
try {
personObj = Person.getEntityWithName(personName);
} catch (NoSuchPersonException e) {
personObj= new Person(personName);
}
if(!groupHeads.containsKey(personObj.getName())){
groupHeads.put(personObj.getName(), personObj);
}
if(!members.containsKey(personObj.getName())){
members.put(personObj.getName(), personObj);
}
//add group-head to person's attribute list
personObj.addAttribute(Attribute.GROUP_HEAD);
//add group to person's groups structure
personObj.addGroup(this.getName());
}
/**
* Returns true if the named person is the head of this group.
* @param personName
* @return
*/
public boolean hasGroupHead(String personName) {
return !groupHeads.isEmpty();
}
/**
* Returns true if the named group exists.
* @param groupName
* @return boolean
*/
public static boolean exists(String groupName){
return groups.containsKey(groupName); //O(1)
}
/**
* String representation of group. String contains information about all the
* group's members and heads.
* @return a string representation of a group
*/
@Override
public String toString(){
String groupStr = "";
groupStr += "group(" + this.getName() + ")\n";
for(Person member : members.values()){
groupStr += "group(" + member.getName() + ", " + this.getName() + ")\n";
}
for(Person groupHead: groupHeads.values()){
groupStr += "heads-group(" + groupHead.getName() + ", " + this.getName() + ")\n";
}
return groupStr;
}
/**
* Builds a string representing all the Group objects instantiated by calling the
* toString() method of each.
* @return a string representing all known information about all groups
*/
public static String groupInfoString(){
String groupStr = "";
for(Group g: groups.values()){
groupStr += g;
}
groupStr += "\n";
return groupStr;
}
/**
* Assigns a person to the group .
* @param person the person being added
*/
public void addMember(Person person){
members.put(person.getName(), person);
}
public static Map<String, Group> getGroups(){
return groups;
}
public static Map<String, Person> getAllGroupHeads(){
Map<String, Person> returnMap = new HashMap<>();
//returnMap.putAll(groups);
for (Map.Entry<String, Group> entry : groups.entrySet()) {
returnMap.putAll(entry.getValue().getGroupHeads());
// TODO: remove duplicates
}
return returnMap;
}
public Map<String, Person> getGroupHeads(){
return groupHeads;
}
public Map<String, Person> getMembers(){
return members;
}
}
| [
"chrishawk9@gmail.com"
] | chrishawk9@gmail.com |
247eaf8949e729bd5e0681c4bfae307f114b79f3 | bee36866c53546826042d9fb11f049bebb465f1d | /Kuis2/Person.java | 5428f02f7433643e931890ac455edd2ec684b789 | [] | no_license | ravielze/OOP-sie-2021 | 42aa687a88dc5309b59b764041ed24807d080619 | 4fe734184daaa4f0f334aac4b008131e33361dea | refs/heads/master | 2023-04-12T06:26:08.725513 | 2021-04-22T03:12:26 | 2021-04-22T03:12:26 | 335,888,541 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 369 | java | public abstract class Person {
private String name;
public Person(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "{" + " name='" + getName() + "'" + "}";
}
}
| [
"ravielz20@gmail.com"
] | ravielz20@gmail.com |
a93685895ae4087d294640bd52458bd9bf170cad | 9c2aea5d85b1e8c6e76b62773270cc7425df12b0 | /src/com/Edward/PicArrangement/Main.java | e3ab2530023386e05358884faadf6de23851775c | [] | no_license | warcraft23/HuaWeiOJ | 26670c86129a87f40a5a5997a594ab484869b4f9 | b8df4a25cf0ac001a87d5a3a83fb3f28b176e502 | refs/heads/master | 2020-04-02T01:26:37.750750 | 2015-09-22T14:23:00 | 2015-09-22T14:23:00 | 42,938,656 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 847 | java | package com.Edward.PicArrangement;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
static String picArragement(String str){
String res="";
int length=str.length();
if(length==0||length>1024)
return res;
char[] chars=new char[length];
chars=str.toCharArray();
int lengthChar=chars.length;
for(int i=0;i<lengthChar;i++){
if(!((chars[i]>='0'&&chars[i]<='9')||(chars[i]>='a'&&chars[i]<='z')||(chars[i]>='A'&&chars[i]<='Z'))){
for(int j=i+1;j<lengthChar;j++){
chars[j-1]=chars[j];
lengthChar--;
}
}
}
Arrays.sort(chars,0,lengthChar);
for(int i=0;i<lengthChar;i++){
res+=chars[i];
}
return res;
}
public static void main(String args[]){
Scanner scan=new Scanner(System.in);
String str=scan.nextLine();
String res=picArragement(str);
System.out.println(res);
}
}
| [
"qh.zhou@siat.ac.cn"
] | qh.zhou@siat.ac.cn |
83138e42ec55fe1be84e612b87e21b4cb5082f22 | d0c51bd8ba6452c1a3fba7d420f830829a5a33e9 | /src/org/openmrs/module/rgrta/service/EncounterService.java | 589381190830bbbc6c4ba913c62394839ee9b330 | [] | no_license | CHIRDL-Openmrs-Modules/rgrta | 1b241b98d450dca474173229538624c0efdabafe | 22f76f2c7001ce50f387814be90c5171ff7e2586 | refs/heads/master | 2021-01-19T12:39:16.127860 | 2015-08-27T14:38:31 | 2015-08-27T14:38:31 | 25,689,717 | 0 | 0 | null | 2015-08-27T14:38:31 | 2014-10-24T13:26:36 | Java | UTF-8 | Java | false | false | 250 | java | package org.openmrs.module.rgrta.service;
import org.springframework.transaction.annotation.Transactional;
/**
* @author Tammy Dugan
*
*/
@Transactional
public interface EncounterService extends org.openmrs.api.EncounterService
{
} | [
"msheley@iu.edu"
] | msheley@iu.edu |
97b8b98801ce5429457510701e6b5475e381e50a | b04a04b297f6b6032d2558f21d6ace73f740454a | /src/sda/training/treesOwn/Node.java | 8686240f3b6115d13b4c4335d633ea1c32f28ae7 | [] | no_license | chrzasz/sda.training | e6f9fe1a59a354179ef5864b93fd55835003e4a9 | 6457b4090015cbb208ba530aa34d803597eda2db | refs/heads/master | 2020-04-10T19:49:44.247390 | 2019-01-18T14:16:25 | 2019-01-18T14:16:25 | 152,871,567 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 267 | java | package sda.training.treesOwn;
/**
* Created by Grzegorz Chrzaszczyk on 21-10-2018 10:18 AM
*/
public class Node {
int value;
Node left;
Node right;
Node(int value) {
this.value = value;
right = null;
left = null;
}
} | [
"chrzaszczyk@gmail.com"
] | chrzaszczyk@gmail.com |
4a83fe610ac4292bdcdf6a04b40008323cd35c70 | cff261e541ba1cbe97d51928cf545cadb42530b4 | /Old/World/Blocks/Abstract/TriggerableBlock.java | 4f198d587ef8c1cfafa7b2f48f00016553149577 | [] | no_license | GlitchyDev/GANOS | 080362dfe15f5dc723c5ce2a175df58c36f4354d | 36bc08bdad282b54222f2677e576383ad80b5b7a | refs/heads/master | 2021-01-09T05:34:21.552164 | 2019-10-19T01:18:28 | 2019-10-19T01:18:28 | 169,134,299 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,228 | java | package com.GlitchyDev.Old.World.Blocks.Abstract;
import com.GlitchyDev.Old.World.Entities.EntityBase;
import com.GlitchyDev.Old.World.Entities.MovementType;
public interface TriggerableBlock {
/**
* Triggered when an EntityBase enters a TriggerableBlock, is not final
* @param movementType
* @param entityBase
* @return Success of movement
*/
boolean enterBlock(MovementType movementType, EntityBase entityBase);
/**
* Triggered when an EntityBase exits a TriggerableBlock, is not final
* @param movementType
* @param entityBase
* @return Success of movement
*/
boolean exitBlock(MovementType movementType, EntityBase entityBase);
/**
* Triggered when an EntityBase enters a TriggerableBlock successfully
* @param movementType
* @param entityBase
* @return Success of movement
*/
void enterBlockSccessfully(MovementType movementType, EntityBase entityBase);
/**
* Triggered when an EntityBase exits a TriggerableBlock successfully
* @param movementType
* @param entityBase
* @return Success of movement
*/
void exitBlockSuccessfully(MovementType movementType, EntityBase entityBase);
}
| [
"RobertLouisHannah@gmail.com"
] | RobertLouisHannah@gmail.com |
c07769495dd2dc37ec243d45f7b2b31c77a6c986 | a0e3385a3ed9e969b0ed5ff8849591810450d29a | /Version6/RepairPlan.java | ac87f866ebe737e92feabcbd82e60febf155feb3 | [] | no_license | mountainrider56/372GroupProject1 | b935b3541db93d4ebd904008389d696ccc88dc3e | e7fe672888b8ad706911de84906615c5fae3b2ce | refs/heads/master | 2021-05-22T22:24:31.193639 | 2020-04-19T02:18:39 | 2020-04-19T02:18:39 | 253,124,152 | 0 | 1 | null | 2020-04-17T12:55:14 | 2020-04-05T00:17:04 | Java | UTF-8 | Java | false | false | 1,113 | java | public class RepairPlan {
private Customer customer;
private Appliance appliance;
// public double balance ;
public RepairPlan(Customer customer, Appliance appliance) {
this.customer = customer;
this.appliance = appliance;
customer.setEnrolledInRepairPlanStatus(true);
// this.balance = 0 ;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public Appliance getAppliance() {
return appliance;
}
public void setAppliance(Appliance appliance) {
this.appliance = appliance;
}
// public double getBalance() {
// return balance;
// }
// public void setBalance(double balance) {
// this.balance = balance;
// }
/**
* String form of the appliance
*
*/
public String toString() {
return "Customer Name :" + customer.getName() + ", phone : " + customer.getPhone() + ", Id : " + customer.getId() + "\n"
+ ", Account Balance : " + customer.getAccountBalance()
+ "-----" + " Appliance Brand : " + appliance.getBrandName() + ", Model :" + appliance.getModelName() + "\n" + "\n";
}
}
| [
"mountainrider56@gmail.com"
] | mountainrider56@gmail.com |
b34382606ff6a1a17eb8966ab13ee83af279944b | 5fecc7dad99fed02521b59af0bcd0bdedbdc089c | /radixeng/src/main/java/br/radixeng/controller/GraphController.java | 1a58f41d45bdfce9e52df83609062f7966236c97 | [] | no_license | rodrigo020295/projeto-de-rotas | 73d19784d703436eaac54d167488fa84b5b56f0c | 9dff0e32789754e804cad9f001c005ad5cd59a63 | refs/heads/main | 2023-04-07T04:02:42.169259 | 2021-04-23T13:16:19 | 2021-04-23T13:16:19 | 360,870,405 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,941 | java | package br.radixeng.controller;
import br.radixeng.model.Graph;
import br.radixeng.model.Route;
import br.radixeng.model.Routes;
import br.radixeng.service.GraphService;
import br.radixreng.model.RouteDistance;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
public class GraphController {
private final GraphService graphService;
public GraphController(GraphService graphService) {
this.graphService = graphService;
}
@PostMapping(path = "/graph")
public ResponseEntity createGraph(@RequestBody Graph graph) {
if (graph.isSameSourceAndTarget(graph.getData())) {
return new ResponseEntity("Existem rota(s) com saída e destino iguais", HttpStatus.BAD_REQUEST);
}
for (Route route : graph.getData()) {
route.setGraph(graph);
}
Graph graphResponse = graphService.createGraph(graph);
return new ResponseEntity(graphResponse, HttpStatus.CREATED);
}
@GetMapping(path = "/graph/{graphId}")
public ResponseEntity findById(@PathVariable Integer graphId) {
return graphService.findById(graphId)
.map(record -> ResponseEntity.ok().body(record))
.orElse(new ResponseEntity("Grafo não localizado", HttpStatus.NOT_FOUND));
}
@PostMapping(path = "/routes/from/{town1}/to/{town2}")
public ResponseEntity findAvariableRoutes(@RequestBody Graph graph,
@PathVariable String town1,
@PathVariable String town2,
@RequestParam Integer maxStop) {
Route.createRouteList(graph.getData());
List<Routes> routesList = Route.calculateTrips(town1, town2, t -> t <= maxStop, maxStop);
if (routesList.isEmpty()) {
return new ResponseEntity("Grafo não localizado", HttpStatus.NOT_FOUND);
} else {
return new ResponseEntity(routesList, HttpStatus.OK);
}
}
@PostMapping(path = "/distance/from/{town1}/to/{town2}")
public ResponseEntity findMinimumRouteDistance(@RequestBody Graph graph,
@PathVariable String town1,
@PathVariable String town2) {
if (town1.equalsIgnoreCase(town2)) {
return new ResponseEntity(0, HttpStatus.OK);
}
Route.createRouteList(graph.getData());
RouteDistance routeDistance = Route.findMinimumRouteDistance(town1, town2);
if (routeDistance == null) {
return new ResponseEntity(-1, HttpStatus.NOT_FOUND);
}
return new ResponseEntity(routeDistance, HttpStatus.OK);
}
} | [
"Cliente@Cliente-PC"
] | Cliente@Cliente-PC |
8223b16c935df2e66e4863a0596cdd6893d056a8 | 26ce2e5d791da69b0c88821320631a4daaa5228c | /src/main/java/br/com/swconsultoria/efd/contribuicoes/registros/blocoA/RegistroA111.java | 13716f389a645f28e00811430b39b3c93ce5258e | [
"MIT"
] | permissive | Samuel-Oliveira/Java-Efd-Contribuicoes | b3ac3b76f82a29e22ee37c3fb0334d801306c1d4 | da29df5694e27024df3aeda579936c792fac0815 | refs/heads/master | 2023-08-04T06:39:32.644218 | 2023-07-28T00:39:59 | 2023-07-28T00:39:59 | 94,896,966 | 8 | 6 | MIT | 2022-04-06T15:30:13 | 2017-06-20T13:55:12 | Java | UTF-8 | Java | false | false | 765 | java | /**
*
*/
package br.com.swconsultoria.efd.contribuicoes.registros.blocoA;
/**
* @author Yuri Lemes
*
*/
public class RegistroA111 {
private final String reg = "A111";
private String num_proc;
private String ind_proc;
/**
* @return the num_proc
*/
public String getNum_proc() {
return num_proc;
}
/**
* @param num_proc
* the num_proc to set
*/
public void setNum_proc(String num_proc) {
this.num_proc = num_proc;
}
/**
* @return the ind_proc
*/
public String getInd_proc() {
return ind_proc;
}
/**
* @param ind_proc
* the ind_proc to set
*/
public void setInd_proc(String ind_proc) {
this.ind_proc = ind_proc;
}
/**
* @return the reg
*/
public String getReg() {
return reg;
}
}
| [
"samuk.exe@hotmail.com"
] | samuk.exe@hotmail.com |
84cc3b4b6405fc20ba2b9a542758434429e6b6c6 | 51cc9acab04946897d50844c2a5d93b7e5e743eb | /Components/CommonCore/Source/gov/sandia/cognition/math/matrix/custom/ParallelMatrixFunction.java | 3032ee3ae33c725277e02705c89ce0cddcdaf955 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | Markoy8/Foundry | c9da8bb224cf6fd089a7e5d700631e4c12280380 | c3ec00a8efe08a25dd5eae7150b788e4486c0e6e | refs/heads/master | 2021-06-28T09:40:51.709574 | 2020-12-10T08:20:26 | 2020-12-10T08:20:26 | 151,100,445 | 0 | 0 | NOASSERTION | 2018-10-01T14:16:01 | 2018-10-01T14:16:01 | null | UTF-8 | Java | false | false | 7,778 | java | /*
* File: ParallelMatrixFunction.java
* Authors: Jeremy D. Wendt
* Company: Sandia National Laboratories
* Project: Cognitive Foundry
*
* Copyright 2015, Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000, there is a non-exclusive license for use of this work by
* or on behalf of the U.S. Government. Export of this program may require a
* license from the United States Government. See CopyrightHistory.txt for
* complete details.
*/
package gov.sandia.cognition.math.matrix.custom;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* This package-private class simplifies parallelizing Matrix operations. It
* uses generics for defining the two (possibly different) input types, and the
* output type. This should be used for parallel operations where the output can
* be stored separately for each row (for instance in matrix/vector multiplies,
* where the output is a vector with independent values for each row's output).
*
* @author Jeremy D. Wendt
* @since 3.4.3
* @param <InputType1> The first part of the input
* @param <InputType2> The second part of the input
* @param <OutputType> The output type
*/
abstract class ParallelMatrixFunction<InputType1, InputType2, OutputType>
implements Callable<Integer>
{
/**
* The minimum index for the row that should be used in the operation (row
* on input1, likely column on input2).
*/
protected int minRow;
/**
* The maximum index for the row that should be used in the operation
* (not-inclusive (as in the for loop goes i = minRow; i < maxRow); row
* on input1, likely column on input2).
*/
protected int maxRow;
/**
* The left-part of the operation. For instance, in matrix-vector
* multiplication, this is the matrix. Each thread should only read from
* rows between minRow and maxRow (for caching purposes). This should not be
* changed at all during the operations.
*/
protected InputType1 input1;
/**
* The right-part of the operation. For instance, in matrix-vector
* multiplication, this is the vector. This should not be changed at all
* during the operations.
*/
protected InputType2 input2;
/**
* The result of the operation. Each thread will only write to rows between
* minRow and maxRow (not inclusive). The results of the operation will
* alter this -- and the caller should maintain a copy.
*/
protected OutputType output;
/**
* Private because this should never be called. Ever. No matter what.
*/
private ParallelMatrixFunction()
{
throw new UnsupportedOperationException(
"Null constructor not supported.");
}
/**
* Passes in the necessary arguments to initialize an instance. Shallow
* copies of all inputs are made.
*
* @param input1 The first input
* @param input2 The second input
* @param output The output -- the callee will see the results of the
* parallel operations in this
* @param minRow The minimum row for this thread to operate on
* @param maxRow The maximum row (not inclusive) for this thread to operate
* on
*/
public ParallelMatrixFunction(
final InputType1 input1,
final InputType2 input2,
final OutputType output,
final int minRow,
final int maxRow)
{
this.input1 = input1;
this.input2 = input2;
this.output = output;
this.minRow = minRow;
this.maxRow = maxRow;
}
/**
* This needs to be extended by operation-specific classes. NOTE: The return
* type will be ignored (it's just required by the Callable interface).
*
* @return Is ignored.
* @throws Exception Part of the interface. Please don't throw exceptions
* unless you really need to.
*/
@Override
abstract public Integer call()
throws Exception;
/**
* This static method handles all the logic of splitting up the chunks of a
* matrix problem and calling the chunks in parallel.
*
* @param <InputType1> The type for the left operand
* @param <InputType2> The type for the right operand
* @param <OutputType> The type for the result
* @param input1 The left operand
* @param input2 The right operand
* @param output The result -- this will change as a result of operations
* @param numPieces The number of pieces to split the problem into -- can be
* more than the number of threads if you think the pieces may be non-equal
* in size.
* @param numThreads The number of threads to create for solving the problem
* @param numRows The number of rows in the problem (usually input1's
* numRows)
* @param factory The factory for creating ParallelMatrixFunction instnaces
*/
public static <InputType1, InputType2, OutputType> void solve(
final InputType1 input1,
final InputType2 input2,
final OutputType output,
final int numPieces,
final int numThreads,
final int numRows,
final Factory<InputType1, InputType2, OutputType> factory)
{
double numRowsPer = numRows / ((double) numPieces);
numRowsPer = Math.max(numRowsPer, 1.0);
List<ParallelMatrixFunction<InputType1, InputType2, OutputType>> pieces =
new ArrayList<>(
numPieces);
int minRow, maxRow;
minRow = 0;
for (int i = 0; i < numPieces; ++i)
{
if (i == (numPieces - 1))
{
maxRow = numRows;
}
else
{
maxRow = (int) Math.round((i + 1) * numRowsPer);
}
maxRow = Math.min(maxRow, numRows);
pieces.add(factory.init(input1, input2, output, minRow, maxRow));
minRow = maxRow;
// Break out early if there were more pieces than rows
if (minRow >= numRows)
{
break;
}
}
ExecutorService threads = Executors.newFixedThreadPool(numThreads);
try
{
threads.invokeAll(pieces);
}
catch (InterruptedException e)
{
throw new RuntimeException("Threads stopped prematurely", e);
}
finally
{
threads.shutdown();
}
}
/**
* A factory for creating the necessary parallel-aware solvers
*
* @param <InputType1> The left input's type
* @param <InputType2> The right input's type
* @param <OutputType> The output's type
*/
public static interface Factory<InputType1, InputType2, OutputType>
{
/**
* Creates an instance of the parallel-aware solver with the input
* values stored for the call method.
*
* @param input1 The left input
* @param input2 The right input
* @param output The output -- this will be altered by the call method
* (between minRow (inclusive) and maxRow (not inclusive)).
* @param minRow The minimum row to affect (inclusive)
* @param maxRow The maximum row to affect (not inclusive)
* @return A new instance of the correct parallel-aware solver with the
* input values stored for the call method.
*/
ParallelMatrixFunction<InputType1, InputType2, OutputType> init(
InputType1 input1,
InputType2 input2,
OutputType output,
int minRow,
int maxRow);
}
}
| [
"jbasilico@algorithmfoundry.org"
] | jbasilico@algorithmfoundry.org |
d8746f4a64801d2b8dcd4d2c6b2164641d7ecf7a | 9537f25878b5dfc8d1d00fe7dc493e2e55a187a7 | /src/rm/node/TSemicolonsym.java | 84ec22f5da29b4d669fb9c5d5b775f921fafc761 | [] | no_license | mlterpstra92/RM | 31b65f84445587cdfbf75163b8cb858f3ad85744 | 574a3c56170d8b5702205ec35bbea5cb4b5f206c | refs/heads/master | 2016-09-05T21:18:26.018174 | 2014-02-19T14:13:49 | 2014-02-19T14:13:49 | 10,155,448 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 762 | java | /* This file was generated by SableCC (http://www.sablecc.org/). */
package rm.node;
import rm.analysis.*;
@SuppressWarnings("nls")
public final class TSemicolonsym extends Token
{
public TSemicolonsym()
{
super.setText(";");
}
public TSemicolonsym(int line, int pos)
{
super.setText(";");
setLine(line);
setPos(pos);
}
@Override
public Object clone()
{
return new TSemicolonsym(getLine(), getPos());
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseTSemicolonsym(this);
}
@Override
public void setText(@SuppressWarnings("unused") String text)
{
throw new RuntimeException("Cannot change TSemicolonsym text.");
}
}
| [
"maarten@bazenpc"
] | maarten@bazenpc |
3ab551aef570f1ea8b20c6162b1fceff2c15b718 | 7ebfc9e651fefad56676c37f7a62fb7b22b525be | /baseproject-framework-monitor/src/main/java/com/baseproject/framework/monitor/BaseProjectFrameworkMonitorApplication.java | 3fdd27e73cd77aed7ebb37fc4a4a648f7192671c | [] | no_license | yelanting/ManagePlatformBaseProjectFramework | a92ca5089d4a9729da245432ed1e0eb902022668 | 0069349422ec065b687f7d817a8675917f98094f | refs/heads/master | 2023-01-03T11:47:23.572249 | 2019-11-19T08:55:22 | 2019-11-19T08:55:22 | 222,648,949 | 0 | 0 | null | 2022-12-10T07:13:39 | 2019-11-19T08:42:32 | Java | UTF-8 | Java | false | false | 616 | java | package com.baseproject.framework.monitor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
/**
* 启动器
* @author Administrator
* @date Jan 15, 2019
*/
@EnableAdminServer
@EnableDiscoveryClient
@SpringBootApplication
public class BaseProjectFrameworkMonitorApplication {
public static void main(String[] args) {
SpringApplication.run(BaseProjectFrameworkMonitorApplication.class, args);
}
} | [
"sunlpmail@126.com"
] | sunlpmail@126.com |
d9c64ffa52488cc138981e120d6cb9473a4208f8 | b5bc67927e4bf1e0894e924aca10c701096a6c0c | /pet-clinic-data/src/main/java/prtk/springframework/sbpetclinic/services/map/AbstractMapService.java | e81c69b505978c98937551ae4ce12354abdddee6 | [] | no_license | erprtkjn/sb-pet-clinic | 032a3d88e8bfb59c1d10baf70f5aa91a53745bcc | 75c7655485cdd298d15359247790820c501597e7 | refs/heads/master | 2022-10-25T04:59:39.870346 | 2020-06-17T23:03:43 | 2020-06-17T23:03:43 | 262,157,746 | 0 | 0 | null | 2020-06-11T23:51:20 | 2020-05-07T21:01:31 | Java | UTF-8 | Java | false | false | 912 | java | package prtk.springframework.sbpetclinic.services.map;
import prtk.springframework.sbpetclinic.model.BaseEntity;
import java.util.*;
public abstract class AbstractMapService<T extends BaseEntity, ID extends Long> {
protected Map<Long, T> map = new HashMap<>();
Set<T> findAll() {
return new HashSet<>(map.values());
}
T findById(ID id) {
return map.get(id);
}
T save(T object) {
map.put(getNextId(), object);
return object;
}
void deleteByID(ID id) {
map.remove(id);
}
void delete(T object) {
map.entrySet().removeIf(idtEntry -> idtEntry.getValue().equals(object));
}
private Long getNextId() {
Long nextId = null;
try {
nextId = Collections.max(map.keySet()) + 1;
} catch (NoSuchElementException e) {
nextId = 1L;
}
return nextId;
}
}
| [
"jain.prateek904@gmail.com"
] | jain.prateek904@gmail.com |
f47892f4a94d3da3c8acc36695f8d582401d6d24 | 05b272f20f40c2b7848d88a7eea4b12f1c828824 | /MiniJava/src/main/java/scanner/ScannerFacade.java | cb6254cda53d1378be35afcee623e6ca4b4ac009 | [
"MIT"
] | permissive | ArvinSamiei/session5SeLab | de9aafbc2ab444b74573bcf9d8e95fc0fd884abc | 6dd42125a36218c62f7c7181ecbd44ce5f57a06a | refs/heads/master | 2023-01-05T22:08:24.269766 | 2020-11-09T16:01:44 | 2020-11-09T16:01:44 | 311,392,948 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 353 | java | package scanner;
import scanner.token.Token;
import java.util.Scanner;
public class ScannerFacade {
private LexicalAnalyzer lexicalAnalyzer;
public ScannerFacade(Scanner scanner) {
this.lexicalAnalyzer = new LexicalAnalyzer(scanner);
}
public Token getNextToken() {
return lexicalAnalyzer.getNextToken();
}
}
| [
"samiei.arvin@gmail.com"
] | samiei.arvin@gmail.com |
65a8086f037437ca645fbc557167a1da3314fb9d | af0c6341bd69f38d4712d236751af7f94085d82b | /src/main/java/task6/dao/MySQLProducerDao.java | 021aa30fbde49c787301d4e0005cdac1009da8eb | [] | no_license | Alikhano/lvlp | 86e6f4bb4b48296b9f33823786bee7a45860c52d | 3773b2ca1be272bd7b29a5b5a71658025b4993e3 | refs/heads/master | 2021-05-06T16:03:23.793002 | 2017-12-26T20:33:57 | 2017-12-26T20:33:57 | 113,700,421 | 0 | 0 | null | 2017-12-20T15:31:20 | 2017-12-09T20:51:58 | Java | UTF-8 | Java | false | false | 4,537 | java | package task6.dao;
import task6.ConnectionFactory;
import task6.domain.ResultsProducer;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
public class MySQLProducerDao implements ProducerDao {
private final ConnectionFactory connectionFactory;
public MySQLProducerDao(ConnectionFactory connectionFactory) {
this.connectionFactory = connectionFactory;
}
@Override
public ResultsProducer create(String name, String address) {
ResultSet set1;
ResultsProducer result;
try (Connection connection = connectionFactory.getConnection("onlineshop", "root", "Mikkeli9586")) {
Statement statement = connection.createStatement();
int rowUpdated = statement.executeUpdate("insert into producer(name, address) value (\"" + name + "\", \"" + address + "\")");
if (rowUpdated == 0) {
return null;
}
set1 = statement.executeQuery("select * from producer where name = \"" + name + "\"");
set1.next();
result = new ResultsProducer(set1.getInt(1), set1.getString(2), set1.getString(3));
return result;
}
catch (SQLException e) {
throw new RuntimeException(e);
}
}
@Override
public ResultsProducer update(String name, String address) {
ResultSet set2;
ResultsProducer result;
try (Connection connection = connectionFactory.getConnection("onlineshop", "root", "Mikkeli9586")) {
Statement statement = connection.createStatement();
int rowUpdated = statement.executeUpdate("update producer set address = \"" + address + "\" where name = \"" + name + "\"");
if (rowUpdated == 0) {
return null;
}
set2 = statement.executeQuery("select * from producer where address = \"" + address + "\"");
set2.next();
result = new ResultsProducer(set2.getInt(1), set2.getString(2), set2.getString(3));
return result;
}
catch (SQLException e) {
throw new RuntimeException(e);
}
}
@Override
public ResultsProducer delete(int id) {
ResultSet set3;
ResultsProducer result;
try (Connection connection = connectionFactory.getConnection("onlineshop", "root", "Mikkeli9586")) {
Statement statement = connection.createStatement();
int rowUpdated = statement.executeUpdate("delete from producer where producerId =" + id);
if (rowUpdated == 0) {
return null;
}
set3 = statement.getResultSet();
result = new ResultsProducer(set3.getInt(1), set3.getString(2), set3.getString(3));
return result;
}
catch (SQLException e) {
throw new RuntimeException(e);
}
}
@Override
public ResultsProducer getById(int id) {
ResultSet set4;
ResultsProducer result;
try (Connection connection = connectionFactory.getConnection("onlineshop", "root", "Mikkeli9586")) {
Statement statement = connection.createStatement();
int rowUpdated = statement.executeUpdate("select * from producer where producerId =" + id);
if (rowUpdated == 0) {
return null;
}
set4 = statement.getResultSet();
result = new ResultsProducer(set4.getInt(1),set4.getString(2), set4.getString(3));
return result;
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
@Override
public ArrayList<ResultsProducer> getAll() {
ResultsProducer result;
ArrayList<ResultsProducer> list = new ArrayList<>();
try (Connection connection = connectionFactory.getConnection("onlineshop", "root", "Mikkeli9586")) {
Statement statement = connection.createStatement();
ResultSet set = statement.executeQuery("select * from producer");
while (set.next()) {
System.out.println("ID " + set.getInt(1) + " name " + set.getString(2) + " address " + set.getString(3));
result = new ResultsProducer(set.getInt(1), set.getString(2), set.getString(3));
list.add(result);
}
return list;
}
catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
| [
"nannette121@gmail.com"
] | nannette121@gmail.com |
f8311eaa69c323ce7306a173b0adc2f0986c2d7a | 6045ce2e867ba53818f68457e4903f23b7ecda76 | /src/main/java/com/nanyin/repository/ProjectStatusRepository.java | 0b5d9adf4ca90179b79649fd0aff6a90e7765116 | [] | no_license | sixminutestogg/ssm-web-project | b61ca35b5cfe2b36c07ba966e72107171e1c0c36 | 1e1e4eccad3c8550f0816fd991128e2acb43ddcf | refs/heads/master | 2020-06-22T23:58:09.954526 | 2019-07-23T09:13:59 | 2019-07-23T09:13:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 429 | java | package com.nanyin.repository;
import com.nanyin.entity.Project;
import com.nanyin.entity.ProjectLevel;
import com.nanyin.entity.ProjectStatus;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public interface ProjectStatusRepository extends JpaRepository<ProjectStatus,Integer> {
List<ProjectStatus> findByOrderByOrdAsc();
}
| [
"1977713379@qq.com"
] | 1977713379@qq.com |
376c3d3a6d990f81bc6904a5e0e2cb26450e88f6 | dc82250eb527587635ab439ba49cb215c686bc9a | /app/src/main/java/com/kotov/ffmpeg/custompager/PagerAdapter.java | 15c494fb408f795af0c46bbb82834c244352ee04 | [
"Apache-2.0"
] | permissive | dmitriykotov333/Ffmpeg_Android | e760b8075df6681efec4aa7ca6a76ed5fc0ef44c | 59b02204b62f6733c6c8358f7bb077a912b1fb87 | refs/heads/master | 2023-02-23T02:46:19.376300 | 2021-01-30T16:54:56 | 2021-01-30T16:54:56 | 274,659,261 | 0 | 1 | Apache-2.0 | 2021-01-30T18:11:04 | 2020-06-24T12:07:56 | Java | UTF-8 | Java | false | false | 1,028 | java | package com.kotov.ffmpeg.custompager;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
public class PagerAdapter extends FragmentPagerAdapter {
private final List<Fragment> mFragmentList = new ArrayList<>();
private final List<String> mFragmentTitleList = new ArrayList<>();
public PagerAdapter(FragmentManager manager) {
super(manager);
}
@NotNull
@Override
public Fragment getItem(int position) {
return mFragmentList.get(position);
}
@Override
public int getCount() {
return mFragmentList.size();
}
public void addFragment(Fragment fragment, String title) {
mFragmentList.add(fragment);
mFragmentTitleList.add(title);
}
@Override
public CharSequence getPageTitle(int position) {
return mFragmentTitleList.get(position);
}
} | [
"40573791+dmitriykotov333@users.noreply.github.com"
] | 40573791+dmitriykotov333@users.noreply.github.com |
07211f3ed156c104ebe5695f60b07592c54df5fa | 5621138cff27c31e979c78063ac82ff44c83aec0 | /src/minecraft/mattparks/mods/starcraft/mercury/wgen/village/GCMercuryComponentVillageStartPiece.java | 3056efe48d3d8dd806c031c1f33d068aa06633d2 | [] | no_license | nikolaStarcraft/Starcraft-2 | efbde65f26ee4889a6fc384a7fe7add09396f59a | 6405557ab9bcf1c24514722b3599ab77c8f48231 | refs/heads/master | 2021-01-15T10:52:27.109300 | 2014-03-01T10:42:07 | 2014-03-01T10:42:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,674 | java | package mattparks.mods.starcraft.mercury.wgen.village;
import java.util.ArrayList;
import java.util.Random;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.biome.WorldChunkManager;
public class GCMercuryComponentVillageStartPiece extends GCMercuryComponentVillageWell
{
public WorldChunkManager worldChunkMngr;
public int terrainType;
public GCMercuryStructureVillagePieceWeight structVillagePieceWeight;
public ArrayList<GCMercuryStructureVillagePieceWeight> structureVillageWeightedPieceList;
public ArrayList<Object> field_74932_i = new ArrayList<Object>();
public ArrayList<Object> field_74930_j = new ArrayList<Object>();
public GCMercuryComponentVillageStartPiece()
{
}
public GCMercuryComponentVillageStartPiece(WorldChunkManager par1WorldChunkManager, int par2, Random par3Random, int par4, int par5, ArrayList<GCMercuryStructureVillagePieceWeight> par6ArrayList, int par7)
{
super((GCMercuryComponentVillageStartPiece) null, 0, par3Random, par4, par5);
this.worldChunkMngr = par1WorldChunkManager;
this.structureVillageWeightedPieceList = par6ArrayList;
this.terrainType = par7;
this.startPiece = this;
}
@Override
protected void func_143012_a(NBTTagCompound nbt)
{
super.func_143012_a(nbt);
nbt.setInteger("TerrainType", this.terrainType);
}
@Override
protected void func_143011_b(NBTTagCompound nbt)
{
super.func_143011_b(nbt);
this.terrainType = nbt.getInteger("TerrainType");
}
public WorldChunkManager getWorldChunkManager()
{
return this.worldChunkMngr;
}
}
| [
"mattparks5855@gmail.com"
] | mattparks5855@gmail.com |
54de85f53c9735483c684562285ae46c87709187 | dcb7ecb0eb558a3c5abff8cea875e4fa78f1f9f0 | /src/main/java/com/web/config/WebMvcConfig.java | 4488b3856926ae33cf97caacf1e214c60511d918 | [] | no_license | lordchavez/oraclejson | 90c9eacb44c5d94900bfe9ad479861474a434c13 | ba2dac9243daddeb8e91d51b10e7917ae1e1d592 | refs/heads/master | 2023-06-17T18:39:13.361459 | 2021-07-12T19:51:05 | 2021-07-12T19:51:05 | 372,913,245 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,123 | java | package com.web.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
@EnableWebMvc
public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Autowired
AdminInterceptor adminInterceptor;
// Static Resource Config
@Override
public void addResourceHandlers( ResourceHandlerRegistry registry ) {
}
@Override
public void configureDefaultServletHandling( DefaultServletHandlerConfigurer configurer ) {
configurer.enable();
}
@Override
public void addInterceptors( InterceptorRegistry registry ) {
registry.addInterceptor( adminInterceptor ).addPathPatterns( "/" );
}
}
| [
"lordchavez@gmail.com"
] | lordchavez@gmail.com |
b8d177f33dd33fef49ea866d328c8173a0a72b41 | 34969093f70070018d216a913ec3a06b081bbfe0 | /com/company/Solution867.java | 59cc9aa6d217192bc14c04d0dffbcfa6f371c91e | [] | no_license | wsnwsn321/LeetcodeKiller | 642c50c4fd1416b51dff719a6d3a00a02a777375 | b98098cc690967816ad4b08f76760af302764baa | refs/heads/master | 2021-06-06T16:39:37.047040 | 2020-02-23T03:36:34 | 2020-02-23T03:36:34 | 139,386,377 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 697 | java | package com.company;
public class Solution867 {
public static void main(String[] args) {
int[][] A = new int[3][3];
int count = 0;
for (int i = 0; i < A.length; i++) {
for (int j = 0; j < A[i].length; j++) {
A[i][j] = count;
}
}
transpose(A);
System.out.println();
}
public static int[][] transpose ( int[][] A) {
int[][] result = new int[A[0].length][A.length];
for (int i = 0; i < A.length; i++) {
for (int j = 0; j < A[0].length; j++) {
result[j][i]=A[i][j];
}
}
return result;
}
}
| [
"7758258wsn"
] | 7758258wsn |
a099a73e323e0c53d686a1ac8fc55f810b3c9df9 | f3cedaf0a246058dab4a4d26c63352b8b5f9acbc | /src/main/java/com/genersoft/iot/vmp/web/ApiController.java | 002b2cc52c3fb242b6890febf479ecc2b7045b7e | [] | no_license | tanbinh123/banma-GB28181Server | 77ce0cf9c584dcb963f8ba655fbdd91c7c3a7362 | 60e99dc0912a231375619177e6b71216799c7f60 | refs/heads/main | 2023-02-28T12:03:24.330377 | 2021-02-05T01:59:02 | 2021-02-05T01:59:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,319 | java | package com.genersoft.iot.vmp.web;
import com.alibaba.fastjson.JSONObject;
import com.genersoft.iot.vmp.conf.SipConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* 兼容LiveGBS的API:系统接口
*/
@Controller
@CrossOrigin
@RequestMapping(value = "/api/v1")
public class ApiController {
private final static Logger logger = LoggerFactory.getLogger(ApiController.class);
@Autowired
private SipConfig sipConfig;
@RequestMapping("/getserverinfo")
private JSONObject getserverinfo(){
JSONObject result = new JSONObject();
result.put("Authorization","ceshi");
result.put("Hardware","");
result.put("InterfaceVersion","2.5.5");
result.put("IsDemo","");
result.put("Hardware","false");
result.put("APIAuth","false");
result.put("RemainDays","永久");
result.put("RunningTime","");
result.put("ServerTime","2020-09-02 17:11");
result.put("StartUpTime","2020-09-02 17:11");
result.put("Server","");
result.put("SIPSerial", sipConfig.getSipId());
result.put("SIPRealm", sipConfig.getSipDomain());
result.put("SIPHost", sipConfig.getSipIp());
result.put("SIPPort", sipConfig.getSipPort());
result.put("ChannelCount","1000");
result.put("VersionType","");
result.put("LogoMiniText","");
result.put("LogoText","");
result.put("CopyrightText","");
return result;
}
@RequestMapping(value = "/userinfo")
private JSONObject userinfo(){
// JSONObject result = new JSONObject();
// result.put("ID","ceshi");
// result.put("Hardware","");
// result.put("InterfaceVersion","2.5.5");
// result.put("IsDemo","");
// result.put("Hardware","false");
// result.put("APIAuth","false");
// result.put("RemainDays","永久");
// result.put("RunningTime","");
// result.put("ServerTime","2020-09-02 17:11");
// result.put("StartUpTime","2020-09-02 17:11");
// result.put("Server","");
// result.put("SIPSerial", sipConfig.getSipId());
// result.put("SIPRealm", sipConfig.getSipDomain());
// result.put("SIPHost", sipConfig.getSipIp());
// result.put("SIPPort", sipConfig.getSipPort());
// result.put("ChannelCount","1000");
// result.put("VersionType","");
// result.put("LogoMiniText","");
// result.put("LogoText","");
// result.put("CopyrightText","");
return null;
}
/**
* 系统接口 - 登录
* @param username 用户名
* @param password 密码(经过md5加密,32位长度,不带中划线,不区分大小写)
* @return
*/
@RequestMapping(value = "/login")
@ResponseBody
private JSONObject login(String username,String password ){
if (logger.isDebugEnabled()) {
logger.debug(String.format("模拟接口> 登录 API调用,username:%s ,password:%s ",
username, password));
}
JSONObject result = new JSONObject();
result.put("CookieToken","ynBDDiKMg");
result.put("URLToken","MOBkORkqnrnoVGcKIAHXppgfkNWRdV7utZSkDrI448Q.oxNjAxNTM4NDk3LCJwIjoiZGJjODg5NzliNzVj" +
"Nzc2YmU5MzBjM2JjNjg1ZWFiNGI5ZjhhN2Y0N2RlZjg3NWUyOTJkY2VkYjkwYmEwMTA0NyIsInQiOjE2MDA5MzM2OTcsInUiOiI" +
"4ODlkZDYyM2ViIn0eyJlIj.GciOiJIUzI1NiIsInR5cCI6IkpXVCJ9eyJhb");
result.put("TokenTimeout",604800);
result.put("AuthToken","MOBkORkqnrnoVGcKIAHXppgfkNWRdV7utZSkDrI448Q.oxNjAxNTM4NDk3LCJwIjoiZGJjODg5NzliNzVj" +
"Nzc2YmU5MzBjM2JjNjg1ZWFiNGI5ZjhhN2Y0N2RlZjg3NWUyOTJkY2VkYjkwYmEwMTA0NyIsInQiOjE2MDA5MzM2OTcsInUiOiI" +
"4ODlkZDYyM2ViIn0eyJlIj.GciOiJIUzI1NiIsInR5cCI6IkpXVCJ9eyJhb");
result.put("Token","ynBDDiKMg");
return result;
}
}
| [
"banmajio@163.com"
] | banmajio@163.com |
072cec80546ea854ffcead58ab6b91c3f17a97c4 | 2b85dd448a2f0ae0cd1ecce4b62729b170acdaaa | /code/src/de/rfh/crm/server/appointmentService/boundary/AppointmentServicePersistence.java | 1766f1b4d9c24950dbcc698c85ece0737d7473e8 | [] | no_license | ffmaikgodinho/RFH-WS2014-AppDev2-Projektarbeit | 1ef3f4727aacd08a4ec18a47a819d9774a3c72ef | e1d1b496108729d3343019049d64cf80d54aa6be | refs/heads/master | 2016-09-06T13:10:57.442082 | 2015-01-31T10:45:44 | 2015-01-31T10:45:44 | 27,626,535 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 380 | java | package de.rfh.crm.server.appointmentService.boundary;
import java.util.UUID;
import de.rfh.crm.server.appointmentService.entity.Appointment;
public interface AppointmentServicePersistence {
Appointment getAppointment(UUID id);
void deleteAppointment(UUID id);
void createAppointment(Appointment appointment);
void updateAppointment(Appointment appointment);
}
| [
"maik.godinho@flowfact.de"
] | maik.godinho@flowfact.de |
d60b2cd667b6be1898b33ac636aafacb145a423a | 110c90c7b659897324cff84cb00f9761fb4297cd | /c3.unicap.br.almir.ip1/src/lista8/Exercicio11_lista8.java | f5ca4b982aec91f96c23ec9329bf1ccdfc75ddfa | [
"MIT"
] | permissive | luisfelipe3d/base-cod-java | 7ec580354c74484dde6942aaa5f97f8674bc161a | 8a19086ab2e0c0e27f7f2a5dd616c0a49b40accb | refs/heads/master | 2021-06-22T03:06:58.409961 | 2020-12-08T04:23:06 | 2020-12-08T04:23:06 | 146,921,903 | 0 | 2 | MIT | 2020-06-06T12:31:10 | 2018-08-31T17:17:12 | Java | UTF-8 | Java | false | false | 2,490 | java | /*
Exercicio :
Faça um programa em JAVA para ler o sexo(1-masculino, 2-feminino) e a
altura de um grupo de 50 pessoas. O programa deve calcular;
a) Altura média das mulheres e a altura média dos homens;
b) A maior e o menor altura do grupo, dizendo se a altura é de um homem ou de
uma mulher.
*/
package lista8;
import java.util.Scanner;
public class Exercicio11_lista8 {
public static void main(String[] args) {
Scanner in = new Scanner (System.in);
int sexo,i=0;
double altura_m=0,altura_h=0,maior_h=0,maior_m=0,
menor_h=Integer.MAX_VALUE,media_h=0,media_m=0,
menor_m=Integer.MAX_VALUE;
do {
do{
System.out.println("Digite seu sexo: ");
System.out.println("1. Masculino.");
System.out.println("2. Feminino.");
System.out.print("sexo: ");
sexo = in.nextInt();
} while (sexo != 1 && sexo != 2);
switch(sexo){
case 1:
System.out.print("Digite sua altura: ");
altura_h = in.nextDouble();
if (altura_h > maior_h )
maior_h = altura_h;
media_h = media_h + altura_h;
if (altura_h < menor_h)
menor_h = altura_h;
break;
case 2:
System.out.print("Digite sua altura: ");
altura_m = in.nextDouble();
if (altura_m > maior_m)
maior_m = altura_m;
media_m = (media_m + altura_m);
if (altura_m < menor_m)
menor_m = altura_m;
break;
default:
System.out.println("Opção inválida!!");
}
i++;
} while (i !=4);
if (maior_h > maior_m)
System.out.println("Maior altura é: "+maior_h+". Homem.");
else
System.out.println("Maior altura é: "+maior_m+". Mulher.");
if (menor_h < menor_m)
System.out.println("Menor altura é: "+menor_h+". Homem");
else
System.out.println("Menor altura é: "+menor_m+". Mulher.");
System.out.println("Média Homens: "+(media_h/4));
System.out.println("Média Mulheres: "+(media_m/4));
}
}
| [
"luisfelipe3d@pm.me"
] | luisfelipe3d@pm.me |
055ac210977d3f995ec9af6f52ba1f4cdb16fbae | d9ea3ae7b2c4e9a586e61aed23e6e997eaa38687 | /11.GOF23开发模式/★★★开发模式/代理模式/静态代理/exp1/WeddingCompany.java | 8bce0bc7b0c846be6f6535849e27daf40ac5a426 | [] | no_license | yuanhaocn/Fu-Zusheng-Java | 6e5dcf9ef3d501102af7205bb81674f880352158 | ab872bcfe36d985a651a5e12ecb6132ad4d2cb8e | refs/heads/master | 2020-05-15T00:20:47.872967 | 2019-04-16T11:06:18 | 2019-04-16T11:06:18 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 544 | java | package 静态代理.exp1;
//2,代理角色--->代理class忙前忙后需要持有真实角色的引用
public class WeddingCompany implements Marry{
private You you;
public WeddingCompany() {
}
public WeddingCompany(You you) {
super();
this.you = you;
}
private void befor() {
System.out.println("布置婚房。。。");
}
private void after() {
System.out.println("闹洞房。。。");
}
@Override
public void marry() {
befor();//<<---代理给你忙前
you.marry();
after();//《---代理给你忙后
}
}
| [
"fuzusheng@gmail.com"
] | fuzusheng@gmail.com |
f5ad8fc772455520dbe65e630822ecbc71985de1 | 6ed3d3ec7861c3471747b1307d48b8f8e9d3f38f | /src/microsoft/exchange/webservices/data/XmlNameTable.java | 62cdab18824d9f93c35b9059a14c8e65581728b4 | [] | no_license | msld/EWS-Java-API | 583c49a27e72f7282c07cde9439039941e843815 | 146467ed1a9b3684c038467fcc5265654460541d | refs/heads/master | 2021-01-23T18:10:47.029613 | 2013-05-30T12:16:13 | 2013-05-30T12:16:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,390 | java | /**************************************************************************
* copyright file="XmlNameTable.java" company="Microsoft"
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* Defines the XmlNameTable.java.
**************************************************************************/
package microsoft.exchange.webservices.data;
import microsoft.exchange.webservices.data.exceptions.ArgumentNullException;
import microsoft.exchange.webservices.data.exceptions.ArgumentOutOfRangeException;
/**
* Table of atomized String objects.
*/
public abstract class XmlNameTable {
/**
* Initializes a new instance of the XmlNameTable class.
*/
protected XmlNameTable() {
};
/**
* When overridden in a derived class, atomizes the specified String and
* adds it to the XmlNameTable.
*
* @param array
* : The name to add.
* @return The new atomized String or the existing one if it already exists.
* @throws System.ArgumentNullException
* : array is null.
*/
public abstract String Add(String array);
/**
* Reads an XML Schema from the supplied stream.
*
* @param array
* The character array containing the name to add.
* @param offset
* Zero-based index into the array specifying the first character
* of the name.
* @param length
* The number of characters in the name.
* @return The new atomized String or the existing one if it already exists.
* If length is zero, String.Empty is returned
* @throws System.IndexOutOfRangeException
* 0 > offset -or- offset >= array.Length -or- length >
* array.Length The above conditions do not cause an exception
* to be thrown if length =0.
* @throws System.ArgumentOutOfRangeException
* length < 0.
*/
public abstract String Add(char[] array, int offset, int length);
/**
* When overridden in a derived class, gets the atomized String containing
* the same value as the specified String.
*
* @param array
* The name to look up.
* @return The atomized String or null if the String has not already been
* atomized.
* @throws System.ArgumentNullException
* : array is null.
*/
public abstract String Get(String array);
/**
* When overridden in a derived class, gets the atomized String containing
* the same characters as the specified range of characters in the given
* array.
*
* @param array
* The character array containing the name to add.
* @param offset
* Zero-based index into the array specifying the first character
* of the name.
* @param length
* The number of characters in the name.
* @return The atomized String or null if the String has not already been
* atomized. If length is zero, String.Empty is returned
* @throws System.IndexOutOfRangeException
* 0 > offset -or- offset >= array.Length -or- length >
* array.Length The above conditions do not cause an exception
* to be thrown if length =0.
* @throws System.ArgumentOutOfRangeException
* length < 0.
*/
public abstract String Get(char[] array, int offset, int length);
}
| [
"therion66"
] | therion66 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.