Hola a todos , soy estudiante de 4 de ing informatica , y estaba buscando realizar algun trabajo para este mes antes de comenzar el ultimo año , es decir dentro de un mes . ¿ Que sitio me recomiendan para buscar trabajo ?
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
private JComboBox getCbFiltro() {
if (cbFiltro == null) {
cbFiltro = new JComboBox();
cbFiltro.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
pnBillboard.removeAll();
pnBillboard.repaint();
}
@Override
public void focusLost(FocusEvent e) {
addFilmsToBillboard();
pnBillboard.repaint();
}
});
/*
addFilmsToBillboard();
contentPane.repaint();
*/
cbFiltro.addItem("");
cbFiltro.addItem("Todos los públicos");
cbFiltro.addItem("3D");
}
return cbFiltro;
}
private void addFilmsToBillboard() {
JButton aux;
pnBillboard.setLayout(resizeGridLayout(billboard.getNumberOfFilms()));
for (final Film each : billboard.getFilms()) {
if(filtrar(each)){ //si cumple la condicion se añade
aux = new JButton("<html>" + each.getTitle() + "<br>"
+ each.getGender() + " " + each.getRecomendedAge() + " "
+ each.is3DString() + "</html>");
aux.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
((CardLayout) pnMain.getLayout()).show(pnMain,
"panelDescription");
tASumary.setText(each.getSynopsis());
lbTituloPelicula.setText(each.getTitle());
lbGeneropelicula.setText(each.getGender());
lblEdadr.setText(each.getRecomendedAge());
lblDuracionfilm.setText(Integer.toString(each.getLenght())
+ " m");
checkB3D.setSelected(each.isIs3D());
lblFroom.setText(each.getRoom());
cBDates.setModel(new DefaultComboBoxModel(each
.getPremiereDates()));
cBHours.setModel(new DefaultComboBoxModel(each.getDates()));
cbFiltro.setVisible(false); //esconder casilla filtro
cargarImagenPelicula(each);
showStep(false, true, false, false);
}
});
pnBillboard.add(aux);
}
}//if
}
private boolean filtrar(Film film){
String filter=(String)cbFiltro.getSelectedItem();
switch (filter) {
case "3D":
return film.isIs3D();
case "Todos los publicos":
return film.getRecomendedAge().equals("Todos los públicos");
default:
return true;
}
}
int distanceShipBomb(int xShip, int yShip, int xBomb, int yBomb){
return max(abs(xShip-xBomb),abs(yShip-yBomb));
}
.386
.model flat, C
.code
PUBLIC distanceShipBomb
distanceShipBomb PROC
;ARQUITECTURA 86-32 DE INTEL
push esb ; pointer variable s [la variable que se encargara de ser el puntero ]
mov esb, esp; [hago que mi puntero sea igual al puntero base]
push eax ; x ship a [meto en el stack la variable a ]
push ebx ; y ship b [meto en el stack la variable b ]
push ecx ; x bomb c [meto en el stack la variable c ]
push edx ; y bomb d [meto en el stack la variable d ]
push eox ; o =0 [meto en el stack la variable o que sera oara compararlo con 0 ]
inc esb
inc esb
inc esb
inc esb
inc esb
; adjust pointer [incremente el puntero 5 veces , una por cada elemento en el stack]
xor eox , eox ; [hago que eox sea igual a 0]
sub eax,ecx ; [resta a -c]
sub ebx,edx ; [resta b - d]
cmp eax , eox ; [compara a con 0]
JS consequent ;[como estoy comparando numero con signo tengo que mirar que las flags de signed y overflow sean distintas para mirar la operacion a<0]
JNO consequent
jmp next
consequent: ;[en caso de ser negativo lo paso a positivo]
NEG eax ;if eap is neggative change sing
next:
JNS consequent2 ; [aqui en ek otro caso que se puede dar que la flag s sea 0 y o =1 ]
JO consequent2
jmp next2
consequent2:
NEG ebx ;if eap is neggative change sing
next2:
cmp ebx , eox ;[exactamente lo mismo que lo anterior pero esta vez con la variable b ]
;PD se poco de asemblador pero supongo que para evitar la repeticion se podra hacer una funcion , si me echais os lo agradeceria
JS consequent3
JNO consequent3
jmp next3
consequent3:
NEG ebx ;if eap is neggative change sing
next3:
JNS consequent4
JO consequent4
jmp next4
consequent4:
NEG ebx ;if eap is neggative change sing
next4:
OR eax,ebx ; [hago una operacion or para quedarme con el mayor ]
pop eox ; [dejo lmpio el stack de nuevo]
pop edx
pop ecx
pop ebx
pop eax
pop esp
ret ; [retorno]
distanceShipBomb ENDP ;[fin funcion]
END
1>------ Operación Compilar iniciada: proyecto: TeamWrok-Winter-2014, configuración: Debug Win32 ------
1> Assembling Distance.asm...
1>Distance.asm(10): error A2006: undefined symbol : esb
1>Distance.asm(11): error A2006: undefined symbol : esb
1>Distance.asm(24): error A2006: undefined symbol : eox
1>Distance.asm(25): error A2006: undefined symbol : eox
1>Distance.asm(29): error A2006: undefined symbol : ESB
1>Distance.asm(31): error A2006: undefined symbol : eox
1>Distance.asm(36): error A2006: undefined symbol : eox
1>Distance.asm(55): error A2006: undefined symbol : eox
1>Distance.asm(75): error A2006: undefined symbol : eox
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\masm.targets(49,5): error MSB3721: El comando "ml.exe /c /nologo /Zi /Fo"Debug\Distance.obj" /W3 /errorReport:prompt /TaDistance.asm" salió con el código 1.
========== Compilar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========
import java.util.Random;
public class Film
{
// instance variables - replace the example below with your own
public int[][] room;
String filmName,roomName;
double ticketPrice,income,discount;
Ticket t ;
public final static int columns=10,rows=10,MAX_FREE=10;
public final static double Price=7.50;
/**
* Constructor for objects of class Film
*/
public Film(String filmName,String roomName,double discount)
{
// initialise instance variables
setFilmName(filmName);
setRoomName(roomName);
setDiscount(discount);
}
public void setFilmName(String filmName)
{
this.filmName=filmName;
}
public void setRoomName(String roomName)
{
this.roomName=roomName;
}
private void setTicketPrice(double ticketPrice)
{
this.ticketPrice=ticketPrice;
}
public void setDiscount(double discount)
{
this.discount=discount;
}
public String getFilmName(){return filmName;}
public String getroomName(){return roomName;}
public double getTicketPrice(){return ticketPrice;}
public double getDiscount(){return discount;}
public double getIncome(){return income;}
public void generateTickets(String id,String description)
{
Random numberGenerator = new Random();
int value=(numberGenerator.nextInt(MAX_FREE+1));
int ticket=0;
if (roomName=="room1"||roomName=="ROOM1")
{
room=new int[10][40];
for (ticket=0;ticket<=(10*40);ticket++){
if(value%7==0)
setTicketPrice(0);
else
{
t=new Ticket(id,description,Price,false);
}
}
}
if (roomName=="room2"||roomName=="ROOM2")
{
room=new int[15][35];
for (ticket=0;ticket<=15*35;ticket++){
{
t=new Ticket(id,description,Price,false);
}
}
}
}
}
public boolean fly()
{
if (getCombustible() <=0)
return false ;
else
return true ;
}
public void move(){
if (fly()==true)
combustible=combustible-1;
}
0000000100850009101C63ABF314F3CE1EDF0000000000000000000000000000
00000001008C000910009FE2CD19532800000000000000000000000000000000
000000010085000304030850fcbf2a7f0000000000000000000000000000000000
000000010084000b1002009fc6d9661c000000000000000000000000000000000
000000010087000B1407A92C20D8297600000000000000000000000000000000
00000001008C00091001B82AEB2F5D4F00000000000000000000000000000000
000000010085000B101C9ABD854A62940000000000000000000000000000000
0000000100850009101C63ABF314F3CE1EDF0000000000000000000000000000
0000000100850007F4001EA5E43254CC00000000000000000000000000000000
000000010085000714037B248DA5A44A00000000000000000000000000000000
00000001008C0009F400090541D024C400000000000000000000000000000000
0000000100850009140898F3D368E5B600000000000000000000000000000000
0000000100850009140898F3D368E5B600000000000000000000000000000000
000000010087000B140D934807A93B6600000000000000000000000000000000
00000001008
//java version
import java.util.Random ;
/**
* Write a description of class generator here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class generator
{
// atributos
String parte_1="00000001008";
String parte_2;//el numero o letra hexadecimal que sigue a la parte 1
String parte_3="000";
String parte_4;//aqui la parte variable
String parte_5="00000000000000000000000000000000";//los 32 ceros restantes
/**
* Constructor for objects of class generator
*/
public generator()
{
Random Generator = new Random();
setParte_2((Generator.nextHex(parte_2))) ;
setParte_4((Generator.nextInt(parte_4))) ;
}
/**
* modifies the value for ID property
*/
public void setParte_2(String parte_2)
{
this.parte_2 = parte_2 ;
}
/**
* modifies the value for ID property
*/
public void setParte_4(String parte_4)
{
this.parte_4 = parte_4 ;
}
/**
* returns the value for ID property
*/
public char getID ()
{
return parte_1 + parte_2 + parte_3 + parte_4 + parte_5;
}
}
/**
* this method tell you how many years you have left to be
* 1) adult ,if you are under 18
* 2) retired ,if you are under 67
* 3) you are retired
*/
public String getCriticalAge ()
{
if (age >0 && age <C_ADULT)
return (C_ADULT-age)+" to be adult";
else if ( age <=C_RETIRED && age >=C_ADULT)
return (C_RETIRED-age+" to be retired");
else
return (age-C_RETIRED)+" you are retired" ;
}
/**
* Write a description of class person here.
*
* @author roberto fernandez diaz
* @version 20130917
*/
public class person
{
private String name = " Roberto"; // this is the name o f the person
private String surname =" Fernandez Diaz "; //this is your surname
int age =18;//this is your age
private final static int C_RETIRED = 67; //this is the value to be retired
private final static int C_ADULT = 18; //this is the value to be adult
private final static int MIN_AGE_VALUE = 0;
public final static int MAX_AGE_VALUE = 118; //this is the max value for age
public static double height = 1.8; //this is the heihgt of the person.
boolean gender ;
private final static boolean MALE_VALUE = false;
private final static boolean FEMALE_VALUE = true;
public String nationality = "Spain"; //this is the nationality of the person
/**
* Constructor for objects of class person
*/
public person()
{
System.out.println ("person object created");
}
/**
* Constructor for objects of class person
*/
public person(String name, String surname)
{
//System.out.println (setName(name) + setSurname(surname));
System.out.println ("person object created" );
setName(name);
setSurname(surname);
}
/**
* modifies the value for name property
*/
public void setName(String name)
{
this.name = name ;
}
/**
* modifies the value for surname property
*/
public void setSurname(String newSurname)
{
this.surname = surname ;
}
/**
* modifies the value for nationality property
*/
private void setNationality(String nationality)
{
this.nationality = nationality ;
}
/**
* mofies the value for age property
*/
public void setAge(int age)
{ //if age is less than 0 or bigger than 118 show a message to the user
if ( age <MIN_AGE_VALUE || age> MAX_AGE_VALUE)
System.err.print ("age can´t be less than 0 or bigger than 118 ");
else
this.age = age ;
}
/**
* modifies the value for gender property
*/
public void setGender(boolean gender)
{
this.gender = gender ;
}
public void setHeight (double height)
/**
* stablish the height of the people
*/
{
this.height = height;
}
public String toString()
{
if (gender == MALE_VALUE)
return (" NAME: " +name +" AGE: "+ age +" GENDER: MALE" );
else
return (" NAME: " +name +" AGE: "+ age +" GENDER: FEMALE" );
}
/**
* Converts all information contain in this class into a String
*
* @returns String String containing all the data related to this class
*/
public String toStringV2() //la que hay que usar
{
String aux="NAME: "+ getSurname () + name +" AGE: "+ age + " GENDER: ";
if (gender == MALE_VALUE)
aux =aux + "MALE";
else
aux += "FEMALE"; //en lugar de aux + "FEMALE"
return(aux);
}
/**
* returns the value for name property
*/
public String getName ()
{
return name.toUpperCase(); // return it in full uppercase
}
/**
* returns the value for surname property
*/
public String getSurname ()
{
return "DR. " + surname.toUpperCase(); // return it in full uppercase //surname.CONVERT TO UPPERCASE
}
/**
* returns the value for age property
*/
public int getAge ()
{
return age;
}
/**
* this method tell you how many years you have left to be
* 1) adult ,if you are under 18
* 2) retired ,if you are under 67
* 3) you are retired
*/
public String getCriticalAge ()
{
if (age >0 && age <C_ADULT)
return (C_ADULT-age)+" to be adult";
else if ( age <=C_RETIRED && age >=C_ADULT)
return (C_RETIRED-age+" to be retired");
else
return (age-C_RETIRED)+" you are retired" ;
// cambiar string por int y quitar comillas
}
/**
* returns the value for gender property
*/
public boolean getGender ()
{
return gender;
}
/**
* print in the screen a message with features/atributes of people
*/
public void print ()
{
System.out.println (toStringV2() );
}
}
/**
* Write a description of class person here.
*
* @author roberto
* @version 20130917
*/
public class person
{
String name ="roberto";
String surname ="fernandez diaz";
String age ="18";
/**
* Constructor for objects of class person
*/
public person()
{
}
/**
* mofies the value for name property
*/
public void setName(String newName)
{
name = newName ;
}
/**
* mofies the value for surname property
*/
public void setSurname(String newSurname)
{
surname = newSurname ;
}
/**
* mofies the value for age property
*/
public void setAge(String newAge)
{
name = newAge ;
}
public String getName ()
{
return name;
}
}
public void setGeslacht(char geslacht)
{
if (geslacht == 1)
{
geslacht2 = "M";
}
if (geslacht == 2)
{
geslacht2 = "V";
}
else {geslacht2 = "not found";}
}
public String getGeslacht2()
{
String temp;
temp = geslacht2;
return temp;}