Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/17/2016 in all areas

  1. My pleasure @kcvinu , I can even help with setting up a IRC channel for you guys if you want .
    2 points
  2. GMK

    OOo/LibO Calc UDF

    OK, the latest version has been uploaded. I fixed the bug where it wouldn't attach if more than one Calc spreadsheet was open.
    1 point
  3. In Microsoft's world, the affinity mask starts at 1 and counts up, it's got nothing to do with CPU numbering but assigning a bit position to a CPU.
    1 point
  4. Regexp: Local $sIn = _ "FIN,MRN,LastNameA,FirstName,DateOfService,Mercy Dept Name,ServiceCode" & @CRLF & _ "FIN,MRN,LastNameB,FirstName,DateOfService,Mercy Dept Name,ServiceCode" & @CRLF & _ "FIN,MRN,LastNameC,FirstName,DateOfService,Mercy Dept Name,ServiceCode" & @CRLF & _ "FIN,MRN,LastNameD,FirstName,DateOfService,Mercy Dept Name,ServiceCode" & @CRLF & _ "FIN,MRN,LastNameE,FirstName,DateOfService,Mercy Dept Name,ServiceCode" & @CRLF Local $sOut = StringRegExpReplace($sIn, "(?m)([^,]*,[^,]*,[^,]*),(.*)", "$1 $2") ConsoleWrite($sOut)
    1 point
  5. lampel, From that snippet, you are using the ListView handle to identify it - when using the UDF functions, you need to use the index returned when you initialise the ListView. So I suggest trying: _GUIListViewEx_SetColour($iLV_Right_Index,"0x0000FF;0xFF0000",2,2) The use of the index is explained in the _GUIListViewEx_SetColour function header: ; #FUNCTION# ========================================================================================================= ; Name...........: _GUIListViewEx_SetColour ; Description ...: Sets text and/or back colour for a user colour enabled ListView item ; Syntax.........: _GUIListViewEx_SetColour($iLV_Index, $sColSet, $iRow, $iCol) ; Parameters ....: $iLV_Index - Index of ListView Come back if that does not do the trick. M23
    1 point
  6. Hi, I went looking for an algorithm and I found one thanks to jchd's links to OEIS. It is blindingly fast - I get the 14-bit result in ~150ms on my machine. Anyway, here it is for completion: #include "Array.au3" $nBegin = TimerInit() ; Set number of bits $iMax = 14 ; Create array to hold unique patterns $iArraySizeFactor = 500 Global $aUnique[$iArraySizeFactor] =[0] ; Find factors for the bit value $sFactors = "|1|" For $i = Ceiling($iMax / 2) To 2 Step -1 $nDiv = $iMax / $i If IsInt($nDiv) Then $sFactors &= $nDiv & "|" EndIf Next $sFactors &= $iMax & "|" ;ConsoleWrite($sFactors & @CRLF) ; Create initial pattern of all 1s Local $aBits[$iMax + 1] For $i = 1 To $iMax $aBits[$i] = 1 Next _SavePattern($aBits) ; Start algorithm While 1 ; Find rightmost 1 For $iIndex= $iMax To 1 Step -1 If $aBits[$iIndex] = 1 Then ExitLoop Next ; Set found 1 to 0 $aBits[$iIndex] = 0 ; Fill rest of pattern with repeats of the pattern up to the found index $iFiller = 0 For $i = $iIndex + 1 To $iMax $iFiller= Mod($iFiller, $iIndex) + 1 $aBits[$i] = $aBits[$iFiller] Next ; If the found index is a factor of the bit value - valid pattern If StringInStr($sFactors, "|" & $iIndex & "|") Then _SavePattern($aBits) EndIf ; If leftmost 1 changed to 0 then pattern must be all 0s so end If $iIndex = 1 Then ExitLoop EndIf WEnd ReDim $aUnique[$aUnique[0] + 1] ConsoleWrite(TimerDiff($nBegin) & @CRLF) _ArrayDisplay($aUnique, "", "", 8) Func _SavePattern($aArray) ; Convert pattern to string $sPattern = "" For $i = 1 to UBound($aArray) - 1 $sPattern &= $aArray[$i] Next ; Resize array if required $aUnique[0] += 1 If $aUnique[0] > UBound($aUnique) - 1 Then ReDim $aUnique[UBound($aUnique) + $iArraySizeFactor] EndIf ; Add pattern to array $aUnique[$aUnique[0]] = $sPattern EndFunc And please do not ask me to explain why it works - it took me long enough to work out how to get it to run! M23
    1 point
  7. u could leave it if it works, but i would go with 7zip until the author updates this script or some one more skilled then me fix the issue
    1 point
  8. @kcvinu & @DFerrato If you both want to collaborate, you can use IRC as a good solution , You both can create a separate chat room for collaboration . Feel free to ask me if you are having any problems regarding IRC, TD.
    1 point
  9. Hello You can do something Like this... #include <WinAPIGdi.au3> #include <Array.au3> ;just for Debug Global Const $PHYSICAL_MONITOR_DESCRIPTION_SIZE = 128 ;~ PHYSICAL_MONITOR structure ;~ HANDLE hPhysicalMonitor; ;~ WCHAR szPhysicalMonitorDescription[PHYSICAL_MONITOR_DESCRIPTION_SIZE]; Global Const $sTagPHYSICAL_MONITOR = "handle;wchar[128];" Local $aMonitors = _WinAPI_EnumDisplayMonitors() ;~ _ArrayDisplay($aMonitors) Local $hMonitor = $aMonitors[1][0] Local $aRet = DllCall("Dxva2.dll", "bool", "GetNumberOfPhysicalMonitorsFromHMONITOR", "handle", $hMonitor, "dword*", 0) Local $iNumberOfPhysicalMonitors = $aRet[2] ConsoleWrite("Number Of Physical Monitors: " & $iNumberOfPhysicalMonitors & @CRLF) Local $sStringTagStructure = "" For $i = 1 To $iNumberOfPhysicalMonitors $sStringTagStructure &= $sTagPHYSICAL_MONITOR Next Local $tArrayPHYSICAL_MONITOR = DllStructCreate($sStringTagStructure) Local $PtrPhysicalMonitorArray = DllStructGetPtr($tArrayPHYSICAL_MONITOR) $aRet = DllCall("Dxva2.dll", "bool", "GetPhysicalMonitorsFromHMONITOR", "handle", $hMonitor, "dword", $iNumberOfPhysicalMonitors, "ptr", $PtrPhysicalMonitorArray) For $i = 1 To $iNumberOfPhysicalMonitors ConsoleWrite("hPhysicalMonitor: " & DllStructGetData($tArrayPHYSICAL_MONITOR, (($i) * 2) - 1) & @CRLF) ConsoleWrite("PhysicalMonitorDescription: " & DllStructGetData($tArrayPHYSICAL_MONITOR, (($i) * 2)) & @CRLF) Next $tArrayPHYSICAL_MONITOR=0;free Saludos
    1 point
×
×
  • Create New...