« first day (4399 days earlier)      last day (771 days later) » 

06:02
No JS -> nothing can break -> whataboutCSS.jpeg
 
7 hours later…
13:01
@VLAZ thx anyway, but the regex was trash
anyone got a js version of this?

^\s*[a-zA-Z]{2}(?:\s*\d\s*){6}[a-zA-Z]?\s*$
^\\s*[a-zA-Z]{2}(?:\\s*\\d\\s*){6}[a-zA-Z]?\\s*$
doesn't work with a valid UK NI number, lets through invalid ones in <input>
what is this ?: thing

(?:\s*\d\s*)
seems redundant with just
six digits, with optional whitespace leading/trailing need there
nvm, it works
?: i still dont get
@SuperUberDuper Non-capturing group. If you surround part of the part in brackets, e.g., a(.)c then that's a capturing group and you can extract the captured part later - if you match that regex against "abc" it will capture "b", while if you run it against "azc" it will capture "z". A non-capturing group...doesn't do that. It does allow you to repeat a sub-pattern, though a(?:.)+c will repeat the pattern in the group but would not capture the sub-sequence.
2277
Q: What is a non-capturing group in regular expressions?

never_had_a_nameHow are non-capturing groups, i.e., (?:), used in regular expressions and what are they good for?

13:31
I HATE LINTER
Because Linter and TypeScript + React is hell
  useEffect(() => {
    const accessors = columnData.map((column) => column.accessor)
    const displayedRowData: Array<TableRowData> = []
    rowData.forEach((row, index) => {
      const rowId = row.rowId
      displayedRowData[index] = { rowId: rowId }
      for (let i = 0; i <= accessors.length; i++) {
        const prop = accessors[i]
        displayedRowData[index][prop] = row[prop]
      }
    })
    state.filteredRowData = displayedRowData
  }, [rowData, state.filteredRowData, columnData])
instead of explicitly define state.filteredRowData, Linter screaming , give me the whole state
 
3 hours later…
16:11
@VLAZ cool thx
i dont see the point of it in this case
16:37
@SuperUberDuper It's to repeat the pattern with {6}
 
2 hours later…
18:32
Hello, how would you create a selector which extends another selector? I need to pass both to a component and it is quite weird and I hope there's a better way to do this.
(React, REdux)
<Component selector={(state) => state.manager.users} dataSelector={(state) => state.manager.users.data} />
I need to use the selector in the Component but to send the second selector to another subcomponent
Is there something like

((state) => resolveFirst(firstSelector).data)

?
And no, I can't just pass the selectedSelector.data into the subcomponent
I guess it's a bad idea to just do
const result = useSelector(props.selector);
<SubComponent selector={(state) => result.data)} />
@VLAZ but no one cares what is captured i my case
 
1 hour later…
19:54
posted on November 01, 2022 by Giuliana Pritchard

LTS-102 is being updated in the LTS channel to 102.0.5005.184 (Platform Version: 14695.142.0) for most ChromeOS devices. Want to know more about Long-term Support? Click here. This update contains Security fixes, including: 1051198 High CVE-2022-3044 Inappropriate implementation in Site Isolation. 1320139 High CVE-2022-3306 Use-after-free in

20:15
Hello
is it possible to DRY in this case
    const isAscendingOrder =

                    isSelectedColumn && getIsOrderAscending(state.order)

                  const isDescendingOrder =

                    isSelectedColumn && !getIsOrderAscending(state.order)
as you can see, only difference is in getIsOrderAscending
20:40
Why do both need to be set?
isn't one just the opposite of the other?

« first day (4399 days earlier)      last day (771 days later) »