Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "value"


Who needs qubits? Factoring algorithm run on a probabilistic computer

  • Next, it samples the outputs of all the p-bits and uses that as a feedback to adjust the behavior of each individual p-bit (in this sense, it's a bit like a hardware-based neural network).
  • During this time, the probabilistic nature means that the collection of p-bits will sample a large portion of the solution space of the problem, similar to a quantum computer—although the latter exists in a state that includes all potential solutions simultaneously.
  • Since the probabilistic nature means that some of the p-bits will sometimes be in the wrong state, it takes multiple samplings to understand the probabilities and thus the answer to the problem.
  • This means the feedback process can be handled asynchronously, so that aspect of the computation shouldn't need to scale up much with additional p-bits.

save | comments | report | share on


Debounce with vanilla JavaScript or RxJS

  • For performance reason and maybe even for cost reason (if for example you are using Google Firestore) you might not want to trigger a database update every single time a keyboard key is hit but rather perform a save only when needed.
  • Likewise, you may have a function in your application, which might be called multiple times in a row, for which you would rather like to consider only the last call.
  • Commonly, in order to detect which functions should effectively be triggered, a delay between calls is observed.
  • For example, if we are debouncing a function with a debounce time of 300ms, as soon as, or more than, 300ms between two calls are observed, the function will be triggered.
  • To reproduce the same example as above and to create an observable, we could for example use a Subject and triggers multiple times in a row next() .

save | comments | report | share on


'The early stages of a collapse': The stock market is undergoing a ruthless shift that reminds JPMorgan of a seemingly invincible trade that blew up in 2018

  • Now, Kolanovic sees trouble brewing for those who have been heavily reliant on one of the market's most-popular and long-lasting trades: long-momentum, short-value.
  • The price of oil plays a key role in the long-momentum, short-value trade.
  • Momentum has trounced value for years now, and has rewarded investors for simply buying what's already going up, in a systematic fashion.
  • Designed to provide single-day returns that were the inverse of the VIX — which itself is a measure of future volatility expectations known as the stock market's "fear gauge" — XIV was essentially a short-volatility bet.
  • While the long-momentum/short-value comeuppance is unlikely to strike as quickly as the short-volatility blowup, Kolanovic says a similar level of complacency has sent into the market — which is precisely when conditions get most dangerous.

save | comments | report | share on


#showdevHands-on guide: Configure your Kubernetes apps using the ConfigMap object

  • Let’s start off with an easy peasy example to see how to use environment variables by specifying them directly within our Pod specification.
  • To keep things simple, the YAML file is being referenced directly from the GitHub repo, but you can also download the file to your local machine and use it in the same way.
  • We can use envFrom in our manifest to directly refer to all key-value data in a ConfigMap. Another interesting way to consume configuration data is by pointing to a ConfigMap in the spec.volumes section of your Deployment or Pod spec.
  • In the above spec, pay attention to the spec.volumes section — notice that it refers to an existing ConfigMap. Each key in the ConfigMap is added as a file to the directory specified in the spec i.e. spec.containers.volumeMount.mountPath and the value is nothing but the contents of the file.

save | comments | report | share on


Understanding React Context System by building simple translation App

  • Next create an index.js inside the src directory and add the boilerplate code for React.
  • Next, we create three new files inside our components directory — UserCreate.js, Button.js and Field.js.
  • Now, we will quickly add code inside these files, to show our basic form containing an input box and submit button.
  • Without the context system, we had to pass it from App to UserCreate and from there to Button and Field component.
  • Now, create a new folder contexts inside src directory and a file LanguageContext.js inside it.
  • Next, we will create the context object inside the file LanguageContext.js and pass english as a default value.
  • There is another way to consuming or showing data in our child component (Field and Button in our case) and it is via Consumer instead of context object.

save | comments | report | share on


Curate, Don't Only Consume

  • In this article, I am going to teach you how to write a simple computer program that will do the math for you, so that you can be on your way to vast riches using only a whole lot of pennies!
  • (The code is on the numbered lines, starting with 1, and counting.) Now that we have a blank code screen, we are ready to type the JavaScript commands to tally our 30 day salary.
  • Now that we know what we want our program to do, let's write the actual code that will do it.
  • For our project, we're going to need three variables: a number (pay amount), a string (the text to display on the screen), and a counter (used to loop through all thirty days).
  • A lot of computer programs use semicolons to inform the computer that you're finished with that code block, and JavaScript is one of them.

save | comments | report | share on


Pass-By-Value in C++ and Rust

  • Once such difference beginners in Rust will run into quickly is what happens when you pass a parameter by value.
  • The code inside the setCoolValueToTen() function is operating on its very own copy, made from and identical to co2 when it was passed in but entirely distinct from it.
  • We're already starting to see a problem - we can't just mutate values without asking first, like we can in C++.
  • When pass by value in C++, the compiler will just assume you know what you're doing and call a copy constructor for you, even if it doesn't really make sense.
  • It's not copying the original object in, it's actually bringing the object from outside - but the caveat is that the calling scope no longer owns this value at all, the new function does.

save | comments | report | share on


Loading and Displaying Data with Hooks

  • Let's see what's the minimum code needed to handle the error and pending states.
  • We write a custom hook that takes an async function (which returns a Promise) and a default value.
  • This hook returns a tuple with 3 elements: [value, error, isPending].
  • It calls the async function once*, and it updates the value when it resolves, unless there's an error, of course.
  • Now in useGames.ts we can simply use this new custom hook, passing the getGames function and the initial value of an empty array as arguments.
  • We can explicitly annotate the return type of the function to be [T, string | null, boolean] where T is the (generic) type of the value, (string | null) is the type of the error and boolean is isPending.
  • And our useGames hook should return an object with three keys: games, error, isPending.

save | comments | report | share on


Pass-By-Value in C++ and Rust

  • Once such difference beginners in Rust will run into quickly is what happens when you pass a parameter by value.
  • The code inside the setCoolValueToTen() function is operating on its very own copy, made from and identical to co2 when it was passed in but entirely distinct from it.
  • We're already starting to see a problem - we can't just mutate values without asking first, like we can in C++.
  • When pass by value in C++, the compiler will just assume you know what you're doing and call a copy constructor for you, even if it doesn't really make sense.
  • It's not copying the original object in, it's actually bringing the object from outside - but the caveat is that the calling scope no longer owns this value at all, the new function does.

save | comments | report | share on


The 6 different ways Amex cardholders can redeem their points — including the method that gets you maximum value

  • A number of airlines offer an option to place cash bids on upgrades before your flight — if there are available seats in premium cabins, you can snag them at a potentially steep discount.
  • The best value from points, however, can be had by transferring them to one of Amex's 22 airline or hotel partners, and booking flights or hotel stays that way (see the next section for more on that).
  • It's exceedingly rare to get under 1 cent per point when you book flights by transferring to a frequent flyer program — as long as you're booking saver space — and while researching examples for this article and comparing to cash fares, I found values ranging from 1.2 cents per point to around 20 cents per point (in the case of flying first class to Japan).

save | comments | report | share on