text stringlengths 14 410k | label int32 0 9 |
|---|---|
private void postPlugin(final boolean isPing) throws IOException {
// The plugin's description file containg all of the plugin data such as name, version, author, etc
final PluginDescriptionFile description = plugin.getDescription();
// Construct the post data
final StringBuilder data =... | 9 |
@EventHandler
public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
if (event.getPlayer().getItemInHand().getType() == Material.STRING) {
if (event.getRightClicked() instanceof Wolf) {
Wolf wolf = (Wolf) event.getRightClicked();
plugin.debugMessage... | 3 |
@Override
public MedTypeDTO getMedTypeById(Long id) throws SQLException {
Session session = null;
MedTypeDTO medType = null;
try {
session = HibernateUtil.getSessionFactory().openSession();
medType = (MedTypeDTO) session.load(MedTypeDTO.class, id);
} catch (Ex... | 3 |
public static double GetTrainingLikelyhood(int i, int j, int f, boolean isFaceClass)
{
if(f == 1 && isFaceClass)
{
return isFaceProbilities[i][j];
}
else if(f == 0 && isFaceClass)
{
return 1 - isFaceProbilities[i][j];
}
else if(f == 1 && !isFaceClass)
{
return nonFaceProbilities[i][j];
}
e... | 8 |
private void addNeighbors(int i, int j) {
for (int k = i - 1; k <= i + 1; k++)
for (int m = j - 1; m <= j + 1; m++)
if (existNeighbor(k, m))
board[i][j].addNeighbor(board[k][m]);
} | 3 |
public Gestion()
{
Restaurant r = new Restaurant();
Table gestion[] = r.restaurantCreate();
do
{
System.out.println("If you want to sit down press 1, to leave press 2, to display the restaurant state press 3,to close the programm press 4");
choice = scan.nextInt();
switch(choice)
{
case ... | 5 |
protected StandardTile[][][] makeTiles(JSONObject dataRoot)
throws JSONException, DataFormatException {
JSONObject dataSize = dataRoot.getJSONObject("size");
int sizeZ = dataSize.getInt("z");
int sizeX = dataSize.getInt("x");
int sizeY = dataSize.getInt("y");
if (sizeZ <= 0 || sizeX <= 0 || sizeY <= 0) {
... | 7 |
public Mesh(Vector3d[] verts, Triangle[] tris, Color3f a, Color3f d, Color3f s, Color3f e, float shininess, Shape3D shape) {
this.shape = shape;
vertices = new ArrayList<Vector3d>(verts.length);
edges = new ArrayList<Edge>(verts.length);
triangles = new ArrayList<Triangle>(tris.length);
for (int i = 0; i < v... | 8 |
private void setEvents(){
dataTf.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent focusEvent) {
if(!controlDate){
JOptionPane.showMessageDialog(centerPanel, "Por favor, digite uma data no formato Brasileiro dia/mês/an... | 8 |
public boolean checkReset(){
int counter = 0;
for (int i=0; i < model.getWidth(); i++){
for (int j=0; j < model.getHeight(); j++){
if (buttons[i][j].isEnabled()){
counter++;
}
}
}
log.fine("Resetting of the gamefield is " + ((counter == 0) ? "valid" : "invalid" )+ ".");
System.out.println(c... | 5 |
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
Player player = null;
if(sender instanceof Player){
player = (Player)sender;
if(args.length >= 1){
if(player.hasPermission("")){
player = _plugin.getServer().getPlayer(args[0]);
if(player... | 9 |
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
if(paused) {
g.setColor(Color.BLACK);
g.fillRect(1, 1, getWidth()-1, getHeight()-6);
g.setColor(Color.WHITE);
g.setFont(new Font("Monospaced", Font.BOLD, 15));
g.drawString("Click to resume", 100, 200);
} else if(gameOver)... | 3 |
@Override
public void push(T item) {
if (first == null) {
first = new Node<T>(null, item);
last = first;
} else {
last = setToNext(first, item);
}
size++;
} | 1 |
public static void shortPrintStackTrace(final Throwable main, final Throwable throwable, final Object cause)
{
final StackTraceElement[] causedTrace = main.getStackTrace();
final StackTraceElement[] trace = throwable.getStackTrace();
int m = trace.length - 1, n = causedTrace.length - 1;
while (m >= 0 && n >= 0... | 6 |
private void jBListarIncidentesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBListarIncidentesActionPerformed
// TODO add your handling code here:
int comuna = combo_comuna_reportetriple.getSelectedIndex();
int tipo = combo_tipo_reportetriple.getSelectedIndex();
int... | 8 |
Class367_Sub2(NativeOpenGlToolkit class377, IndexLoader class45, Class269 class269) {
super(class377);
try {
aClass377_7296 = class377;
aClass269_7294 = class269;
if (class45 == null || !aClass269_7294.method2039(100)
|| !((NativeOpenGlToolkit) aClass377_7296).aBoolean9923)
aClass193_7293 = null;
... | 7 |
@Test
public void twoVerticesCompareCorrectly() {
Vertex v = new Vertex(0, 1);
Vertex w = new Vertex(0, 1);
Vertex u = new Vertex(0, 2);
assertTrue(v.compareTo(u) < 0);
assertTrue(u.compareTo(v) > 0);
assertTrue(w.compareTo(v) == 0);
} | 0 |
static void plot() {
//Simulating a service running in the background
//It can force plot the calculator after a timer runs out!
while(true) {
try{Thread.sleep(1);}catch(Exception e){}
if(delayInt>0){
delayInt--;
if(delayInt... | 4 |
@Override
public boolean contains(int x, int y) {
int radbor = getSelect() ? CIRCLE_BORDER_RAD_SELECT : CIRCLE_BORDER_RAD_NOSELECT;
int xx = x - radbor, yy = y - radbor;
return (xx * xx) + (yy * yy) <= (radbor * radbor);
} | 1 |
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Survey)) {
return false;
}
Survey other = (Survey) object;
if ((this.id == null && other.id != null) || (this.i... | 5 |
static boolean isUniueCharBitVector(String s) {
if (s.length() > 256) {
return false;
}
int checker = 0;
for (int i=0; i<s.length(); i++) {
int val = s.charAt(i) - 'a';
if ((checker & (1 << val)) > 0) {
return false;
}
... | 3 |
private void loadProperties() {
properties = new HashMap<String, String>();
try {
BufferedReader reader = new BufferedReader(new FileReader(configFilePath));
String line = reader.readLine();
while(line != null) {
if (line.length()>0 && (! line.startsWith("#"))) {
String[] toks= line.split... | 6 |
@Override
public void computeShortestPath() throws IllegalStateException
{
PriorityQueue<CostPath> nextCostPathQueue = new PriorityQueue<CostPath>();
if (startID == -1 || graph == null || weighing == null)
throw new IllegalStateException();
costMap = new HashMap<Integer, C... | 9 |
@EventHandler
public void EnderDragonSlow(EntityDamageByEntityEvent event) {
Entity e = event.getEntity();
Entity damager = event.getDamager();
String world = e.getWorld().getName();
boolean dodged = false;
Random random = new Random();
double randomChance = plugin.getEnderDragonConfig().getDouble("EnderDr... | 6 |
public static void deleteResource(int resourceID) {
// Find in list
int listIndex = 0;
int listSize = resourceList.size();
for (int i = 1; i <= listSize; i++) {
if (resourceList.get(i - 1).intID == resourceID) {
listIndex = i - 1;
}
}
Resource resourceToDelete = resourceList.get(listIndex);
//... | 9 |
public void close() {
try{
if(connection!=null && !connection.isClosed())
{
connection.close();
connection=null;
}
}catch(SQLException ex)
{
ex.printStackTrace();
}
} | 3 |
public String AddCart() {
ProductService service = new ProductService();
try {
// if quantity mentioned on checkout.jsp is 0 display error message
// without adding item to the shopping cart.
if (item.getQuantity() != 0) {
Item item_temp = service.getItem(item.getCategory(),
item.getTitle(), it... | 7 |
public Bullet updateControl(final Input input) {
if (input.isKeyDown(Input.KEY_A) || input.isKeyDown(Input.KEY_LEFT)) {
this.angle -= Constants.THRUST_ANGLE;
} else if (input.isKeyDown(Input.KEY_D) || input.isKeyDown(Input.KEY_RIGHT)) {
this.angle += Constants.THRUST_ANGLE;
}
if (input.isKeyDown(Input.KEY... | 9 |
public boolean populate(OggPacket packet) {
// TODO Finish the flac support properly
if (type == OggStreamIdentifier.OGG_FLAC) {
if (tags == null) {
tags = new FlacTags(packet);
return true;
} else {
// TODO Finish FLAC support
... | 5 |
private synchronized void messageReceivedWithTimestamp(int node, Message msg, long timestamp, boolean plot) {
if (slave != null && msg instanceof SnoopBCMsg) {
SnoopBCMsg sm = (SnoopBCMsg) msg;
//Logger.getLogger(Datasource.class.getName()).log(Level.INFO, String.format("Msg from %d", sm... | 7 |
public void compile() throws IOException {
GlobalAppHandler.getInstance().disableBackButton();
File folder = new File(FileUtilities.getUnintegratedDirectory() + File.separator + "notes");
Logger.getInstance().log("Folder path: " + folder.getAbsolutePath());
List<File> files = new ArrayList<File>();
FileUtilit... | 9 |
public Type pop() {
size--;
if (size < 0)
throw new IndexOutOfBoundsException("No more items in the stack!");
Type data = stack[size];
stack[size] = null;
if (size > 0 && size == stack.length / 4)
resize(stack.length / 2);
return data;
} | 3 |
public void setCache(Cache cache) {
this.cache = cache;
} | 0 |
private int numKings( int player ) {
int total = 0;
if( player == 1 ){
//counts how many pieces are player ones
for( int row = 0 ; row < 8 ; row++ )
{
for( int column = (row + 1) % 2 ; column < MAX_COLUMNS ; column += 2 )
{
if( isPlayerOne( new Coordinate( column, row) ) ){
... | 9 |
public void valueChanged(ListSelectionEvent __event) {
try {
Object source = __event.getSource();
ListModel listmodel;
Vector contents;
Class selection;
int val;
int _MAX;
if (sou... | 7 |
public Updater(Plugin plugin, int id, File file, UpdateType type, boolean announce) {
this.plugin = plugin;
this.type = type;
this.announce = announce;
this.file = file;
this.id = id;
this.updateFolder = plugin.getServer().getUpdateFolder();
final File pluginFile... | 9 |
public static void parse(String filename, int n) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
String line = null;
// drop the header line
line = br.readLine();
int abs_min = Integer.MAX_VALUE, abs_max = Integer.M... | 9 |
public Vector<String> enumDatabases () {
Vector<String> instances = new Vector<String>();
Connection session = null;
try {
// connect to management database
session = connect ("postgres", "postgres", "postgres");
if (session == null) {
errMsg = "Can't connect to management database";
return inst... | 7 |
public static void printSpiral(int[][] spiral) {
for (int y = 0; y < spiral.length; y++) {
for (int x = 0; x < spiral.length; x++) {
int value = spiral[x][y];
String start = "";
if (value < 100) {
start += " ";
}
if (value < 10) {
start += " ";
}
System.out.print(start + valu... | 4 |
void moveY(boolean down) {
if (down)
y += speed;
else y -= speed;
} | 1 |
@Override
protected boolean isProgramRunning(String programName) throws IOException, InterruptedException {
logger.detailedTrace("Obtaining information about running instances of " + programName);
Process process = new ProcessBuilder("wmic", "Path", "win32_process", "Where",
command... | 4 |
private int indexOf(Vertex v) {
Vertex r;
if (v != null) {
for (int i = 0; i < adjacencyList.getSize(); i++) {
r = adjacencyList.get(i).min();
if (r != null) {
if (r.equals(v)) {
return i;
}
... | 4 |
public MyStatusAdapter(ApplicationConfParser applicationConfParser) throws FileNotFoundException, UnsupportedEncodingException{
//hbaseConfModel = applicationConfParser.getHbaseConfModel();
mediaConfModel = applicationConfParser.getMediaConfModel();
newBuffer();
} | 0 |
@Override
public void startElement(String uri, String localName, String name,
Attributes atts) throws SAXException {
super.startElement(uri, localName, name, atts);
if (numLayers > 0) {
if (secondElementName.equalsIgnoreCase(localName)) {
if (shouldRecord(uri, localName, name, atts)) {
numLayersForR... | 4 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
FPSectionNode other = (FPSectionNode) obj;
if (node == null) {
if (other.... | 9 |
public void processEvent(Event event)
{
if (event.getType() == Event.COMPLETION_EVENT)
{
System.out.println(_className + ": Receive a COMPLETION_EVENT, " + event.getHandle());
return;
}
System.out.println(_className + ".processEvent: Received Login Response..... | 8 |
public static GeneralValidator isLessThan() {
return LESS_THAN_VALIDATOR;
} | 0 |
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
MOB target=mob;
if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB))
target=(MOB)givenTarget;
if(!CMLib.flags().canSpeak(mob))
{
mob.tell(L("You can't speak!"));
return false;
... | 8 |
public List<PaidVo> getUnPaidOutDetail(int oid, Date from, Date to, int uid) {
List<InDetail> result = inDetailDao.queryInDetail(-1, oid, -1, -1, from, to, uid);
//Collections.sort(result);
//Collections.reverse(result);
Map<Integer, Double> shouldPaid = new HashMap<Integer, Double>();
... | 5 |
public static void resetTimer(String timerName, JProgressBar bar) {
for (Timer t : timerList) {
if (t.getName().equals(timerName)) {
if (t.isNormalTimer()){
t.setStartingTime(System.currentTimeMillis());
bar.setForeground(Color.black);
} else if (t.getDurationTotal() == DAY_LENGTH){
... | 5 |
@Override
protected void setReaction(Message message) {
String result = executeCmd(message.text.replaceAll(" ", ""), message.author);
if(result != null)
reaction.add(result);
} | 1 |
public void atualizar() {
jComboBoxEdicao.removeAllItems();
jComboBoxAnoPublicacao.removeAllItems();
jComboBoxAutor.removeAllItems();
jComboBoxEditora.removeAllItems();
jComboBoxCategoria.removeAllItems();
jComboBoxPublico.removeAllItems();
jComboBoxFormato.remove... | 7 |
protected static List<Class> getSupers(Class type) {
if (type.isAssignableFrom(Model.class))
throw new IllegalArgumentException(EXC_NOTAMODEL);
Class[] interfaces = type.getInterfaces();
List<Class> sC = new ArrayList<Class>();
boolean subclass = true;
for (Class i : interfaces)
if (i.equals(Model.... | 7 |
private void fireActionListeners(ActionEvent e) {
if (this.listeners == null) {
return;
}
for (int a = 0; a < this.listeners.size(); a++) {
ActionListener l = this.listeners.get(a);
try {
l.actionPerformed(e);
} catch (Exception e2)... | 3 |
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
StringBuilder out = new StringBuilder();
int nCases = Integer.parseInt(in.readLine().trim());
for (int nCase = 0; nCase < nCases; nCase++) {
in.readLine();
int[] mn = readI... | 5 |
public static String doCensor(String input) {
System.currentTimeMillis();
char dest[] = input.toCharArray();
Censor.method495(dest);
String censoredInput = new String(dest).trim();
dest = censoredInput.toLowerCase().toCharArray();
String s2 = censoredInput.toLowerCase();
Censor.method505(dest);
Censor.m... | 2 |
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((dateTime == null) ? 0 : dateTime.hashCode());
return result;
} | 1 |
public Queue() {} | 0 |
public void updateTable()
{
myXYZPanel.remove(myXYZDisplay);
myXYZDisplay = new JTable(1, myLemma.getW().length());
myXYZDisplay.setEnabled(false);
String s = myLemma.getW();
for(int i = 0; i < s.length(); i++)
myXYZDisplay.setValueAt(s.substring(i, i + 1), 0, i);... | 1 |
@SuppressWarnings("unchecked")
private Map<OrderField, String> getMarketOrderPaths(Document doc)
{
Map<OrderField, String> toReturn = new HashMap<OrderField, String>();
for (OrderField f : OrderField.values())
{
String path = f.getPath();
if (path != null)
{
List<DefaultElement> list = doc.selectNo... | 3 |
public void addAttempt(String attempt)
{
myAttempts.add(attempt);
} | 0 |
public static Team getTeamFromJson(JSONObject obj){
if(obj ==null)
return null;
Team team = new Team();
Object value;
JSONArray jsonArray;
JSONObject tmpObj;
User tmpUser;
value = obj.get("id_team");
if(value!=null)
{
team.setId_team(Integer.parseInt(value.toString()));
}
jsonArray ... | 4 |
public String getNumber() {
return number;
} | 0 |
@Override
public void actionPerformed(ActionEvent e) {
String cmd = e.getActionCommand();
switch (cmd){
case CMD_LOGIN:
String login = loginField.getText();
String pass = getHash(new String(passwordField.getPassword()));
if (login.isEmpty()... | 5 |
public MandelbrotPanel()
{
left = BigDecimal.valueOf(-2.5);
right = BigDecimal.valueOf(1);
top = BigDecimal.valueOf(-1);
bottom = BigDecimal.valueOf(1);
} | 0 |
public List<Rectangle> generate() {
data.getMainRectangle().setX(100);
data.getMainRectangle().setY(100);
rectanglesToDraw.add(data.getMainRectangle());
data.sort();
data.getSecondaryRectangles().get(0).setX(data.getMainRectangle().getX());
data.getSecondaryRectangles().get(0).setY(data.getMainRectang... | 1 |
public final int getCurrentServerIndex() {
return serverBox.getSelectedIndex();
} | 0 |
public String stComposeEmailForGmailEmailService(int dataId,int ExpVal,String flow )
{
int actVal=1000;
String returnVal=null;
hm.clear();
hm=STFunctionLibrary.stMakeData(dataId, "ExternalEmail");
String to = hm.get("To");
String subject = hm.get("Subject");
// String message = hm.get("Message")... | 6 |
public ArithmeticDecompress (String inputFileName, boolean codeCbCr) throws IOException {
this.codeCbCr = codeCbCr;
binList = new ArrayList<>();
for (int color = 0; color < 3; color++) {
binList.add(new LinkedList<Byte>());
}
arithmeticDecompressProcess(binList.get(0), inputFil... | 2 |
public void mouseClicked(MouseEvent e) {
//Запоминаем событие для обработки кнопки
ev = e;
//Получаем выбраную строку в таблице
int selectedRowIndex = creditProgramTable.getSelectedRow();
if (selectedRowIndex != -1) {
//Получаем значения
... | 2 |
public CheckResultMessage checkF07(int day) {
return checkReport.checkF07(day);
} | 0 |
public PagePinnedException(Exception e, String name){
super(e, name);
} | 0 |
public static synchronized void geneject(Class<? extends GenejectorProblem> problem)
{
byte[] mortalBytes;
if (instanceRole == InstanceRole.PROJECT)
{
// Finalize settings
Settings.getSettings().setProblemClassName(problem.getCanonicalName());
Settings.getSettings().addClass(problem.getCanonicalName(),... | 8 |
public void mouseClick(Point point) {
if(exitButton.getBounds().contains(point) || !window.contains(point)) {
setVisible(false); return;
} else if(moneyButton.contains(point)) {
log.logp(Level.FINE, getClass().getSimpleName(), "mouseClick()", "Setting money to add...");
setMoneyToAdd(50000);
log.logp(Le... | 3 |
@Override
public String getServletInfo() {
System.out.println("a");
return "Short description";
} | 0 |
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
ProdutoDAO dao = new ProdutoDAO();
Produto editado = null;
try {
editado = dao.Abrir(this.idDoProdutoSelecionado );
} catch (ErroValidacaoException ex) {
... | 2 |
public void setUsuarioidUsuario(Usuario usuarioidUsuario) {
this.usuarioidUsuario = usuarioidUsuario;
} | 0 |
public Room getRoom(int id)
{
Room room = null;
try {
PreparedStatement ps = con.prepareStatement("SELECT * FROM rooms WHERE id=?");
ps.setInt(1, id);
ResultSet rs = ps.executeQuery();
if( rs.next() )
{
room = getRoomFromRS(rs);
}
ps.close();
} catch (SQLException e) {
// T... | 2 |
public boolean removeEntity(int x, int y) {
if (state != null) {
throw new IllegalStateException("game currently ticking");
}
boolean success = thisTick[x][y] != null;
log(Level.INFO, "Removing %d at (%d, %d)", success ? thisTick[x][y].id : -1, x, y);
thisTick[x][y] =... | 2 |
static public Object[] toArray(Object coll) throws Exception{
if(coll == null)
return EMPTY_ARRAY;
else if(coll instanceof Object[])
return (Object[]) coll;
else if(coll instanceof Collection)
return ((Collection) coll).toArray();
else if(coll instanceof Map)
return ((Map) coll).entrySet().toArray();
else ... | 8 |
protected Icon getIcon() {
java.net.URL url = getClass().getResource("/ICON/default.gif");
return new javax.swing.ImageIcon(url);
} | 0 |
public void drawRect(int xPos, int yPos, int width, int height, int color) {
if (xPos > this.width)
xPos = this.width - 1;
if (yPos > this.height)
yPos = this.height - 1;
if (xPos + width > this.width)
width = this.width - xPos;
if (yPos + height > this.height)
height = this.height - yPos;
width -... | 8 |
public static void keyPress(KeyEvent e){
Ship ship = gameObjects.getShip();
int keyCode = e.getKeyCode();
if (keyCode == KeyEvent.VK_UP){
ship.forwardThrust(true);
}
if (keyCode == KeyEvent.VK_DOWN){
//No reverse
}
if (keyCode == KeyEvent... | 5 |
public static Set<ClassFile> analyzeProject(ClassReference mainClass,
File classPath, final Set<ClassReference> notFound) {
final RootReference root = mainClass.getRootReference();
Set<ClassHolder> classHolders = new HashSet<ClassHolder>();
classHolders.add(new ClassHolder(mainClass... | 8 |
protected String legalMove(Board b, String move) {
// get source pos and target pos
if (move != null) {
Position src, tgt;
int srcRow, srcCol;
int tgtRow, tgtCol;
srcRow = b.getRowNumber(move.substring(1, move.indexOf(' ')));
if (reverse) {
src... | 6 |
public void consume() throws InterruptedException {
Random random = new Random();
while (true) {
synchronized (lock) {
while (list.size() == 0) {
lock.wait();
}
int value = list.removeFirst();
System.out.pri... | 2 |
void processLoginResponseMessage(Event event)
{
OMMItemEvent ie = (OMMItemEvent)event;
OMMMsg ommMsg = ie.getMsg();
short ommMsgType = ommMsg.getMsgType();
String ommMsgTypeStr = OMMMsg.MsgType.toString((byte)ommMsgType);
System.out.println("<-- " + _className + "Received " +... | 8 |
static final Class171 method459(int i, OpenGlToolkit var_ha_Sub2, String string,
boolean bool) {
try {
anInt861++;
int i_6_ = OpenGL.glGenProgramARB();
OpenGL.glBindProgramARB(i, i_6_);
if (bool != false)
return null;
OpenGL.glProgramStringARB(i, 34933, string);
OpenGL.glGetInte... | 5 |
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... | 6 |
public void WGPwd(String sender, String login, String hostname, Command command) {
if(command.arguments.length == 2) {
User user;
for(Game game : games.values()) {
user = getUser(game, sender, login, hostname);
if(user != null) {
user.s... | 4 |
public ParkMain() {
setTitle("\u505C\u8F66\u573A\u7BA1\u7406\u7CFB\u7EDF");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
JMenuBar menuBar = new JMenuBar();
JMenu m1 = new JMenu();
m1.setFont(new Font("微软雅黑", Font.PLAIN, 12));
m1.setText("\u7CFB\u7EDF\... | 4 |
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerEnteredArena(PlayerEnteredArenaEvent evt) {
if (!evt.isCancelled()) {
Player evtPlayer = evt.getPlayer();
if (!evtPlayer.isDead() || evt.getMethod() == MoveMethod.RESPAWNED) {
evtPlayer.getInventory().clear();
addItems(evtPlayer);
add... | 4 |
public JButton getjButtonClose() {
return jButtonClose;
} | 0 |
private boolean jj_3_37() {
if (jj_3R_55()) return true;
if (jj_3R_56()) return true;
return false;
} | 2 |
public StudentTableModel(LinkedList<Student> students) {
this.showStudents(students);
} | 0 |
public void runAway(int fromX, int fromY) {
if (dead || sleeping || exciting || angry) {
return;
}
int toX, toY;
if (x > fromX) {
toX = Terrarium.MAX_X;
}
else {
toX = 0;
}
if (y > fromY) {
toY = Terrarium.MAX_Y;
}
else {
toY = 0;
}
moveTo(toX, toY);
clearActions();
scare = tr... | 6 |
public double getEnvironmentMult(Player player)
{
Environment env = player.getWorld().getEnvironment();
String envString;
double envMult = 1.0;
if (env.equals(Environment.NORMAL))
{
envString = getMBR().getConfigManager()
.getProperty(MobBounty... | 9 |
private void getRequest(HttpExchange he) throws IOException {
try {
String path = he.getRequestURI().getPath();
int lastIndex = path.lastIndexOf("/");
if (lastIndex > 0) {
int id = Integer.parseInt(path.substring(lastIndex + 1));
response = fac... | 2 |
protected void configureShell(Shell shell) {
GridLayoutFactory.fillDefaults().margins(0, 0).spacing(5, 5).applyTo(
shell);
shell.addListener(SWT.Deactivate, new Listener() {
public void handleEvent(Event event) {
/*
* Close if we are deactivating and have no child shells. If we
* have child sh... | 8 |
public RacketView(int x, int y) {
BufferedImage img = null;
try {
img = ImageIO.read(new File("src\\jark\\racket.png"));
_elementSprite = new Sprite(img, x, y);
_elementSprite.setSpeed(0, 0);
} catch (IOException e) {
e.printStackTrace();
}... | 1 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.