Introduction
In this post I will show of my math trainer.
LOAD CSV FROM 'file:///AD.csv' AS line
CREATE (:Person { name: line[0], department: line[1], title: line[2], manager: line[3] })
USING PERIODIC COMMIT 500
LOAD CSV FROM 'file:///AD.csv' AS line
MATCH (p { name: line[0]}),(m { name: line[3]})
CREATE (p)-[:HAS_MANAGER]->(m)
Organizational Chart
Public Function URLEncode( _
StringVal As String, _
Optional SpaceAsPlus As Boolean = False _
) As String
Dim StringLen As Long: StringLen = Len(StringVal)
If StringLen > 0 Then
ReDim result(StringLen) As String
Dim i As Long, CharCode As Integer
Dim Char As String, Space As String
If SpaceAsPlus Then Space = "+" Else Space = "%20"
For i = 1 To StringLen
Char = Mid$(StringVal, i, 1)
CharCode = Asc(Char)
Select Case CharCode
Case 97 To 122, 65 To 90, 48 To 57, 45, 46, 95, 126
result(i) = Char
Case 32
result(i) = Space
Case 0 To 15
result(i) = "%0" & Hex(CharCode)
Case Else
result(i) = "%" & Hex(CharCode)
End Select
Next i
URLEncode = Join(result, "")
End If
End Function
Sub open_webpage()
Dim objApp As Outlook.Application
Dim objItem As Object
Dim objAttendees As Outlook.Recipients
Dim strNames As String
Dim chromePath As String
Set objApp = CreateObject("Outlook.Application")
Set objItem = Outlook.Application.ActiveExplorer.Selection.Item(1)
Set objAttendees = Outlook.Application.ActiveExplorer.Selection.Item(1).Recipients
chromePath = """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"""
For x = 1 To objAttendees.Count
strNames = strNames & objAttendees(x).Name & ";"
Next
strNames = URLEncode(strNames)
Dim stradres As String
stradres = "http://localhost/orgchart.html?Names=" & strNames
Shell (chromePath & " -url " & stradres)
Set objApp = Nothing
Set objItem = Nothing
Set objAttendees = Nothing
End Sub
Correlation =
var cv = VALUES ( Data[Perioden] )
var cas = ALLSELECTED ( Data[Perioden] )
var x_sd = CALCULATE (STDEVX.P ( cv, [x]), cas )
var y_sd = CALCULATE (STDEVX.P ( cv, [y]), cas )
var SD_Product = CALCULATE ( x_sd * y_sd )
var x_mean = CALCULATE ( AVERAGEX ( cv, [x] ), cas )
var y_mean = CALCULATE (AVERAGEX ( cv, [y] ), cas )
var vDiff_Mean_Product =
CALCULATE ( AVERAGEX (
cv,
( [y] - y_mean ) * ([x] - x_mean )
),
cas
)
return
CALCULATE ( vDiff_Mean_Product / SD_Product)