JavaScript programming problem
You can enter a certain period of a day, this day is judgment day of the year?
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <Title> Test </ title> </head> <body> <script> // pop-up year, month, date input box, statement date, and assign var the y-= parseInt (prompt ( "Please enter your year of birth" )); var m = parseInt (prompt ( "Please enter your birth month " )); var d = parseInt (prompt (" Please enter your date of birth " )); // time entered as the end time, the last day of the previous year as the starting time. // new new a Date (year, month The, DATE), month The value range is 0 to 11, 0 representing January, 11 table represents Dec; var endDate = new new a Date (Y, m -. 1 , D); // DATE from the beginning, if the writing is 0, the previous day var startDate = new new a Date (Y, 0, 0 ); // Both calculating the difference between the calculated interval. new Date () involved in the calculation are automatically converted to a number of milliseconds from the start 1970.1.1 var Days = (endDate - startDate) / 1000/60/60/24 ; document.write ( "the first day of the year" + days + "days" ); </ Script> </body> </html>
MySQL programming problems
Goods contained in the database named library Specification List Content commodity and commodity property table Property, their definitions are: Content (Code varchar (50), Class varchar (20), Price double, Number int) Property (Code varchar (50), Place varchar (20), Brand varchar (50))
(1) write the following query of action; SELECT Distinct Brand FROM Property;
A: Property query from a table of all the different brands (2) check out the highest price for each type of merchandise from the merchandise specification sheets SELECT Class,max(Price) FROM Content GROUP BY Class;
(3) check out the same merchandise from the specification sheet All categories of goods more than one category nameSELECT Class FROM Content GROUP BY Class HAVING COUNT(Class)>1;
Java programming problem
Print out the following pattern (diamonds).
*
***
*****
*******
*****
***
*
package test; /** * @author CUI * * / Public class TL9 { public static void Print ( int n-) { // first pattern to look into two parts, a rule before the four lines, three lines after a rule for using a double loop, the first layer control line, the first L2C column. // first four rows for ( int I =. 1; I <= n-; I ++ ) { for ( int J =. 1; J <= n-- I; J ++ ) { System.out.print(" "); } for (int k = 1; k <= 2*i -1; k++) { System.out.print("*"); } System.out.println(); } // three lines for ( int I =. 1; I <n-; I ++ ) { for (int j = 1; j <= i; j++) { System.out.print(" "); } for (int k = 1; k <= 2*(n-i) - 1; k++) { System.out.print("*"); } System.out.println(); } }
public static void main(String[] args) {
print(4);
}
}