35 Matching Annotations
  1. Feb 2025
    1. “[Weimar]… Yes, we all know how it ends. But its participants… could have no idea what was in store for them. Will we be any the wiser? I ask because Weimar now beckons us. But, not at all in the way we think. We think about Weimar only in terms of the weakening of American democracy. While we should really think about it in terms of the world."

      for - Charlie Angus - quoting Robert D. Kaplan - Weimar moment - SOURCE - Substack article - Weimar and the Super Bowl - Trump 2.0 - Weimar republic - rise of Hitler - Charlie Angus - 2025, Feb 7

      Comment - This is a very appropriate quote as it is not just a national threat, but a global one - Steve Bannon and others have been criss-crossing the globe priming other far-right movements - It is also the case that most people are underestimating the slippery slope we are sliding down, - just as the people supporting Hitler at the time of Hitler's ascendency were not aware that he was going to cause a genocide - Would these people have gone along with Hitler if they knew in the early days what we now know?

  2. Jan 2025
  3. Dec 2024
    1. Curiosity is not just this intellectual tool, it's also this heart-centered force that we can bring into our life,

      for - quote - curiosity is not just an intellectual tool - from TED Talk - Can curiosity heal division? - Scott Shigeoka - 2024 Dec

      quote - curiosity is more than a tool - (see below) - Curiosity is not just this intellectual tool, - u t's also this heart-centered force that we can bring into our life, and - I think it's a practice we really need right now in our country and in the world. - It also reminds us to look for the good in our lives and not just focus on the bad. - It reminds us to look for what’s uniting our communities and our country and - not to just focus on what's fracturing and dividing us. - It also tells us to prioritize the questions that we're asking, as an important step to problem-solving, because - we can't just focus on the answers,

    1. when I've worked with pre and perinal psychology people think oh well this is psychology this is mental health but really it's not it's more than that it's a holistic Body Mind practice where implicit somatic memory is alive and active and actually informing how we behave and choices that we make in the present

      for - prenatal and perinatal psychology - is not just mental health - it's holistic mind body practice - somatic memories are alive in our body right now - Youtube - Prenatal and Perinatal Healing Happens in Layers - Kate White

    2. we work with more senses than TW than five there are 12

      for - prenatal and perinatal psychology - there are 12 senses, not just 5 - Youtube - Prenatal and Perinatal Heaing Happens in Layers - Kate White

  4. Oct 2024
    1. but people wanting to take projects on that can produce things in the world that get things done.

      for - similarity - not just talk, make an impact

      similarity - not just talk, make an impact - I think many of us are of like-mind. Surveying the precarity of the current polycrisis, there is immense complexity and very little time - Given these challenging circumstances, it behooves us to perform very careful sense-making to identify both the individual and the collective leverage points that will have the greatest impact in the shortest time - This also means we have to be careful of which groups we choose to work with as an optimal set of synergies is required if the group is to have possibility of reaching the greatest impact collectively

  5. Jul 2024
    1. Given that assumptions of quantitativegrowth are pervasive in our society andhave been present for many generations,it is perhaps not surprising that growth isnot widely understood to be a transientphenomenon. Early thinkers on the physicaleconomy, such as Adam Smith, ThomasMalthus, David Ricardo and John Stuart Millsaw the growth phase as just that: a phase9

      for - quote - economic growth - pioneering economists saw growth not as permanent, but as just a temporary phase

      quote - economic growth - pioneering economists saw growth not as permanent, but as just a temporary phase - (see below) - Given that - assumptions of quantitative growth are pervasive in our society and - have been present for many generations, - it is perhaps not surprising that growth is not widely understood to be a transient phenomenon. - Early thinkers on the physical economy, such as - Adam Smith, <br /> - Thomas Malthus, - David Ricardo and - John Stuart Mill - saw the growth phase as just that: a phase

  6. Jun 2024
    1. it’s important to know that it is the perfection of wisdom rather than the perfection of meditation that is stressed as the key to attaining enlightenment.

      for - quote - HH Dalai Lama - attaining enlightenment through wisdom, not just meditation

      quote - HH Dalai Lama - attaining enlightenment through wisdom, not just meditation - (see below) - Even today I meet Buddhists in Japan for example - who tell me that Buddhahood can be attained through non-conceptual meditation, - but there seems little room for wisdom. - I feel it’s important to know that - it is the perfection of wisdom rather than - the perfection of meditation - that is stressed as the key to attaining enlightenment

  7. 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. I feel that the current design area should be a key part of the workflow on any work item, not just type of designs. As a PM I don't schedule designs independently. It's odd to open and close a design issue when it doesn't deliver value to the customer.
  8. Jun 2023
  9. Mar 2023
  10. Oct 2022
    1. The problem is that the caller may write yield instead of block.call. The code I have given is possible caller's code. Extended method definition in my library can be simplified to my code above. Client provides block passed to define_method (body of a method), so he/she can write there anything. Especially yield. I can write in documentation that yield simply does not work, but I am trying to avoid that, and make my library 100% compatible with Ruby (alow to use any language syntax, not only a subset).

      An understandable concern/desire: compatibility

      Added new tag for this: allowing full syntax to be used, not just subset

  11. Aug 2022
    1. I'm building a Rails API with a separate web frontend app as "just another API client" (various smartphone apps to follow as well). In the previous "monolithic" version of the service, where all the server side was rolled into one Rails app
  12. Sep 2021
    1. Let's not get over-excited. Actually, we're only part-way there; you can compile this code with the TypeScript compiler.... But is that enough?I bundle my TypeScript with ts-loader and webpack. If I try and use my new exciting import statement above with my build system then disappointment is in my future. webpack will be all like "import whuuuuuuuut?"You see, webpack doesn't know what we told the TypeScript compiler in the tsconfig.json.
  13. Jun 2021
  14. Mar 2021
  15. Feb 2021
    1. which entails computer programming (process of writing and maintaining the source code), but also encompasses a planned and structured process from the conception of the desired software to its final manifestation
  16. Jan 2021
    1. Most users frankly don’t care how software is packaged. They don’t understand the difference between deb / rpm / flatpak / snap. They just want a button that installs Spotify so they can listen to their music.
    2. What’s the use of ie. snap libreoffice if it can’t access documents on a samba server in my workplace ? Should I really re-organize years of storage and work in my office for being able to use snap ? A too high price to pay, for the moment.
  17. Nov 2020
    1. This is Sass based, and therefore doesn't require Svelte components

      Just because we could make Svelte wrapper components for each Material typography [thing], doesn't mean we should.

      Compare:

      • material-ui [react] did make wrapper components for typography.

        • But why did they? Is there a technical reason why they couldn't just do what svelte-material-ui did (as in, something technical that Svelte empowers/allows?), or did they just not consider it?
      • svelte-material-ui did not.

        • And they were probably wise to not do so. Just reuse the existing work from the Material team so that there's less work for you to keep in sync and less chance of divergence.
  18. Oct 2020
  19. Sep 2020
  20. Apr 2020
    1. Surely all Uber drivers were submitted to the same labor regime, but those who had to endure it as a means to survive were predominantly people of color.

      This is also true of companies like Instacart, GrubHub,etc.

  21. Jul 2019
  22. Apr 2017