code stringlengths 3 1.18M | language stringclasses 1
value |
|---|---|
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
package org.peterbaldwin.vlcremote.loader;
import org.peterbaldwin.client.android.vlcremote.R;
import org.peterbaldwin.vlcremote.net.MediaServer;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import an... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
package org.peterbaldwin.vlcremote.loader;
import org.peterbaldwin.client.android.vlcremote.R;
import org.peterbaldwin.vlcremote.net.MediaServer;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import j... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
/*-
* Copyright (C) 2009 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2009 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
package org.peterbaldwin.vlcremote.widget;
import org.peterbaldwin.client.android.vlcremote.R;
import org.peterbaldwin.vlcremote.model.PlaylistItem;
import org.peterbaldwin.vlcremote.model.Track;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.Vi... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
package org.peterbaldwin.vlcremote.fragment;
import org.peterbaldwin.client.android.vlcremote.R;
import org.peterbaldwin.vlcremote.intent.Intents;
import org.peterbaldwin.vlcremote.model.Status;
import org.peterbaldwin.vlcremote.net.MediaServer;
import android.content.BroadcastReceiver;
import android.content.Contex... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2009 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2009 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2009 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2009 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2009 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
/*-
* Copyright (C) 2011 Peter Baldwin
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This pro... | Java |
public class Profesor extends Persona implements Evaluar
{
private
String titulo_acam;
public Profesor(){}
public Profesor(long cedula, String nombre, String apellido,String t)
{
super(cedula, nombre, apellido);
this.titulo_acam = t;
}
public String getTitulo_acam()
{
return titulo_acam;
}
public... | Java |
import java.awt.*;
import javax.swing.*;
import com.cloudgarden.layout.AnchorLayout;
import info.clearthought.layout.TableLayout;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.WindowAdapter;
import java... | Java |
import java.io.*;
import java.util.*;
import javax.swing.JOptionPane;
public class Control
{
private
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
boolean prof_registrado = false;
Seccion sec;
public Control()
{
super();
this.sec = new Seccion();
}
//******... | Java |
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import jav... | Java |
import java.awt.*;
import javax.swing.*;
import java.awt.Dimension;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Vector;
import javax.swing.JApplet;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
public class JTab... | Java |
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
public class Panel extends JPanel {
private int anchoImagen, altoImagen;
private Image image;
public Panel(String rutaImagen, int ancho, int alto) {
super();
image = new ImageIcon(getClas... | Java |
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.JComponent;
import javax.swing.JFrame;
/*Desarrolladores:
* Arrieche, Andrés C.I V- 19.423.804
* Fernández, Jhoswar C.I V- 19.779.296
* Ramírez, Jeniree C.I V- 18.619.418
Sección 3. */
public class Principal
{
public static void main(Str... | Java |
public abstract class Persona
{
private
long cedula;
String nombre;
String apellido;
public Persona()
{
super();
}
public Persona(long cedula, String nombre, String apellido)
{
super();
this.cedula = cedula;
this.nombre = nombre;
this.apellido = apell... | Java |
public interface Evaluado
{
public abstract void presentarEvaluacion();
}
| Java |
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Acceso
{
private
String log,pass;
public Acceso()
{
super();
this.log = "usuario";
this.pass = "123456";
}
public Acceso(String log, String pass)
{
super();
this.log = log;
this.pass = pass;
}
public String get... | Java |
public interface Evaluar
{
public abstract void EvaluarEstudiante(Estudiante e);
}
| Java |
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.*;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.util.Vector;
/**
* This code was... | Java |
public class Estudiante extends Persona implements Evaluado
{
private
float notas[] = new float[3];
float nota_final;
boolean estado;
public Estudiante(){}
public Estudiante(long cedula, String nombre, String apellido)
{
super(cedula, nombre, apellido);
}
public float... | Java |
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import javax.swing.border.LineBorder;
import javax.swing.Swing... | Java |
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import jav... | Java |
import java.util.*;
public class Seccion
{
private
Profesor prof;
String num_secc;
boolean prof_reg = false;
Vector<Estudiante> Estudiantes = new Vector<Estudiante>(0);
public Seccion()
{
super();
prof = new Profesor();
}
public Seccion(String s)
{
super();
num_secc = s;
prof = new Pr... | Java |
package com.risk.client;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
* The async counterpart of <code>GreetingService</code>.
*/
public interface GreetingServiceAsync
{
void greetServer(String input, AsyncCallback<String> callback)
throws IllegalArgumentException;
}
| Java |
package com.risk.client;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
/**
* The client side stub for the RPC service.
*/
@RemoteServiceRelativePath("greet")
public interface GreetingService extends RemoteService
{
String greetServer(String... | Java |
package com.risk.client;
import com.risk.shared.FieldVerifier;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.... | Java |
package com.risk.shared;
/**
* <p>
* FieldVerifier validates that the name the user enters is valid.
* </p>
* <p>
* This class is in the <code>shared</code> packing because we use it in both
* the client code and on the server. On the client, we verify that the name is
* valid before sending an RPC request so t... | Java |
package com.risk.server;
import com.risk.client.GreetingService;
import com.risk.shared.FieldVerifier;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
/**
* The server side implementation of the RPC service.
*/
@SuppressWarnings("serial")
public class GreetingServiceImpl extends RemoteServiceServlet imp... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Demo {
public static void main(String args[]) {
Queue q = new Queue();
new Publisher(q);
new Consumer(q);
}
}
| Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Queue {
int exchangeValue;
boolean busy = false;
synchronized int get() {
if (!busy) {
try {
wait();
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Publisher implements Runnable {
Queue q;
Publisher(Queue q) {
this.q = q;
new Thread(this, "Publisher").start();
}
public voi... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Consumer implements Runnable {
Queue q;
Consumer(Queue q) {
this.q = q;
new Thread(this, "Consumer").start();
}
public void r... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author TanAnh
*/
public class Demo {
public static void main(String args[]) throws InterruptedException{
Parentheses p3=new Parentheses();
MyThread name1=new MyThread(p3, "Bob");
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author TanAnh
*/
public class MyThread implements Runnable {
String s1;
Parentheses p1;
Thread t;
public MyThread(Parentheses p2, String s2){
p1=p2;
s1=s2;
t... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerConfigurationExcepti... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder... | Java |
package XML;
import java.util.ArrayList;
import java.util.List;
public class Table {
public String TenBang;
public List<Record> ListRecord=new ArrayList<Record>();
public String TenKhoaChinh;
public String KieuKhoaChinh;
public Table(String TenBang,List<Record> ListRecord,String TenKho... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
/**
*
* @author PC
*/
public class Condition {
public String TenBang;
public String[] Bien;
public String[] GiaTri;
public String[] DauSoSanh;
public String[] DauNoi;
... | Java |
package XML;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import org.xml.... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.io.Serializable;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
/**
*
* @author PC
*/
class Col implements Serializable{
public S... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
/**
*
* @author PC
*/
public class Attributes
{
public String Bang1;
public String Bang2;
public String[] ThuocTinh1;
public String[] ThuocTinh2;
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
/**
*
* @author PC
*/
import java.io.File;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
/**
*
* @author PC
*/
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
imp... | Java |
package XML;
/*
* To change this template, choose Tools | Templates and open the template in
* the editor.
*/
/**
*
* @author PC
*/
import java.lang.*;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
public class XuLyChuoi {
public String XoaMoiKhoangTrang(String chuoi) {... | Java |
import java.util.logging.Level;
import java.util.logging.Logger;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author TanAnh
*/
public class Parentheses {
void display(String s) {
try {
Thread.sleep(100);
} catch (Inter... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Demo {
public static void main(String args[]) {
Queue q = new Queue();
new Publisher(q);
new Consumer(q);
}
}
| Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Queue {
int exchangeValue;
boolean busy = false;
synchronized int get() {
if (!busy) {
try {
wait();
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Publisher implements Runnable {
Queue q;
Publisher(Queue q) {
this.q = q;
new Thread(this, "Publisher").start();
}
public voi... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Consumer implements Runnable {
Queue q;
Consumer(Queue q) {
this.q = q;
new Thread(this, "Consumer").start();
}
public void r... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author TanAnh
*/
public class Demo {
public static void main(String args[]) throws InterruptedException{
Parentheses p3=new Parentheses();
MyThread name1=new MyThread(p3, "Bob");
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author TanAnh
*/
public class MyThread implements Runnable {
String s1;
Parentheses p1;
Thread t;
public MyThread(Parentheses p2, String s2){
p1=p2;
s1=s2;
t... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
/**
*
* @author TanAnh
*/
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
imp... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.*;
import javax.xml.xpath.*;
import org.w3c.dom.*;
import org.xml... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.io.File;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.*;
/**
*
* @author TanA... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
impo... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author TanAnh
*/
import java.net.*;
import java.io.*;
public class SimpleClient {
public static void main(String args[]) {
try {
Socket s = new Socket("localhost", 2002);
... | Java |
import java.util.logging.Level;
import java.util.logging.Logger;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author TanAnh
*/
public class Parentheses {
void display(String s) {
try {
Thread.sleep(100);
} catch (Inter... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package TestSocket;
import java.io.*;
import java.net.*;
/**
*
* @author TanAnh
*/
public class SimpleServer {
public static void main(String args[]) {
int port = 2002;
try {
Server... | Java |
package TestSocket;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.Serializable;
/**
*
* @author TanAnh
*/
class HocSinh implements Serializable {
int value;
String id;
public HocSinh(int v, String s) {
this.value = v;
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Demo {
public static void main(String args[]) {
Queue q = new Queue();
new Publisher(q);
new Consumer(q);
}
}
| Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Queue {
int exchangeValue;
boolean busy = false;
synchronized int get() {
if (!busy) {
try {
wait();
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Publisher implements Runnable {
Queue q;
Publisher(Queue q) {
this.q = q;
new Thread(this, "Publisher").start();
}
public voi... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GiaoTiepThread;
/**
*
* @author TanAnh
*/
class Consumer implements Runnable {
Queue q;
Consumer(Queue q) {
this.q = q;
new Thread(this, "Consumer").start();
}
public void r... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author TanAnh
*/
public class Demo {
public static void main(String args[]) throws InterruptedException{
Parentheses p3=new Parentheses();
MyThread name1=new MyThread(p3, "Bob");
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author TanAnh
*/
public class MyThread implements Runnable {
String s1;
Parentheses p1;
Thread t;
public MyThread(Parentheses p2, String s2){
p1=p2;
s1=s2;
t... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder... | Java |
package XML;
public class Table {
public String TenBang;
public String[] Kieu;
public String[] TenBien;
public String TenKhoaChinh;
public String KieuKhoaChinh;
public String[] GiaTri;
public Table(String TenBang, String[] Kieu, String[] TenBien, String TenKhoaChinh, String KieuKhoaChi... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
import java.util.List;
/**
*
* @author PC
*/
public class Records{
public List<Record> records;
public Records()
{
}
public Records(List<Record... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package XML;
/**
*
* @author PC
*/
public class Condition {
public String TenBang;
public String[] Bien;
public String[] GiaTri;
public String[] DauSoSanh;
public String[] DauNoi;
... | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.