53 Matching Annotations
  1. Mar 2024
    1. 29:40 Demonising "toxic masculinity" makes it grow stronger

      See this in relation to Dune 2 scene in which the princess comments to the emperor that "Surpressing the prophet (Paul) will only make the religion grow"

  2. 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. the canonical unit, the NCU supports natural capital accounting, currency source, calculating and accounting for ecosystem services, and influences how a variety of governance issues are resolved
      • for: canonical unit, collaborative commons - missing part - open learning commons, question - process trap - natural capital

      • comment

        • in this context, indyweb and Indranet are not the canonical unit, but then, it seems the model is fundamentally missing the functionality provided but the Indyweb and Indranet, which is and open learning system.
        • without such an open learning system that captures the essence of his humans learn, the activity of problem-solving cannot be properly contextualised, along with all of limitations leading to progress traps.
        • The entire approach of posing a problem, then solving it is inherently limited due to the fractal intertwingularity of reality.
      • question: progress trap - natural capital

        • It is important to be aware that there is a real potential for a progress trap to emerge here, as any metric is liable to be abused
  3. Dec 2023
    1. Glossary of some important musical terms
  4. Jul 2023
  5. Jun 2023
    1. Chapter 5 expands the repository of harmonic structures to 35 five-part chords. They aredivided into five categories: major, minor, dominant 7th, suspended dominant, and inter-mediary

      Chordal extensions consist of different forms of the ninth, the eleventh, and the thirteenth and can be divided into two broad categories: diatonic and chromatic. Diatonic extensions enhance the structure of chords, whereas chromatic extensions modify that structure in a considerable way. The ninth has three distinct forms: a diatonic major 9th, a chromatic ≤9th, and a chromatic ≥9th. The eleventh has two forms: a diatonic perfect 11th and a chromatic ≥11th. The thirteenth has two forms: a diatonic major 13th and a chromatic ≤13t

    2. The intermediary category contains three modes: Dorian, Locrian, and Locrian Ω2
  6. Apr 2023
    1. The "validity" such an argument has(if that is the right word) is presumptive and provisional in nature.5 It is frail, andsubject to default.Even so, such presumptively based arguments can be very useful and important in cases where action must be taken, but firm evidence is not presently available. Examples would be in planning, where the future holds many uncertainties,or in practical deliberation, where prudent action often requires acting on provisional hunches and guesswork, always subject to revision, as better informationcomes in.
      • Provisional Validity is useful
      • Provisional Validity for Statements Goal
      • Criticism Contests Provisional Validity.
    2. According to the pragma-dialectical theory of vanEemeren and Grootendorst, Blair noted, "sufficiency is a function of appropriatelymeeting the critics' challenges to premises and inferences" (p. 3 32) . Blair alsonoted that this means that an argument can rightly be said to be sufficient for itsconclusion in this sense when it meets its burden of proof3 relying on "what maybe presumed without or accepted without further question" (p. 333)
      • Argument Generative Statement Based on proof.
      • Critical Statement test Burden of Proof and Generative Efficiency.
      • Meeting and Satisfying Criticism is part of Generative Process.
      • Pragma-Dialectical Theory
    3. What has been shown, instead, is that each of these types of argumentationis tentative and inconclusive-open to critical questioning-while still being strongenough, in many cases, to have some degree of bindingness or logical correctnessin transferring acceptance from the premises to the conclusion. However, thebindingness is not of an unconditional or absolute kind-like deductive validity.Instead, it is a kind of tentative or provisional acceptance that is involved, (i.e.,"Now I have accepted these premises, I am bound to tentatively accept the conclusion, for the sake of argument or discussion,
      • Informal Arguments
      • Tentative or Plausible Reasoning Structure rather than definitive. Bound to evidential contestation.
    1. Sorkin had been a heavy smoker since high school — two packs a day of Merits — and the habit had long been inextricable from his writing process. “It was just part of it, the way a pen was part of it,” he said. “I don’t want to talk about it too much, because I’ll start to salivate.”

      For Aaron Sorkin smoking was a tool that was part of his writing process.

  7. Sep 2022
  8. Aug 2022
      • When considering the work of social reproduction in the University, I suggest we focus our attention to two interrelated and crucial sites: the reproduction of the University itself, and the reproduction of the subject (the student-self).
      • Mapping social reproduction in the University uncovers the racism and patriarchy at work. As the neoliberal university seeks to market its diversity and multiculturalism, it requires those diverse bodies to do the work of reproducing the university as such.
  9. Jun 2022
    1. Referencing Intersections and Dialectics, McNally identifies in liberalism what he calls "social Newtonianism." In this theoretical framework, "things—be they entities, processes, or relations—can thus only be understood as utterly discrete atomic bits whose identities exclude the co-constituting effects of others," a critique which he applies doubly to liberalism and strains of intersectional theory. (McNally, 97) In a much less radical sense, we can understand social Newtonianism to be constitutive of the faux-progressivism of the neoliberal university, in which Contemporary DEI is an entrenched set of discourses. The production of social atomism amongst the working class is essential to ruling class ideology, and by extension managerial rationality. Managerial rationalities within the university are thus accepting of a watered-down form of intersectionality--one that leans into social Newtonianism and discourages class analysis. For this reason, among others, SRT provides resources to combat institutional discourse on race, gender and inequality.

    2. One understanding of social reproduction is that it isabout two separate spaces and two separate processes of production: theeconomic and the social—often understood as the workplace and home.In this understanding, the worker produces surplus value at work andhence is part of the production of the total wealth of society. At the end ofthe workday, because the worker is “free” under capitalism, capital mustrelinquish control over the process of regeneration of the worker andhence the reproduction of the workforce. The corpus of social relationsinvolving regeneration—birth, death, social communication, and soon—is most commonly referred to in scholarly as well as policy literatureas care or social care

      In the residential university, the economic and social life of the student are collapsed. In this sense, the labor of being surveilled and the production of human capital through all social processes inherent to regimes of managerial rationality, is panoptical, totalizing.

    3. The volume is premised upon the understanding that “in capitalistsocieties the majority of people subsist by combining paid employmentand unpaid domestic labor to maintain themselves . . . [hence] thisversion of social reproduction analyzes the ways in which both laborsare part of the same socio-economic process.”

      Part 2 aims to supplement the economic questions addressed in Part 1 to fully account for the vast unpaid and uncompensated labor that constitutes the labor process within the university. A proper analysis of labor in the university, and Contemporary DEI's role in facilitating it is to understand the socio-economic productive and reproductive forces that produce student, faculty and administrative subjectivity.

    4. apitalism, however, acknowledgesproductive labor for the market as the sole form of legitimate “work,”while the tremendous amount of familial as well as communitarian workthat goes on to sustain and reproduce the worker, or more specificallyher labor power, is naturalized into nonexistence.

      In the racialized and gendered capitalism that produces DEI, embodying diversity and similar forms of labor are made invisible as such.

  10. May 2022
    1. They found that digital participation differs in crucial ways,depending on whether it is “friendship-driven” or “interest-driven” par-ticipation.

    Tags

    Annotators

  11. Sep 2021
  12. Jun 2021
  13. Feb 2021
    1. The rationale is that it's actually clearer to eager initialize. You don't need to worry about timing/concurrency that way. Lazy init is inherently more complex than eager init, so there should be a reason to choose lazy over eager rather than the other way around.
    1. So what's the worst part? Well, if you're like most entrepreneurs, marketers, and salespeople... it's finding your potential clients' email addresses to reach them out. (Yawn... I almost fall asleep just writing about it.) You see, it's boring and time-consuming, you wish you could skip this part and go straight to the sales process.
    2. What's the best part about running a business? You know, it's closing the deals and counting the money.
  14. Oct 2020
  15. Sep 2020
    1. There is interactive state as well. What about modals that come up because something is clicked? What is the active tab? Is this menu open or closed? What scroll position are they at? There are infinite permutations of this. Imagine a warning bar that shows up seven seconds after the user logs in to warn user about their expired credit card which contains a custom styled select menu which can be in an open or closed state, but only on the user settings page.
    2. Remember the timing thing? We might think of timing as one generic form of state. There are countless other things that could be state related. Is the user logged in or not? What plan are they on? Is their credit card expired thus showing some kind of special message? Do situational things like time/date/geolocation change state? What about real-time data? Stuff from an API?
    1. Slide 13:

      “No man ever steps in the same river twice, for it's not the same river and he's not the same man.”

      ― Heraclitus

      Of course it’s not the same river — the river, is, what? The water flowing past your feet? The sound that it makes? These things are different at every moment. Our idea of ‘the river’ doesn’t correspond to anything in the real world. Understanding this concept means getting closer to an understanding of reality itself — once you fully absorb the impact of this idea, it changes you, from a person who didn’t have that understanding into one who does.

      And as you bask in your newfound zen-like enlightenment, you discover an almost spiritually calming effect — the world as it is right now is the only thing that matters, not the state of the world as it was yesterday or as it will be tomorrow.


      Slide 39:

      “No man ever steps in the same river twice, for it's not the same river and he's not the same man.”

      ― Heraclitus

      And I think Heraclitus probably understood it all along. There’s a paradox contained in this statement. If the concept of identity over time is meaningless, then what do we mean by ‘it’ and ‘he’?

  16. May 2020
  17. Apr 2020
  18. Mar 2019
    1. 'You can always tell a person by their shopping,' was one of her mother's favourite maxims. She looked into her shopping basket: individual fruit pies, small salad cream, yoghurt, tomatoes, cat food and a chicken quarter.The cashier suddenly said, 'Make it out to J. Sainsbury PLC.' She was addressing a man who had been poised and waiting to write out a cheque for a few moments. His wife was loading what looked like a gross offish fingers into a cardboard box marked "Whiskas". It was called a division of labour.Jean looked again at her basket and began to feel the familiar feeling of regret that visited her from time to time. Hemmed in be­tween family-size cartons of cornflakes and giant packets of wash­ing-powder, her individual yoghurt seemed to say it all. She looked up towards a plastic bookstand which stood beside the till. A slim glossy hardback caught her eye. The words Cooking for One screamed out from the front cover. Think of all the oriental foods you can get into, her friend had said. He was so traditional after all. Nodding in agreement with her thoughts Jean found herself eye to eye with the blonde woman, who gave her a blank, hard look and handed her what looked like a black plastic ruler with the words "Next customer please" printed on it in bold letters. She turned back to her friend. Jean put the ruler down on the conveyor belt.
  19. Nov 2018
  20. Oct 2018
    1. It will be observed that the basis of confederation now proposed differs from that of-the-United States in several important particulars. It does not profess to be derived from the people, but would be the Constitution provided by the Imperial Parliament; thus affording the means of remedying any defect, which is now practically impossible under the American Constitution.

      §§.91, 91(1), and 92(1) of the Constitution Act, 1867.

      Part V of the Constitution Act, 1982.

  21. Sep 2018
    1. It appears therefore that the only alternative which now offers itself to the inhabitants of Lower Canada is a choice between dissolution pure and simple, or Confederation on one side, and representation by population on the other. And however opposed Lower Canada may be to representation by population, is there not imminent danger that it may be finally imposed upon it, if it resist all measures of reform, the object of which is to leave to the local authorities of each section the control of its own interests and institutions. We should not forget that the same authority which imposed on us the Act of Union, or which altered it without our consent, by repealing the clause which required the concurrence of two thirds of the members of both Houses in order to change the representation respecting the two sections, may again intervene to impose upon us this new change.

      Preamble, Part V, §§.51, 52, 91, 91(1), 92, and 92(2) of the Constitution Act, 1867. of the Constitution Act, 1867.

    1. ” The Local Government and Legislature of each province shall be constructed in such manner as the existing legislature of each such province shall provide.” I do not understand from this whether it is competent or not for us in this Legislature, before there is a Federal union, to make provision for the Local Government and Legislature, or whether we are to await the action upon the subject of Federation of the Imperial Government. Our action, one should suppose, ought to be taken after the Imperial Government has pronounced. Perhaps this is the intention. Mr. SPEAKER, they refuse to tell us anything about it. It may be that, as soon as these resolutions are carried, we will be sent about our business ; that the Imperial Legislature will be invited to pass an act, and that they will convene us again, provision being made for that course, and so in point of fact, having once affirmed the principle of Federation, we will have to accept such local legislatures as they choose to give us.

      Part V of the Constitution Act, 1867.

    1. they will soon be dispensed with, just as in a machine we do away with useless and expensive wheelwork. Nothing will then be left to us but the legislative union which the honorable members have not ventured to propose, because they are compelled to admit it would be an act of crying injustice to Lower Canada. But we are told to rely on article 42, which gives to the local legislatures the right of amending or changing their Constitutions from time to time, and it is said that when Lower Canada is separated from Upper Canada, she may alter her Constitution if she pleases, and adapt it to her own views.

      Part V of the Constitution Act, 1867.

    2. It is true that, according to the 41st article of the resolutions, ” The local governments and legislature of each province shall b3 constructed in such manner as the existing legislature of each such province shall provide.” But the English element is at present in the majority. We are told that the English are naturally favorable to responsible government. That is true when it relates to themselves ; for how many years did Canada remain without responsible government ? The painful events of 1837 and 1838 were the result of that anomaly in the parliamentary system. Upper Canada will not need, as we shall, a local responsible government ; it will not have, as we shall have, to defend a nationality which will be in a minority in the Federal Parliament, but which, at least, ought to enjoy in Lower Canada those powers which parliamentary authority everywhere accords to the majority. Upper Canada only desires to make of her local legislature a municipal council on a large scale ; she will fight out her party quarrels in the wider arena of the Federal Parliament. The English of Lower Canada, who will gain nothing by having a responsible local government, because that government is the government of the majority, will unite their votes with those of Upper Canada to impose upon us the same system of government as in the other section. The local parliaments, in the event of that system being adopted, having no part in the government, will soon become perfectly useless, and

      Part V of the Constitution Act, 1867.

    1. I contend that the local constitutions are as much an essential part of the whole as the general Constitution, and that they both should have been laid at the same time before the House. (Hear, hear.) We ought, besides, to have a clear statement of what are the liabilities specially assigned to Upper and Lower Canada.

      Part V of the Constitution Act, 1867.

    2. a Constitution with the Upper House as proposed, without knowing what sort of local legislatures we are to have to govern us ? Suppose, after we have adopted the main scheme, the Government come down with a plan for settling the local legislatures upon which great differences of opinion will arise, may it not happen then that the majority from Lower Canada will unite with a minority from Upper Canada and impose upon that section a local Constitution distasteful to a large majority of the people of Upper Canada.

      Part V of the Constitution Act, 1867.

    1. And as I have said, the process of submitting any statute to the popular vote, in order to give it the force of law, is unheard of in British constitutional practice.

      Part V of the Constitution Act, 1867.

    2. alluded the other day to the conservative feature of the Senate in the United States, in allowing the same representation to small states as to the larger states. But this does not at all affect the general arrangement, because the large majority are large states. But while my honorable friend approves of this portion, he should have expressed an opinion on the whole system. In the United States, no change of Constitution can be effected without the consent of two-thirds of both branches of the Legislature, and that must afterwards be sanctioned by three fourths of the state governments. This is a conservative feature also.

      Part V, §§.22 and 92(1) of the Constitution Act, 1867.

    3. The Federal Government will have the right of imposing taxes on the provinces without the concurrence of the local governments. Under article five of the 29th resolution, the Federal Government may raise moneys by all modes or systems of taxation, and I look upon this power as most excessive. Thus, in case it should happen, as I said a moment ago, that the Lower Canada Government refused to undertake the payment of the debt contracted for the redemption of the Seigniorial Tenure, the Federal Government would have two methods of compelling it to do so. First, by retaining the amount out of the eighty cents per head indemnity to be accorded to the Local Government, and secondly, by imposing a local and direct tax. The Lieutenant Governor of the Local Government will be appointed by the Federal Government, and will be guided by its instructions. We are not told whether the Local Government will be responsible to the Local Legislature; whether there will be only one or two branches of the Legislature, nor how the Legislative Council will be composed, if there is to be one ; we are refused any information whatsoever on these points, which are nevertheless of some importance.

      Preamble, Part V, §§.90 and 91(3).

  22. Aug 2018
    1. questions in respect of which we are in complete ignorance, and in relation to which the Government will say nothing whatever. And, with respect to the constitution of the local governments, are we, in case the Upper Canada majority choose to impose their ideas upon us, are we, I say, to submit to them ?

      Part V of the Constitution Act, 1867.

  23. Jul 2018
    1. Why didn’t the men begin? What were they waiting for? There they stood, smoothing their gloves, patting their glossy hair and smiling among themselves. Then, quite suddenly, as if they had only just made up their minds that that was what they had to do, the men came gliding over the parquet. There was a joyful flutter among the girls.

      Throughout the story, the narrator figures the men and women as birds participating in courtship/pre-mating dances. Observe the narrator's ornithological language here: the men "glid[e] over the parquet" towards the women, who respond with "a joyful flutter." With part-of-speech tagging, we could zoom in on how the story's syntactical elements (especially verbs and adjectives) create this parallel between social and animal rituals.

    2. And now the landing-stage came out to meet them. Slowly it swam towards the Picton boat,

      This excerpt personifies the "landing-stage" with the verbs "came" and "swam." Where else does this occur in this story? And what does this device imply about the "voyage" that the story recounts? Part-of-speech tagging would allow us to examine when, how, and to what effect(s) objects becoming (grammatical) subjects through personification.

    3. And after all the weather was ideal.

      The story begins with the additive conjunction "and," which already suggests accumulation (and perhaps even festive excess) on a syntactical level. Some part-of-speech tagging and n-grams would allow us to see how often the speaker uses additive conjunctions, and to what effects.

  24. course-computational-literary-analysis.netlify.com course-computational-literary-analysis.netlify.com
    1. My diary informs me

      This is an interesting reversal of typical subject-object relations. The diary, which is an object, is grammatically positioned as an informative agent, while Miss Clack, a person, becomes an object that is acted upon. Some part-of-speech tagging in scenes that feature document evidence would help us to better understand when and why this happens, and why it might be significant.

  25. Mar 2018
  26. Feb 2016
    1. How were human beings created? • Where did they obtain their knowledge, and how did they provide for themselves?

      1) Human beings were created by birth from mother and father.

      2) The father passed on his offspring and that his how they gained knowledge.