谭杰希《珍珠奶茶》歌词
《Bubble tea》(珍珠奶茶) 词Geo,杰希 曲杰希 I saw you smiling at me was it real or just a fantasy maybe in time you would know you could know how I feel N I saw you stumbling at me such a funny silly crazy girl maybe in time you would know you could know how I feel You and I, I testify, with no one else will I feel so fine I just want you by my side and I sing for you tonight We drinking the milktea making bubbles fly across the street here comes a cop so we run then we run dont get caught, wont be fun! You and I, I testify with no one else will I feel so fine I just want you by my side and I, I ll be there for you tonight.
java编程-----M个数内选N个互不重复数的所有排列组合
import java.applet.applet;
import java.awt.button;
import java.awt.label;
import java.awt.textfield;
import java.awt.event.actionevent;
import java.awt.event.actionlistener;
public class complextest extends applet implements actionlistener{
label firstreal, firstimg;
textfield firstrealnum, firstimgnum;
label secondreal, secondimg;
textfield secondrealnum, secondimgnum;
button add = new button(add);
button subtract = new button(subtract);
textfield addresult, subtractresult;
public void init(){
firstreal = new label(first complex real number: );
firstrealnum = new textfield(7);
super.add(firstreal);
super.add(firstrealnum);
firstimg = new label(first complex imaginary number: );
firstimgnum = new textfield(7);
super.add(firstimg);
super.add(firstimgnum);
secondreal = new label(second complex real number: );
secondrealnum = new textfield(7);
super.add(secondreal);
super.add(secondrealnum);
secondimg = new label(second complex imaginary number: );
secondimgnum = new textfield(7);
super.add(secondimg);
super.add(secondimgnum);
super.add(add);
addresult = new textfield(7);
super.add(addresult);
super.add(subtract);
subtractresult = new textfield(7);
super.add(subtractresult);
add.addactionlistener(this);
subtract.addactionlistener(this);
}
public void actionperformed(actionevent e) {
double firstcomplxreal = double.parsedouble(firstrealnum.gettext());
double firstcomplximg = double.parsedouble(firstimgnum.gettext());
double secondcomplxreal = double.parsedouble(secondrealnum.gettext());
double secondcomplximg = double.parsedouble(secondimgnum.gettext());
complexnumber complxnum1 = new complexnumber(firstcomplxreal, firstcomplximg);
complexnumber complxnum2 = new complexnumber(secondcomplxreal, secondcomplximg);
addresult.settext(complxnum1.add(complxnum2).tostring());
subtractresult.settext(complxnum1.subtract(complxnum2).tostring());
}
}
class complexnumber{
private double real;
private double imaginary;
public complexnumber(double realnum, double imaginarynum){
this.real = realnum;
this.imaginary = imaginarynum;
}
// (a+bi) + (c+di) = (a+b) + (c+d)i
public complexnumber add(complexnumber complexnum2){
double newrealpart = this.real + complexnum2.getreal();
double newimgpart = this.imaginary + complexnum2.getimaginary();
return new complexnumber(newrealpart, newimgpart);
}
//(a+bi) - (c+di) = (a-b) - (c-d)i
public complexnumber subtract(complexnumber complexnum2){
double newrealpart = this.real - complexnum2.getreal();
double newimgpart = this.imaginary - complexnum2.getimaginary();
return new complexnumber(newrealpart, newimgpart);
}
public double getimaginary() {
return imaginary;
}
public void setimaginary(double imaginary) {
this.imaginary = imaginary;
}
public double getreal() {
return real;
}
public void setreal(double real) {
this.real = real;
}
public string tostring(){
return real + + + imaginary + i;
}
}