The day before yesterday, Star 2 showed his true face in South Korea. I was excited. Why do I go to an internet cafe at noon every day in junior high school? StarCraft and quake3. Haha, the next plan seems to be postponed. It will take one of the reference items that run SC2. however, blizzard seems to like to skip the ticket for a long time... There have been a lot of things over the past few days. Please hurry up and try again.
Update:The teacher
Environment Introduction:Os:centos 6.4 x86_64 MinimalServers:sc2-log1,sc2-log2,sc2-log3,sc2-log4Client:sc2-ads15
Specific steps:1. Install the Glusterfs package on Sc2-log{1-4}:
The code is as follows
Copy Code
# wget-p/ETC/YUM.REPOS.D Http://download.gluster.org/pub/gluster/glusterfs/LATE
Background Introduction:The project is currently in the file synchronization with Rsync, in the attempt to replace the distributed file system, the use of moosefs, the effect is not satisfactory, after understanding the Glusterfs, decided to try, because it compared with moosefs, feel more simple deployment, At the same time there is no meta-data server features so that it does not have a single point of failure, it feels very good.Environment Introduction:Os:centos 6.4 x86_64 MinimalServers:sc2
SWHERE not EXISTS (SELECT * from Sc,cWHERE SC. Cno=c.cnoAnd C.cteacher= ' Li Ming 'and SC. SNO=S.SNO)2. List the names of students with two or more (including two) failing courses and their average grades--Implementation code:SELECT S.sno,s.sname,avg_scgrade=avg (SC. Scgrade)From S,SC, (SELECT SNOFrom SCWHERE scgradeGROUP by SNOHaving COUNT (DISTINCT CNO) >=2A WHERE S.sno=a.sno and SC. Sno=a.snoGROUP by S.sno,s.sname3. List the names of all students who have studied the "1" course and have stud
'),(2, ' money electricity ', ' 1990-12-21 ', ' Male '),(3, ' Sun Feng ', ' 1990-05-20 ', ' Male '),(4, ' Levin ', ' 1990-08-06 ', ' Male '),(5, ' Zhou Mei ', ' 1991-12-01 ', ' Women '),(6, ' Wu Lan ', ' 1992-03-01 ', ' Women '),(7, ' Qingshou ', ' 1989-07-01 ', ' Women '),(8, ' Wang Ju ', ' 1990-01-20 ', ' female ');# Teacher TableInsert INTO teacher values(1, ' Zhang San '),(2, ' John Doe '),(3, ' Harry ');# timetableINSERT INTO course values(1, ' language ', 2),(2, ' language ', 1),(3, ' lan
from student sWhere Sno not in(SELECT DISTINCT (SC1.CNO) from class C,SC sc1,student swhere C.cno=sc1.cno and Sc1.sno=s.snoAnd C.cteacher= ' Li Ming '); /* The second question lists the names of students with two or more failed courses and their average scores * *Select S.sname as student name, AVG (Ssc.scgrade) as average score from student s, SC SSC, (select Sno from SCwhere scgradeGROUP by SnoHaving COUNT ((CNO) >=2)) awhere S.sno=a.sno and Ssc.sno=a.snoGROUP by S.sno,s.sname; /* The name of
studied the Chinese also learned the student information of mathematics select S. ' Stud Entid ' as student number, S. ' Studentname ' as student's name, S. ' Studentgender ' as student gender, S. ' Studentage ' as student age from studentinfo as Sinner JOIN Scoreinfo as Sc1on S.studentid = Sc1.studentid and Sc1.courseid = (SELECT CourseID from courseinfo WHERE coursename = ' language ' ) INNER JOIN scoreinfo as Sc2on S.studentid =Sc2.studentid and
:-- 1 query the student ID of all the students whose scores are higher than those of the "001" Course;Select * From t_ SC;SelectSc1.s _ id from t_ SC SC1, t_ SC SC2 where sc1.s _ id = sc2.s _ id and sc1.c _ id ='001' and sc2.c _ id = '002' and sc1.score> sc2.score;-- 2. query the student ID and average score of student
more courses fail.
-- Implementation code:Select S. SNO, S. SNAME, AVG_SCGRADE = AVG (SC. SCGRADE)
From s, SC ,(
Select SNO
FROM SC
Where SCGRADE
GROUP BY SNO
Having count (distinct cno)> = 2
) A Where S. SNO = A. sno and SC. SNO = A. SNO
Group by s. SNO, S. SNAME
3. List the names of all students who have learned course 1 and course 2
-- Implementation code:
Select S. SNO, S. SNAME
From s ,(
Select SC. SNO
From SC, C
Where SC. CNO = C. CNO
And c. cname in ('1', '2 ')
GROUP BY SNO
Having count
')And SC. check_time Group by info. fouth_area) MAP2 on map2.areacode = area. areacode
Left join(Select count (sc2.id) num3, info. fouth_area as areacode from jd_safe_check SC2 inner join jd_company C on C. ID = sc2.par _ Id2Inner join fk_user_info info on info. ID = sc2.user _ idWhere
of students whose scores are equal to those of the course No.
-- Implementation code:
Select S. SNO, S. SNAME
From s ,(
Select SC1.SNO
From SC SC1, C C1, SC SC2, C C2
Where SC1.CNO = C1.CNO AND C1.NAME = '1'
AND SC2.CNO = C2.CNO AND C2.NAME = '2'
AND SC1.SCGRADE> SC2.SCGRADE
) SC Where S. SNO = SC. SNO
5. List the student IDs of all students whose scores are hig
students whose scores are equal to those of the course No.
-- Implementation code:
Select S. Sno, S. sname
From S ,(
Select sc1.sno
From SC SC1, C C1, SC SC2, C C2
Where sc1.cno = c1.cno and c1.name = '1'
And sc2.cno = c2.cno and c2.name = '2'
And sc1.scgrade> sc2.scgrade
) SC where S. Sno = SC. SnO
5. List the student IDs of all students whose scores are higher
equals_default:system.web.ui.page{ protected void Page_Load (object sender, EventArgs e) { SomeClass SC1 = new SomeClass (); SomeClass SC2 = new SomeClass (); Output false Response.Write (ReferenceEquals (SC1, SC2) + "
Method 2:public Virtual bool Equals (object obj);Description: This method also compares references, but because the method is virtual, you can override
=c.cno Andc.cnamein (' 1 ', ' 2 ') Groupbysno Havingcount (distinct CNO) =2 ) scwheres.sno=sc. SNO 4. List "1" class scores than the "2" students who have high grades of the student's school number Select S.sno,s.snameFrom S, (Select SC1. SNOFrom SC sc1,c c1,sc sc2,c C2Where SC1. Cno=c1. CNO and c1.name= ' 1 'and SC2. Cno=c2. CNO and C2.name= ' 2 'and SC1. SCGRADE>
Today, I accidentally sawCodeMaybe I have never seen it. I think it's new. I just wrote the following code. Maybe I 've seen it, Maybe I forgot ...... Haha, let's make a souvenir on your own ......
I found that the singleton mode is good ......
Using System; Namespace Ca_staticconstructor { Class Staticclass { Public Static Staticclass instance { Get ; Set ;} Public String Name { Get ;Set ;} Static Staticclass (){ If(Instance =Null) { Instance = New Staticclass (); } }} Clas
First question: finding the root of a two-second equationpublic class Lianxi1 {public static void main (string[] Args) {System.out.println ("please Enter a value");Scanner sc = new Scanner (system.in);String A=sc.nextline ();int x = Integer.parseint (a);If (x!=0){System.out.println ("please Enter the value of b");Scanner SC1 =new Scanner (system.in);System.out.println ("please Enter the value of c");Scanner SC2 =new Scanner (system.in);String B=sc1.ne
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.