679 Matching Annotations
  1. Mar 2024
    1. One of the first thing I noticed was the rubber on this foot was sticking. This is the resting spot for the basket shift. Moving it up or down will adjust where the lower case letters strike the platen. I removed the old sticky rubber. There are two adjustments here, you can’t see the other one, but it’s looks the same. One is for lower case letters the other is for upper case. This is called the “on feet” adjustment. If you ever have the top of an upper case letter not imprinting or not level with the lower case letters, look at this adjustment. A good way to tell is to type HhHh, and see if the bottoms of the letters line up.
    1. 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.
    2. 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.
  2. Feb 2024
    1. a fellowlexicographer and one of the Dictionary People, John Stephen Farmer, hadhis own legal drama. Farmer was writing a slang dictionary with WilliamHenley, and was struggling to publish the second volume (containing theletters C and F) of his work on grounds of obscenity. Farmer took hispublisher to court for breach of contract in 1891, and tried to convince a jurythat writing about obscene words in a dictionary did not make him personallyguilty of obscenity, but he lost the case and was ordered to pay costs.Eventually, he found fresh printers and avoided the Obscene Publications Actby arguing that his dictionary was published privately for subscribers only, notthe public, and the remarkable Slang and Its Analogues by Farmer and Henleywas published in seven volumes (from 1890 to 1904), with cunt and fuck andmany other words regarded as lewd on its pages. Farmer’s legal case and thepublic outcry that ensued was a clear deterrent for Murray.
  3. Jan 2024
    1. 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 the Animal 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 the Animal schema. When you create an instance of the Animal model (e.g., a dog), you can then call findSimilarTypes on that instance to find other animals with the same type. The method uses the this.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 the Animal model.

      Certainly! Let's go through each part and explain it in simple terms: ### 1. `this` in Mongoose: - **What is `this`?** In JavaScript, `this` refers to the current context or object. In Mongoose, particularly within methods and middleware functions, `this` represents the instance (document) the function is currently operating on. - **Why is it used?** `this` is used to access and modify the properties of the current document. For example, in a Mongoose method, `this` allows you to refer to the fields of the specific document the method is called on. ### 2. Example: Let's use the `userSchema.pre("save", ...)`, which is a Mongoose middleware, as an example: ```javascript userSchema.pre("save", async function (next) { if (!this.isModified("password")) { next(); } else { this.password = await bcrypt.hash(this.password, 10); next(); } }); ``` - **Explanation in Simple Words:** - Imagine you have a system where users can sign up and set their password. - Before saving a new user to the database, you want to ensure that the password is securely encrypted (hashed) using a library like `bcrypt`. - The `userSchema.pre("save", ...)` is a special function that runs automatically before saving a user to the database. - In this function: - `this.isModified("password")`: Checks if the password field of the current user has been changed. - If the password is not modified, it means the user is not updating their password, so it just moves on to the next operation (saving the user). - If the password is modified, it means a new password is set or the existing one is changed. In this case, it uses `bcrypt.hash` to encrypt (hash) the password before saving it to the database. - The use of `this` here is crucial because it allows you to refer to the specific user document that's being saved. It ensures that the correct password is hashed for the current user being processed. In summary, `this` in Mongoose is a way to refer to the current document or instance, and it's commonly used to access and modify the properties of that document, especially in middleware functions like the one demonstrated here for password encryption before saving to the database.

    Tags

    Annotators

    URL

    1. 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.
    2. 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.
  4. Dec 2023
  5. Nov 2023
  6. Oct 2023
    1. MYH7-V934A, MYH7-E1387K and MYH7-M877I were identified as novel MYH7 mutations causing HCM.

      Novel mutations related to Hypertrophic cardiomyopathy using exome-sequencing technology and verified by Sanger

  7. Sep 2023
    1. WORLD Italian cheesemakers microchip parmesan in bid to fight copycats BY EMMET LYONS

      AUGUST 18, 2023 / 11:45 AM / CBS NEWS

      One of the world's most famous cheeses is also one of the most counterfeited dairy products on the planet.

      Competing manufacturers have for years produced cheaper imitations of Italy's parmigiano reggiano, a favored topping for pasta and salad.

      FILE PHOTO: A storage area for Parmesan cheese wheels is pictured at storehouse shelf at 4 Madonne Caseificio dell'Emilia dairy cooperative in Modena A storage area for Parmesan cheese wheels is pictured at storehouse shelf at 4 Madonne Caseificio dell'Emilia dairy cooperative in Modena, Italy, February 16 2016. ALESSANDRO BIANCHI / REUTERS Now, the producers of parmigiano reggiano say they have innovated a way to prevent any pretenders from ripping off their product.

      Parmigiano Reggiano Consortium (PRC), the association that oversees production of the cheese, says it has been putting microchips in its product as part of a technological trial which would allow consumers to trace parmesan cheese back to its place of origin.

      Under special protections designated by the European Union, parmigiano reggiano is the only kind of cheese which can be called parmesan within Europe and it must be made in a small part of northern Italy, including in the provinces of Parma and Reggio Emilia.

      PRC are hopeful that their new technology will help to enforce that protected status. Their microchips are about the size of a grain of salt and have been inserted into the labels found on the rind of about 120,000 wheels of parmigiano reggiano. The chips work as scannable food tags with a QR code label (link)

    1. 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.

  8. Aug 2023
    1. 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.
  9. May 2023
    1. Please can we (a) retain case information from the email address the student uses to set up their account (in case their mailbox is case sensitive), and use that when sending password reset emails, etc., but also (b) when checking credentials for login or setting up an account, treat the email address as non-case-sensitive. The upshot would be if someone registered with Student@City.ac.uk, all emails would go to Student@City.ac.uk, but the student would be able to log in with student@city.ac.uk, and if someone later tried to set up an account with student@city.ac.uk they'd be told that the user already exists.
    2. Although there's an argument for keeping case sensitivity for the local mailbox (as they can be case sensitive, depending on how they're set up, though I haven't come across case sensitivity in university emails), the domain part of the email address is not case sensitive and should not be treated as such. Please can we (a) retain case information from the email address the student uses to set up their account (in case their mailbox is case sensitive), and use that when sending password reset emails, etc., but also (b) when checking credentials for login or setting up an account, treat the email address as non-case-sensitive. The upshot would be if someone registered with Student@City.ac.uk, all emails would go to Student@City.ac.uk, but the student would be able to log in with student@city.ac.uk, and if someone later tried to set up an account with student@city.ac.uk they'd be told that the user already exists.
    1. If you are storing email addresses then you probably should store them in their original case (the recipient at least) to be safe. However, always compare them case-insensitively in order to avoid duplicates.
    1. However, it's difficult to rely on a case-sensitive email address in the real world because many systems (typically ones that have to handle data merging) don't preserve case. Notably systems that use email addresses for user IDs, or any system that has to collate data from multiple sources (CRMs, email broadcast systems, etc) will either normalise case or treat them case-insensitively.
    2. However, for all practical purposes in the modern age, I believe you can consider email addresses to be case insensitive.
    1. a SHOULD is always trumped in RFCs by a MUST. The fact that hosts SHOULD do something means that they might not and I just wanted reassurance that, in reality, the SHOULD is a bit more widely adopted than its definition implies.
    1. While email addresses are only partially case-sensitive, it is generally safe to think of them as case insensitive. All major providers, such as Gmail, Yahoo Mail, Hotmail, and others, treat the local parts of email addresses as case insensitive.
    2. According to RFC 5321, the local part of the email address is case sensitive. This means that, in theory, SoMething@something.com is not the same as something@something.com. However, email providers have the liberty to treat the local parts as both case sensitive and case insensitive.
    1. Are Email Addresses Case Sensitive? Technically, the answer is yes. However, email addresses are typically not case sensitive; if you type your email address into a form and accidentally capitalize one or two letters, it probably won’t prevent the sender from emailing you.
    2. The local part does, in fact, take the case into account, as per RFC 5321. However, Email Service Providers (ESPs) are aware of the potential confusion that could result from allowing upper-case letters.
    1. In short, while it’s technically possible to make the part before @ case sensitive, most popular email servers do not allow that. 
    2. Most big email providers like Gmail, Outlook and even company email address hosted on Google Suite are not case sensitive. Just to avoid any unnecessary confusion. However, in extreme cases, some large companies, implement case sensitivity on their server as some people can often have the same first and last name. But in general, this creates more confusion, than the usability, which is why most standard email providers avoid case sensitivity. 
    1. Either way, at some point almost everyone started treating addresses as case-insensitive.
    2. Despite it being commonplace to “fix up” email addresses by lowercasing them — or, in financial/government contexts, uppercasing them — email addresses are clearly defined as case-sensitive in the only standard that matters.
    1. Since using case insensitivity is so widespread, take their sign up email address and make it lower case. Whenever they try to log in, convert that to lowercase as well, for comparison purposes, when you go to see if the user exists. As far as sign up and sign in go, do a case insensitive comparison. If the person signs up as Steve@example.com, you'll still want to allow them to sign in later with steve@example.com or sTeVE@example.com.
    2. But you should also keep track of the email address that they signed up with in a case sensitive fashion. Any time you send an email to them, be sure to send it with that original casing. This allows the email server to handle it however it feels like it needs to. So even though the person may always be signing in to your site with steve@example.com, if they signed up as Steve@example.com, you'll always send email to Steve@example.com, just to be safe.
    3. The de facto standard is to treat local mailboxes as case insensitive, but the official standard says case matters (though even the official standard mentions the de facto standard).
    1. So yes, the part before the "@" could be case-sensitive, since it is entirely under the control of the host system. In practice though, no widely used mail systems distinguish different addresses based on case.
    2. In short, you are safe to treat email addresses as case-insensitive.
    1. Since the case sensitivity of email addresses can create confusion and delivery problems, most email providers and clients either fix the case if the email address is entered in the wrong case, or they ignore upper-case entries. Not many email services or ISPs enforce case-sensitive email addresses.
    1. 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.

    1. articulates requirements for readability sating that identifiers must be: Any printable characters from the Universal Character Set of ISO/IEC 10646 (ISO 2012):UTF-8 encoding is required; Case insensitive:Only ASCII case folding is allowed.

      {UTF-8} {ASCII Case Folding}

  10. Apr 2023
    1. Clearly this type of reasoning has an argumentation scheme. One premisedefines or describes a goal. The other premise describes a means of achieving thegoal. The conclusion directs the agent towards action to carry out the means.6But this type of reasoning is so common and distinctive, having manyvariants and subspecies of argumentation, that it is misleading to call it anargumentation scheme. Better to call it a type of reasoning that can be used inargumentation in different types of dialogue (as in Walton, What Reas., 1990).
      • Agential Network
      • Case and Inferential Qualifications
      • Conclusions and Goal Relations
      • Normative Framework
    2. A person who puts forward an argumentation anticipates criticism, and bychoosing a particular type of argumentation, using the one argumentationscheme rather than the other, he implies that he thinks he knows which routewill lead to the justification of his standpoint. At any rate, whether he reallythinks this or not, if he is to be taken seriously by the other party, he may beheld to be committed to deal with the critical questions which pertain to ajustification via the argumentation scheme that is inherent in his argumentation.In relying on a certain argumentation scheme, the arguer invokes a particular testing method in a dialectical procedure, in which certain criticalreactions are relevant, and others not. Each argumentation scheme calls, as itwere, for its own set of critical reactions. In conjunction with each other,these reactions constitute a well-rounded test for checking the soundness of anargumentation of the type concerned. (p. 98)This way of describing argumentation schemes suggests that they are normativelybinding, in the following sense. If the hearer accepts the premises of the speaker'sargument, and the argument is an instance of a genuine and appropriate argumentation scheme (for the type of dialogue they are engaged in), then the hearer mustor should (in some binding way) accept the conclusion. This does not appear to be"validity" in the same sense in which the word is familiarly used in deductive (orperhaps even inductive) logic. But it does appear to express a normative or broadlylogical sense of validity, bindingness, conditional acceptability, or whatever youwant to call it
      • Initial Speaker has goal in mind thus presents reasoning that invites particular types of attention
      • This includes Supportive and Critical attention
      • The reasoning is normative in that it conformism to the shared communicative standards. Not definitive logical ones.
    3. Arguments like the one in Case 1 . 1 lie on a razor's edge: They are somewhatweak and unreliable, and apt to fail occasionally, but they are not so bad or inherently erroneous that they should be called "fallacious" in all instances. On theother hand, they can tum out to be fallacious, in some cases. And, in particular,they run the risk of committing the secundum quid fallacy as quite a general sort offailure they are prone to. If this is right, a new approach to fallacies is called foran approach that takes more care in assessing the particulars of a given case.In arguments like the one in Case 1 . 1 , the premise, if true in a given case,does give a reason for accepting the conclusion. But it is not a conclusive reason,and it is subject to default relative to what is known (or becomes known) of thefurther circumstances of the case. The problem then is to find the underlying structure of inference in such a case that enables one to identify and test the correctness(or incorrectness) of the argument as an instance of an argumentation scheme
      • Case = Argumentative Stage in the Sequence of Goal Statements
      • All Cases generate infernal qualifications.
      • Inferential Qualifications give rise to conclusions
      • Qualification to Conclusion = Argument
      • Arguments Relate to Goal.
    1. Recommended Resource

      Since Unit 4 mentions some CC license infringement cases as examples, I recommend adding a court case from the Netherlands of a photographer suing a website for using their photo without permission or compensation. The name of the court case is below.

      ECLI:NL:RBMNE:2021:5887

      The court case ended with the judge awarding the photographer (plaintiff) the following damages (excerpt is from the court case records).

      "5.4. orders [defendant] to pay to [plaintiff] against proof of discharge:

      € 450.00 in damages, increased by the statutory interest as referred to in Article 6:119 of the Dutch Civil Code, with effect from 11 June 2021 until the day of full payment,

      € 67.50 in extrajudicial collection costs,

      5.5. orders [defendant] to pay the costs of the proceedings on the part of [plaintiff], estimated at € 2,036.30 until the judgment of this judgment, of which € 1,702.00 in salary for the authorized representative."

      This case demonstrates the enforceability of the CC license in other countries, such as the Netherlands.

  11. Mar 2023
  12. Jan 2023
  13. Nov 2022
    1. It can be useful to use with keywords argument, which required symbol keys.
    1. 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.
    1. Post.in_order_of(:type, %w[Draft Published Archived]).order(:created_at).pluck(:name) which generates SELECT posts.name FROM posts ORDER BY CASE posts.type WHEN 'Draft' THEN 1 WHEN 'Published' THEN 2 WHEN 'Archived' THEN 3 ELSE 4 END ASC, posts.created_at ASC
  14. Oct 2022
    1. Your alternator is NOT a chargerThe alternator’s job is to supply the power needed for all electrical items on the vehicle, plus replenish the battery from the last start up. The alternator is not a battery charger so much as it is a battery maintainer. If the alternator has to recharge an overly discharged battery, the alternator will become over-worked, which will shorten its life.If you use your alternator to charge your dead battery, you will overheat the alternator during its charging process. The greater the amperage flowing through it, the higher the heat an alternator creates.Maximum Alternator Output Only Occurs at high RPMSAfter you start your car with jumper cables, the voltage regulator sees a discharged battery and commands maximum field in the rotor. But at 600 RPM, the alternator can only provide about 1/4th of its rated output. Let it idle for a long period and all you’ll do it overheat the rotor windings and burn up your expensive alternator. A 110-amp alternator can only output 110-amps at RPMS of 2,500 or more. So don’t even think about letting it idle to recharge the battery.A battery charger costs $40. A new Alternator $350Not exactly brain surgery, is it?The correct way to deal with this situation is to jump the battery (using a jumper pack is much safer than jumper cables) and driving it to a place where you can place a REAL battery charger on the battery.
    1. This was much more of an issue a generation ago, when your ‘74 Chevy Nova or ‘69 Ford F-100 had a 35 amp alternator. Any car made in the last 15-20 years will have a 75 amp alternator as a bare minimum, and ratings well north of 100 amps are common in larger vehicles.There’s dozens of amps of headroom to charge the battery at idle speed, especially if you turn off the lights, stereo, HVAC, etc. That said, it’ll charge even more quickly if you drive the car.

      In reply to: https://hyp.is/YNQwwlF0Ee206UcS3HYLnA/www.reddit.com/r/Cartalk/comments/aoks7b/how_much_idling_needed_after_jump_start_to/

      This seems like more sound/trustworthy advice than the replied-to's advice/info.

    2. This will KILL your alternator. You should get a battery charger or a trickle charger. Alternators go through hell when trying to recharge a fully depleted battery.
  15. Sep 2022
    1. in my personal opinion, there shouldn't be a special treatment of do-end blocks in general. I believe that anything that starts a "block", i.e. something that is terminated by and end, should have the same indentation logic
    1. 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.
    1. https://www.amazon.com/s?k=math+demystified&i=stripbooks&crid=UM15P2ZTY84C&sprefix=math+demystified%2Cstripbooks%2C137&ref=nb_sb_noss_2

      A whole series of books from McGraw Hill whose titles all carry an implicit math shaming. Who wants to carry these books around and be seen reading them? Even the word DeMYSTiFieD on the cover is written in CLoWn case.

      • Business Math Demystified
      • Dosage Calculations and Basic Math for Nurses Demystified
      • Geometry Demystified
      • Business Calculus Demystified
      • Math Word Problems Demystified
      • Everyday Math Demystified
      • Discrete Mathematics Demystified
      • Math Proofs Demystified
      • Pre-Algebra Demystified
  16. Aug 2022
    1. It seems to me that they tried to roboticize a manufacturing process for a product that was designed to be manufactured by humans. Rookie mistake.

      If they want to automate construction of Mac products, they'll have to redesign the product to fit the constraints of robotic manufacture.

    1. Dr Dan Goyal. (2022, March 15). What’s been happening This Week in Covid? The schism between reality and policy grew even wider this week... Omicron B.2 sent cases soaring and stock markets sinking! #TheWeekInCovid [Tweet]. @danielgoyal. https://twitter.com/danielgoyal/status/1503699425427968001

    1. ReconfigBehSci. (2021, December 13). RT @DrEricDing: 11) Omicron is doubling every 1.6 days in UK 🇬🇧 according to @DrWilliamKu’s figure. That’s way faster growth than in South… [Tweet]. @SciBeh. https://twitter.com/SciBeh/status/1470451594378502154

    1. John Burn-Murdoch. (2021, November 25). Five quick tweets on the new variant B.1.1.529 Caveat first: Data here is very preliminary, so everything could change. Nonetheless, better safe than sorry. 1) Based on the data we have, this variant is out-competing others far faster than Beta and even Delta did 🚩🚩 https://t.co/R2Ac4e4N6s [Tweet]. @jburnmurdoch. https://twitter.com/jburnmurdoch/status/1463956686075580421

    1. ReconfigBehSci. (2021, December 9). a rather worrying development- a (local) newspaper “fact checking” the new German health minister simply by interviewing a virologist who happens to have a different view. There’s simply no established “fact” as to the severity of omicron in children at this point in time [Tweet]. @SciBeh. https://twitter.com/SciBeh/status/1469037817481334786

    1. 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.

    1. 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.
    1. It's a great way to test various limits. When you think about this even more, it's a little mind-bending, as we're trying to impose a global clock ("who is the most up to date") on a system that inherently doesn't have a global clock. When we scale time down to nanoseconds, this affects us in the real world of today: a light-nanosecond is not very far.
    2. Which of these to use depends on the result you want. Note that by the time you get the answer, it may be incorrect (out of date). There is no way to fix this locally. Using some ESP,2 imagine the remote you're contacting is in orbit around Saturn. It takes light about 8 minutes to travel from the sun to Earth, and about 80 to travel from the sun to Saturn, so depending on where we are orbitally, they're 72 to 88 minutes away. Any answer you get back from them will necessarily be over an hour out of date.
    3. When we have our git rev-parse examine our Git repository to view our origin/HEAD, what we see is whatever we have stored in this origin/HEAD. That need not match what is in their HEAD at this time. It might match! It might not.
    4. Exaggeration of System Parameters
  17. Jun 2022
  18. May 2022
    1. 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

    1. 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?

    2. 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.
    1. DICER1 syndrome is an autosomal-dominant,pleiotropic, tumor-predisposition disorder arisingfrom pathogenic germline variants in DICER1, whichencodes an endoribonuclease integral to processingmicroRNAs

      DICER1 is the gene name. PubMed ID, HGCNCID, and Variant: I can't find Inheritance Pattern: autosomal-dominant The disease entity: DICER1 syndrome The type of mutation: germline. Zygosity: not known. Family Information: a family was used, DICER1 carriers, and non DICER1 variant used, some of the family members had tumors from DICER1 Case Information: mean age is 34, the range of age is 18.6 to 43 years, male, and female used, ethnicity can't find Case Presenting HPO: cancer testing, chemotherapy, radiotherapy gnomeAD: 9.2,8.3.2 Mutation type: Pleiotropic, loss of function, missense

  19. Apr 2022
    1. They coincide in most cases, but they don't if there are series of consecutive uppercase letters as in "HTMLParser"
    1. 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.
    2. There are project layouts that put implementation files and test files together.
    3. Let's suppose that your gem decorates something in Kernel:
    1. if Rails.application.config.reloading_enabled? Rails.autoloaders.main.on_unload("Country") do |klass, _abspath| klass.expire_redis_cache end end
    2. If your application decorates classes or modules from an engine,
    3. Some projects want something like app/api/base.rb to define API::Base, and add app to the autoload paths to accomplish that.
    4. 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.
    1. To drive this point home:

      I sometimes get people who balk at my characterization of GitHub-style anti-wikis as being inferior to, you know, actual wikis. "You can just use the GitHub UI to edit the files", they'll sometimes say.

      A case study: a couple days ago, I noticed that the lone link in the current README for Jeff Zucker's solid-rest project is a 404. I made a note of it. Just now, I reset my GitLab password, logged in to solid/chat, and notified Jeff https://gitter.im/solid/chat?at=611976c009a1c273827b3bd1. Jeff's response was, "I'll change it".

      This case is rich with examples of what makes unwikis so goddamn inefficient to work with. First, my thought upon finding the broken link was to take note of it (i.e. so that it can eventually be taken care of) rather than fixing it immediately, as would have been the case with a wiki. More on this in a bit. Secondly, my eventual action was still not something that directly addressed the problem—it was to notify someone else† of the problem so that it might be fixed by them, due to the unwiki nature of piles of Git-managed markdown. Thirdly, even Jeff's reflex is not to immediately change it—much like my reaction, his is to note the need for a fix himself and then to tell me he's going to change it, which he will presumably eventually do. Tons of rigamarole just to get a link fixed‡ that remains broken even after having gone through all this.

      † Any attempt to point the finger at me here (i.e. coming up short from having taken the wrong action—notifying somebody rather than doing it myself) would be getting it wrong. First, the fact that I can't just make an edit without taking into account the myriad privacy issues that GitHub presents is materially relevant! Secondly, even if I had been willing to ignore that thorn (or jump through the necessary hoops to work around it) and had used the GitHub web UI as prescribed, it still would have ended up as a request for someone else to actually take action on, because I don't control the project.

      ‡ Any attempt to quibble here that I'm talking about changing a README and not (what GitHub considers) a wiki page gets it wrong. We're here precisely because GitHub's unwikis are a bunch of files of markdown. The experience of changing an unwiki page would be rife with the same problems as encountered here.

    1. 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:
    2. 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:

    1. 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?
    2. 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.
    1. 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.
    1. 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.
  20. Mar 2022
    1. 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.

    1. 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.
    1. 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.
    2. class PreDeployMigration < ActiveRecord::Migration tag :predeploy end
    3. This is especially useful for zero downtime deploys to Production environments.
  21. Feb 2022
    1. 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.
    1. Deepti Gurdasani. (2022, January 29). Going to say this again because it’s important. Case-control studies to determine prevalence of long COVID are completely flawed science, but are often presented as being scientifically robust. This is not how we can define clinical syndromes or their prevalence! A thread. [Tweet]. @dgurdasani1. https://twitter.com/dgurdasani1/status/1487366920508694529

  22. Jan 2022
    1. Can Windows/Linux not rename a file while it’s open, show a folder’s size, or rename a document from within its app window?

      Case study in equivocation.

    1. Olson, S. M., Newhams, M. M., Halasa, N. B., Price, A. M., Boom, J. A., Sahni, L. C., Pannaraj, P. S., Irby, K., Walker, T. C., Schwartz, S. P., Maddux, A. B., Mack, E. H., Bradford, T. T., Schuster, J. E., Nofziger, R. A., Cameron, M. A., Chiotos, K., Cullimore, M. L., Gertz, S. J., … Randolph, A. G. (2022). Effectiveness of BNT162b2 Vaccine against Critical Covid-19 in Adolescents. New England Journal of Medicine, 0(0), null. https://doi.org/10.1056/NEJMoa2117995

    1. 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.
    1. 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.
  23. Dec 2021
    1. Green computing, or green information technology, is the practice of environmentally sustainable computing. In this article we take a closer look at: * Greening the workplace. * A green workplace business case. * Opportunities to make Data Centers greener by: - ​​Other IT equipment. - The cooling of IT spaces. - The data center buildings.

      Green computing : Workplace and data center, a real business case https://en.itpedia.nl/2021/12/11/green-computing-werkplek-datacenter-business-case/ Green computing, or green information technology, is the practice of environmentally sustainable computing. In this article we take a closer look at: Greening the workplace. A green workplace business case. * Opportunities to make Data Centers greener by: - ​​Other IT equipment. - The cooling of IT spaces. - The data center buildings.

    1. the Center for CommunityChange (CCC)

      The case

    Tags

    Annotators

    1. Thiruvengadam, R., Awasthi, A., Medigeshi, G., Bhattacharya, S., Mani, S., Sivasubbu, S., Shrivastava, T., Samal, S., Rathna Murugesan, D., Koundinya Desiraju, B., Kshetrapal, P., Pandey, R., Scaria, V., Kumar Malik, P., Taneja, J., Binayke, A., Vohra, T., Zaheer, A., Rathore, D., … Garg, P. K. (2021). Effectiveness of ChAdOx1 nCoV-19 vaccine against SARS-CoV-2 infection during the delta (B.1.617.2) variant surge in India: A test-negative, case-control study and a mechanistic study of post-vaccination immune responses. The Lancet Infectious Diseases, S1473309921006800. https://doi.org/10.1016/S1473-3099(21)00680-0

  24. Nov 2021
    1. Thiruvengadam, R., Awasthi, A., Medigeshi, G., Bhattacharya, S., Mani, S., Sivasubbu, S., Shrivastava, T., Samal, S., Murugesan, D. R., Desiraju, B. K., Kshetrapal, P., Pandey, R., Scaria, V., Malik, P. K., Taneja, J., Binayke, A., Vohra, T., Zaheer, A., Rathore, D., … Garg, P. K. (2021). Effectiveness of ChAdOx1 nCoV-19 vaccine against SARS-CoV-2 infection during the delta (B.1.617.2) variant surge in India: A test-negative, case-control study and a mechanistic study of post-vaccination immune responses. The Lancet Infectious Diseases, 0(0). https://doi.org/10.1016/S1473-3099(21)00680-0

    1. McNamara, L. A., Wiegand, R. E., Burke, R. M., Sharma, A. J., Sheppard, M., Adjemian, J., Ahmad, F. B., Anderson, R. N., Barbour, K. E., Binder, A. M., Dasgupta, S., Dee, D. L., Jones, E. S., Kriss, J. L., Lyons, B. C., McMorrow, M., Payne, D. C., Reses, H. E., Rodgers, L. E., … Schrag, S. J. (2021). Estimating the early impact of the US COVID-19 vaccination programme on COVID-19 cases, emergency department visits, hospital admissions, and deaths among adults aged 65 years and older: An ecological analysis of national surveillance data. The Lancet, 0(0). https://doi.org/10.1016/S0140-6736(21)02226-1

  25. Oct 2021
    1. mirtazapine is used to treat akathisia probably because of its antagonistic property at H1 postsynaptic receptors and dopaminergic action in the frontal cortex.

      That's an interesting hypothesis. I wouldn't have thought histamine was involved. Though, histamine being a stimulant, it also makes some sense. I'd have thought the primary mechanism is serotonin blockade, which would work in part by dopamine dis-inhibition as mentioned here.