text:
Q: Mongoose reference overwritten I am in a bit of a pickle. Whenever I create a new resume as a logged in user it doesn't add the resume id as an array. I.e, ["20293", "2932392", "32903239"]
Instead, it overwrites the current resume id in the users schema. Here is the code
UserSchema
const UserSchema = new Schema({
    _vId: {
        type: String,
        default: id.generate()
    },
    firstName: {
        type: String,
        required: true
    },
    lastName: {
        type: String,
        required: true
    },
    accountType: {
        type: String,
        enum: ['Alphaneer', 'Administrator', 'Support', 'PRO'],
        default: 'Alphaneer'
    },
    email: {
        type: String,
        required: true,
        trim: true
    },
    username: {
        type: String,
        required: true,
        trim: true,
        unique: true
    },
    bio: {
        type: String,
        default: "No bio provided."
    },
    // TODO: Hash the password before inserting as a document :)
    password: {
        type: String,
        required: true
    },
    createdAt: {
        type: String,
        default: moment(new Date()).format("MMM DD, YYYY") // "Sun, 3PM 17"
    },
    resume: [ { type: mongoose.Schema.ObjectId, ref: "Resume" } ]
});

Where I post my resume
 // POST /dashboard/resume/create
router.post('/resume/create', (req, res, next) => {
  Resume.create(req.body, (err, resume) => {
    if (err) {
      var err = new Error("Error:" + err);
      err.status = 404;
      next(err);
    } else {
      req.user = jwtDecode.decode(req.session.tokenID, 'secret');
      //I am assuming that you have saved your resume and getting the saved object in `resume`, now update the logged in user in req.user
      var user = req.user.sessionId;
      var updateData = {
        resume: resume._id
      }
      //save the updated user
      User.findByIdAndUpdate(user, updateData, function(err, user) {
        console.log(user);
        if (err) {
          res.json(err);
        } else {
          res.json(user);
        }
      })
    }
  })
});

gif of submitting new resumes
UPDATE:
error picture
UPDATED CODE:
// POST /dashboard/resume/create
router.post('/resume/create', (req, res, next) => {
  Resume.create(req.body, (err, resume) => {
    if (err) {
      var err = new Error("Error:" + err);
      err.status = 404;
      next(err);
    } else {
      req.user = jwtDecode.decode(req.session.tokenID, 'secret');
      //I am assuming that you have saved your resume and getting the saved object in `resume`, now update the logged in user in req.user
      var user = req.user.sessionId;
      var updateData = {
        resume: resume._id
      }
      //save the updated user
      User.findById(user, function(err, user) {
        console.log(user);
        if (err) {
          res.json(err);
        } else {
          user.resume.push(resume.id)
          user.save(function(user) {
            return res.json(user);
          });
        }
      })
    }
  })
});

A: This is wrong:
var user = req.user.sessionId;
  var updateData = {
    resume: resume._id
  }
  //save the updated user
  User.findByIdAndUpdate(user, updateData, function(err, user) {
    console.log(user);
    if (err) {
      res.json(err);
    } else {
      res.json(user);
    }
  });

The resume field is an array and you are manipulating it as a string field. The method findOneAndUpdate do two things:

*

*Find the document by it's id

*Update it with the new data

The second argument is the new data to set. So, the second step is translated to:
User.upate({ _id: user }, { resume: resume._id });

Can you see what's wrong? resume must store an array of resume's id and your are setting a id as value. Obviously this will throw an MongooseError.
Your second shot is correct but has a typo error:
User.findById(user, function(err, user) {
    console.log(user);
    if (err) {
      res.json(err);
    } else {
      user.resume.push(resume.id)
      user.save(function(user) {
        return res.json(user);
      });
    }
  });

You must add the _id field since this is the ObjectID of the new created document (resume). So, you need to do user.resume.push(resume._id) instead.
Update
According with your last comment, you want to populate your User model, that is, through association id's retrieve all model data. In this case, is recommended that the resumes array change like this:
...
resumes: [
  {
     resume: {
       type: Schema.Types.ObjectId,
       ref: 'Resume'
     }
   }
 ]

To populate the User document with all Resume data you just need to reference the resume key in resumes field array.
User.findById(user, function(err, user) {
    if (err) {
      return res.json({ success: false, message: err.message });
    }
    user.resume.push(resume.id)
    user.save(function(err, user) {
      if (err) {
        return res.json({ success: false, message: err.message });
      }
      // save was fine, finally return the user document populated
      User.findById(user).populate('resumes.resume').exec(function(err, u) {
        return res.json(u);
      });
    });
  }
});

The populate method accepts a string with the fields that we want fill with it model data. In your case is an only field (resume). After run the query, you will get something like this:
{
  _id: a939v0240mf0205jf48ut84sdfdjg4,
  ...,
  resumes: [
    resume: {
      _id: f940tndfq4ut84jofgh03ut85dg9454g,
      title: 'Some title'
    },
    ...
  ]
}

A: Just to follow up on my comment regarding how I suggest you solve the issue:
router.post('/resume/create', (req, res, next) => {
  Resume.create(req.body, (err, resume) => {
    if (err) {
      var err = new Error("Error:" + err);
      err.status = 404;
      next(err);
    } else {
      req.user = jwtDecode.decode(req.session.tokenID, 'secret');

    //Here, instead of creating a new key entry for resume, you rather push new resume-id into the resume property of the "found user".
      //find, update and save the user
      User.findOne({_id: req.user.sessionId}, function (err, userToUpdate) {
         userToUpdate.toJSON().resume.push(resume.id);
         userToUpdate.save(function (err) {
        if(err) {
            console.error('ERROR!');
        }
      });
    });

    }
  })
});

I left the rest of your code (saving new resume) untouched - I assume that part works. Give this a try and let me know if you encounter some problems.


text:
Eaze Raises $35 Million As Company Pivots To Plant Touching
Debra BorchardtFebruary 25, 20205min31200
Eaze
Financially challenged cannabis delivery company Eaze said it has raised $35 million in a Series D round and could raise an additional $20 million. The company closed on a $20 million investment led by Founders JT LLC, which joins a $15 million bridge round led by Eaze key stakeholders, Rose Capital, and DCM. Eaze also said it had secured the ability to raise up to an additional $20 million to fund the company's pivot into plant-touching businesses. verticalization and brand strategy to expand access to safe, legal, and affordable cannabis products.
Eaze Chief Executive Officer Ro Choy said, "Verticalization is Eaze's second act. Until now, we've invested in proving our market fit, building an enormous and loyal customer base, and becoming California's biggest marketplace for legal cannabis delivery. Now, we're proving we can make this business work in a more sustainable and profitable way, while continuing to grow Eaze's existing services."
Eaze Picks Up Former Rival's Dispensary
In a strange twist to this move, Eaze acquired DionyMed Brand's (OTC: DYME) rights to retail licensee Hometown Heart (HTH) depots in Oakland and San Francisco, and now has oversight of HTH's day-to-day operations. It wasn't long ago that some of Eaze's top employees left the company to work at DionyMed in an attempt to create a new delivery service at that company called Chill. The effort failed and in the process, the two companies began a word of words against each other resulting in lawsuits.
Hometown Heart had been a big part of the Eaze volume business but then DionyMed, then acquired the dispensary Hometown Heart from Evan Tenenbaum (one of the former Eaze employees according to the Eaze lawsuit) for $6 million with a potential amount rising to $12 million. Eaze says it has "purchased DYME's *share* of the licensee HTH (which is a separate entity from DYME and always has been)." The amount paid was not disclosed, however, the lawsuit from DionyMed has been dropped. The former Eaze employees were not included in the HTH purchase, although the company said that many of the other employees retained their jobs. A spokesperson said, "lots of great folks whose jobs were at risk that worked in the DYME depots were able to keep their jobs as part of the ongoing, larger business."
Eaze Products
In the coming weeks, Eaze said it will launch its own line of consumer brands in partnership with local licensees while continuing to support a broad array of independent, world-class California brands and independent licensed retailers across the state.
With regard to payment processing, Eaze said it doesn't process payments (payment processors in partnership with licensed retailers do). "Eaze now has partial ownership in HTH non-storefront retail (this is a license type in CA)."
Last month a story in Tech Crunch suggested that the company was in dire financial trouble. The story said that Eaze had raised $166 million and the recent bridge round was literally to keep the lights on and make payroll. The company has laid off employees over the past year. According to the TC story, Eaze is claiming in its investor deck that the company has a valuation of $388 million. The story also states that Eaze "appears to only take payments via debit cards, ACH transfer and cash, not credit card."
TC also said that in the presentation, that Eaze claimed that it makes $9.04 on an average sale of $85, which will go up to $18.31 if it successfully brings in "private label" products and has more depot control.
previousMillennials Are Fueling the Cannabis Economy
nextGW Pharma Stock Slides Despite Strong Epidiolex Sales

redpajama_set_name: RedPajamaCommonCrawl


The holidays are often difficult for those who have experienced the death of someone close. Annual religious celebrations, family gatherings and birthdays are all times full of joy when the family comes together, but for those who have been bereaved it can feel surprisingly lonely. Here are seven ways that you can help yourself feel stronger and cope a little better during these times.
While you might not want to seem like a party-pooper by bringing up your personal feelings of sadness or isolation, the only way people can help you is if they know how you are feeling. Grief can be all-consuming and scary which is why you need to bring it in from out of the cold. Your loved one's care about you and are there to help. Try bringing one of your relatives to one side and confiding in them as to how you're feeling. Your grief will not improve by ignoring it or avoiding it and many people report an overwhelming feeling of relief after they have shared what's going on inside their head.
Grief is taxing both emotionally and physically and you need to be careful that you aren't over committing yourself. Whether it's organising a birthday party or cooking the Christmas roast and all it's trimmings, you should ask for help when you need it. You might believe that keeping busy will help you deal with your grief but it's talking and sharing feelings – not avoiding them – that will ultimately help you out in the long run.
Bereavement can often make those left behind feel guilty about enjoying themselves. You might feel that it's unfair for you to be having a good time when your loved one isn't there to join in too. This is not a beneficial way of thinking and will only leave you upset and frustrated. Instead, you should seek to honour your loved one's memory. Raising a toast, taking a moment to remember them and perhaps sharing a funny or interesting anecdote about their life are just a few ways that you can pay tribute to your loved one.
There are certain days of the year when grief and sadness can be compounded, such as on the deceased's birthday and the anniversary of the day they died. What would normally be a day of celebration can be a painful and difficult day. On this day it's important to give yourself time to process your feelings and emotions. Perhaps booking the day off work so that you can visit your loved one's grave, or a special place they liked to visit themselves. If you are religious, then you might want to visit your place of worship and light a candle or say a prayer for your loved one. There are no right or wrong ways to feel on these days, you might want to seek help from loved ones to get you through the day, or equally you might want to be alone – the choice is yours.
Sometimes the key to coping with a difficult day is to try and balance out the negative with something good. Yes, you can be sad that your loved one is absent from the day, but you can also thankful for the years you spent together and the memories you have of them. Exploring a certain memory or a feeling can create a spark of joy that can make a real difference to your day.


The Top Laminate Flooring Stairs with Do You Want To Install Laminate Flooring On Your Stairs Diy is one of best image reference about Flooring ideas with the size 592 x 444. This home designs has been created with great idea and follow trending of modern design and simple ideas. The Top Laminate Flooring Stairs with Do You Want To Install Laminate Flooring On Your Stairs Diy reference also include allen and roth laminate flooring stairs, laminate flooring stair jig, for your convenience in searching this reference more specific.
The Top Laminate Flooring Stairs with Do You Want To Install Laminate Flooring On Your Stairs Diy is one of best Flooring ideas of the years, this design has been built from brilliant ideas combined with a various selection of elegant colors and beautiful designs ideas, would be something amazing if you want apply Flooring design at your own home. Top Laminate Flooring Stairs with Do You Want To Install Laminate Flooring On Your Stairs Diy just one of the many reference that we have, you can find other reference from this site such as kichen design, home design ideas, home interior design, home interior decorating, home decorating ideas, bathroom remodel and etc.
If you are building a house or just redesigning your existing house these are popular types of floor coverings that are utilized in house decor and layout. They are very easy to set up and clean and they often tend to have a longer life than carpeting. Carpets reveals high web traffic areas easily and spots are occasionally difficult to remove. When you're thinking about floor covering in your house make sure you assume concerning exactly how much you clean up the floors as well as what sort of spending plan you have. Wood and tile can be very expensive yet are still relatively very easy to clean in spite of the tiny voids that separate each piece. Laminate floor coverings are smoother makings it easier to clean up and it's likewise very easy to set up. In this post we likewise consist of some photos of laminate flooring stairs and may be your house embellishing ideas.
You can also look for some pictures that related to Flooring by scroll down to collection on below this picture. If you want to find the other picture or article about Laminate Flooring Stairs just push the gallery or if you are interested in similar Gallery of Top Laminate Flooring Stairs with Do You Want To Install Laminate Flooring On Your Stairs Diy, you are free to browse through search feature that located on top this page or random post section at below of this post. We hope it can help you to get information of this image. Finally, thank you for visiting this Interior Design Website and we welcome you to come as many as you like in here.


March 14, 2019 (San Diego) - In honor of Pi Day and in support of local teachers, San Diego Gas & Electric (SDG&E) is launching a $314,159 matching grant program to enable K-12 public schools in the region to provide more classroom learning opportunities in science, technology, engineering and math (STEM).
Pi (Greek letter "π") is the symbol used in math to represent a constant — the ratio of the circumference of a circle to its diameter — which is approximately 3.14159. Accordingly, SDG&E has set aside a donation amount reflecting the infinite number. Shareholder funds (not utility rates) are used to fund the charitable initiative.
This is the second year SDG&E is providing matching grants to support local STEM teachers in partnership with DonorsChoose.org – an online platform that enables public school teachers to crowdfund materials, projects, and field trips for their students. This year SDG&E aims to support 500 teachers at 300 local schools, through 600 STEM projects that could reach 40,000 students. Last year, SDG&E helped 208 teachers at 135 schools and reached nearly 20,000 students through 286 STEM projects. Sixty-four percent of these schools were in disadvantaged communities.
With mathematics being a key pillar of STEM education, Pi Day is the perfect time to kickstart the crowdfunding initiative as math enthusiasts all over the world recite the infinite digits of Pi, talk to their friends about math, and eat pie.
Teachers at public schools located in San Diego and South Orange counties that are served by SDG&E are eligible to receive matching funds for STEM projects that cost $1,000 or less. For every dollar they raise via DonorsChoose, SDG&E will provide a $1 match. For teachers whose schools are located in disadvantaged communities, as defined by the state's CalEnviroScreen as being most vulnerable to environmental pollution, SDG&E will offer a $2 match for every $1 raised by teachers, making public contributions even more impactful.
Teachers are encouraged to create project requests through DonorsChoose.org/teachers. To donate to a project that SDG&E is matching, visit DonorosChoose.org/SDGE.
SDG&E is a San Diego-based energy company that provides clean, safe and reliable energy to better the lives of the people it serves in San Diego and southern Orange counties. The company is committed to creating a sustainable future by providing around 45 percent of its electricity from renewable sources; modernizing natural gas pipelines; accelerating the adoption of electric vehicles; supporting numerous non-profit partners; and, investing in innovative technologies to ensure the reliable operation of the region's infrastructure for generations to come. SDG&E is a subsidiary of Sempra Energy (NYSE: SRE), a Fortune 500 energy services holding company based in San Diego. For more information, visit SDGEnews.com or connect with SDG&E on Twitter (@SDGE), Instagram (@SDGE) and Facebook.
It seems that "California Mandated" that public utilities spend money on public education, energy savings, technology and research programs etc. Who is behind that door? Public Utilities Commission, State Legislature or some other State bureaucracy doing the mandating? It still takes us back to the money trail.......our pocketbooks as rate payers. This does not sit well with me.
Would someone explain (1) where "shareholder funds" come from and (2) what utility rates has to do with it. I would presume that every dollar SDG&E takes in, comes from our pockets in some way. SDG&E is playing the "Welfare" public relations ploy whereby they are giving out rate discounts, grants. rebates etc. They also pay (guaranteed) common stock dividends. So nice of SDG&E however, the money has to come from somewhere. SDG&E "does not" produce anything today, whereby in the past they generated electricity. Now they are just a middleman that causes rates to increase just by being a middleman. I also would presume that the Public Utilities Commission is charged with oversight. Is there any?
Some utility "grants" are mandated by the state.
I am not certain about the specific grant funds listed above.