Notepad++ v6.6.8 new feature and bug fixes:
1. Settings on cloud - Google Drive.
2. Fix Settings on cloud - OneDrive detection error.
3. Make internal docking dialogs apply the selected theme's background and foreground colours.
4. Fix the bug that "backslash is escape char for SQL" setting is not saved correctly.
5. Fix the bug that user cannot disable "backslash is SQL escape char" without restarting.
6. Fix DocMap's syntax highlighting doesn't update while current doc apply a new syntax highlighting.
7. Add 2 new plugins APIs: NPPM_GETEDITORDEFAULTBACKGROUNDCOLOR & NPPM_GETEDITORDEFAULTFOREGROUNDCOLOR
8. Add new notification NPPN_SNAPSHOTDIRTYFILELOADED to notify plugins that a snapshot dirty file is loaded on startup.
Included plugins:
1. DSpellCheck v1.2.12
2. NppFTP 0.24.1
3. NppExport v0.2.8
4. Plugin Manager 1.0.8
5. Converter 3.0
6. Mime Tool 1.9
<%
Const dictKey = 1
Const dictItem = 2
Function DoMatchCompare(ByVal HLAA1, ByVal HLAA2, ByVal HLAA3, ByVal HLAA4, ByVal HLAB1, ByVal HLAB2, ByVal HLAB3, ByVal HLAB4, ByVal HLADR1, ByVal HLADR2, ByVal HLADR3, ByVal HLADR4)
Dim sql
Dim PPoints(11)
Dim VPoints(11)
Dim MatchIDs
Dim tPoints
Dim S4,S5,S6
'DictionaryObject.Add(key,item)
Set MatchIDs = CreateObject("Scripting.Dictionary")
'convert number
ConvertNumber HLAA1, HLAA3
ConvertNumber HLAB1, HLAB3
ConvertNumber HLADR1, HLADR3
'truncate string from 4 to 2
TruncateNumber HLAA1, HLAA2, HLAA3, HLAA4
TruncateNumber HLAB1, HLAB2, HLAB3, HLAB4
TruncateNumber HLADR1, HLADR2, HLADR3, HLADR4
'save to Patient Point Array
PPoints(0) = HLAA1
PPoints(1) = HLAA2
PPoints(2) = HLAA3
PPoints(3) = HLAA4
PPoints(4) = HLAB1
PPoints(5) = HLAB2
PPoints(6) = HLAB3
PPoints(7) = HLAB4
PPoints(8) = HLADR1
PPoints(9) = HLADR2
PPoints(10) = HLADR3
PPoints(11) = HLADR4
S4 =0
S5 =0
S6 =0
sql = "select Random_ID,hlaa1,hlaa2,hlaa3,hlaa4,hlab1,hlab2,hlab3,hlab4,hladr1,hladr2,hladr3,hladr4 from "& TableName &" " & _
"where Cell_Quantity >= 5 and Blood_Type <> '溶血' and Rh <> '溶血' and ((left(hlaa1,2) in ('" & HLAA1 & "','" & HLAA2 & "','" & HLAA3 & "','" & HLAA4 & "')) and hlaa1<>'') " & _
"or ((left(hlaa2,2) in ('" & HLAA1 & "','" & HLAA2 & "','" & HLAA3 & "','" & HLAA4 & "')) and hlaa2<>'') " & _
"or ((left(hlaa3,2) in ('" & HLAA1 & "','" & HLAA2 & "','" & HLAA3 & "','" & HLAA4 & "')) and hlaa3<>'') " & _
"or ((left(hlaa4,2) in ('" & HLAA1 & "','" & HLAA2 & "','" & HLAA3 & "','" & HLAA4 & "')) and hlaa4<>'') " & _
"or ((left(hlab1,2) in ('" & HLAB1 & "','" & HLAB2 & "','" & HLAB3 & "','" & HLAB4 & "')) and hlab1<>'') " & _
"or ((left(hlab2,2) in ('" & HLAB1 & "','" & HLAB2 & "','" & HLAB3 & "','" & HLAB4 & "')) and hlab2<>'') " & _
"or ((left(hlab3,2) in ('" & HLAB1 & "','" & HLAB2 & "','" & HLAB3 & "','" & HLAB4 & "')) and hlab3<>'') " & _
"or ((left(hlab4,2) in ('" & HLAB1 & "','" & HLAB2 & "','" & HLAB3 & "','" & HLAB4 & "')) and hlab4<>'') " & _
"or ((left(hladr1,2) in ('" & HLADR1 & "','" & HLADR2 & "','" & HLADR3 & "','" & HLADR4 & "')) and hladr1<>'') " & _
"or ((left(hladr2,2) in ('" & HLADR1 & "','" & HLADR2 & "','" & HLADR3 & "','" & HLADR4 & "')) and hladr2<>'') " & _
"or ((left(hladr3,2) in ('" & HLADR1 & "','" & HLADR2 & "','" & HLADR3 & "','" & HLADR4 & "')) and hladr3<>'') " & _
"or ((left(hladr4,2) in ('" & HLADR1 & "','" & HLADR2 & "','" & HLADR3 & "','" & HLADR4 & "')) and hladr4<>'') "
set rs = server.CreateObject("adodb.recordset")
Set rs = MatchConn.Execute(sql)
Do While Not (rs.EOF Or rs.BOF)
VPoints(0) = rs(1)
VPoints(1) = rs(2)
VPoints(2) = rs(3)
VPoints(3) = rs(4)
VPoints(4) = rs(5)
VPoints(5) = rs(6)
VPoints(6) = rs(7)
VPoints(7) = rs(8)
VPoints(8) = rs(9)
VPoints(9) = rs(10)
VPoints(10) = rs(11)
VPoints(11) = rs(12)
tPoints = MatchBloodTypePoint(PPoints, VPoints)
If tPoints >= 4 Then
'get match id
'add dealing code by ywm
MatchIDs.Add trim(rs(0)),tPoints
select case tPoints
case 4
S4 = S4 + 1
case 5
S5 = S5 + 1
case 6
S6 = S6 + 1
end select
End If
rs.MoveNext
'DoEvents
Loop
rs.Close
'更新
LogConn.Execute("update SearchLog set M4 = '"& S4 &"',M5 = '"& S5 &"',M6 = '"& S6 &"' where ID = "& clng(ID) &"")
'排序
SortDictionary MatchIDs,dictItem
Set DoMatchCompare = MatchIDs
Set rs = Nothing
End Function
Public Function MatchBloodTypePoint(ByRef PatientPoint(), ByRef VolunteerPoint())
Dim MatchCounter
Dim Counter
Dim i
If UBound(PatientPoint) = 11 And UBound(VolunteerPoint) = 11 Then
For i = 0 To UBound(PatientPoint) Step 4
Counter = MatchHLPoint(PatientPoint(i), PatientPoint(i + 1), PatientPoint(i + 2), PatientPoint(i + 3), VolunteerPoint(i), VolunteerPoint(i + 1), VolunteerPoint(i + 2), VolunteerPoint(i + 3))
MatchCounter = MatchCounter + Counter
' If MatchCounter >= 4 Then
' Exit For
' End If
Next
End If
' MsgBox MatchCounter
' If MatchCounter >= 4 Then
' MatchBloodTypePoint = True
' Else
' MatchBloodTypePoint = False
' End If
MatchBloodTypePoint = MatchCounter
End Function
Public Function MatchHLPoint(ByVal PFirst, ByVal PSecond, ByVal PThird, ByVal PFourth, ByVal VFirst, ByVal VSecond, ByVal VThird, ByVal VFourth)
Dim Counter
Dim IsCrossMatch
ConvertNumber VFirst, VThird
TruncateNumber VFirst, VSecond, VThird, VFourth
' ConvertNumber PFirst, PThird
' TruncateNumber PFirst, PSecond, PThird, PFourth
'compare
If Len(PFirst) > 0 Then
If PFirst = VFirst Or PFirst = VSecond Then
Counter = Counter + 1
ElseIf PFirst = VThird Or PFirst = VFourth Then
Counter = Counter + 1
IsCrossMatch = True
ElseIf Len(PSecond) > 0 Then
If PSecond = VFirst Or PSecond = VSecond Then
Counter = Counter + 1
ElseIf PSecond = VThird Or PSecond = VFourth Then
Counter = Counter + 1
IsCrossMatch = True
End If
End If
End If
If Len(PThird) > 0 Then
If Counter = 1 Then
If IsCrossMatch Then
If PThird = VFirst Or PThird = VSecond Then
Counter = Counter + 1
ElseIf Len(PFourth) > 0 Then
If PFourth = VFirst Or PFourth = VSecond Then
Counter = Counter + 1
End If
End If
Else
If PThird = VThird Or PThird = VFourth Then
Counter = Counter + 1
ElseIf Len(PFourth) > 0 Then
If PFourth = VThird Or PFourth = VFourth Then
Counter = Counter + 1
End If
End If
End If
Else
If PThird = VFirst Or PThird = VSecond Or PThird = VThird Or PThird = VFourth Then
Counter = Counter + 1
ElseIf Len(PFourth) > 0 Then
If PFourth = VFirst Or PFourth = VSecond Or PFourth = VThird Or PFourth = VFourth Then
Counter = Counter + 1
End If
End If
End If
End If
MatchHLPoint = Counter
End Function
Public Sub ConvertNumber(ByRef First, ByRef Second)
If Not IsNumeric(First) Then
First = Second
ElseIf Not IsNumeric(Second) Then
Second = First
End If
End Sub
Public Sub TruncateNumber(ByRef First, ByRef Second, ByRef Third, ByRef Fourth)
If Len(First) = 4 Then
First = Left(First, 2)
ElseIf Len(First) = 1 Then
First = "0" & First
End If
If Len(Second) = 4 Then
Second = Left(Second, 2)
ElseIf Len(Second) = 1 Then
Second = "0" & Second
End If
If Len(Third) = 4 Then
Third = Left(Third, 2)
ElseIf Len(Third) = 1 Then
Third = "0" & Third
End If
If Len(Fourth) = 4 Then
Fourth = Left(Fourth, 2)
ElseIf Len(Fourth) = 1 Then
Fourth = "0" & Fourth
End If
End Sub
%>
哪位大神 能将asp的一段代码逻辑 用java语言实现!!!我QQ“:596963475 求大神!!!
最新推荐文章于 2024-09-20 15:32:13 发布