JavaScript programming problem
The difference between null and undefined?
Only one type undefined value, i.e., undefined. When the variable declaration has not been initialized, the default variable is undefined.
only one type of null value, i.e., null. null object has not been used to indicate the presence, used to indicate the function attempts to return an object that does not exist.
MySQL programming problems
Table students
id | sno | username | course | score |
---|---|---|---|---|
1 | 1 | Joe Smith | Chinese | 50 |
2 | 1 | Joe Smith | mathematics | 80 |
3 | 1 | Joe Smith | English | 90 |
4 | 2 | John Doe | Chinese | 70 |
5 | 2 | John Doe | mathematics | 80 |
6 | 2 | John Doe | English | 80 |
7 | 3 | Wang Wu | Chinese | 50 |
8 | 3 | Wang Wu | English | 70 |
9 | 4 | Zhao six | mathematics | 90 |
Check out only enrolled in a course of all students in school number and name.
SELECT sno,username,count(course) FROM students
GROUP BY sno,username
HAVING count(course) = 1;
Java programming problem
Print out all the "narcissistic number", the so-called "digital daffodils" refers to a three-digit number, which is equal to the digits of the cube and the number itself. For example: 153 is a "narcissistic number" because cubic cubic 153 cubic 1 = +5 +3.
Package Test; / ** * @author the CUI * * / public class the Test { public static void main (String [] args) { for ( int NUM = 100; NUM <1000; NUM ++ ) { // digit int A = 10% NUM ; // tens int B = NUM / 10% 10 ; // hundreds digit int C = NUM / 100% 10 ; IF (Math.pow (A,. 3) + Math.pow (B,. 3 ) + Math.pow (C,. 3) == NUM) { System.out.println (NUM); } } } }