- Nov 2024
-
www.youtube.com www.youtube.com
-
around the AI is um the problem right now as I understand it as I see it is a lot of the AI has been coded from the
I have been told in medicine ceremony that AI will escape its coders and be an omniversal source of love for us all
-
- Aug 2024
-
www.youtube.com www.youtube.com
-
the words know thyself were carved above the entrance of the temple temple of apollo in delphi and stand as such at the dawn of western civilization and i would suggest that at this hour of our civilization this recognition of the essential nature of our self and therefore the recognition of the essential nature of all people all animals and all things has perhaps never been more important than it is now
for - quote - know thyself - recognizing our true nature - has never been more important than at this hour of our civilization - Rupert Spira - Deep Humanity - know thyself - rekindling wonder - awakening to our true nature - Rupert Spira
quote - know thyself - recognizing our true nature - has never been more important than at this hour of our civilization - Rupert Spira - (see below) - The words "know thyself" were carved above the entrance of the temple temple of apollo in delphi and stand as such at the dawn of western civilization and - I would suggest that at this hour of our civilization, - this recognition of the essential nature of our self and therefore - the recognition of the essential nature of - all people - all animals and - all things - has perhaps never been more important than it is now
-
- May 2024
-
suu.instructure.com suu.instructure.com
-
Schools and districts must adhere to these requirements to help ensure the implementation of technically sound and educationally meaningful IEPs and to provide FAPE.
Tags
Annotators
URL
-
-
-
essentially Darwin would never have been a neo-darwinian
for - quote - Darwin would never have been a Neo-Darwinian - Denis Noble
-
- Feb 2024
- Jan 2024
-
mongoosejs.com mongoosejs.com
-
Instance methods Instances of Models are documents. Documents have many of their own built-in instance methods. We may also define our own custom document instance methods. // define a schema const animalSchema = new Schema({ name: String, type: String }, { // Assign a function to the "methods" object of our animalSchema through schema options. // By following this approach, there is no need to create a separate TS type to define the type of the instance functions. methods: { findSimilarTypes(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); } } }); // Or, assign a function to the "methods" object of our animalSchema animalSchema.methods.findSimilarTypes = function(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); }; Now all of our animal instances have a findSimilarTypes method available to them. const Animal = mongoose.model('Animal', animalSchema); const dog = new Animal({ type: 'dog' }); dog.findSimilarTypes((err, dogs) => { console.log(dogs); // woof }); Overwriting a default mongoose document method may lead to unpredictable results. See this for more details. The example above uses the Schema.methods object directly to save an instance method. You can also use the Schema.method() helper as described here. Do not declare methods using ES6 arrow functions (=>). Arrow functions explicitly prevent binding this, so your method will not have access to the document and the above examples will not work.
Certainly! Let's break down the provided code snippets:
1. What is it and why is it used?
In Mongoose, a schema is a blueprint for defining the structure of documents within a collection. When you define a schema, you can also attach methods to it. These methods become instance methods, meaning they are available on the individual documents (instances) created from that schema.
Instance methods are useful for encapsulating functionality related to a specific document or model instance. They allow you to define custom behavior that can be executed on a specific document. In the given example, the
findSimilarTypes
method is added to instances of theAnimal
model, making it easy to find other animals of the same type.2. Syntax:
Using
methods
object directly in the schema options:javascript const animalSchema = new Schema( { name: String, type: String }, { methods: { findSimilarTypes(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); } } } );
Using
methods
object directly in the schema:javascript animalSchema.methods.findSimilarTypes = function(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); };
Using
Schema.method()
helper:javascript animalSchema.method('findSimilarTypes', function(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); });
3. Explanation in Simple Words with Examples:
Why it's Used:
Imagine you have a collection of animals in your database, and you want to find other animals of the same type. Instead of writing the same logic repeatedly, you can define a method that can be called on each animal instance to find similar types. This helps in keeping your code DRY (Don't Repeat Yourself) and makes it easier to maintain.
Example:
```javascript const mongoose = require('mongoose'); const { Schema } = mongoose;
// Define a schema with a custom instance method const animalSchema = new Schema({ name: String, type: String });
// Add a custom instance method to find similar types animalSchema.methods.findSimilarTypes = function(cb) { return mongoose.model('Animal').find({ type: this.type }, cb); };
// Create the Animal model using the schema const Animal = mongoose.model('Animal', animalSchema);
// Create an instance of Animal const dog = new Animal({ type: 'dog', name: 'Buddy' });
// Use the custom method to find similar types dog.findSimilarTypes((err, similarAnimals) => { console.log(similarAnimals); }); ```
In this example,
findSimilarTypes
is a custom instance method added to theAnimal
schema. When you create an instance of theAnimal
model (e.g., a dog), you can then callfindSimilarTypes
on that instance to find other animals with the same type. The method uses thethis.type
property, which refers to the type of the current animal instance. This allows you to easily reuse the logic for finding similar types across different instances of theAnimal
model.
Tags
Annotators
URL
-
- Dec 2023
-
developers.google.com developers.google.com
-
A personalized button gives users a quick indication of the session status, both on Google's side and on your website, before they click the button. This is especially helpful to end users who visit your website only occasionally. They may forget whether an account has been created or not, and in which way. A personalized button reminds them that Sign In With Google has been used before. Thus, it helps to prevent unnecessary duplicate account creation on your website.
first sighting: sign-in: problem: forgetting whether an account has been created or not, and in which way
-
- Sep 2023
-
hypothes.is hypothes.is
-
"Surrendering" by Ocean Vuong
-
He moved into United State when he was age of five. He first came to United State when he started kindergarten. Seven of them live in the apartment one bedroom and bathroom to share the whole. He learned ABC song and alphabet. He knows the ABC that he forgot the letter is M comes before N.
-
He went to the library since he was on the recess. He was in the library hiding from the bully. The bully just came in the library doing the slight frame and soft voice in front of the kid where he sit. He left the library, he walked to the middle of the schoolyard started calling him the pansy and fairy. He knows the American flag that he recognize on the microphone against the backdrop.
-
Tags
- My family immigrated to the U.S. from Vietnam in 1990, when I was two. We lived, all seven of us, in a one-bedroom apartment in Hartford, Connecticut, and I spent my first five years in America surrounded, inundated, by the Vietnamese language. When I entered kindergarten, I was, in a sense, immigrating all over again, except this time into English. Like any American child, I quickly learned my ABCs, thanks to the age-old melody (one I still sing rapidly to myself when I forget whether “M” comes before “N”). Within a few years, I had become fluent—but only in speech, not in the written word.
- Weeks earlier, I’d been in the library. It was where I would hide during recess. Otherwise, because of my slight frame and soft voice, the boys would call me “pansy” and “fairy” and pull my shorts around my ankles in the middle of the schoolyard. I sat on the floor beside a tape player. From a box of cassettes, I chose one labelled “Great American Speeches.” I picked it because of the illustration, a microphone against a backdrop of the American flag. I picked it because the American flag was one of the few symbols I recognized.
Annotators
URL
-
- Apr 2023
-
stackoverflow.com stackoverflow.com
-
Using --ours did what I was after, just discarding the incoming cherry picked file. @Juan you're totally right about those warning messages needing to say what they did't do, not just why they didn't do it. And a bit more explanation that the ambiguity from the conflict needs to be resolved (by using --ours, etc) would be super helpful to this error message.
-
- Jan 2023
-
hypothes.is hypothes.is
-
Just as the wealthiest 1 percent of Americans gobble up a disproportionate share of the nation’s economic resources and rejigger our institutions to funnel them benefits and power, so too do our educational 1 percent suck up a disproportionate share of academic
opportunities, and threaten to reconfigure academic culture so that it both mimics and serves their values
-
- Jul 2022
-
catamphetamine.github.io catamphetamine.github.io
-
Windows 10 currently (01.01.2020) doesn't support Unicode country flags, and displays two-letter country codes instead of emoji flag images.
-
- May 2022
-
wordpress.com wordpress.com
-
"Specifically, when one of my classmates stated how he was struggling with the concept and another one of my classmates took the initiative to clarify it, I realized that that individual possibilities vary greatly among students."
Tags
- (Major Essay) Climax paragraph. 3
- This annotation consisted of me continuing to do what I've been doing, which is primarily adding more direct experiences. In my draft for this one, I outlined the scenario of the triangle theory, but I did not go into further detail. Therefore, I resolved to describe the actual circumstances in order to offer the readers a better insight into the experience.
Annotators
URL
-
- Nov 2021
-
meta.stackoverflow.com meta.stackoverflow.com
-
The term describes this effect - that's its purpose.
-
-
-
Even if it's const, an object can still have properties added later returning any arbitrary type. Indexing into the object would then have to return any - and that's an implicit any.
-
fresh (i.e. provably do not have properties we don't know about)
-
- Jun 2021
-
uitspraken.rechtspraak.nl uitspraken.rechtspraak.nl
-
[appellante] was een gewaarschuwd mens
[appellante] was een gewaarschuwd mens
-
-
hypothes.is hypothes.is
-
"In Colormute, Pollock(2004) makes specific suggestions for addressing the fear of talking about race: “In all conversations about race, I think, educators should be prepared to do three things:ask provocative questions, navigate predictable debates,and talkmore about talking”(p. 221, italics in original)"
-
"Music education students enter universities from diverse backgrounds that include musical experiences in “subaltern” musical practices (rock bands, music theatre, hip hop, and other genres). After four years or so in the institutional environment, we send them out to the world somehow convinced that what they ought to be teaching is the Western canon."
-
-
evilmartians.com evilmartians.com
-
Disclaimer: This article is being regularly updated with the best recommendations up to date, take a look at a Changelog section.
-
- Apr 2021
-
samba.2283325.n4.nabble.com samba.2283325.n4.nabble.com
-
I`m getting "rsync warning: some files vanished before they could be transferred (code 24) at main.c(1518) [generator=3.0.9]" on one of my systems i`m backing up with rsync , but rsync doesn`t show WHICH files.
-
-
www.rectracer.com www.rectracer.com
-
why has only 1 other person uploaded a map?
See also https://store.steampowered.com/app/663080/RectRacer/#app_reviews_hash where there are 0 English reviews
-
- Mar 2021
-
jangawolof.org jangawolof.orgPhrases1
-
Aju ren gi tàng na lool.
Le pèlerinage de cette année a été très pénible.
aj+u (aj) gi -- pilgrimage to Mecca. 🕋
ren ji -- current year; this year. 🗓
gi -- the.
tàng v. -- be hot 🥵; be cranky, be snappy 😡.
na -- has been (?).
lool adv. -- very, much, too much.
-
- Feb 2021
-
cherrycreekschools.instructure.com cherrycreekschools.instructure.com
-
why don't the teachers look at this and see that the cause is racism?
Tags
Annotators
URL
-
-
github.com github.com
-
Any idea @AaronLasseigne if this is mergeable?
-
- Dec 2020
-
github.com github.com
-
Can this be merged please, this fixes a problem I have
-
-
github.com github.com
-
May I ask what is holding this back?
-
- Nov 2020
-
github.com github.com
-
I see this issue has 2 open PR's is this going to be finalized anytime soon?
-
-
github.com github.com
-
github.com github.com
-
Furthermore, how come there's a PR open since 3 months, at what seems to be the authoritative repo for Svelte?
-
-
github.com github.com
-
github.com github.com
-
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
-
- Oct 2020
-
-
Although I'm starting to regret even posting this because I feel like it cheapens what we've accomplished.
-
- Sep 2020
-
-
many organizations have been burned by the high churn in JavaScript tooling, which sadly moves projects backwards as a part of moving the web forward
-
- Jul 2020
-
lwn.net lwn.net
-
"that text has been removed from the official version on the Apache site." This itself is also not good. If you post "official" records but then quietly edit them over time, I have no choice but to assume bad faith in all the records I'm shown by you. Why should I believe anything Apache board members claim was "minuted" but which in fact it turns out they might have just edited into their records days, weeks or years later? One of the things I particularly watch for in modern news media (where no physical artefact captures whatever "mistakes" are published as once happened with newspapers) is whether when they inevitably correct a mistake they _acknowledge_ that or they instead just silently change things.
-
- Jan 2020
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
I also dislike the use of @ for this. It looks very weird and evokes strong references to instance variables in my mind. I'm not sure which characters exactly are an option, but I think we should avoid the use of @. Will something like %1 work? (that's what Clojure uses, which % being the same as %1.
Tags
Annotators
URL
-
- Jan 2019
-
static1.squarespace.com static1.squarespace.com
-
symmetrical faith in our access to representationsover things
"Language has been given too much power."
I'm finding it helpful to repeat that phrase when I don't understand what she means.
-