- Jul 2024
-
www.rfc-editor.org www.rfc-editor.org
-
The purpose of distinguishing between safe and unsafe methods is to allow automated retrieval processes (spiders) and cache performance optimization (pre-fetching) to work without fear of causing harm.
-
-
-
However, with verifiable credentials in a Solid Pod, the university issues some information stating that a student completed a course and cryptography signs that information. This is a verifiable credential. They then pass that credential to the student who stores it in their Solid Personal Online Datastore (Pod). When the student wants to apply for a job, all they need to do is grant access to the credential so the company can read it. The company can confirm that the credential isn’t faked because its cryptographically signed by the university.
-
- Jun 2024
-
www.howtogeek.com www.howtogeek.com
-
Docker-in-Docker via dind has historically been widely used in CI environments. It means the "inner" containers have a layer of isolation from the host. A single CI runner container supports every pipeline container without polluting the host's Docker daemon.
-
While it often works, this is fraught with side effects and not the intended use case for dind. It was added to ease the development of Docker itself, not provide end user support for nested Docker installations.
-
- May 2024
-
www.rfc-editor.org www.rfc-editor.org
-
Please note that '+' characters are frequently used as part of an email address to indicate a subaddress, as for example in <bill+ietf@example.org>.
Nice of them to point that this is a common scenario, not just a hypothetical one.
Tags
Annotators
URL
-
-
commandmasters.com commandmasters.com
-
Use case 1: Delete a ref, useful for soft resetting the first commit
-
- Apr 2024
-
datatracker.ietf.org datatracker.ietf.org
-
if a mail system automatically unsubscribes recipient mailboxes that have been closed or abandoned, there can be no interaction with a user who is not present
I had not thought of that use case...
Tags
Annotators
URL
-
- Mar 2024
-
yarnpkg.com yarnpkg.com
-
When you need to publish multiple packages and want to avoid your contributors having to open PRs on many separate repositories whenever they want to make a change.
-
when projects want to keep strict boundaries within their code and avoid becoming an entangled monolith. This is for example the case for Yarn itself, or many enterprise codebases.
-
- Jan 2024
-
mongoosejs.com mongoosejs.com
-
Instance methods Instances of Models are documents. Documents have many of their own built-in instance methods. We may also define our own custom document instance methods. // define a schema const animalSchema = new Schema({ name: String, type: String }, { // Assign a function to the "methods" object of our animalSchema through schema options. // By following this approach, there is no need to create a separate TS type to define the type of the instance functions. methods: { findSimilarTypes(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); } } }); // Or, assign a function to the "methods" object of our animalSchema animalSchema.methods.findSimilarTypes = function(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); }; Now all of our animal instances have a findSimilarTypes method available to them. const Animal = mongoose.model('Animal', animalSchema); const dog = new Animal({ type: 'dog' }); dog.findSimilarTypes((err, dogs) => { console.log(dogs); // woof }); Overwriting a default mongoose document method may lead to unpredictable results. See this for more details. The example above uses the Schema.methods object directly to save an instance method. You can also use the Schema.method() helper as described here. Do not declare methods using ES6 arrow functions (=>). Arrow functions explicitly prevent binding this, so your method will not have access to the document and the above examples will not work.
Certainly! Let's break down the provided code snippets:
1. What is it and why is it used?
In Mongoose, a schema is a blueprint for defining the structure of documents within a collection. When you define a schema, you can also attach methods to it. These methods become instance methods, meaning they are available on the individual documents (instances) created from that schema.
Instance methods are useful for encapsulating functionality related to a specific document or model instance. They allow you to define custom behavior that can be executed on a specific document. In the given example, the
findSimilarTypes
method is added to instances of theAnimal
model, making it easy to find other animals of the same type.2. Syntax:
Using
methods
object directly in the schema options:javascript const animalSchema = new Schema( { name: String, type: String }, { methods: { findSimilarTypes(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); } } } );
Using
methods
object directly in the schema:javascript animalSchema.methods.findSimilarTypes = function(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); };
Using
Schema.method()
helper:javascript animalSchema.method('findSimilarTypes', function(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); });
3. Explanation in Simple Words with Examples:
Why it's Used:
Imagine you have a collection of animals in your database, and you want to find other animals of the same type. Instead of writing the same logic repeatedly, you can define a method that can be called on each animal instance to find similar types. This helps in keeping your code DRY (Don't Repeat Yourself) and makes it easier to maintain.
Example:
```javascript const mongoose = require('mongoose'); const { Schema } = mongoose;
// Define a schema with a custom instance method const animalSchema = new Schema({ name: String, type: String });
// Add a custom instance method to find similar types animalSchema.methods.findSimilarTypes = function(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); };
// Create the Animal model using the schema const Animal = mongoose.model('Animal', animalSchema);
// Create an instance of Animal const dog = new Animal({ type: 'dog', name: 'Buddy' });
// Use the custom method to find similar types dog.findSimilarTypes((err, similarAnimals) => { console.log(similarAnimals); }); ```
In this example,
findSimilarTypes
is a custom instance method added to theAnimal
schema. When you create an instance of theAnimal
model (e.g., a dog), you can then callfindSimilarTypes
on that instance to find other animals with the same type. The method uses thethis.type
property, which refers to the type of the current animal instance. This allows you to easily reuse the logic for finding similar types across different instances of theAnimal
model.
Tags
Annotators
URL
-
-
gitlab.com gitlab.com
-
It's also common to want to compute the transitive closure of these relations, for instance, in listing all the issues that are, transitively, duped to the current one to hunt for information about how to reproduce them.
-
Purpose of the relations should be to allow advanced analysis, visualization and planning by third-party tools or extensions/plugins, while keeping Gitlab's issues simple and easy to use.
-
- Dec 2023
-
developers.google.com developers.google.com
-
Use cases
-
- Sep 2023
-
www.ncbi.nlm.nih.gov www.ncbi.nlm.nih.gov
-
Recent work has revealed several new and significant aspects of the dynamics of theory change. First, statistical information, information about the probabilistic contingencies between events, plays a particularly important role in theory-formation both in science and in childhood. In the last fifteen years we’ve discovered the power of early statistical learning.
The data of the past is congruent with the current psychological trends that face the education system of today. Developmentalists have charted how children construct and revise intuitive theories. In turn, a variety of theories have developed because of the greater use of statistical information that supports probabilistic contingencies that help to better inform us of causal models and their distinctive cognitive functions. These studies investigate the physical, psychological, and social domains. In the case of intuitive psychology, or "theory of mind," developmentalism has traced a progression from an early understanding of emotion and action to an understanding of intentions and simple aspects of perception, to an understanding of knowledge vs. ignorance, and finally to a representational and then an interpretive theory of mind.
The mechanisms by which life evolved—from chemical beginnings to cognizing human beings—are central to understanding the psychological basis of learning. We are the product of an evolutionary process and it is the mechanisms inherent in this process that offer the most probable explanations to how we think and learn.
Bada, & Olusegun, S. (2015). Constructivism Learning Theory : A Paradigm for Teaching and Learning.
Tags
Annotators
URL
-
- Aug 2023
-
stackoverflow.com stackoverflow.com
-
async vs. sync depends exactly on what you are doing in what context. If this is in a network service, you need async. For a command line utility, sync is the appropriate paradigm in most simple cases, but just knee-jerk saying "async is better" is not correct. My snippet is based on the OP snippet for context.
-
- May 2023
-
impedagogy.com impedagogy.com
-
human values and ethics, rather than solely pursuing technological progress.
I ask whether technology is classic Pandora's Box--once the attitude is out, you cannot re-box it. Or at least we haven't figured out a way.
Once this margin has been populated with annotations I want to redo the prompt to include them as an alternative point of view in the dialogue.
-
- Nov 2022
-
github.com github.com
-
It can be useful to use with keywords argument, which required symbol keys.
Tags
Annotators
URL
-
-
www.taniarascia.com www.taniarascia.com
-
For example, if I make an application (Client) that allows a user (Resource Owner) to make notes and save them as a repo in their GitHub account (Resource Server), then my application will need to access their GitHub data. It's not secure for the user to directly supply their GitHub username and password to my application and grant full access to the entire account. Instead, using OAuth 2.0, they can go through an authorization flow that will grant limited access to some resources based on a scope, and I will never have access to any other data or their password.
-
-
stackoverflow.com stackoverflow.com
-
session = ActionDispatch::Integration::Session.new(Rails.application) response = session.post("/mypath", my_params: "go_here")
worked for me
-
I used the above to test what happens to the user if a POST happens in another session (via WebSockets), so a form wouldn't cut it.
-
- Sep 2022
-
datatracker.ietf.org datatracker.ietf.org
-
Consumers can use the status member to determine what the original status code used by the generator was, in cases where it has been changed (e.g., by an intermediary or cache), and when message bodies persist without HTTP information. Generic HTTP software will still use the HTTP status code.
-
-
www.al-fanarmedia.org www.al-fanarmedia.org
-
Literacies Teachers Need During Covid-19
News Example
-
- Aug 2022
-
flexdigitalhealth.atlassian.net flexdigitalhealth.atlassian.net
-
The instructions here for "Postman Collection" might be useful on the portal, but are they too complex? Is there anything we can do (such as purchase a Postman team license) to streamline this part of the work? Ask the ProServ Team.
-
-
flexdigitalhealth.atlassian.net flexdigitalhealth.atlassian.net
-
From Freddie: potential use cases
-
-
flexdigitalhealth.jamacloud.com flexdigitalhealth.jamacloud.com
-
Got this from Lucas: this is a good example of API documentation for custom services developed in proserv
-
-
github.com github.com
-
Beyond memory leaks, it's also really useful to be able to re-run a test many times to help with tracking down intermittence failure and race conditions.
Tags
Annotators
URL
-
- May 2022
-
github.com github.com
-
The shared context worked though thanks! RSpec.shared_context "perform_enqueued_jobs" do around(:each) { |example| perform_enqueued_jobs { example.run } } end RSpec.configure do |config| config.include_context "perform_enqueued_jobs" end
use case for around
Tags
Annotators
URL
-
-
github.com github.com
-
1/ It fits into existing spec based testing infrastructure nicely, including running on travis, code coverage using SimpleCov, switching between generating a profile (RubyProf), a benchmark (Benchmark::IPS) or normal test run. 2/ Some of my benchmarks do have expect clauses to validate that things are working before invoking the benchmark.
Answering the question:
I don't understand the point of putting it in a spec. What does that gain you over using benchmark-ips the normal way?
-
I just wanted to mention there was, IMHO, a valid use case for this. It helps add to the validity of the ticket and the design of the feature.
-
- Apr 2022
-
-
Let's imagine your project talks to databases, supports several, and has adapters for each one of them. Those adapters may have top-level require calls that load their respective drivers: # my_gem/db_adapters/postgresql.rb require "pg" but you don't want your users to install them all, only the one they are going to use.
-
There are project layouts that put implementation files and test files together.
-
Let's suppose that your gem decorates something in Kernel:
-
-
edgeguides.rubyonrails.org edgeguides.rubyonrails.org
-
if Rails.application.config.reloading_enabled? Rails.autoloaders.main.on_unload("Country") do |klass, _abspath| klass.expire_redis_cache end end
-
If your application decorates classes or modules from an engine,
-
Some projects want something like app/api/base.rb to define API::Base, and add app to the autoload paths to accomplish that.
-
By default, app/models/concerns belongs to the autoload paths and therefore it is assumed to be a root directory. So, by default, app/models/concerns/foo.rb should define Foo, not Concerns::Foo.
-
-
github.com github.com
-
(I can't imagine use case for it but if you can, please open a pull request or issue).
Tags
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
I am not looking for model based after commits on update/create/etc, I want to be able to dynamically define a block that will be executed only if the current (top-most) transaction passes:
-
This would work if your transaction only wraps a single model's save operation. I need to wrap at least Node + Version + Attachment
looking for a callback that you can register to happen after current transaction is committed, not just after_commit of model -- though actually, that might fire precisely when current transaction is committed, too (except that it might only get triggered for nested transactions, not the top-most transaction), so it could maybe go there ... but I think the problem is just that it doesn't belong there, because it's not specific to the model...
I guess the OP said it best:
I am not looking for model based after commits on update/create/etc, I want to be able to dynamically define a block that will be executed only if the current (top-most) transaction passes:
-
-
sambleckley.com sambleckley.com
-
You want the front page to show a few hundred posts along with the top three comments on each post. You’re planning on being very popular, so the front page will need to be very fast. How do you fetch that data efficiently from postgresql using Activerecord?
-
Making one Comment query per Post is too expensive; it’s N+1 queries (one to fetch the posts, N to fetch the comments). You could use includes to preload all the comments for all the posts, but that requires hydrating hundreds of thousands of records, even though you only need a few hundred for your front page. What you want is some kind of GROUP BY with a LIMIT on each group — but that doesn’t exist, either in Activerecord nor even in postgres. Postgres has a different solution for this problem: the LATERAL JOIN.
-
-
github.com github.com
-
Let's say the user is in the process of selecting some files. The names don't indicate anything. So she has to listen and select.
Tags
Annotators
URL
-
-
html.spec.whatwg.org html.spec.whatwg.org
-
When a web page is viewed on a screen with a large physical size (assuming a maximised browser window), the author might wish to include some less relevant parts surrounding the critical part of the image. When the same web page is viewed on a screen with a small physical size, the author might wish to show only the critical part of the image.
Tags
Annotators
URL
-
- Mar 2022
-
github.com github.com
-
This has cropped up in particular when trying to create a copy of a store object when the store changes (which is a common use case with forms where you don't want to mutate the global store until the form is saved).
Exactly! This is more or less the same kind of use case I tend to have: intentionally having/wanting a stale/out-of-date copy of a (reactive) object.
Tags
Annotators
URL
-
-
-
This is particularly useful in cases where you want to separate your data migrations from your schema migrations or where you have multiple steps in your migration process that must have other steps invoked throughout.
-
-
github.com github.com
-
There are a couple of reasons why you may want to do this.
-
-
-
If you need to ensure migrations run in a certain order with regular db:migrate, set up Outrigger.ordered. It can be a hash or a proc that takes a tag; either way it needs to return a sortable value: Outrigger.ordered = { predeploy: -1, postdeploy: 1 } This will run predeploys, untagged migrations (implicitly 0), and then postdeploy migrations.
-
class PreDeployMigration < ActiveRecord::Migration tag :predeploy end
-
This is especially useful for zero downtime deploys to Production environments.
-
- Feb 2022
-
people.cs.rutgers.edu people.cs.rutgers.edu
-
Screening is a useful way of avoiding spam and/or other unwanted correspondence.
-
Filing is the simplest application to take advantage of plus signs.
-
-
-
This is especially useful for UI library components, as it is generally unknown which events will be required from them for all desired use cases. For example, if a Button component only forwards a click event, then no use case that requires the mouseover or the keypress event can be used with it.
-
-
-
people want to have an object, lets call it a Product that they want to create in several different steps
-
- Jan 2022
-
github.com github.com
-
My case is that I have a component which takes an object as a prop. As the user changes the object's values, they can either Save or Cancel. So in the component I have two variables: value and valueUnsaved. It's similar to the example on my comment above. To avoid mutating the original object directly, I assign valueUnsaved as a deep clone of value. If value is changed outside of the component, valueUnsaved should be updated.
Tags
Annotators
URL
-
-
support.mozilla.org support.mozilla.org
-
Thunderbird provides the ability to archive messages - that is, to move them from the default folders to archive folders without deleting the messages altogether. This makes it easy to organize archives or move them to a backup device, and keep the Inbox clean. Messages can only be archived manually, not automatically.
-
- Nov 2021
-
www.kirillvasiltsov.com www.kirillvasiltsov.com
-
But you can get quite close to directly updating CSS with Actions!
-
- Oct 2021
-
kit.svelte.dev kit.svelte.dev
-
This function allows you to modify (or replace) a fetch request for an external resource that happens inside a load function that runs on the server (or during pre-rendering). For example, your load function might make a request to a public URL like https://api.yourapp.com when the user performs a client-side navigation to the respective page, but during SSR it might make sense to hit the API directly (bypassing whatever proxies and load balancers sit between it and the public internet).
-
- Sep 2021
-
stackoverflow.com stackoverflow.com
-
One good use for /dev/tty is if you're trying to call an editor in a pipeline (e.g., with xargs). Since the standard input of xargs is some list of files rather than your terminal, just doing, e.g., | xargs emacs will screw up your terminal. Instead you can use | xargs sh -c 'emacs "$@" </dev/tty' emacs to connect the editor to your terminal even though the input of xargs is coming from elsewhere.
-
-
spin.atomicobject.com spin.atomicobject.com
-
An extensible plugin architecture allows for customizing your workflow or even making Yarn a package manager for non-JavaScript projects.
-
- Jul 2021
-
github.com github.com
-
apart from [Websockets], which is unnecessarily complex for non-browser applications
-
- Jun 2021
-
digitalnow878391108.wordpress.com digitalnow878391108.wordpress.com
-
Monorepo use cases
-
-
stackoverflow.com stackoverflow.com
-
for cpp_file in *.cpp; do gcc -c $$cpp_file & done; wait This gives much finer control than make -j.
-
There is one very important reason for enabling job control to be useful inside scripts: the side-effect it has of placing background processes in their own process groups. This makes it much, much easier to send signels to them and their children with one simple command: kill -<signal> -$pgid. All other ways of dealing with signaling entire trees of processes either involve elaborate (sometimes even recursive) functions, which are often bugnests, or risk killing the parent in the process (no pun intended).
-
-
-
Provides a template for future specific classes
-
-
stackoverflow.com stackoverflow.com
-
FYI, my use case is having clickable links in the mail generated by the integration tests.
-
-
docs.gitlab.com docs.gitlab.com
-
These tests should only be used when: the functionality/component being tested is small the internal state of the objects/database needs to be tested it cannot be tested at a lower level
-
-
stackoverflow.com stackoverflow.com
-
Thanks, this was just what I was looking for! This is a perfect appropriate use of instance_eval. I do not understand the nay-sayers. If you already have your array in a variable, then sure, a.reduce(:+) / a.size.to_f is pretty reasonable. But if you want to "in line" find the mean of an array literal or an array that is returned from a function/expression — without duplicating the entire expression ([0,4,8].reduce(:+) / [0,4,8].length.to_f, for example, is abhorrent) or being required to assign to a local, then instance_eval option is a beautiful, elegant, idiomatic solution!!
-
instance_eval is analogous to using tap, yield_self, … when you are dealing with a chain of method calls: do use it whenever it's appropriate and helpful! And in this case, I absolutely believe that it is.
-
instance_eval lets you run the code while only specifying a once, so it can be chained with other commands. I.e. random_average = Array.new(10) { rand(10) }.instance_eval { reduce(:+) / size.to_f } instead of random = Array.new(10) { rand(10) }; random_average = random.reduce(:+) / random.size
-
- May 2021
-
-
also it's can be helpful for geo deploying when your browser should get access to closest API by GeoDNS but server part can touch neighborhood server or same server.
"geo deploy"
Tags
Annotators
URL
-
-
docs.gitlab.com docs.gitlab.com
-
Make it easier to manage people and control visibility. Give people different permissions depending on their group membership.
-
Organize large projects. For large projects, subgroups makes it potentially easier to separate permissions on parts of the source code.
Tags
Annotators
URL
-
-
twitter.com twitter.com
-
(20) ReconfigBehSci on Twitter: ‘RT @martikagv: New book “Urban Informatics”, #OpenAccess https://t.co/wp45uWU9Mi Edited by @jmichaelbatty @CUHKofficial Michael Goodchild,…’ / Twitter. (n.d.). Retrieved 21 April 2021, from https://twitter.com/SciBeh/status/1384411081456582662
-
- Apr 2021
-
meta.stackexchange.com meta.stackexchange.com
-
With Stack Overflow for Teams being a flexible platform, we’ve seen customers use it for a wide variety of use cases: A platform to help onboard new employees A self-serve help center to reduce support tickets Collaboration and documentation to drive innersource initiatives Breaking down silos and driving org wide transformation like cloud migration efforts A direct customer support platform Enable people who are working towards a common goal, whether a startup or a side project, to develop a collective knowledge base
-
-
unix.stackexchange.com unix.stackexchange.com
-
What produces that text, and what do you want to use it for?
-
If it's a list of actual pathnames, just replacing spaces by newlines may obviously mangle pathnames that contain embedded spaces, such as /User/myself/VirtualBox VMs/.
-
-
blog.dnsimple.com blog.dnsimple.com
-
stackoverflow.com stackoverflow.com
-
This is a great application for using route constraints.
-
- Mar 2021
-
web.cs.iastate.edu web.cs.iastate.edu
-
Application: 3-D Shape RegistrationAn important problem in model-based recognition is to find the transformation of a set of datapoints that yields the best match of these points against a shape model. The process is oftenreferred to asdata registration. The data points are typically measured on a real object by rangesensors, touch sensors, etc., and given in Cartesian coordinates. The quality of a match is oftendescribed as the total squared distance from the data pointsto the model. When multiple shapemodels are possible, the one that results in the least total distance is then recognized as the shapeof the object.Quaternions are very effective in solving the above least-squares-based registration problem.
-
-
en.wikipedia.org en.wikipedia.org
-
There is obvious connections between the flow paths of a use case and its test cases. Deriving functional test cases from a use case through its scenarios (running instances of a use case) is straightforward.
-
With content based upon an action or event flow structure, a model of well-written use cases also serves as an excellent groundwork and valuable guidelines for the design of test cases
-
- Feb 2021
-
sobolevn.me sobolevn.me
-
So, the sad conclusion is: all problems must be resolved individually depending on a specific usage context. There’s no silver bullet to resolve all ZeroDivisionErrors once and for all. And again, I am not even covering complex IO flows with retry policies and expotential timeouts.
-
-
www.morozov.is www.morozov.is
-
Railway Oriented Programming is a way to gracefully handle errors in your application
-
-
en.wikipedia.org en.wikipedia.org
-
Supporting languages may use monads to abstract away boilerplate code needed by the program logic.
-
-
github.com github.com
-
ActiveInteraction also supports merging errors. This is useful if you want to delegate validation to some other object. For example, if you have an interaction that updates a record, you might want that record to validate itself. By using the #merge! helper on errors, you can do exactly that.
-
-
-
Like all best practices, I think the way you will resolve a problem will depend of the application you are doing.
-
-
github.com github.com
-
An additional usecase is where we would like to update multiple records
-
This can be useful in cases like multistep registration. Previously in # rails we used to stick all of the validations in the class and then we're # stuck validating them all everytime
-
-
www.honeybadger.io www.honeybadger.io
-
Honeybadger isn't a single page app, and it probably won't ever be. SPAs just don't make sense for our technical requirements.
-
-
stackoverflow.com stackoverflow.com
-
think about them as a text/markup equivalent to the way a video or another media file would be embedded
-
but I wouldn't use a frameset for anything but a manual since it no longer exists in html5. Example: Game maker manual
-
- Jan 2021
-
wondertools.substack.com wondertools.substack.com
-
toppings on a spreadsheet sundae.🍨🍦
One of my fav toppings is to use Google Forms. Sheets is integrated completely there. In fact this is practically my only use case for google sheets so I am grateful for discussion of add-ons and other uses.
-
I use sheets for organizing lists of people, topics and grades, as well as managing budgets, ideas and plans.
Use case #1. How might I use it? How might others use it?
-
-
-
Maybe $$slots like $$props? My use case is that I'd like to wrap a slot's content in an element that applies styling that I'd like absent without the slotted content. Something like this: {#if $$slots.description} <div class="description"> <slot name="description"></slot> </div> {/if}
-
-
-
If components gain the slot attribute, then it would be possible to implement the proposed behavior of <svelte:fragment /> by creating a component that has a default slot with out any wrappers. However, I think it's still a good idea to add <svelte:fragment /> so everyone who encounters this common use case doesn't have to come up with their own slightly different solutions.
-
-
github.com github.com
-
I want to make some add-ons or wrappers on components e.g BigButton.svelte <script> import Button from './Button.svelte' </script> <Button fz="16" h="64" {...$$props}> <slot slot="prepend" name="prepend" /> <slot /> <slot slot="append" name="append" /> </Button>
-
-
-
I am trying to implements this usecase (a generic lazy loader component which forwards slots/events to the "real" component).
-
- Oct 2020
-
xtzmf.csb.app xtzmf.csb.app
-
stackoverflow.com stackoverflow.com
-
Looks like the problem is that debounce defaults to waiting for 0 ms ... which is completely useless!
It would be (and is) way to easy to omit the 2nd parameter to https://lodash.com/docs/4.17.15#debounce.
Why is that an optional param with a default value?? It should be required!
There must be some application where a delay of 0 is useless. https://www.geeksforgeeks.org/lodash-_-debounce-method/ alludes to / implies there may be a use:
When the wait time is 0 and the leading option is false, then the func call is deferred until to the next tick.
But I don't know what that use case is. For the use case / application of debouncing user input (where each character of input is delayed by at least 10 ms -- probably > 100 ms -- a delay of 0 seems utterly useless.
-
-
2ality.com 2ality.com
-
trusktr herman willems • 2 years ago Haha. Maybe React should focus on a template-string syntax and follow standards (and provide options for pre-compiling in Webpack, etc).
Well anywho, there's other projects now like hyperHTML, lit-html, etc, plus some really fast ones: https://www.stefankrause.ne...
React seems a little old now (and the new Hooks API is also resource heavy).
• Share ›  Michael Calkins trusktr • 4 years ago • edited That's a micro optimization. There isn't a big enough difference to matter unless you are building a game or something extraordinarily odd.
• Share › −  trusktr Michael Calkins • 2 years ago True, it matters if you're re-rendering the template at 60fps (f.e. for animations, or for games). If you're just changing views one time (f.e. a URL route change), then 100ms won't hurt at all.
-
- Aug 2020
-
certificates.creativecommons.org certificates.creativecommons.org
-
More information about limitations and exceptions to copyright
Under more information about limitations and exceptions to copyright add section titled Case Studies: Case studies provide valuable information relating to the state of affairs in various countries, as well as the opposing views when debating copyright issues.
- South Africa: a case study of politics and the global economics of limitations and exceptions to copyright. The current debate in South Africa regarding proposed amendments to the Copyright Bill allows showcases the different sides of the debate, and how legal frameworks, e.g. the Constitution of the Republic of South Africa also informs decision making.
- US Government Threatening To Kill Free Trade With South Africa After Hollywood Complained It Was Adopting American Fair Use Principles, by Mike Masnick, 4 November 2019.
- South Africa’s Copyright Amendment Bill – one year on, by Denise Nicholson, 30 March 2020. This work is licensed under a Creative Commons Attribution 4.0 International License.
- South Africa’s Copyright Amendment Bill Returned to Parliament for Further Consideration, Mike Palmedo, 22 June 2020. This work is licensed under a Creative Commons Attribution 4.0 International License.
- See the light and pass the Copyright Amendment Bill, by Mugwena Maluleke, Tebogo Sithathu, Jack Devnarain, Tusi Fokane, Ben Cashdan and Jace Nair, 24 June 2020. © Mail & Guardian Online.
- South African President’s Reservations to Copyright Bill Not Supported by Law, by Sean Flynn, 13 July 2020. This work is licensed under a Creative Commons Attribution 4.0 International License.
For a comprehensive list of materials relating to the South African Copyright Amendment Bill processes, see Copyright and Related Issues: USTR GSP trade threats re: Bill, list compiled and amended by Denis Nicholson
-
- Jul 2020
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
If you're having to look at GitHub, it seems like you didn't find a situation yourself where the requested feature would make you happier. I would advice you not to attempt to find use cases beforehand, just let them find you.
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
Matz, alas, I cannot offer one. You see, Ruby--coding generally--is just a hobby for me. I spend a fair bit of time answering Ruby questions on SO and would have reached for this method on many occasions had it been available. Perhaps readers with development experience (everybody but me?) could reflect on whether this method would have been useful in projects they've worked on.
-
- Nov 2019
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
You haven't shown any real use case yet. I don't deny that the functionality alone would be a good shortcut itself just like any other proposal we see every day.
-
- Jun 2019
-
docs.ethhub.io docs.ethhub.io
-
Built on Ethereum
Great resource for blockchain use cases
-
- Feb 2016
-
www.dataone.org www.dataone.org
-
Searches for tortoise food web and area meteorological data in the region at the DataONE portal. Searches for land-use histories, especially for former grazing lands. Searches for co-locality data for other animal species as possible signals for other ecological changes in the region.
-