Custom Query
Results (208 - 210 of 3866)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#752 | Fixed | _ArrayUnique | Jpm | Xenobiologist |
Description |
Hi, #include <Array.au3> $r = StringSplit('a,u,t,o,i,t, , a, a', ',') ConsoleWrite(_ArrayToString($r, ' ') & @CRLF) $r = _ArrayUnique($r) ConsoleWrite(_ArrayToString($r, ' ') & @CRLF) Output is: 9 a u t o i t a a 8 9 a u t o i a There is also a typo in the helpfile : 2x containing Success: Returns a 1-dimensional array containing containing only the unique elements of that Dimension Mega |
|||
#755 | Fixed | _FileReadToArray broken in 3.3.0.0 | Jpm | Melba23 |
Description |
If an array containing empty elements is saved by _FileWriteFromArray, it can no longer be read by _FileReadToArray, which returns error 2 "cannot split file". I track whether certain files listed in an array have already been accessed by creating a shadow array of the same size and setting its elements to 1 when the corresponding file in the first array is accessed. The shadow array is then saved on exit using _FileWriteFromArray. On startup I load the shadow file and compare its size to the array created from the files on disk as a form of checksum. Under 3.3.0.0 the shadow array, which contains a great number of empty elements (ie long strings of 0x0D0A interspersed with the odd 1), will not load as an array. I have substituted the "old" _FileReadToArray UDF from 3.2.12.1 and the file loads to an array without problem. Creating the array and then setting all elements to 0 in a loop does enable the "new" _FileReadToArray UDF from 3.3.0.0 to read the array, so the problem does appear to be with the empty elements. |
|||
#759 | Fixed | _GUICtrlListView_GetItemTextString() --> BIG speed optimize | Jpm | Zedna |
Description |
$iSelected = _GUICtrlListView_GetNextItem($hWnd) should be before FOR NEXT loop and not inside. When I need to get text of all listview items then this function will be called many times: number of rows * number of columns! original: Func _GUICtrlListView_GetItemTextString($hWnd, $iItem = -1) If $Debug_LV Then _GUICtrlListView_ValidateClassName($hWnd) Local $sRow = "", $SeparatorChar = Opt('GUIDataSeparatorChar') If $iItem <> -1 Then ; get row For $x = 0 To _GUICtrlListView_GetColumnCount($hWnd) - 1 $sRow &= _GUICtrlListView_GetItemText($hWnd, $iItem, $x) & $SeparatorChar Next Return StringTrimRight($sRow, 1) Else ; get current row selected For $x = 0 To _GUICtrlListView_GetColumnCount($hWnd) - 1 $sRow &= _GUICtrlListView_GetItemText($hWnd, _GUICtrlListView_GetNextItem($hWnd), $x) & $SeparatorChar Next Return StringTrimRight($sRow, 1) EndIf EndFunc ;==>_GUICtrlListView_GetItemTextString optimized: Func _GUICtrlListView_GetItemTextString($hWnd, $iItem = -1) If $Debug_LV Then _GUICtrlListView_ValidateClassName($hWnd) Local $sRow = "", $SeparatorChar = Opt('GUIDataSeparatorChar') If $iItem <> -1 Then ; get row For $x = 0 To _GUICtrlListView_GetColumnCount($hWnd) - 1 $sRow &= _GUICtrlListView_GetItemText($hWnd, $iItem, $x) & $SeparatorChar Next Return StringTrimRight($sRow, 1) Else ; get current row selected $iSelected = _GUICtrlListView_GetNextItem($hWnd) For $x = 0 To _GUICtrlListView_GetColumnCount($hWnd) - 1 $sRow &= _GUICtrlListView_GetItemText($hWnd, $iSelected, $x) & $SeparatorChar Next Return StringTrimRight($sRow, 1) EndIf EndFunc ;==>_GUICtrlListView_GetItemTextString |