Questions tagged [refs]

Resilient File System

The Resilient File System (ReFS) is Microsoft's newest file system, designed to maximize data availability, scale efficiently to large data sets across diverse workloads, and provide data integrity by means of resiliency to corruption. It seeks to address an expanding set of storage scenarios and establish a foundation for future innovations.

162 questions
5
votes
2 answers

ref.current.focus() is not a function

im trying to use a ref for focusing on the element when onBlur. I'm using react v.16.9.0 My code is this: const handleKeyDown = (e, element, index) => { element.current.focus(); event.preventDefault(); }; const pinDigitBuilder = () => { const…
RamAlx
  • 6,976
  • 23
  • 58
  • 106
5
votes
2 answers

vuejs accessing ref inside v-for components

Have some components rendered from a v-for loop. The refs are defined like this: :ref="'category_' + index" This is how these refs appears in console at: console.log(this.$refs): category_0: [VueComponent] category_1: [VueComponent] category_2:…
5
votes
0 answers

Does ReFS handle small files and large deletes faster than NTFS?

I work with developer tools like git and npm/yarn that often generate lots of small files. I know from NTFS performance and large volumes of files and directories (and from experience) that NTFS doesn't handle these as fast as most Unix…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
4
votes
1 answer

Windows (ReFS,NTFS) file preallocation hint

Assume I have multiple processes writing large files (20gb+). Each process is writing its own file and assume that the process writes x mb at a time, then does some processing and writes x mb again, etc.. What happens is that this write pattern…
Jaka
  • 1,205
  • 12
  • 19
4
votes
2 answers

The more threads that changes the Clojure's ref are, the more does the rate of retries per threads rise?

I worry about this a little. Imagine the simplest version controll way that programmers just copy all directory from the master repository and after changing a file do reversely if the master repository is still the same. If it has been changed by…
Takahiro Hozumi
  • 701
  • 5
  • 11
4
votes
2 answers

OCaml Invalid Argument("equal:abstract value")

It seems that I can't assign an abstract value to a ref and I'm not sure what to do. open Big_int let largest = ref zero_big_int;; let depth = ref zero_big_int;; let rec big i = (add_int_big_int i zero_big_int) and collatz = fun num depth -> …
drellem
  • 43
  • 3
3
votes
1 answer

Vue difference of refs and javascript method like getElementById

I know both can make me to access to a element but what is the difference? It is only difference that Refs is more easier to access the element?
kkokki
  • 51
  • 1
  • 4
3
votes
3 answers

autofocus in react based on condition if else

How to autofocus for input name based on whether this.props.email exists or not? if(this.props.email){ // would like to set autofocus for }else{ // would like to set autofocus for
user21
  • 1,261
  • 5
  • 20
  • 41
3
votes
4 answers

How to programmatically simulate file corruption to test ReFS Health Check and Recovery features?

I would like to programmatically test Windows ReFS Health Check and Recovery features. Note: ReFS only detects bitrot (no self-healing). To have ReFS both detect and auto-heal, one must also use Storage Spaces. So, I have prepared a Storage Mirror…
gsl
  • 1,063
  • 1
  • 16
  • 27
3
votes
1 answer

In React do ref's reference the virtual DOM, or the actual DOM?

I'm assuming the virtual DOM, and that React takes care of it with diff'ing. But I had a recruiter say that ref's affect the actual DOM, I can't see how this can be. I assume that they were just mistaken.
3
votes
2 answers

How to access refs of a child in react, the proper way

Let me start off by saying I understand you should never use refs. With that said, I think in my scenario it is very valid. Specifically I am using a window.onscroll handler and cannot simply change props in the onscroll handler. Changing state or…
Terence Chow
  • 10,755
  • 24
  • 78
  • 141
3
votes
0 answers

Creating a new branch with GitHub API and php

I'm attempting some git automation using php, curl and the GitHub API. I'm first merging a feature branch into the default (master) branch by creating a pull request and then merging that pull request (all via the api). So far so good. The…
axl
  • 153
  • 4
  • 9
3
votes
1 answer

Passing pattern value as parameter or reference dynamic

I want to enforce my ID/IDRefs with a pattern. The code below works perfectly, but I would like to optimize it a bit, because all the different types are the same except for the first 3 characters in the pattern. Is it possible to have a generic…
3
votes
2 answers

dealing cards in Clojure

I am trying to write a Spider Solitaire player as an exercise in learning Clojure. I am trying to figure out how to deal the cards. I have created (with the help of stackoverflow), a shuffled sequence of 104 cards from two standard decks. Each card…
Ralph
  • 31,584
  • 38
  • 145
  • 282
3
votes
2 answers

two clojure map refs as elements of each other

I have two maps in refs and want to assoc them to each other in one transaction. My function looks like this: (defn assoc-two [one two] (let [newone (assoc @one :two two) newtwo (assoc @two :one one)] (ref-set one newone) …
Finn
  • 198
  • 9
1
2
3
10 11