If Request.ServerVariables ("http_method") = "POST" Then
If Request.Form ("submit") = "Enter 1" then
' The student enters the network examination room the processing
Set Conn=server. CreateObject ("Adodb.connection")
Conn. Connectionstring= "Dsn=testsys"
' Connect and open the database
Conn.Open
Strsql= "SELECT * from Studentinfo where stid= '" Request.Form ("Stid") "' and Stname= '" Request.Form ("Stna Me ") " ' "
Set Mrs=conn. Execute (strSQL)
If
Now we have files that need to be cross-referenced through the $REMOTE_ADDR variable, so that we can tell if the user who wants to post has been flattened or not flattened. Very simple:
For ($counter =0 $counter if ($banned _array[$counter] = = $REMOTE _addr) {
Print (""You have been banned from this chatExit
}
}
?>
The exit command stops the execution of the script immediately. Insert a check of the flattened user before starting to perform processing on the passed variables so that the flat us
Chat room ' Get the speech content and filter the script statements in it
Usersays=request.form ("says")
If InStr (Usersays, "script") 0 Then
Usersays= ""
End If
' To judge whether there is a conversation or not to deal with it
If Len (usersays) "0 Then
Session ("Whoto") =request.form ("Whoto")
Session ("Action") =request.form ("action")
If InStr (USERSAYS,CHR (39)) 0 Then
Usersays=replace (USERSAYS,CHR), "\" AMP;CHR (39))
End If
If InStr (USERSAYS,C
The realization of ACE middle-line secure single-room modeClass Normal_test{Friend Class Ace_singletonPublicvoid Show_my_life ();PrivateNormal_test ();};
Normal_test::normal_test () {}
typedef ace_singleton
void Normal_test::show_my_life (){cout }
int ace_tmain (int argc, Ace_tchar *argv[]){Normal_test::instance ()->show_my_life ();return 0;};
As shown above, the following benefits are obtained:
1. The code has been reduced by more than half, be
Hello everyone! Long time no see everyone, the last time I wrote a file with PHP chat room operation, of course, is porous, and every time the screen is very bad! I think for a long time, is there a way not to refresh, you can get the message of the speech? The effect is achieved by using a single frame, that is to use a framework we call getmsg, we let getmeg to obtain information and ensure that every time the information is the latest, is the last
Chat Room | Source code/* Table Structure Design * *
/* Microsoft SQL server-scripting * *
* SERVER:SQL2 * *
* Database:chat * *
/* Creation Date 00-4-28 12:55:20 * *
/* dbo:chat*/
/* dbopassword:chat001*/
/**/
/* User Action form * *
if exists (SELECT * from sysobjects
WHERE id = object_id (' dbo.user_acction_table ') and
Sysstat 0xf = 3)
drop table Dbo.user_acction_table
Go
/**/
/* User Expression form * *
if exists (SELECT * from sysobjects
WHERE
xml| Server | chat Room | refresh | no Refresh | original ############### #main. asp######################
Response.expires=0
Username=request.form ("UserName")
If Username= "" then Response.Redirect "index.asp"
Session ("U_name") =username
If Request.Form ("sx") = "1" Then
Session ("U_SX") = "1"
Else
Session ("U_SX") = "0"
End If
%>
Due to abnormal power outage in the company room, the Hadoop cluster data of the test environment is all down. After restarting the Hadoop cluster, visit: http://xxx.xxx.xxx.xx:50070/dfshealth.html
Tips:
NameNode is still loading. Redirecting to the Startup Progress page.As shown in figure:
This is not a mistake .。 Since Hadoop starts, it goes into safe mode for self-test, and self-test is done.
Let 's take a look at the status change of Nam
Chat room
' Nested Enum for supported states
Public Enum Status
Listening
Connected
End Enum ' Status
' Start up ' talker ' s functionality
Public Sub Start ()
ThreadPool.QueueUserWorkItem (New System.Threading.WaitCallback (AddressOf establishsocket))
End Sub ' Start
' Establish a socket connection and start receiving
Private Sub Establishsocket (ByVal State as Object)
Try
' If not client, Setup Listner
If not client Then
Dim Listener as Socket
Computer room charges to do on the machine and the next part, the need to calculate from the machine to the time difference between the machine, so as to calculate the costs incurred during the machine.
At this time, you can use a function can be simple to implement--datediff (), the specific use of rules:
DateDiff (Timeinterval,date1,date2 [, FirstDayOfWeek [, FirstWeekOfYear]])
The return value of the function is the time elapsed from Date1 to Da
Young men and young men
In the last article our maid can finally do something like other people in the sun, the young masters can join the maid sauce to attend the afternoon tea ~ Rare high society AH
This is the most obvious difference between the 1v1 of a private slave girl and a maid's sauce that was shared by tea.
Bright afternoon in the sun, the courtyard of the white long table on both sides, handsome young men exchanged with each other recent anecdotes, one side to appreciate the maid
Else
' Change Password
Mrc. Fields (1) = NewPassword (0). Text
Mrc. Update
Mrc. Close
MsgBox "Password modified successfully, please log in to the system again. ", vbOKOnly," prompt message "
' Force the user to log off, re-login system
Dim frm as Form
For each frm in Forms
If frm. Name
Unload frm
If myexit = vbno Or myexit= vbyes Then
Cancel = False
End If
Frmmain.hide
Login.show
Login.txtpassword.Text = ""
Login.txtusername.Text = ""
End If
Next
End If
End If
When changing the password,
Objective:
Report as a major focus of the computer room charge system, its main process is divided into report design-database connection-VB and report interaction. Let's look at the report design first.
1. First download the installation Report Designer, it is commonly used by grid++report5.0
Download Link: http://xiazai.zol.com.cn/detail/27/262835.shtml
Add corresponding parts in VB
2. Open the Editor--insert a report header--Insert a static box t
: Ibalance.selectbalanceinfo (CardID)' Query and return the dataset result Later found. The class inside the DAL layer is reflected in the BLL layer. It is equivalent to producing the class of the DAL layer inside the BLL layer, and then reflecting the code of the detailed class. I then abstracted out a layer, called the factory layer. Only the BLL cites the factory and is able to return the detailed class through the factory.This is the application of Reflection + factory. It seems to be a litt
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.