text:
Bill Moyers: Faith & Reason
In his latest PBS series, the veteran journalist talks to writers about faith, reason, and religious conflicts around the world.
Bill Moyers's new seven-part series, "Faith & Reason," airs Fridays, starting June 23, on PBS. Click here to watch a video greeting from Moyers.
Series Sneak Peek
Bill Moyers With Pema Chödrön
Episode Seven
Check local listings
• Watch this week's clip
• Martin Amis
• Richard Rodriguez
• Anne Provoost
• Jeanette Winterson
• Mary Gordon
• Salman Rushdie
Bill Moyers: The Beliefnet Interview
By Michael Kress
Why did you decide to just interview writers, rather than speaking to theologians, pastors, etc.?
The PBS series "Bill Moyers on Faith & Reason" features interviews with provocative authors including Salman Rushdie, Martin Amis, Mary Gordon, and Margaret Atwood. To see more clips, participate in discussions, check airtimes in your area, and explore the many issues raised in the series click here: www.pbs.org/moyers
I was looking for a fresh take. There's a spasm of fundamentalism in the world right now, and fundamentalism is at war with the imagination, at war with creativity, at war with freedom, especially freedom of the mind. And more often than not, the people who feel the weight of that war are writers, and [it is] writers who are exploring deep issues of faith and reason through language. Language gives them the capacity for nuance that you don't have in fundamentalist dogma or creeds or doctrines of any organized religion. So, if you want fresh takes on faith and reason today, go to the people who are thinking creatively about both and writing about both of them.
Writers struggle in their art and in their lives with the meaning of faith and reason and the experience of faith and reason. And if you want first hand witnesses to the reality of how most of us are neither wholly skeptics nor wholly believers, go to writers. Go to people whose work is imagining a different world.
What does the series aim to add to our understanding of faith in America today?
The violence in the world and the atrocities in the world over the last few years have divided us as almost never before in terms of religion and politics. It's all about confrontation, and we've allowed the fundamentalists--the Orthodox Jews, the fundamentalist Muslims, the fundamentalist Christians--to dominate the political discourse. If you watch the mainstream media in this country, you would not know that there was something called mainline Protestantism. You wouldn't know that there are Catholics who are independent and have remained in the church, even though they are at odds with the church.
You just singled out three groups--Orthodox Jews, fundamentalist Christians, fundamentalist Muslims. Why? What do you see that they have in common?
They have in common a belief that they know the mind of God. The young man who killed the prime minister of Israel said, "What I did, I did for the glory of God." He killed the prime minister of Israel for the same reason that the Islamists want to kill Rushdie. General Boykin has been going around the country in uniform talking about a holy war against Islam. They believe they know the mind of God. And when you believe you know the mind of God, you've got no room for compromise in the United States Senate or the United States House of Representatives or on the street corner. Truth becomes absolute. And absolute truth, like absolute power, is a terrifying sword.
So why are fundamentalism and extremism so attractive to so many people?
The Attraction of Fundamentalism
Fundamentalism is attractive because it offers certainty in the chaos of modern life. It offers a prescription you can take to treat your illness. The illness of the day is confusion and ambiguity and fear about the forces of modernity that are shaping and reshaping our world. And fundamentalism has easy answers for people who are besieged by insoluble conflicts and problematic politics. So, fundamentalism offers people safety from a world that is changing so rapidly around them.
Furthermore, fundamentalism is a way of identifying yourself against the other. It gives you an easy identity. It makes access to God a simple thing. It's what you believe and not what you experience. So, I can understand the attraction of fundamentalism to people who are besieged and poorly equipped to confront the contradictions of our day.
At the same time, I personally believe, and so do many of these writers, that the most pernicious force in the world today is fundamentalism because it is a war against the imagination, against creativity, against freedom--freedom of the mind, above all. Fundamentalists would have us believe that violence and competition are the only ways. Fundamentalists would have us believe that women aren't equally human beings.
Fundamentalists would have us believe that the nation and the state are one and the same, and I believe, therefore, that fundamentalism is a pernicious force. It will not enter into conversation with others. The way so many of us get to illumination and insight and even revelation is through conversation with the other. We need to be in discourse with the other. But, the fundamentalists of the world don't want to have that conversation. I have invited fundamentalist Christians on many of my shows over the years. They don't want to do it. They don't want to come in to engage in dialogue.
David Grossman [an Israeli writer featured on the series] says about Samson that he was the first suicide bomber. There's no record in the Bible of anybody before Samson using his body to kill other people. And Grossman went on to say that fundamentalists like Samson and like the [extremist] Muslims of today, live in hermetic realities, closed systems. Systems that invite no criticism, invite no conversation, invite no commentary--and that's very dangerous in a world where there are almost nine billion of us, and each of us comes stamped with a different DNA, and we have a need to try to see the other, so that we know when to fear him and when not to fear him.
So how does one oppose extremism? Is the huge attraction for it a sign that secular enlightenment has failed in some way?
Yes. I think fundamentalism appeals in no small part because secularism—secular politics--failed to feed the soul. We're not going to change the fundamentalists. But we have to stand up and champion a secular democracy in which fundamentalists belong as comfortably as liberal Catholics belong. Secular democracy is about protecting everyone's identity and everyone's faith from the encroachment of others. We have to stand and defend a secular society against the fundamentalist forces that would like for the state to be the tool of their theology.
And is the only way to be in, or participate in, a secular democracy to not bring your own beliefs to the debate? How do you understand or make room for those who say, "My faith is who I am and imbues everything I do, I can't separate it from my politics"?
I agree with that. None of us can set aside our DNA when we are engaged in the world, as citizens, with each other. It's impossible for me to be a journalist without being influenced by my upbringing as a Baptist, as a Christian, as one who experienced the civil rights fights of the 1960s.
Martin Luther King is the epitome of what you're talking about. Martin Luther King was led to struggle for civil rights because of his moral beliefs. But, he didn't insist that other people be forced to accept or adopt his moral beliefs. Only that society be rearranged so that people like him, black people, had an equal voice in democracy. It's inevitable that you will bring your beliefs into the political struggles of our time, but it is essential to realize that your theology, your beliefs about God, cannot be enshrined in legislation or in policies of the state.
We mustn't miss the great significance of that verse in Isaiah that says, "Come now and let us reason together." This was spoken by a mighty prophet of God who had believed he had read God's mind and heart. He was saying, "Come now and let us reason together." That, to me, is the embodiment of how all of us, with belief or without beliefs, need to be involved in the public square.
I've never thought of that verse that way. Do you have a favorite biblical character or story or verse?
His Favorite Verses
I live by that verse from Isaiah, "Come now and let us reason together" and by another verse in The New Testament that says, "I believe. Help thou my unbelief." I am neither wholly a skeptic nor wholly a believer, and I believe, as [the writer] Mary Gordon said, "Belief is only strengthened by doubt. That without doubt, religion becomes nostalgia and Utopian. And that doubt is what keeps us tethered to the realities of our own human nature and realities of the world."
So when I take those two verses together and hold them in front of me, one says, use your mind and your intelligence to relate to the other. The other says, relate to God, but relate to God by recognizing much of religion is incomprehensible and must be a journey and not a prescription.
How did you end up getting so fascinated journalistically by faith?
I spent five years getting a master of theology in seminary, the University of Edenborough in Scotland and Southwestern Baptist Theological Seminary in Texas, and I grew up in a small Protestant culture where religion was as much a part of our lives as the humidity in the summer. We were drenched in religion. And so, I've always seen religion as a human appetite, in the same way that our appetite for food and drink is part of our nature.
Then I was in Washington for seven years working with the Kennedy and Johnson administrations helping to organize the Peace Corps, working on the civil rights legislation of the 60's, and I realized that so many people I was dealing with. no matter what the cause of the moment, were there out of strong religious conviction, deep moral imperative, and I've just simply always recognized that, like sex and hunger, we are religious creatures. That is, we are constantly asking, where do we come from? Who are we and where are we going?
Hovering over the whole series is the general question, is religion a salvation or poison? Ultimately, what do you think?
I would have no way of measuring whether it's been more poison than salvation. You look over the whole span of history, and you see that if it weren't for the Hebrew prophets, Israel would not have been redeemed. You look over the whole span of history and see, nonetheless, that jihadism is part of the Muslim experience and the Crusades are part of the Christian experience and that religion has been used as a heavy bludgeon to compel and kill other people. On the other hand, religious believers fought for justice. Religious believers fought slavery. Religious believers fought for the Civil Rights movement.
Faith and reason are embedded in the basic cells of the human experience and human history. And constantly trying to understand them, trying to come to terms with them, trying to see how they can co-exist together and how they do co-exist together in each and every mind is one of the great experiences of being a journalist.
What advice would you give to people who have a strong, traditional belief in the righteous of their own system and yet want to have an open mind and be part of a pluralistic society?
Advice for Righteous Believers
Open your monologue to a dialogue. Deliberately seek out people who disagree with you. Begin from a position of respect, and listen. Too few of us listen in this world today. This is likely to fall on deaf ears, because the people that we've talked about live in that hermetic or closed system of belief. But, nonetheless, walk out on the street of New York, as I did this morning, and I see every conceivable form of human being, and I know and contained in their own lives is the great diversity of human experience. And I would like to see people set aside the politics of confrontation in order to try to see how other people see themselves.
I've been reading a wonderful book by Amartya Sen, who's a professor of economics at Harvard. It's a book called, "Identity and Violence: The Illusion of Destiny." He has a wonderful line in there. He says, "The same person can be without any contradiction an American citizen of Caribbean origin, with African ancestry, a Christian, a liberal, a woman, a vegetarian, a long distance runner, a historian, a school teacher, a novelist, a feminist, a heterosexual, a believer in gay and lesbian rights, a theater lover, an environmental activist, a tennis fan, a jazz musician and someone who is deeply committed to the view that there're intelligent beings in outer space with whom it is extremely urgent to talk, preferably in English."
It goes on to say, "Each of these collectivities, to all of which this person simultaneously belongs, gives her a particular identity." None of them alone can be taken to be the person's only identity or singular membership category. The point is, we need to realize we're not just a Christian or not just a Muslim or not just a Jew or not just a Buddhist. Each of us is a pot of mixed everything and that we need to see that other people have as many complexities to their identity as we do to ours and approach them then as a wondrously, if confused, jumble of human values and needs and start a conversation based upon the fact that each of us is many things.
Are you optimistic about the future in this regard? There's so much pessimism out there, especially since 9/11 about fundamentalism and extremism and the direction that religion is going.
Optimism vs. Pessimism
I said to a friend of mine on Wall Street once, "What do you think about the market?" He said, "I'm optimistic." I said, "Then why do you look so worried?" And he said, "Because I'm not sure my optimism is justified." I'm the same way.
There's an Italian philosopher who's had a big influence on me, name is Gramsci. He talked about practicing the pessimism of the mind and the optimism of the will, and by that he means--and I take this as a journalist--my job is to look around and describe the world as it is without any whitewash or illusions or romance. To say, "This is how the world looks. This is what's happening in the world." That's the pessimism of the mind. To look around and see that all the signs add up to potential calamity, whether it's global warming or the clash of civilizations or the uncompromising nature of present American politics.
But, as a human being, as a father, as a husband, as a citizen, I don't know how to live in the world except to expect a more confident future and then, get up every morning and try to do something to bring that future about. That's the optimism of the will. I will will myself to try to change the realities that I see that are so disturbing.


Is the Dubai Financial Market Open?
The Dubai Financial Market (DFM) is .
Click the speaker symbol to the right to turn sounds on/off for Dubai Financial Market.
Does Dubai Financial Market Close For Lunch?
The Dubai Financial Market does not close for lunch. Most stock markets in Asia close for lunch and a few exchanges in the Middle East do as well. Stock exchanges in most of the rest of the world remain open continuously from the Opening Bell to the Closing bell. Our Stock Market Countdown takes lunch hours into account for all Stock Exchanges.
Is Dubai Financial Market Open on Weekends?
The Dubai Financial Market is open on weekends. Stock Exchanges in America, Europe, and Asia follow the typical Monday to Friday schedule. However, in the Middle East the work week typically runs from Sunday through Thursday.
How Long is Dubai Financial Market Open?
The Dubai Financial Market is open 20 hours per week which is below average. Most stock exchanges are open 25 to 35 hours per week with 5 days of trading per week. There are several exchanges that are only open 4 days per week and one exchange that is only open 2 days per week. The Deutsche Börse is open more than any other stock exchange.
Does Daylight Saving Time Affect the Dubai Financial Market?
Dubai Financial Market follows the Asia/Dubai timezone which does observe Daylight Saving Time. Although it is not currently Daylight Saving Time (DST). As a result, the timezone offset is now GMT+04:00. Daylight Saving Time for Asia/Dubai will begin on January 19, 2038 at 6:14 AM. At this time, the region will spring ahead one hour.
Stocks can always be traded on the Dubai Financial Market during regular trading hours (listed above).
Check out the list of Dubai Financial Market Holidays to learn more. All holiday closures are taken into account by our Opening/Closing Bell Countdown. Stock Market holidays often differ slightly from official federal and bank holidays in each country.
If you would like to learn more about how the Dubai Financial Market works and learn about investing in general we highly recommend the books listed below. These books are an excellent resource for anyone from first-time day-traders to seasoned investors.


text:
Q: How do I just display plain numbers using SwiftUI? Text keeps adding commas I have been having an issue and have spent days trying to find a solution, I'm trying to learn SwiftUI having not done Swift in a while and only getting back into it post neurosurgery to remove  brain tumour (so maybe I'm just a bit slow). I'd spend a bit of time trying to solve this then give up and move on only to come back to it, but I'm reaching the point where I need it sorted as little else needs done in my app update / conversion to SwiftUI.
I am trying to display a year (eg 2021) output as just a number off some previous code I did, this is not handled as a date for a reason I won't get into here. I'm just passing years as numbers. However when I put these into Text() in the middle of a string they are always output formatted like a normal number (eg 2,021) which obviously is not how years are displayed.
Basically what I need is just a way to tell Text() to ignore the fact it's a "number" and just display it as is with no adaption as if it is just string value as part of the string it's being added to.
Example
struct ContentView: View {

    let theYear = 2021

    var body: some View {
        VStack{
            Text("The year is \(theYear)")
            }
      }
}

Will output

The year is 2,021

I've tried to solve this but I'm clearly missing something that I'm sure is an obvious answer, anyone have any tips or advice? Thanks.

A: You can just wrap it in a String().
Text("The year is \(String(theYear))")

redpajama_set_name: RedPajamaStackExchange


text:
Aid for Australia: 34 Ways to Support
With a crisis of this magnitude, many feel helpless. But you aren't. You can be helpful. Below you will find 34 ways to provide support for the Australian Fire Crisis. They need our help. Make this your first donation of the year. Give up a cup of coffee or five. Be part of a much needed solution. - Jack
Photo: Saeed Khan/Getty
Thank you, Jackson Ryan of the CNET Staff, for posting an article with 34 ways to help. Jackson shares the following: "A number of organizations and volunteer services are aiding in the firefighting and recovery efforts for affected communities. Whether you want to help the firefighting organizations, wildlife or just provide somewhere to sleep, you can find a ton of handy links." Below are the resources Jackson shared in his article 'Australian Fires: Everything We Know and How You Can Help'.
Australia's Red Cross Disaster relief and recovery fund helps support evacuation centers and recovery programs for the affected communities
The NSW Rural Fire Service has a donation page to support the firefighting efforts in New South Wales
The Country Fire Authority is the state of Victoria's rural firefighting service and you can donate directly here.
The Country Fire Service in South Australia also takes direct donations.
To help support firefighters in the state of Queensland, you can donate to the Rural Fire Brigades Association via their webpage.
The Salvation Army has a disaster appeal donations page set up to deliver support to local communities affected by the blazes.
The Victorian Bushfire Appeal is where state premier Daniel Andrews is suggesting to donate. The appeal directs money to communities in need, giving directly to those affected by the fires.
Foodbank is taking donations to help people in need during the crisis. You can donate at its website to the Victorian relief effort, which helps get relief for communities cut off from power and food.
Givit is a not-for-profit organization that cares for those in need by letting you donate goods it then passes on. It accepts items or money at its donation page.
The RSPCA bushfire appeal is used to protect the pets, livestock and wildlife affected by bushfires, helping evacuate animals from disaster zones. Items like livestock pellets and possum boxes are also incredibly handy.
Airbnb has established an emergency housing site for those displaced by the bushfires via its Open Homes initiative. You can book free accommodation in certain areas of New South Wales and Victoria.
Similarly, Find A Bed, established by Australian writer Erin Riley, allows people to offer up a bed or locate a bed in NSW, Victoria and South Australia. It currently has 900 registered volunteers.
The St Vincent de Paul society is helping people on the ground in rebuilding, providing food and clothing and emotional support. It has a donation page here.
The World Wildlife Fund accepts donations to help support conservation activities, particularly related to koalas. Money can help provide emergency care during bushfires.
Zoos Victoria have established a Bushfire Emergency Wildlife Fund which funds emergency vet assistance and "scientific intervention." You can donate to the fund here and it seems to accept PayPal and credit cards.
The Port Macquarie Koala Hospital has already raised in excess of $2 million to help search for and protect the koalas in the region. You can donate at its GoFundMe page.
The Kangaroo Island Wildlife Park was hit hard by the fires in South Australia. It's asking for donations to help with vet costs, koala milk and extra enclosures on its GoFundMe page.
Another GoFundMe page has been set up as a relief fund for First Nations communities to offer "culturally sensitive, specific direct support to some of those communities with critical costs to cover expenses."
Wires is an Australia wildlife rescue organization with a myriad ways to help Australia's native fauna. Donations can be made through its website.
Actor and comedian Celeste Barber is running a fundraiser for the Trustee for NSW Rural Fire Service and Brigades donations fund. You can donate on the fundraiser's Facebook page.
Comedian Nick Kroll and Aussie actor Joel Edgerton have started the hashtag #FightFireWithaFiver. They're encouraging donations to the NSW RFS of $5.
Another Twitter-based campaign -- #AuthorsForFireys -- is conducting an online auction to raise funds for the CFA. If you follow the hashtag you'll find a ton of author's offering services and goods for donations.
Stranger Things actor Dacre Montgomery established his own GoFundMe on behalf of the Red Cross. The link to the GoFundMe is here.
Actor Magda Szubanski and "Egg Boy" Will Connolly have established a GoFundMe to provide funds to services providing ongoing mental health support. You can donate to that fundraiser here.
A useful resource if you want to buy products from rural communities is Australia's Buy From The Bush. It highlights creators and artists from regional Australia you can buy from as they face drought and now bushfire.
There are great mental health services available to those who may need support or counselling in the crisis. Australians can chat to Lifeline online or call 13 11 14, and a similar service is provided by Beyond Blue (1300 22 46 36)
Sign a Change.org petition calling on the NSW Government to provide adequate respiratory equipment to firefighters to protect against harmful smoke.
GenerOZity is a charity marathon event in Australia including some of the country's biggest content creators. Creators will be livestreaming to raise funds for the fires starting Jan. 16 and the charity has a fundraiser set up with a $10,000 goal.
GamerAid is an Australian esports and gaming community initiative which has established a GoFundMe page to donate to fire services across the country. It's also teamed up with content creation team Misfits on a merch drive with profits directed to the relief efforts.
The No Sign of Rain print, by renowned Australian artist BossLogic, can be bought from the online store with 100% of proceeds going to the Red Cross.
The Make It Rain fundraiser is offering up unique online auction prizes from famous Australian musicians. A concert will be held on Jan. 8 and Jan. 9 in Byron Bay.
The Carlton Draft, a clothing store, has teamed up with former Australian Rules Football player Daniel Gorringe to raise funds via GoFundMe on behalf of the Red Cross. 100% of its profits (until Jan. 7) will go toward relief funds.
Run your online searches through Ecosia, which uses profits to plant trees where they're needed most. Trees help reduce the carbon dioxide load. It can be added to Chrome.
In the US, if you want to contact elected officials and make your voice heard about climate change action -- you can do that here. For Australians, you can contact a member of Parliament at this link.

redpajama_set_name: RedPajamaCommonCrawl


text:
Lawrence Kutner may refer to:
 Lawrence Kutner (psychologist), American child and media psychologist
 Lawrence Kutner (House), a fictional character in the TV series House, M.D.

redpajama_set_name: RedPajamaWikipedia


I have a confession: I'm a budget geek and always have been. Why? Because budgets reflect the values and priorities of a government or organization. They are the best way to learn what their leaders see as important and what their plans for the future are. Using the Fiscal Year 2019 (FY 19) budget proposal–that's the year that starts in October 2018–as a metric, this President's administration does not value our oceans. The FY 19 budget proposal for NOAA (the National Oceanic and Atmospheric Administration) is down by about 20%, or $1 billion, despite marine issues needing more attention than ever. Will ocean problems be 20% less severe or costly to study next year? No. Let's dive into where the big cuts are planned and explore the President's indifference to the oceans.
President Trump has proposed huge cuts to NOAA funding that will threaten our ocean.
His administration proposes cutting $100 million for coastal zone management and planning. The coastal zone is where about 50% of our population lives today, and yet he seeks huge cuts to habitat conservation, storm and sea level rise planning, coastal flooding preparedness, and protecting estuarine reserves. The President would also like to cut $100 million from managing U.S. fisheries, enforcing fishery laws and protecting marine mammals and other species. At a time when dozens of fish populations are still recovering from overfishing, climate change is stressing marine wildlife and illegal seafood is flooding our markets, how is this reduction remotely justified?


text:
Mark Edwardson (born 1967) is a former TV news presenter and reporter for BBC North West Tonight based at MediaCity UK in Salford. He is also a seasoned radio presenter having hosted the breakfast shows at BBC Radio Stoke and BBC GMR.

Early life
Mark Edwardson was born on 3 March 1967 at Cowley Hill Hospital in St Helens, Lancashire and grew up in Haydock. He has one sister. Edwardson was educated at English Martyrs RC Primary School in Haydock, St Edmund Arrowsmith Catholic High School, Ashton in Makerfield and St John Rigby College, Orrell. He graduated from Edge Hill College, Ormskirk with an Honours Degree.

Career
Edwardson first worked as a rent collector for the local council in his hometown of St. Helens. After 18 months in the job, he got his first job in broadcasting by asking a radio station news editor if he needed help on a busy derby day in Manchester. He survived the Hillsborough Disaster in Sheffield in April 1989, and presented an emotional special report on North West Tonight on the day of the 20th anniversary of the disaster in 2009. On 1 January 2021 he announced while presenting an evening news bulletin, that it was his final appearance for BBC North West Tonight.

In an interview with the Congleton Chronicle in January 2023, Edwardson announced his plans to stand as an independent candidate for Congleton Town Council and Cheshire East Council at the 2023 United Kingdom Local Elections.

In late January 2023 Edwardson and two other independent candidates standing in the 2023 United kingdom Local Elections in Congleton formed the Congleton Independents political party. The party was formed due to a "plot to destroy" the chances of independent candidates in Congleton winning at the local elections.

References

Living people
People from St Helens, Merseyside
Alumni of Edge Hill University
1967 births
People from Haydock
BBC North West newsreaders and journalists


Want a reliable Home And Or Commercial Cleaning?
If you're looking for a cleaner you can trust to deliver a quality service then call Express Home & Office Cleaning.
Express Office Cleaning is a full service office cleaning and house cleaning franchise with franchisees located throughout New Zealand .We provide services to all kinds of businesses from general offices, retail stores and medical centres to small commercial buildings.
General house tidy, Vacuum all floors, chairs and sofas, Clean & wipe down all bench tops and work surfaces, Clean bathrooms, toilets & showers, Polish mirrors, Mop tiles and vinyl flooring, Clean kitchen cupboards & doors, Deodorise house, Oven cleaning, Dusting throughout, Garage clean and tidy, Wall wash, Light bulb changing, Screen cleaning, Clean window tracks and runners.
Thorough vacuuming of all carpets and floors, Wipe down all work surfaces, Quick clean of bathroom and toilet areas, Optional deodorise house.


text:
const bcrypt = require('bcrypt');

const UserDAO = require('../services/UserDAO');
const createToken = require('../utils/createToken');

class AuthController {
  static login(req, res, next) {
    const { email, password } = req.body;
    UserDAO.findBy({ email })
      .then((userArray) => {
        const user = userArray[0];
        if (!bcrypt.compareSync(password, user.password)) {
          res.status(401).json({ error: 'Incorrect password' });
        } else {
          user.fetchTrailers()
              .then((userWithTrailers) => {
                req.session.currentUser = userWithTrailers;
                const token = createToken(userWithTrailers);
                res.cookie('token', token);
                res.status(200).json(token);
              })
              .catch(err => next(err));
        }
      })
      .catch(err => next(err));
  }
  static signUp(req, res, next) {
    const email = req.body.email;
    const username = req.body.username;
    let password = req.body.password;
    if (email.length > 0 && password.length > 0) {
      password = bcrypt.hashSync(password, 10);
      UserDAO.save({ email, password, username })
          .then((user) => {
            user.fetchTrailers()
                .then((userWithTrailers) => {
                  req.session.currentUser = userWithTrailers;
                  const token = createToken(userWithTrailers);
                  res.cookie('token', token);
                  res.status(200).json(token);
                })
                .catch(err => next(err));
          })
          .catch(err => next(err));
    } else {
      res.status(400).json({ error: 'No email or password entered' });
    }
  }
  static signOut(req, res) {
    req.session.currentUser = null;
    res.clearCookie('token');
    res.status(204).end();
  }
}

module.exports = AuthController;

redpajama_set_name: RedPajamaGithub


text:
From the NFB May 2021
Editors Note: McDonald's owns about 5% of its nearly 14,000 domestic locations and the remainder are franchised. McDonald's has more than 39,000 locations worldwide.
Blind Americans Commend McDonald's for Commitment to Accessibility
McDonalds Drive Thru Kiosks
Baltimore, Maryland (May 2021): The National Federation of the Blind, America's civil rights organization of the blind, and McDonald's USA announce a collaboration to make McDonald's self-service kiosks in company-owned, U.S. restaurants even more accessible to customers who are blind. McDonald's USA's company-owned restaurants will implement these enhancements by December 31, 2021.
Using new and advanced technology, enhancements to existing accessibility features include screen-reading software, tactile keypads and the ability for customers to connect their headphones or ear buds to the kiosk and independently place their orders by responding to audio prompts.
"More accessible self-service kiosks are a win both for McDonald's guests who are blind and for its company-owned restaurants, since they will allow us fully independent access to the menu and ordering options without assistance from restaurant employees or other patrons," said Mark Riccobono, President of the National Federation of the Blind. "We commend McDonald's for quickly working with us to implement these innovations and hope that McDonald's leadership in the industry will serve as an example to encourage other restaurant brands to incorporate accessibility into their customer-service technology plans and specifications."
The enhancements will be incorporated into 100 percent of existing kiosks in California and 25 percent of existing kiosks in each company-owned restaurant in other U.S. states. McDonald's will also incorporate these upgrades into all kiosks that are installed in any U.S. restaurant after July 1, 2021, including new kiosks that suppliers are approved to sell to franchised restaurants.
McDonald's and the National Federation of the Blind will continue to collaborate on training for restaurant staff in company-owned restaurants and other innovations impacting McDonald's guests who are blind.
"At McDonald's, inclusion means opening our doors to everyone, and finding ways to exceed customers' unique needs," Myrna Bell, McDonald's Senior Director, Global Diversity, Equity and Inclusion and Strategic Engagement, said. "We are proud to partner with the National Federation of the Blind to offer innovative solutions for our customers and help make everyone's McDonald's experience even more accessible and enjoyable."
McDonald's kiosks currently include multiple accessibility features, including a reach mode for guests with reach limitations, a screen magnifier, ample clear floor space and a customer assistance call button designed to alert restaurant crew members that a guest may require assistance.
About the National Federation of the Blind
The National Federation of the Blind, headquartered in Baltimore, defends the rights of blind people of all ages and provides information and support to families with blind children, older Americans who are losing vision, and more. Founded in 1940, the NFB is the transformative membership and advocacy organization of blind Americans with affiliates, chapters, and divisions in the fifty states, Washington DC, and Puerto Rico. We believe in the hopes and dreams of blind people and work together to transform them into reality. Learn more about our many programs and initiatives at nfb.org.
About McDonalds USA:
McDonald's USA, LLC, serves a variety of menu options made with quality ingredients to nearly 25 million customers every day. For more information, visit www.mcdonalds.com, or follow us on Twitter @McDonalds and Facebook www.facebook.com/mcdonalds.
Chris Danielsen
Director of Public Relations
National Federation of the Blind
410-659-9314, extension 2330
Juliette Alper
Media Relations Supervisor – Crisis & Issues
McDonald's Global Communications
New Kiosk Model From Evoke Creative Supplier for McDonalds
McDonald's Kiosk News – Delivering More Accessible With Storm
Kiosk Accessibility – McDonalds Kiosk Article on Wall Street Journal
← Ticketing ADA & POS ADA Panel Discussion Next Week with U.S. Access Board Kiosk Association Panelist US Access Board Open Meeting – SSTMs Point-of-Sale & Ticketing →


The people of Wales have voiced significant support in favour of the introduction of opt-out organ donation.
A poll carried out for BBC Wales has found that 63% of voters backed a system of presumed consent, while 31% of respondents were against.
The Welsh government has plans to change the law which will see all organs made available for donation for transplant when a person dies, unless they specifically object to that.
A consultation on the change of law in favour of presumed consent has been held and the Welsh government is currently considering the responses with a bill expected later this year in what would be the first system of its kind in the UK.
A more detailed breakdown of the poll shows that 67% of women were in favour, compared to 59% of men.
Supporters of the move say it will make more organs available for transplant.
At present people must first sign up to the organ donor register but under presumed consent, it would be assumed automatically that everyone has agreed to organ donation, unless they opt out.
The British Medical Association has called for fresh debate in the UK on organ donation to keep up with the demand for organs for transplant and has indicated that new types of donors may need to be considered, such as brain dead patients kept alive on ventilators.
Roy Thomas of Kidney Wales Foundation welcomed the findings of the poll and added: "People are seeing that it's important to save lives, that's the clear message".


text:
Here Are The Official State Censorship Documents Relating To The Skripal Affair
10th May 2018 / United Kingdom
By TruePublica: Last week we reported that a D-notice (Defence and Security Media Advisory Notice) used by the British state to censor the publication of potentially damaging news stories had been formally issued to the mainstream media to withhold publication of the British ex-spy deeply involved in the Skripal/Novichok affair.
We revealed that Channel4 journalists had been issued these D-notices, which were in respect of a former British intelligence officer called Pablo Miller. Miller was an associate of Christopher Steele, first in espionage operations in Russia and more recently in the activities of Steele's private intelligence firm, Orbis Business Intelligence.
Steele was responsible for compiling the Trump–Russia dossier, comprising 17 memos written in 2016 alleging misconduct and conspiracy between Donald Trump's presidential campaign and the Putin administration. The dossier paid for by the Democratic Party, claimed that Trump was compromised by evidence of his sexual proclivities in Russia's possession. Steele was the subject of an earlier (unsuccessful) D-notice, which attempted to keep his identity as the author of the dossier a secret.
If Miller and, by extension, Skripal himself were somehow involved in Orbis' work on the highly-suspect Steele–Trump dossier, alongside representatives of British and possibly US intelligence, then all manner of motivations can be suggested for an attack on the ex-Russian spy and British double agent by forces other than Russia's intelligence service, the FSB.
In other words, the state attempted to clear up the mess it had already made of the Trump dossier, since proven to have made many false assertions, particularly of collusion with senior Russian officials and links to ex-Russian double agent Sergei Skripal.
Yesterday, spinwatch.org revealed that the Skripal affair has resulted in the issuing of not one but two 'D-Notices' to the British mainstream media, which are marked 'private and confidential'. They also disclose the contents of both notices, which have been obtained from a reliable source.
Here is the first one dated 7th March lifted straight from the powerbase website:
From: DSMA Secretary <secretary@dsma.uk>
Date: 7 March 2018
Subject: URGENT FOR ALL EDITORS – DEFENCE AND SECURITY MEDIA ADVISORY (DSMA) NOTICE
Private and Confidential: Not for Publication, Broadcast or for use on Social Media TO ALL EDITORS The issue surrounding the identity of a former MI6 informer, Sergei Skripal, is already widely available in the public domain. However, the identifies of intelligence agency personnel associated with Sergei Skripal are not yet widely available in the public domain. The provisions of DSMA Notice 05 therefore apply to these identities. DSMA Notice 05 inter alia advises editors against the:
'inadvertent disclosure of Sensitive Personnel Information (SPI) that reveals the identity, location or contact details of personnel (and their family members) who have security, intelligence and/or counter-terrorist backgrounds, including members of the UK Security and Intelligence Agencies, MOD and Specials Forces.' The full text of DSMA notice 05 can be found on the DSMA website.
If any editor is currently considering publication of such material, may I ask you to seek my advice before doing so?
Please do call or email me if you have any questions or need further clarification.
I would be grateful were the Press Association and Society of Editors to promulgate this notice through their own networks.
Group Captain John Alexander | Second Deputy Secretary | Defence and Security Media Advisory Committee
7th March D-notice can be viewed HERE refers to "the identities of intelligence agency personnel associated with Sergei Skripal not yet widely available in the public domain."
The 14th March D-notice can be viewed HERE and specifically focuses on "reactions from the Russian authorities" and the publication of Sensitive Personal Information (such as naming the ex-spook in question) or identify personnel who work in sensitive positions.
The use of the word 'advisory' is cleverly inserted to give a false impression that this notice is not state censorship. It is indeed nothing less than state censorship.
The mainstream media are 'advised' not to publish and if they do there will be consequences. Those consequences include being left out of government and agency press releases, attendance at meetings, official announcements and the like. In other words, complete exclusion alongside other measures to ensure compliance.
As Spinwatch says: "However, the DSMA-Notices (as they are now officially called) are one of the miracles of British state censorship. They are a mechanism whereby the British state simply 'advises' the mainstream media what not to publish, in 'notices' with no legal force. The media then voluntarily comply."
Under Boris Johnson, Britain is quickly sinking
Another example of social media censorship
Facebook is at it again!
Age Verification is dead – but only for now


text:
Ferenc Gyircsany – Photo: YouTube
Fidesz spokesman: Gyurcsany, 'who lied to the Hungarian people, still leads left wing'
The ruling Fidesz party's communications director said in a video message on Wednesday that former Socialist prime minister Ferenc Gyurcsany, "who confessed to lying to the Hungarian people" 15 years ago "still leads Hungary's left wing".
27. May 2021 7:29
Marking the 15th anniversary of a leaked speech Gyurcsany made at a closed-door Socialist party meeting in Oszod, in which he said his government had been "lying day and night", Istvan Hollik said: "There isn't any other Gyurcsany", adding that the current leader of the opposition Democratic Coalition had "confessed to deceiving the Hungarian people".
"Today's left is the same as the old. Nothing has changed," the Fidesz politician said.
Civil organisations call on government to withdraw proposal on sale of council-owned rental flats
Government official: Hungary a world leader in vaccinations


Metal band "Masters of Disguise" release their 3rd album end of october.
"Masters Of Disguise" have risen from the ashes of the last existing Savage Grace line-up, standing for the virtues of US speed and power metal like back in the old days.
they put together songs with the feeling and the intensity of US metal in its prime.
With a vocalist who delivers it all (Alexx Stahl), a rhythm section to break bones (Jens Gellner & Mario Lang) and two lead guitars with that certain "savoir faire" (Kalli Coldsmith & Wolfgang Buchinger), Masters Of Disguise hit the stages in Fall 2013 with their debut album "Back with a vengeance".
In february 2015 the second album "The Savage And The Grace" was released. It is a worthy successor to this highly acclaimed and successful debut.
The band is now back with their 3rd album "Alpha / omega" that will be released october 27th !!
You can listen to the video track of the song "Shadows of death" here !
PreviousItalian hard rock band "Poisonheart" release their debut album in october.
NextSwedish melodic metal band "The Soul Exchange" announce release of new Ep in december.
U.K power metal band "Power Quest" announce release of new album in october.
UK. metal band "Skarlett Riot" announce release of their new album in october.
UK female alternative rock band "The Kut" announce release of their debut album in may.


I'm Marissa and I live with my husband and our 2 children in Gdansk, in the NA south area. My hobbies are Vintage Books, Model Aircraft Hobbies and Urban exploration. If you have any concerns pertaining to wherever and how to use Miso, you can get hold of us at our internet site.


text:
Q: Selective network access point using wireless bridge I'm not sure if the title makes a whole lot of sense, but my current set-up is that I have one device that is acting as an access point for a couple of other IoT devices.
The IoT devices connect to the access point over wlan, while the access point connects to the internet over a cellular connection and provides the IoT devices internet access through a bridge in /etc/networking and hostapd (as well as providing some management functions). The cellular connection is metered because the normal data flow rate is very low (kB/day)
I would like to be able to intermittently connect my laptop to the access point over wlan, but once I do this, the various stuff on laptop will start using MB of data for updating or syncing or whatever.
Is there a way that I can configure the access point to ignore packets from my laptop that are trying to make it to the internet while still allowing the IoT devices access?

A: If you don't mind to do a manual command you could set your default route 0.0.0.0 to the loopback adapter on your laptop (or simply delete the 0.0.0.0 route)
That would allow you to talk to the IoT device, while any packet matching the default route will be dropped from your laptop side directly.
Do a route print inside your laptop and check your route.
From there if your IoT device are in a LAN, like 192.168.100.X, then you add a route to there via the wifi bridge IP.
You need to know the bridge IP that face you, and the subnet used for your device.
route add 192.168.100.0 mask 255.255.255.0 192.168.X.X -p
-p to make it persistant if needed
After that do a manual route;
route delete 0.0.0.0 to just disable your Internet.
route add 0.0.0.0 mask 0.0.0.0 127.0.0.1 if Windows is recreating your default route to the access-point.


I am grateful for Ethernet, though I have a good WIFI system here at home I do prefer to connect my devices via ethernet as I find it has better performance.
I am grateful for peanut butter it tastes grate and is a good source of protein. I am also grateful that I am not allergic to peanut butter.


text:
This Is What the World Was Like the Last Time LeBron Didn't Make the Finals
The world was very different in 2010.
Dan Gartland
Despite the best efforts of everyone else on his team, LeBron James is headed to his eighth consecutive NBA Finals. There are high schoolers watching the NBA now who have no solid memories of an NBA championship series without LeBron. The last time LeBron lost an Eastern Conference Finals, the guy who led the Celtics in scoring in Sunday's Game 7 was 12 years old.
It's obvious that eight years is a long time—it's the reason we're all freaking out about LeBron having not missed a Finals in that time—but this tweet sort of put it in perspective for me.
And that got us thinking: How else was the world different the last time LeBron bowed out of the playoffs before the first round.
• SI.com was actually sportsillustrated.CNN.com and looked like this:
• Shaq was LeBron's teammate.
• Hall of Famer Allen Iverson was still in the NBA.
• Kevin Ollie was still in the NBA. He retired, spent two seasons as an assistant coach at UConn, got promoted to head coach, won a national championship and got fired this year.
• DeMarcus Cousins, Blake Griffin, John Wall and Paul George hadn't played an NBA game.
• The first Avengers movie was still two years away from being released.
• This is what the president was up to:
• Mike Trout was playing for the Class A Cedar Rapids Kernals.
• Game of Thrones was still a year away from debuting on HBO.
• Tyronn Lue was enjoying his first year of retirement.
• The Xbox One and Playstation 4 were three years away from being released.
• You would get laughed out of the room for saying LeBron was the best player of all time.
lebron james finalsextra mustardlebron james 2010lebron james2010 nba playoffs2010 nba finalsWhen was the last time LeBron didn't make the Finals?


text:
Q: Efficiently merging two data frames on a non-trivial criteria Answering this question last night, I spent a good hour trying to find a solution that didn't grow a data.frame in a for loop, without any success, so I'm curious if there's a better way to go about this problem.
The general case of the problem boils down to this:

*

*Merge two data.frames

*Entries in either data.frame can have 0 or more matching entries in the other.

*We only care about entries that have 1 or more matches across both.

*The match function is complex involving multiple columns in both data.frames

For a concrete example I will use similar data to the linked question:
genes <- data.frame(gene       = letters[1:5],
                    chromosome = c(2,1,2,1,3),
                    start      = c(100, 100, 500, 350, 321),
                    end        = c(200, 200, 600, 400, 567))
markers <- data.frame(marker = 1:10,
                   chromosome = c(1, 1, 2, 2, 1, 3, 4, 3, 1, 2),
                   position   = c(105, 300, 96, 206, 150, 400, 25, 300, 120, 700))

And our complex matching function:
# matching criteria, applies to a single entry from each data.frame
isMatch <- function(marker, gene) {
  return(
    marker$chromosome == gene$chromosome &
    marker$postion >= (gene$start - 10) &
    marker$postion <= (gene$end + 10)
  )
}

The output should look like an sql INNER JOIN of the two data.frames, for entries where isMatch is TRUE.
I've tried to construct the two data.frames so that there can be 0 or more matches in the other data.frame.
The solution I came up with is as follows:
joined <- data.frame()
for (i in 1:nrow(genes)) {
   # This repeated subsetting returns the same results as `isMatch` applied across
   # the `markers` data.frame for each entry in `genes`.
   matches <- markers[which(markers$chromosome == genes[i, "chromosome"]),]
   matches <- matches[which(matches$pos >= (genes[i, "start"] - 10)),]
   matches <- matches[which(matches$pos <= (genes[i, "end"] + 10)),]
   # matches may now be 0 or more rows, which we want to repeat the gene for:
   if(nrow(matches) != 0) {
     joined <- rbind(joined, cbind(genes[i,], matches[,c("marker", "position")]))
   }
}

Giving the results:
   gene chromosome start end marker position
1     a          2   100 200      3       96
2     a          2   100 200      4      206
3     b          1   100 200      1      105
4     b          1   100 200      5      150
5     b          1   100 200      9      120
51    e          3   321 567      6      400

This is quite an ugly and clungy solution, but anything else I tried was met with failure:

*

*use of apply, gave me a list where each element was a matrix,
with no way to rbind them.

*I can't specify the dimensions of joined first, because I don't
know how many rows I will need in the end.

I'm sure I will come up with a problem of this general form in the future. So what's the correct way to solve this kind of problem?

A: I dealt with a very similar problem myself by doing the merge, and sorting out which rows satisfy the condition afterwards. I don't claim that this is a universal solution, if you're dealing with large datasets where there will be few entries that match the condition, this will likely be inefficient. But to adapt it to your data:
joined.raw <- merge(genes, markers)
joined <- joined.raw[joined.raw$position >= (joined.raw$start -10) & joined.raw$position <= (joined.raw$end + 10),]
joined
#    chromosome gene start end marker position
# 1           1    b   100 200      1      105
# 2           1    b   100 200      5      150
# 4           1    b   100 200      9      120
# 10          2    a   100 200      4      206
# 11          2    a   100 200      3       96
# 16          3    e   321 567      6      400

A: A data table solution: a rolling join to fulfill the first inequality, followed by a vector scan to satisfy the second inequality. The join-on-first-inequality will have more rows than the final result (and therefore may run into memory issues), but it will be smaller than a straight-up merge in this answer.
require(data.table)

genes_start <- as.data.table(genes)
## create the start bound as a separate column to join to
genes_start[,`:=`(start_bound = start - 10)]
setkey(genes_start, chromosome, start_bound)

markers <- as.data.table(markers)
setkey(markers, chromosome, position)

new <- genes_start[
    ##join genes to markers
    markers,
    ##rolling the last key column of genes_start (start_bound) forward
    ##to match the last key column of markers (position)
    roll = Inf,
    ##inner join
    nomatch = 0
##rolling join leaves positions column from markers
##with the column name from genes_start (start_bound)
##now vector scan to fulfill the other criterion
][start_bound <= end + 10]
##change names and column order to match desired result in question
setnames(new,"start_bound","position")
setcolorder(new,c("chromosome","gene","start","end","marker","position"))
   # chromosome gene start end marker position
# 1:          1    b   100 200      1      105
# 2:          1    b   100 200      9      120
# 3:          1    b   100 200      5      150
# 4:          2    a   100 200      3       96
# 5:          2    a   100 200      4      206
# 6:          3    e   321 567      6      400

One could do a double join, but as it involves re-keying the data table before the second join, I don't think that it will be faster than the vector scan solution above.
##makes a copy of the genes object and keys it by end
genes_end <- as.data.table(genes)
genes_end[,`:=`(end_bound = end + 10, start = NULL, end = NULL)]
setkey(genes_end, chromosome, gene, end_bound)

## as before, wrapped in a similar join (but rolling backwards this time)
new_2 <- genes_end[
    setkey(
        genes_start[
        markers,
        roll = Inf,
        nomatch = 0
    ], chromosome, gene, start_bound),
    roll = -Inf,
    nomatch = 0
]
setnames(new2, "end_bound", "position")

A: Another answer I've come up with using the sqldf package.
sqldf("SELECT gene, genes.chromosome, start, end, marker, position
       FROM genes JOIN markers ON genes.chromosome = markers.chromosome
       WHERE position >= (start - 10) AND position <= (end + 10)")

Using microbenchmark it performs comparably to @alexwhan's merge and [ method.
> microbenchmark(alexwhan, sql)
Unit: nanoseconds
     expr min    lq median  uq  max neval
 alexwhan 435 462.5  468.0 485 2398   100
      sql 422 456.5  466.5 498 1262   100

I've also attempted to test both functions on some real data of the same format I have lying around (35,000 rows for genes, 2,000,000 rows for markers, with the joined output coming to 480,000 rows).
Unfortunately merge seems unable to handle this much data, falling over at joined.raw <- merge(genes, markers) with an error (which i don't get if reduce the number of rows):
Error in merge.data.frame(genes, markers) :
  negative length vectors are not allowed

While the sqldf method runs successfully in 29 minutes.

A: After almost one year regarding to this problem you solved for me... now i spent some time to deal with this using another way by awk....
awk 'FNR==NR{a[NR]=$0;next}{for (i in a){split(a[i],x," ");if (x[2]==$2 && x[3]-10 <=$3 && x[4]+10 >=$3)print x[1],x[2],x[3],x[4],$0}}' gene.txt makers.txt > genesnp.txt

which produce the kind of same results:
b   1   100 200 1   1   105
a   2   100 200 3   2   96
a   2   100 200 4   2   206
b   1   100 200 5   1   150
e   3   321 567 6   3   400
b   1   100 200 9   1   120


text:
Q: Passport JS - Help, deserializeUser is not being called I have a React App that is calling express API which authenticates with a local strategy using Passport JS.
The client login page calls the /auth/login route successfully. req.user is sent back to the client, and the serialize function is called (I have a console.log that prints).
Router.post('/login', passport.authenticate('local'), (req, res) => {
    res.send(req.user);
})

Subsequent requests to get user info from /auth/instructor don't work. req.user returns undefined and deserializeUser() is never called.
Router.get('/instructor', (req,res)=>{
    console.log(req.user)
    if(req.user) res.send(req.user)
    else res.send({username: "No user logged in"})
})

I believe my passport and session config is setup correctly.
const passportLocal = require('passport-local').Strategy
const bcrypt = require('bcryptjs')
const instructor = require('../Models/instructor.model')

module.exports = function(passport){

    const strategy = new passportLocal( (username, password, done)=> {
        console.log(username, password)
        instructor
            .findOne({username})
            .then( instructor => {
                if (!instructor) return done(null, false)
                if (bcrypt.compareSync(password, instructor.password)) return done( null, instructor)
                return (null, false)
            })
            .catch( error => console.log(error))
    })

    passport.use(strategy)

    passport.serializeUser( (user, done)=> {
        console.log('serialize', user._id)
        done(null, user._id)
    })

    passport.deserializeUser( (id, done)=> {
        console.log('de-serialize', id)
        instructor.findById(id).then( instuctor => done( null, instructor))
    })
}

var createError = require('http-errors');
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
const cors = require('cors')
const session = require('express-session')
const passport = require('passport')

// Import routers
var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users');
const pupilsRouter = require('./routes/pupils.routes');
const authRouter = require('./routes/auth.routes');

// Connect to database
require('./config/mongoose.config.js');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');

app.use(logger('dev'));
app.use(express.static(path.join(__dirname, 'public')));
app.use(cookieParser("secret"));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(session({
    secret: "secret",
    resave: true,
    saveUninitialized: true,
    cookie: {secure: false}
}))

app.use(cors({
    origin: "http://localhost:3003",
    credentials: true,
}))

// Initialize Passport Middleware
app.use(passport.initialize())
app.use(passport.session())
require('./config/passport.config')(passport)

// Use Routers
app.use('/api', indexRouter);
app.use('/api/users', usersRouter);
app.use('/api/pupils', pupilsRouter);
app.use('/api/auth', authRouter);
app.get('/api/ping', (req, res) => res.send("server is working"))

// catch 404 and forward to error handler
app.use(function(req, res, next) {
  next(createError(404));
});

// error handler
app.use(function(err, req, res, next) {
  // set locals, only providing error in development
  res.locals.message = err.message;
  res.locals.error = req.app.get('env') === 'development' ? err : {};

  // render the error page
  res.status(err.status || 500);
  res.render('error');
});

module.exports = app;

const Router = require('express').Router()
const Instructor = require('../Models/instructor.model');
const bcrypt = require('bcryptjs');
const passport = require('passport');

Router.post('/register', (req, res) => {
    Instructor.findOne({username: req.body.username}).then( results => {
        if (!results) {
            const instructorData = {...(req.body), password: bcrypt.hashSync(req.body.password) }
            Instructor.create(instructorData).then(console.log)
            res.send("Instructor registered")
        } else {
            res.status(400).send("Instructor Already Exists")
        }
    } )

})

Router.post('/login', passport.authenticate('local'), (req, res) => {
    res.send(req.user);
})

Router.get('/instructor', (req,res)=>{
    console.log(req.user)
    if(req.user) res.send(req.user)
    else res.send({username: "No user logged in"})
})

module.exports = Router

This is the client code I'm trying to get to work. Clicking the profile button should get the user from the session and display the username.
import React, { useState, useEffect } from 'react'
import { NavLink} from 'react-router-dom'
import styled from 'styled-components';
import axios from 'axios'

import Logo from './Logo'
axios.defaults.withCredentials = true;
function Header() {

    const [user, setUser] = useState({})
    useEffect( ()=>{
        axios
            .get( 'http://localhost:3000/api/auth/instructor')
            .then( response => setUser( response.data ))

    } ,[])

    const getUser = ()=> {
        axios
        .get( 'http://localhost:3000/api/auth/instructor')
        .then( response => setUser( response.data ))
    }

    return (
        <StyledDiv>
            <Logo/>
            <div className="auth">
                <NavLink to="/auth/login"> Login </NavLink>
                <NavLink to="/auth/register"> Register </NavLink>
                <button className="profile-button" onClick={getUser}>{user.username || "Get User"}</button>
            </div>

        </StyledDiv>
    )
}

 const StyledDiv = styled.div`
    width: 100vw; height: 90px;
    display: grid; place-content: center;
    position: relative;
    box-shadow: 0px 3px 5px 5px lightgray, 0px 2px 1px 1px black;

    div.auth {
        position: absolute;
        right: 50px; top: 35px;

        a {
            margin-right: 7px;
        }
    }

    .user-profile {
        background: purple;
        color: white;
    }

 `

export default Header

Checking the network requests, the client side seems to be setting the SID cookie and making the cors request with no issue. But the req.user has no data..
Screenshot of network request
Appreciate any help here, I'm going mad.

A: It looks like there is a typo (instuctor) in your callback function.
Fix:
passport.deserializeUser( (id, done)=> {
        console.log('de-serialize', id);
        instructor.findById(id).then((instructor) => done( null, instructor));
    })

If you are using VS Code I would also recommend a spell checker plugin.


Image Title: Oil Bronze Side Table Rubbed In Round Accent Metal For Outdoor End Pertaining To Design 11. Filename: oil-bronze-side-table-rubbed-in-round-accent-metal-for-outdoor-end-pertaining-to-design-11.jpg. Image Dimension: 900 x 573 pixels. Images Format: jpg/jpeg. Publisher/Author: Eleazar Kiehn. Uploaded Date: Wednesday - April 18th. 2018 23:24:30 PM. Category: Architecture. Image Source: houzz.com.
Tap The Thumbnail Bellow to See Related Gallery of "Oil Bronze Side Table Rubbed In Round Accent Metal For Outdoor End Pertaining To Design 11"


To be provocative not explicit, to suggest rather than is my ethos. I want the viewer to be intrigued as to what he can't see rather than what he can.
I have been shooting for over twenty years, I shoot for fun, for the enjoyment of creating an image I'm happy with and that the model is happy as well.
All the models I have worked with have been a pleasure, I've not met the Prima Donna yet.
Does it make me a GWC? I suppose it does but unless you sell images are we not all Guy's with cameras. Ultimately my goal is to take Images I am proud to show people who have an interest in model photography and to receive praise for my work.
I shoot a fair amount of Boudoir for friends, friends of friends, mutual acquaintances. I rarely make any money other than a free meal here and there, obviously I can't display this work or I would lose the trust of many people, so occasionally I cook up an idea and employ a model, I pay a fair rate and always stick within levels agreed. I will give a model an image or 2 from these paid shoots however this is at my discretion and they can only be used for portfolio use, special permission must be given for any form of submission.
Please get in touch if you feel that we could create something interesting.


The time of Stilman White's departure is nigh at hand.
The North Carolina freshman point guard is close to submitting his paperwork to serve a mission for The Church of Jesus Christ of Latter-day Saints.
White was recently featured in a lengthy article by The Daily Tar Heel's Kelly Parsons and on ESPN.com by Robbi Pickeral.
White was first featured back in January by the Mormon Times.
Parson's article goes super in depth about his basketball background. He used to attend Chicago Bulls' games with his father, Shannon; Stilman was a start at Hoggard High in North Carolina; his recruiting roller-coaster and how another UNC player's decision opened the door for White to come to Chapel Hill. There is also a section that describes his experience this season, highlighted by his performance in the NCAA tournament.
White's parents both served missions. His father labored in California and his mother, Erin, served in Puerto Rico. They both inspired Stilman.
With the Summer Olympics approaching, Mormon Times and Mormons in Sports is looking to feature any LDS athletes. If you know of any, please email the information to ttoone@desnews.com or mormontimes@desnews.com.
I'm also looking for athletes currently competing in professional hockey, soccer or the world of race car driving. If you know of any, please advise. Your help is appreciated.


text:
The Watson
hist.dsc@asus.queensu.ca
Watson in the Past
HistoryDSC
Uncovering Dracula
Ethan, Melanie, and Isra
Happy Halloween, everyone! In the spirit of Halloween, we wanted to include some historical context of the infamous character of Dracula. From Bram Stoker's novel Dracula to the dozens of Dracula films produced, this eponymous character has brought Vlad III Tepes to the forefront of the Western historical imagination and social commentary. Vlad has always been a source of fascination; however, many so-called historical images have developed into prolific stereotypes and inaccuracies of his historical figure. Consequently, leading writers following these stereotypes have represented Vlad Tepes and Dracula regarding capitalism and social stratification.
During the mid-1400s, Wallachia (a region of Romania today) had an intensive economic exchange with Saxon merchants within the city of Kronstadt/Brașov. Vlad was involved in local politics within the region, and through his economic policies, he became the adversary of the merchants in Kronstadt/Brasov. Vlad aimed to get control over their economic activities in Wallachia to cut down their privileges for transportation on the roads of Wallachia and on the river Alt/Olt. This led to a series of broadsheets, woodcuts, and poems in German about his cruelty and tyranny. An example of such a poem is Geschichte Dracole Waide or the Story of Dracula Voivode in 1463. Many stereotypes are prevalent in the wider historical context of Vlad Tepes. Some include: the quarrels with Saxons, gruesome actions against the noblemen of Wallachia, the terror against the poor, his persecution of Gypsies, and his undiplomatic behavior toward foreign merchants and ambassadors. All these could be found in the propagandistic broadsheets. More stereotypes are still in use today, the most famous of which may be when Vlad had lunch while dozens of victims were impaled around him. Consequently, his image in the Western world is of a bloodthirsty and cruel ruler. Furthermore, Wallachia was far away, under despotic rule, close to the Ottoman Empire with whom the powers of Middle and Eastern Europe struggled over centuries. Nothing could be better for the development of stereotypes than that combination. The development of such stereotypes had thus entered Western Europe and its history to a broader audience, leading to the infamous representation of Vlad III Tepes today.
In the novel, the character Dracula represents a motif of capitalism as he struggles to maintain authority over other capitalist societies represented by other characters. One aspect of Dracula that shows social stratification is between the characters Lucy and Mina. Stoker makes a statement by killing off an upper-class character (Lucy) and letting a lower-social-class character live (Mina). These characters represent the stratified social classes of the Victorian era and break down the social barriers of that time. As a vampire, Dracula embodies the old aristocracy feeding off the lifeblood of the masses. The exploitation of the working classes was very prevalent at the time of Dracula's publication in 1897, as this was during the height of the Industrial Revolution.
Overall, we hope you enjoyed reading this brief history lesson on the historical figure Vlad III Tepes and the character Dracula. As stated, historical writers often wrote Vlad Tepes through stereotypes creating inaccuracies about his figure. Dracula and Vlad III Tepes were often represented through capitalism and social stratification of that in the Victorian era. We hope this brief Halloween history lesson gave you something new to learn about. Have a safe and happy Halloween. Stay spooky!
Anonymous. (2021). Bela Lugosi as Dracula, anonymous photograph from 1931,
Universal Studios. Wikipedia. Universal Studios. Retrieved November 1, 2022, from
https://commons.wikimedia.org/wiki/File:Bela_Lugosi_as_Dracula,_
anonymous_photograph_from_1931,_Universal_Studios.jpg.
Kreuter, P. (2018). How Ignorance Made a Monster, Or: Writing the History of Vlad the
Impaler Without the Use of Sources Leads to 20,000 Impaled Turks. In 2119753116
1463208271 K. Wright (Author), Disgust and desire: The paradox of the monster (pp. 3-
17). Brill Rodopi.
McKee, Patricia. "Racialization, Capitalism, and Aesthetics in Stoker's 'Dracula.'" NOVEL: A
Forum on Fiction 36, no. 1 (2002): 42–60. https://doi.org/10.2307/1346114.
On the Great Man Theory of History
Australia's History Wars
Indigenous Maps and the Misinterpretation of Indigenous Sources


text:
Q: Every time I run npm I get this message - Class extends value undefined is not a constructor or null "Class extends value undefined is not a constructor or null" comes up
every time I run npm here's the screenshot

A: I came into this same error on Monday morning. Perhaps it was overkill, but my solution was to uninstall npm, remove the /usr/lib/node_modules/npm/node_modules/ directory, and reinstall npm. Everything appears functional now.

To be precise, this is the full error message I saw if I ran npm, like npm --version:
TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/socks-proxy-agent/dist/agent.js:114:44)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/socks-proxy-agent/dist/index.js:5:33)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/agent.js:169:25)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)

For what it's worth, I got this error under Arch Linux with a direct install of npm, not using nvm.

A: Download fresh node js and press it to install after first next you will see option to remove the existing node js click on that and reinstall it the problem should be solved as it happens to me


text:
<?php

namespace atomita\wordpress\eloquent\entity;

use \Illuminate\Database\Eloquent\Model;
use \Carbon\Carbon;
use \atomita\wordpress\eloquent\DatabaseManager;

DatabaseManager::bootEloquent();

class Post extends Model {
	use traits\Metable;

	protected $table = 'posts';
	protected $primaryKey = 'ID';

	/**
	 * The name of the "created at" column.
	 *
	 * @var string
	 */
	const CREATED_AT = 'post_date';
	/**
	 * The name of the "updated at" column.
	 *
	 * @var string
	 */
	const UPDATED_AT = 'post_modified';

	/**
	 * The attributes that are mass assignable.
	 *
	 * @var array
	 */
	protected $fillable = [];

	protected static function boot(){
		parent::boot();

		static::observe(__NAMESPACE__ . '\observer\Post');
	}

	public function metas(){
		return $this->hasMany(__NAMESPACE__ . '\PostMeta', 'post_id');
	}

	public function user(){
		return $this->belongsTo(__NAMESPACE__ . '\User', 'post_author');
	}

	public function comments(){
		return $this->hasMany(__NAMESPACE__ . '\Comment', 'comment_post_id');
	}

	public function term_taxonomies(){
		return $this->belongsToMany(__NAMESPACE__ . '\TermTaxonomy',
									'term_relationships',
									'object_id',
									'term_taxonomy_id')
					->withPivot('term_order');
	}

	public function getColumnNames(){
		return [
			'ID', 'post_author', 'post_date', 'post_date_gmt', 'post_content',
			'post_title', 'post_excerpt', 'post_status', 'comment_status',
			'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged',
			'post_modified', 'post_modified_gmt', 'post_content_filtered',
			'post_parent', 'guid', 'menu_order', 'post_type', 'post_mime_type',
			'comment_count'
		];
	}

	protected function getAuthorAttribute(){ return $this->post_author; }
	protected function setAuthorAttribute($v){ $this->post_author = $v; }
	protected function getDateAttribute(){ return $this->post_date; }
	protected function setDateAttribute($v){ $this->post_date = $v; }
	protected function getDateGmtAttribute(){ return $this->post_date_gmt; }
	protected function setDateGmtAttribute($v){ $this->post_date_gmt = $v; }
	protected function getContentAttribute(){ return $this->post_content; }
	protected function setContentAttribute($v){ $this->post_content = $v; }
	protected function getTitleAttribute(){ return $this->post_title; }
	protected function setTitleAttribute($v){ $this->post_title = $v; }
	protected function getExcerptAttribute(){ return $this->post_excerpt; }
	protected function setExcerptAttribute($v){ $this->post_excerpt = $v; }
	protected function getStatusAttribute(){ return $this->post_status; }
	protected function setStatusAttribute($v){ $this->post_status = $v; }
	protected function getPasswordAttribute(){ return $this->post_password; }
	protected function setPasswordAttribute($v){ $this->post_password = $v; }
	protected function getNameAttribute(){ return $this->post_name; }
	protected function setNameAttribute($v){ $this->post_name = $v; }
	protected function getModifiedAttribute(){ return $this->post_modified; }
	protected function setModifiedAttribute($v){ $this->post_modified = $v; }
	protected function getModifiedGmtAttribute(){ return $this->post_modified_gmt; }
	protected function setModifiedGmtAttribute($v){ $this->post_modified_gmt = $v; }
	protected function getContentFilteredAttribute(){ return $this->post_content_filtered; }
	protected function setContentFilteredAttribute($v){ $this->post_content_filtered = $v; }
	protected function getParentAttribute(){ return $this->post_parent; }
	protected function setParentAttribute($v){ $this->post_parent = $v; }
	protected function getTypeAttribute(){ return $this->post_type; }
	protected function setTypeAttribute($v){ $this->post_type = $v; }
	protected function getMimeTypeAttribute(){ return $this->post_mime_type; }
	protected function setMimeTypeAttribute($v){ $this->post_mime_type = $v; }

}


A lawsuit brought by a third-party services company accuses Cisco of antitrust behavior. The vendor refutes the claims and says it will defend itself.
Multiven, a Redwood City, Calif.-based company that provides network maintenance and consulting services, filed the lawsuit Tuesday in the U.S. District Court in San Jose, Calif., where Cisco is based.
In the suit, Multiven alleges that Cisco harmed it and consumers by requiring customers to buy Cisco Smartnet maintenance services in order to receive bug fixes, patches and updates. The suit alleges that Cisco's practices prevent competitors such as Multiven from servicing Cisco networking equipment, according to a statement from Multiven.
Cisco's actions had "monopolistic, anticompetitive and injurious effects in the marketplace for network services," Mutiven alleges in the statement. Multiven accuses Cisco of suppressing competition for service and maintenance of its networking equipment, depriving customers of choice by forcing them to purchase Cisco Smartnet and harming consumers by maintaining "supracompetitive prices" for services of "reduced and constrained" quantity, quality and variety, according to Multiven's statement.
Cisco disputes Multiven's claims, plans to "vigorously defend" itself and is "confident that we will prevail in the matter," according to a Cisco statement provided to ChannelWeb.
"Cisco customers are in no way required to purchase services from Cisco. There are thousands of partners who offer service programs for Cisco products, including bug fixes," Cisco said in the statement. "Additionally, customers who purchase Smartnet from Cisco routinely rate Cisco's postsales support and access to our technical assistance centers (TACs) as among the best support offerings in the IT industry."
Cisco in the statement said its Smartnet policies are "consistent with industry practices for making bug fixes available."
Multiven in its statement did not specify the damages or remedies it is seeking via the lawsuit, but said that its "requested remedies are intended to give consumers greater freedom and flexibility, while at the same time ensuring that the network maintenance services marketplace develops into an open and competitive industry."
The antitrust lawsuit isn't the first legal scuffle for Cisco this year. In October, a jury found that Cisco violated its reseller agreement and deal-registration agreement with Infra-Comm and awarded the San Juan Capistrano, Calif.-based solution provider more than $6 million in damages.