text:
Home / Sleep Hypnosis
Sleep Hypnosis
Eric Suni, Staff Writer
Eric Suni
Eric Suni has over a decade of experience as a science writer and was previously an information specialist for the National Cancer Institute.
Because of how it's portrayed in popular culture, hypnosis is commonly misunderstood. As a result, it is often overlooked or discounted as a potential treatment for a range of medical conditions.
When administered in a tailored way, hypnosis can focus a person's attention in a way that allows them to receive suggestions that can positively change their thoughts and behavior. Early research indicates that it has limited side effects and may help people with insomnia and other sleeping problems.
Before getting started with sleep hypnosis, it's important to know the facts about what it is, how it works, its pros and cons, and ways to make the most of this type of therapy.
What Is Hypnosis?
Hypnosis is a state of consciousness in which a person is focused intensely on a particular idea or image. This reduces their peripheral awareness and fosters what can appear to be a trance-like state Trusted Source NIH News in Health The NIH, a part of the U.S. Department of Health and Human Services, is the nation's medical research agency — making important discoveries that improve health and save lives. See Full Reference .
During hypnosis, a person's brain activity changes, creating receptiveness to new ideas. Hypnotherapy is a type of mind-body medicine Trusted Source National Library of Medicine, Biotech Information The National Center for Biotechnology Information advances science and health by providing access to biomedical and genomic information. See Full Reference that conveys suggestions to a person during hypnosis in order to positively influence their thoughts and actions.
Hypnotherapy has shown benefits for treating several types of health problems including pain and some side effects of cancer treatment. It can be helpful in addressing mental health conditions Trusted Source MSD Manuals First published in 1899 as a small reference book for physicians and pharmacists, the Manual grew in size and scope to become one of the most widely used comprehensive medical resources for professionals and consumers. See Full Reference like anxiety and depression and may assist with behavior change Trusted Source MSD Manuals First published in 1899 as a small reference book for physicians and pharmacists, the Manual grew in size and scope to become one of the most widely used comprehensive medical resources for professionals and consumers. See Full Reference like quitting smoking or losing weight.
Is Hypnosis Mind Control?
Hypnosis is not mind control. During hypnosis, a person is generally more open to suggestions, but they still demonstrate agency Trusted Source American Psychological Association (APA) APA is the leading scientific and professional organization representing psychology in the United States, with more than 121,000 researchers, educators, clinicians, consultants and students as its members. See Full Reference and an ability to control their decisions.
Worries about mind control are usually based on stage acts or TV programs that do not represent how hypnosis is actually used in medicine . While some people who are highly hypnotizable may seem to be fully under the influence of a hypnotist, decades of research demonstrate that hypnosis should not be confused with mind control.
Are You Asleep During Hypnosis?
Hypnosis does not involve falling asleep. Instead, a person remains awake, but their focus is fixed in a way that may make them seem zoned out or in a trance.
What Is Sleep Hypnosis?
Sleep hypnosis is the use of hypnotherapy to address sleeping problems. The goal of sleep hypnosis is not to make a person fall asleep during the hypnosis itself. Instead, it works to change negative thoughts or habits related to sleep so that a person can sleep better once hypnotherapy is complete.
Hypnosis for sleep may be combined with other types of treatment. For example, it can be used alongside cognitive behavioral therapy for insomnia (CBT-I), a form of counseling that reframes negative thinking about sleep. Sleep hypnosis may also promote sleep hygiene improvements to develop healthier sleep-related routines.
How Does Hypnotherapy Work?
Hypnotherapy involves several steps to prepare, carry out, and finish the process.
Informed consent: Before beginning, the process is explained so that a patient knows what to expect, has an opportunity to ask questions, and can consent to the therapy.
Visualizing calming imagery: Hypnosis normally starts with a focus on a calming image or thought. This beginning step promotes relaxation that enables an escalating level of focus.
Deepening focus: Hypnosis requires intense focus, so once a person is calm, further instructions enhance attention on the calming imagery.
Therapeutic suggestions: Once a person is in the trance-like condition, specific suggestions are offered that are tailored to address their medical problem or symptoms.
Ending hypnosis: In the final step, the patient is guided to return to being fully awake and alert.
People trained in clinical hypnosis can help ensure that each of these steps are carefully followed. Many types of health professionals, including doctors, nurses, psychologists, and psychiatrists, can receive training and certification to conduct hypnotherapy.
Hypnotherapy frequently involves more than one session, but it usually does not need to be provided on a continuing basis in order for a patient to benefit.
How Can Sleep Hypnosis Be Done?
Sleep hypnosis follows the same steps as hypnotherapy and involves therapeutic suggestions targeted to sleep. For example, hypnotherapy may encourage a person to feel less anxious about falling asleep or to follow a more consistent sleep schedule.
Experts recommend that sleep hypnotherapy be conducted under the guidance of a trained health professional. A person with extensive training can most effectively lead a person through each stage of the process and customize suggestions to meet their needs.
While most studies have focused on in-person hypnosis, there is some evidence that self-hypnosis may be possible using audio recordings, videos, or smartphone apps. A study of cancer survivors found that most people were able to follow audio recordings for at-home hypnosis Trusted Source American Psychological Association (APA) APA is the leading scientific and professional organization representing psychology in the United States, with more than 121,000 researchers, educators, clinicians, consultants and students as its members. See Full Reference , and many perceived some benefits.
For some people, a recording, video, or app may be more practical than going to a doctor or counselor's office. However, studies of at-home hypnosis tools, such as apps, have found that many lack scientific credentials Trusted Source National Library of Medicine, Biotech Information The National Center for Biotechnology Information advances science and health by providing access to biomedical and genomic information. See Full Reference or evidence of their effectiveness.
In some cases, a person may be able to conduct an initial session of hypnosis with a trained provider who can then recommend follow-up exercises to perform at home to reinforce the benefits of hypnotherapy.
Until further research is conducted about the effectiveness of self-guided hypnosis alone, patients should talk with their doctor or counselor before beginning to use any hypnosis recording, video, or app.
Does Hypnotherapy Help With Sleep Problems?
By encouraging relaxation and creating an opportunity to reorient thoughts and emotions, hypnosis may be a useful tool in enhancing sleep Trusted Source National Library of Medicine, Biotech Information The National Center for Biotechnology Information advances science and health by providing access to biomedical and genomic information. See Full Reference for people with conditions like insomnia.
Small studies have identified modest sleep benefits from hypnotherapy. In one study, the suggestion to "sleep deeper" during hypnosis prompted increased slow-wave sleep Trusted Source National Library of Medicine, Biotech Information The National Center for Biotechnology Information advances science and health by providing access to biomedical and genomic information. See Full Reference , which is important for physical and mental recovery.
Hypnotherapy may reduce symptoms of anxiety and depression, both of which are strongly correlated with sleeping problems. It has been employed to treat pain as well, which can also cause disturbed sleep.
While hypnosis is a promising treatment, more clinical studies are needed to establish its sleep benefits. An analysis of the existing research found that the majority of studies reported better sleep Trusted Source National Library of Medicine, Biotech Information The National Center for Biotechnology Information advances science and health by providing access to biomedical and genomic information. See Full Reference in people receiving hypnotherapy, but larger, more robust studies will be necessary before it can be considered a standard treatment for sleeping problems.
Can Hypnotherapy Work For Anyone?
Hypnotherapy does not work for everyone. Researchers have found that people have different levels of hypnotizability Trusted Source National Institutes of Health (NIH) The NIH, a part of the U.S. Department of Health and Human Services, is the nation's medical research agency — making important discoveries that improve health and save lives. See Full Reference . Though estimates vary, it is believed that roughly 15% of people are highly receptive to hypnosis. About one-third of people are resistant to hypnosis and unlikely to benefit from hypnotherapy.
The remaining people fall on a spectrum somewhere in-between and may be helped by hypnosis. Among these individuals, a desire for change and a positive attitude can increase the likelihood of successful hypnotherapy. People in this category may also be trained to become more receptive to hypnosis.
Hypnotherapy can be provided to people of almost any age. Adolescents are thought to more easily enter into a hypnotic state Trusted Source National Library of Medicine, Biotech Information The National Center for Biotechnology Information advances science and health by providing access to biomedical and genomic information. See Full Reference , but adults and the elderly can also be hypnotized.
What Are the Risks of Sleep Hypnosis?
Hypnotherapy is generally considered to be safe when conducted by a trained professional, but rare adverse reactions Trusted Source National Library of Medicine, Biotech Information The National Center for Biotechnology Information advances science and health by providing access to biomedical and genomic information. See Full Reference have been described. It is important to talk with a health professional before starting hypnosis. A doctor or counselor can discuss any risks in a person's specific situation. For example, people with mental health conditions like post-traumatic stress disorder (PTSD) may be advised to use caution and only receive hypnotherapy from a highly experienced counselor.
Making the Most Of Sleep Hypnotherapy
You are most likely to benefit from sleep hypnosis if you talk with your doctor first. Addressing sleep symptoms with a doctor can help make sure that they aren't being caused by an underlying health condition or sleep disorder.
Working with a professional trained in hypnotherapy can help ensure that you get high-quality care that is integrated into your specific treatment plan.
Helpful Tips if You Find Hypnosis Effective
If you've started sleep hypnosis and find it helpful, there are a few tips that may allow you to further improve your sleep:
Ask for follow-up resources: Talk with the person who guided your hypnotherapy and ask about techniques for building upon your success. This may include hypnosis activities, including recordings or apps, that you can do at home. It could also be strategies for relaxation such as listening to calming music.
Develop dependable routines: Habits have a major influence on behavior. If you've noticed a positive change in your sleep routine, make a point of sticking with it for an extended period so that the habit can become nearly automatic.
Schedule a follow-up: Try to monitor your nightly sleep and daytime energy, and if you notice problems arising, schedule a follow up with your doctor to see if hypnotherapy or another approach can help get you back on track.
What Other Approaches Can Help With Sleep?
Like any medical therapy, hypnosis isn't always effective. For people who are resistant to hypnosis or who simply don't find it useful for sleep, there are other ways to promote better sleep.
Many sleeping problems can be addressed by upgrading your sleep hygiene. Examples of sleep hygiene improvements include:
Following the same sleep schedule every day, including on weekends.
Avoiding excess mental stimulation, including from electronic devices, in the lead-up to bedtime.
Reducing or eliminating intake of caffeine and alcohol in the afternoon and evening.
Making your bedroom conducive to sleep by limiting excess light and sound. For example, dark curtains can keep your bedroom dark, and white noise can help drown out external noises.
National Institutes of Health (NIH). (2019, July). NIH News in Health: Hypnosis for Health., Retrieved January 22, 2021, from
https://newsinhealth.nih.gov/2019/07/hypnosis-health
Yeh, V. M., Schnur, J. B., & Montgomery, G. H. (2014). Disseminating hypnosis to health care settings: Applying the RE-AIM framework. Psychology of consciousness (Washington, D.C.), 1(2), 213–228.
Millstine, D. (2019, February). Merck Manual Consumer Version:Hypnotherapy., Retrieved January 22, 2021, from
https://www.msdmanuals.com/home/special-subjects/integrative-complementary-and-alternative-medicine/hypnotherapy
Millstine, D. (2018, September). Merck Manual Professional Version:Hypnotherapy., Retrieved January 22, 2021, from
https://www.msdmanuals.com/professional/special-subjects/integrative-complementary-and-alternative-medicine/hypnotherapy
Polito, V., Barnier, A. J., Woody, E. Z., & Connors, M. H. (2014). Measuring agency change across the domain of hypnosis. Psychology of Consciousness: Theory, Research, and Practice, 1(1), 3–19.
http://doi.apa.org/getdoi.cfm?doi=10.1037/cns0000010
American Society of Clinical Hypnosis. (n.d.). Myths About Hypnosis., Retrieved January 22, 2021, from
https://www.asch.net/Public/GeneralInfoonHypnosis/MythsAboutHypnosis.aspx
Polito, V., Barnier, A., & Cox, R. (2016, April 5). Don't believe everything you see on TV: hypnosis is less far fetched and far more important., Retrieved January 22, 2021, from
https://theconversation.com/dont-believe-everything-you-see-on-tv-hypnosis-is-less-far-fetched-and-far-more-important-57212
Farrell-Carnahan, L., Ritterband, L. M., Bailey, E. T., Thorndike, F. P., Lord, H. R., & Baum, L. D. (2010). Feasibility and preliminary efficacy of a self-hypnosis intervention available on the web for cancer survivors with insomnia. E-Journal of Applied Psychology, 6(2), 10–23.
https://psycnet.apa.org/record/2011-01464-003
Sucala, M., Schnur, J. B., Glazier, K., Miller, S. J., Green, J. P., & Montgomery, G. H. (2013). Hypnosis–there's an app for that: a systematic review of hypnosis apps. The International journal of clinical and experimental hypnosis, 61(4), 463–474.
Becker P. M. (2015). Hypnosis in the Management of Sleep Disorders. Sleep medicine clinics, 10(1), 85–92.
https://linkinghub.elsevier.com/retrieve/pii/S1556407X14001209
Cordi, M. J., Schlarb, A. A., & Rasch, B. (2014). Deepening sleep by hypnotic suggestion. Sleep, 37(6), 1143–1152F.
Chamine, I., Atchley, R., & Oken, B. S. (2018). Hypnosis Intervention Effects on Sleep Outcomes: A Systematic Review. Journal of clinical sleep medicine : JCSM : official publication of the American Academy of Sleep Medicine, 14(2), 271–283.
Garnett, C. (2015, June 19). Tranceformation: How Can Hypnosis Treat Medical Problems?, Retrieved January 22, 2021, from
https://nihrecord.nih.gov/sites/recordNIH/files/pdf/2015/NIH-Record-2015-06-19.pdf
Sawni, A., & Breuner, C. C. (2017). Clinical Hypnosis, an Effective Mind-Body Modality for Adolescents with Behavioral and Physical Complaints. Children (Basel, Switzerland), 4(4), 19.
Lam, T. H., Chung, K. F., Yeung, W. F., Yu, B. Y., Yung, K. P., & Ng, T. H. (2015). Hypnotherapy for insomnia: a systematic review and meta-analysis of randomized controlled trials. Complementary therapies in medicine, 23(5), 719–732.
Best for Side Sleepers Best Memory Foam Mattress Best Mattress for Back Pain Best Latex Beds Best Mattresses
Best Pillows Best Pillows for Side Sleepers Best Pillows for Neck Pain Best Cooling Pillow Best Down Pillows
Best Sheets of 2022 Top Linen Sheet Brands Best Sheets for Hot Sleepers Top-Rated Egyptian Cotton Sheets Best Affordable Sheets
The Best Weighted Blankets of the Year The Best Blankets 2022 The Best Electric Blankets The Best Mattress Pads The Best Summer Blankets
Mattress Sales
Mattress Deals Black Friday Mattress Sales Cyber Monday Mattress Deals Memorial Day Mattress Discounts Labor Day Mattress Deals


Each time they can make a relocation that professional is do everybody seems pleased. As a result diy ventures are ending up so supported by building holders. Countless individuals accept by doing repairs alone, they uncover extra about particular tools work, and in a similar time cut expenditures. All the same, there may be situations whereby you require to relocate and try to find competent help with home door lock service work being among these problems. House lock solution is substantial and pricey. General support of the doors like oiling and cleansing hard to accomplish corners are basic employments you can positively do in your very own, yet when you are crisp based on repair work, their guideline of job needed for segment substitutes might be a large amount of for you truly to supervise in your own.
These entrances might harm you on the occasion that you should be not cautious and think about an amazing setup house door sales and setup. Tons of people have encountered hands found inside maybe a foot got in their possibilities or the manages while executing repair services. Even with the truth that wounds and diminishments may appear like little points, having a home door suddenly slipping you is not. Talented administrations truly allow you to save even more wage. The crucial motivation behind why various individuals value day work is basically in light of the fact that they can cut prices they generally use to spend for repairmen and experts fabbro sostituzione serratura. Ask any talented professional and they will certainly inform you many calls that they get are from people who checked out various avenues regarding willpower things without any individual else's input yet by the way exacerbated the scenario. At the factor when an unpracticed hand does the activity a straightforward sector replacement might progress toward becoming something graver. Besides, various do it yourself repair work prepares to fix the issue quickly are short and as it were. This reduces the lifetime of the entrances inside your home for the a lot of part since it does not take care of the objective behind the concern inside the primary spot.
It is more secure. Ensure it does not haggle your safety and security, despite the fact that having your doors all of a sudden stick in the most bothersome of occasions might prompt you into performing yourself. These are magnificent passageways for hooligans, especially if the doors are broken. Obstructing your chances during or using transitory fixing actions might make your residence a fantastic goal for lawbreakers. The enormous thing about experienced home door work administrations is the way that one is never a great deal of away. In the event that you ought to be quite requirement of professional home door lock service, a basic research concerning the business index or about the web can offer you the begin you require.
A whole new dimension has become incorporated with external activity actively playing with the initially visual appeal from the Parrot AR Drone Choppers. The opportunity of electronic fights has become possible and specified herein are reliable tips to supply a most enjoyable information about your newest copter when outside the house your home. In case your item chest will offer of the brand new Parrot AR Drone Chopper along with a WiFi empowered Apple inc product, then you and your friends are usually in for unparalleled outside the house enjoyable throughout the approaching days, weeks and in addition yrs. Accentuate this with a number of battery pack features plus hard putting on . Model working the entire day and you will probably tempt an array of wide mouthed spectators for your back garden or play soil, like its makers do with struck women and men in the current commence.
Although, the drone is furthermore created to vacation in your house with distinct protection, but you will discover no helps to keep barred if you choose to accept battles on the market to the greens, in so far as you stay in the wifi array of about 20 meters. The tips below will help you to take advantage of benefit from your devices beyond the confines of your own house surfaces. To start out, make certain you have obtained the Augmented Simple fact charge-totally free air travel air travel mobile app since this is the medium-sized by means of which your system will synchronize together with your Apple organization instrument and soar to ideal levels. Also, you have got to ensure that your control is scheduled to Airplane setting plus the Wifi is switched on to get in effect making use of the quadricopter, since it is described by its makers.
What could be the fact for being in the outside if you cannot share the satisfaction along with other devoted game players? Together with the complete a number of-gamer method, it is possible to duplicate battles using the buddies who also private a drone 720x price. You can capture, contend on who flies best or collide copters and learn that has better handle after the collision. Also, there may be basically no limit to the amount of a number of-individuals which could take part in the entertainment. Have you figured out what? The greater, the merrier and also this result in a lot more concentrates on for every single warrior. For top level soaring and online game taking part in experience though beyond the home, you ought to stay away from windy areas like normal water shores and listed here trees and shrubs. Also, your copter will receive caught up in bushes and damage unprotected rotors should they find yourself struggling in bushes and shrubs although powered.


text:
Clinical Signs and Symptoms
Encyclopaedia for patients
Encyclopaedia for professionals
Emergency guidelines
Orphan drugs
Expert centres and Networks
Expert centres
Networks of expert centre
European reference networks
Registries & biobanks
Patient organisations
Patient organisation
Federations/Alliances
Helplines for personal queries
Professionals and institutions
Quality charters
About orphan drugs
About Orphanet
About rare diseases
Orphanet Tutorials
Orphanet produces its data according to published procedures
Orphanet Report Series
The portal for rare diseases and orphan drugs
Sources/procedures
Search for a rare disease
* (*) mandatory field
Disease name
Orpha number
Gene name or symbol
Other search option(s)
(*) Required fields.
You are (*) Choose: Health professional Patient/Family/Association Biopharmaceutical industry Scientist Student Other
If you have selected the �Other� category, please specify which type of user you are: *
Topic of your comment *
Epidemiology data
Summary and related texts
Related genes
Nomenclature and/or coding
Only comments seeking to improve the quality and accuracy of information on the Orphanet website are accepted. For all other comments, please send your remarks via contact us. Only comments written in English can be processed.
Check this box if you wish to receive a copy of your message
Disease definition
Moyamoya disease (MMD) is a rare intracranial arteriopathy involving progressive stenosis of the cerebral vasculature located at the base of the brain causing transient ischemic attacks or strokes.
ORPHA:2573
Classification level: Disorder
Synonym(s):
Idiopathic Moyamoya disease
Prevalence: 1-9 / 1 000 000
Inheritance: Multigenic/multifactorial or Autosomal dominant or Autosomal recessive or X-linked recessive
Age of onset: All ages
ICD-10: I67.5
OMIM: 252350 607151 608796 614042
UMLS: C0026654 C2931384
MeSH: C536991 D009072
GARD: 7064
MedDRA: 10028047
The incidence of MMD is highest in Asian populations but MMD occurs in many other ethnic groups. The incidence ranges from 1/280,000 to 1/89,000 in Japan and China to1/1,100,000 in the US. The prevalence in Japan is estimated to be 1/30,000-1/9,500.
Clinical description
There are two peak incidence ages: young children (5-9 years) and adults (mid-40s). Involvement is usually bilateral but unilateral cases are reported. Disease manifestations are highly variable. Some affected individuals remain asymptomatic, some develop transient attacks, and others severe neurologic deficits as a result of infarcts or hemorrhage. Hemorrhage occurs less often in children. Other manifestations include headache, dizziness, seizures, and chorea. Some patients present intellectual disability. The course is also highly variable but generally progressive. The term MMD is used when there is no cause and Moyamoya syndrome (MMS) when the disease is associated with other diseases (sickle cell anemia, neurofibromatosis; see these terms).
The etiology of MMD is not currently known but is thought to be multifactorial with genetic determinants playing a role. In Japan, about 15% of patients have a family history. Mutations in the RNF213(17q25.3) gene have been found in some patients but their pathogenic role remains unclear. The intracranial vasculopathy associated with smooth muscle actin alpha 2 (ACTA2) (10q23.31) mutations has been referred to as MMS, but it has distinctive angiographic features, including dilatation of proximal ICAs, an abnormally straight course of intracranial arteries, and absence of typical moyamoya collateral vessels.
The diagnosis of MMD may be difficult because it is rare and because of the non-characteristic signs and symptoms. Diagnosis is suspected on the basis of the clinical presentation and imaging findings. Cerebral angiography is the standard confirmatory diagnostic method. Moyamoya disease involves in particular the supraclinoid internal carotid arteries and their proximal branches. The term moyamoya means "puff of smoke" in Japanese, in reference to the appearance of abnormal vascular collateral networks on angiography that develop adjacent to the stenotic vessels. Magnetic resonance angiography (MRA) can also be used.
MMD may develop in an isolated manner but can also be associated with other diseases when it is known as MMS: typical angiographic MMDfeatures associated with other diseases, e.g. sickle cell anemia, Down syndrome, neurofibromatosis type 1 (see these terms) and many others.
Autosomal dominant inheritance with incomplete penetrance has been described in affected Japanese families. Other suggested patterns include autosomal-recessive, X-linked-recessive, or multifactorial inheritance.
Management and treatment
No specific treatment to stop progression or reverse the intracranial arteriopathy is available for MMD. Drug therapy is mainly used to counter disease complications such as stroke and transient ischemic attacks, to alleviate symptoms, and to prevent cognitive deterioration. Physical, occupational and speech therapy may be needed after attacks. Surgical revascularization procedures to restore blood flow to the brain involving direct, indirect or combined techniques have also been used and appear to reduce the risk ofischemic stroke and possibly cognitive dysfunction. The indication and timing of surgery remains controversial.
Early detection and appropriate treatment improve the long-term outcome. The prognosis depends on disease severity. Mortality rates are estimated at about 5% for adults and 2% for children. The main cause of death is hemorrhage.
Expert reviewer(s): Dr Karin KLIJN - Last update: April 2015
Article for general public
Svenska (2017)
Fran�ais (2008, pdf)
Suomi (2015, pdf)
Disability factsheet
Further information on this disease
Classification(s) (1)
Gene(s) (2)
Publications in PubMed
Other website(s)	(5)
Health care resources for this disease
Expert centres (98)
Patient organisations (14)
Orphan designation(s) and orphan drug(s) (1)
Research activities on this disease
Clinical trials (0)
Registries/biobanks (17)
Network of experts (0)
Specialised Social Services
Eurordis directory
The documents contained in this web site are presented for information purposes only. The material is in no way intended to replace professional medical care by a qualified specialist and should not be used as a basis for diagnosis or treatment.
Our Website does not host any form of advertising
Our partnerships do not influence our editorial policy

redpajama_set_name: RedPajamaCommonCrawl


I'm Tanja, 28 years old from Vienna, Austria. I've always traveled a lot and enjoyed exploring new places. Unfortunately having a full time job got in the way of my 'Wanderlust'. So after five years of working for the same company I decided to take a break for one year to travel around the world and learn something new. Before going to San Sebastian, I've already spent 3 months at Linguaschools in Barcelona, where I started my first ever Spanish course.
I was always fascinated with languages. After college I moved to Canada for a while to work there, which not only was a great experience it also helped me so much with improving my English. I've always been more of a math person, so I knew that just taking on evening courses in my hometown wouldn't really do the trick for me. So it had to be a language course abroad.
There are many reasons why I chose Spanish, but mostly because it's one of three most common languages in the world. I really wanted to learn something that I could use on my travels. Since I am also planning a trip to Latin America after my 6 months in Spain, I didn't think of any other language.
What was your reason to go to San Sebastian and since when have you been here?
A while back I almost moved to San Sebastian because of a job offer. I have never been there, or heard much about the town before that. In the end I didn't take the job and forgot all about it. In my 3 months in Barcelona with Linguaschools I had such a great time with the school and the people I've met there. So I wanted to stick with the school and looked into other places where Linguaschools offered Spanish courses. San Sebastian was one of them. After doing a bit more research and finding out that they do have a great surf beach there, I was sold on the idea of going to the Basque Country for 5 weeks.
How did you experience the time at the language school?
My first day at school was a bit exhausting since I had just arrived the night before and got horribly lost on my way to the school. It took a while and some locals, but in the end I found it.
The school was a bit different from the one in Barcelona, but I liked my group the moment I walked in the classroom. Most of the time we were about 10 students, which is more or less the maximum. Even though we were that many students, it always felt well balanced.
The only activity I attended was surfing. The school had a pretty sweet deal with the local Surf School. Which I would highly recommend for people who are not staying long enough to get their own board. It was usually 4-5 days a week, depending on the number of students who signed up for it. It doesn't matter what level you are in and I never had more than 2 other people in my group, which gives the teacher enough time to focus on everyone individually. All in all I really enjoyed the school, made new friends there and really improved my Spanish.
How did you level of Spanish evolve during your stay?
I went from 0 to A2 in my 3 months in Barcelona, so I started with B1 in San Sebastian. When I arrived I was able to have conversations with people about basic things, ask for directions or recite what I did on the weekend. I still struggled a lot with my vocabulary and of course still missed basic grammar.
Now I am able to give my opinion, make suggestions and use sentiments. I also understand way more.
When I arrived in San Sebastian it was almost impossible to understand my roommate, because she spoke so fast, the weekend before I left, during a random conversation about TV Shows, I realised that I have absolutely no problem understanding what she's saying. This and buying my first book in Spanish made me feel really confident about my progress.
Why should someone visit San Sebastian?
And the beaches. There's Playa de Concha, the bigger city beach with calm azul waters and cafes with a beautiful view. And then there is Zurriola (Playa de la Zurriola) the Surfer's beach, where you will find people in the waters at almost any time of day. It also features the cheesiest sunsets I've ever seen.
Besides surfing at Zuriolla beach, one of my favourite things to do was walking around through the old town – Parte Vieja. That's where the history of the city can be discovered. You can still see parts of the Town Wall and walk around at the fishing port. Urgull – the hill is a place you shouldn't miss out, perfect for sundown – picnics. And then there is Santa Clara Island which I heard amazing things about but unfortunately never went.
Another thing I would highly recommend is a day trip to Biarritz. San Sebastian is really close to the French border and there are buses going almost hourly. One day after school, a classmate and I decided to have coffee in France, so we hopped on a bus and 40 minutes later we arrived in Biarritz. It's a cute little town with lots of coffee shops and a beautiful beach. If you want to go on a little shopping spree just keep in mind that France is a bit more expensive then the places you find in Spain.
Although I got all confused with having to speak French all of a sudden, I was over the moon being there. While it's so close it has a whole different vibe to it. Next time I will be heading there I will make sure to bring my surfboard though.
Going east is not the only possibility though. A friend I made at school in Barcelona and I decided to meet up in Bilbao for a prolonged weekend. The bus from San Sebastian to Bilbao takes roughly two and a half hours but there are also trains, which might be a bit faster. Bilbao is great if you have more than one or two days. We spent almost one whole day at the Guggenheim Museum exploring the Jeff Koons & the Basquiat exhibitions. It was probably my first real Museum visit after a long time and since I always admired Basquiat I was very pleased to find his work shown at the same time that I was in the city. Once again the weather was on our side so besides strolling through the city, we spent a huge amount of time picnicking, lounging in the sun and unwinding in the beautiful park areas Bilbao has to offer. Our host for the weekend recommended Casco Viejo (The old part of the city) for going out to eat. Which is not only a good place to eat, but also to do a little shopping.
"La Madame" was my favourite place to go for brunch on weekends. They also have wonderful food during the week. They mix typical basque ingredients with classic Spanish cuisine as well as international influences. Also who doesn't like Brunch? Then there is "vegan vegetarian km0" which we often chose after school for their lunch offer. I am not a vegetarian but went to class with a girl who was, and I remember it was always very hard to find places in San Sebastian that would serve vegetarian options.
So we were very happy when we found KM0, not only because it was so close to school but also because it didn't have the typical basque opening hours. If you are not vegan or vegetarian you will have it pretty easy with good food there. In Party Vieja, for example, are many amazing pinxto bars. Also for the best carrot cake in town go to "Robinson Bar" in Gros.
What are your favorite places to go out in San Sebastian?
Every Thursday there is Pintxo Pote in Gros, which I always enjoyed. The bars in the area open around 6pm and serve pintxos with drinks for a bargain (mostly between 1€ – 2€). In Gros it's not that much about the food, although I had some really good ones there. It is more about bar hoping and have a few drinks with your friends on a week night. There are also some places that changed Pintxo Pote to Pizza Pote or Burger Pote, which are a lot of fun, but as said it's not all about the food. While the Pintxo Pote is happening in Gros there is also Gastro Pote at Mercado de San Martin in the Centro of San Sebastian. Every Thursday they transform the market area into a little concert hall surrounded by amazing food and great wine. I am not much of a party person, but I do love food and enjoy drinks with friends. So these Thursdays always been the most fun to me.


text:
Megalomphalus azonus is a species of very small sea snail, a marine gastropod mollusk in the family Vanikoridae.

Description

Distribution

References

Vanikoridae
Gastropods described in 1865

redpajama_set_name: RedPajamaWikipedia


The International Conference on Advances in Computing & Information Technology (IACIT- 2019) will be held at REVA University, Bangalore, India. This conference is an extension of THREE National Conferences held on ACIT during 2016, 2017 and 2018. The conference presents an open forum for scientists, researchers and engineers to exchange the latest innovations and research advancements in the areas of next-generation computers, communications protocols and algorithms, high performance computing, data science, software engineering, IT services and applications. The conference will include plenary sessions and invited talks from eminent researchers on the state of the art in related areas. Contributions describing original research, surveys and applications are invited.


War of the Rebellion: Serial 013 Page 0664 THE PENINSULAR CAMPAIGN, VA. Chapter XXIII.
The enemy, having ascertained the general disposition of our troops-opened a brisk artillery fire upon the railroad and our center, unfor, tunately mortally wounding the gallant General Griffith, commander of the Third Mississippi Brigade, who was borne from the field and died the next morning. The enemy's fire was responded to with effect by the railroad battery, as well as by Carlton's battery, which that practiced artillerist Lieutenant Colonel Stephen D. Lee had placed in advance in a commanding position in front of our center.
Thus, the forces which General Lee had left to operate against the enemy being reduced from some 35,000 or 40,000 to some 13,000 men, I was compelled to abandon the plan of capturing any large portion of the enemy's forces, and directed that Semmes' brigade (McLaws' division) should be placed on the Williamsburg road, and Cobb's on the left of the railroad in line with Kershaw's; Jones' division being on the extreme left, and Barksdale's brigade marching in reserve behind the center. I ordered the whole to move to the front and each commander to attack the enemy in whatever force or works he might be found. This was executed promptly and in beautiful order, though the ground was difficult and the wood dense.
Kershaw's brigade soon became engaged with the enemy, who took refuge in the works on the Williamsburg road, from which he was driven in gallant style by the infantry advance and by the excellent artillery practice of Kemper's battery. Retreating from work to work, pursued by our line, which swept through his camps with little interruption, the enemy was at last driven as far as Savage Station, where a strong line of battle was formed ready to receive us. He also occupied the wood in front of the station. Here Kershaw's brigade engaged him frankly and furiously, and was gallantly supported by Kemper's battery and Semmes' brigade on his right.


text:
WMU basketball power forward Mario Matasovic transferring to Sacred Heart
WMU basketball forward Mario Matasovic
Gallery: WMU basketball forward Mario Matasovic
By David Drew | ddrew1@mlive.com
KALAMAZOO, MI -- Western Michigan men's basketball power forward Mario Matasovic will transfer to Sacred Heart University, Broncos coach Steve Hawkins said Wednesday.
The 6-foot-8 power forward will have to redshirt in 2015-16, but he will have two seasons of eligibility after that with the Pioneers, who play at the Division I level in the Northeast Conference.
The Pioneers went 15-17 this past season, including a 9-9 mark in the NEC.
It was announced on April 21 that Matasovic would transfer out of WMU to look for more playing time at another school.
Matasovic played in 51 games in his two years at WMU without a start. He played an average of just over seven minutes per game and averaged 1.3 points per game.
He averaged 1.7 points per game this past season and was able to pass junior A.J. Avery for playing time early in the season and gave WMU a big energy boost off the bench. However, Avery eventually re-emerged as the first power forward off the bench.
WMU will have a loaded frontcourt in 2015-16 with starters Drake LaMont and Connar Tava returning and bench players Avery and Kellen McCormick returning to go along with Khadim Dieng, a 7-footer who will likely compete for more playing time as a sophomore along with incoming 7-foot freshman Seth Dugan.
Email David Drew at ddrew1@mlive.com and follow him on Twitter and on Instagram.


Editor's note: the following article is a guest post by Shay Namdarian, GM of Customer Strategy at Collective Campus.
It is no coincidence that the most innovative brands in the world are also leading the way in customer experience. Brands like Apple, Disney, Zappos, and Amazon are front of mind during conversations about memorable customer experiences. To thrive in this era of rapid disruption, other organizations also need to invest and focus on the customer journey.
The trend is set to continue as highlighted in a study from Gartner. The study found that in 2010 only 36% of companies expected to compete mostly on customer experience, whereas in 2016 that percentage increased to a staggering 89%.
So what makes these leading brands stand out from the rest? What can we learn from the experiences they provide their customers?
Each touch point with the customer matters, whether it be early in the journey or towards the end. Customers value and appreciate a journey that is consistent and Apple is a brand that does this extremely well.
Let's take the iPhone as an example. Apple provides a memorable experience at every point in the journey, from the research phase (clean and slick website) to the communication while waiting for your iPhone (email and sms delivery updates). A standout moment in the journey (often overlooked) is the suspense encountered when lifting the lid off a new iPhone box. It takes about five seconds to slide off the lid – the excitement, the anticipation, the joy – it all forms part of the experience.
Customers are connecting with companies in more ways than ever. Mobile, email, instant chat, social media – the list goes on. Disney continues to enhance their omni-channel experience and this is apparent in the customer journey at Disney World. The seamless end to end journey starts from the moment a customer visits their mobile-responsive website.
After purchasing their tickets and prior to arriving at Disney World, customers receive Magic Bands in the mail. Each family member has their own assigned Magic Band but these aren't just ordinary wrist bands, they provide visitors with an experience like no other, acting as a hotel room key, ride reserver, and a method of making payments. What about all the photos your children take with Disney characters? Well these also get stored on your Magic Band and can be accessed later. In true end to end customer experience, Disney follow up with customers after their visit, thank them for visiting and share photos of memorable moments during their visit.
Temkin Group recently reported that loyal customers are five times as likely to repurchase, five times as likely to forgive, seven times as likely to try a new offering, and four times as likely to refer. Given these statistics, it is no surprise that Zappos places a focus on creating lifelong customers.
As Ted Rubin pointed out on episode #11 of the Future Squared podcast, the marketing focus needs to be on building relationships and metrics that expand beyond ROI to include ROR: Return on Relationship.
By successfully building a loyal customer base, significant marketing for your business will come from the resulting word of mouth.
Millennials shop on Amazon because it is fast and easy. By introducing Amazon Prime, Amazon further strengthened their appeal to millennials, providing a fixed membership fee so customers no longer need to pay for shipping throughout the year (addressing a millennial pain point).
Building your customer experience is a marathon not a sprint. As competition continues to increase it is imperative that brands in turn continue to improve and enhance their customer experience. Brands such as Amazon (Jeff Bezos) and Zappos (Tony Hsieh) have leaders that are driving the customer-centric approach and it is time for others to follow in their footsteps.
Shay is the GM of Customer Strategy at Collective Campus. Shay has launched two CX-conscious fashion startups and has helped drive customer experience and innovation across large organizations in industries such as retail, utilities, financial and legal services.


LAS VEGAS, Jan. 4, 2017 /PRNewswire/ -- (CES 2017, North Hall Booth #6106) Elektrobit (EB), a leading developer of cutting-edge, embedded and connected technology solutions for the automotive industry, today announced the first software module for its EB robinos product line — EB robinos Predictor, a solution that provides accurate street map and topographical data for development of predictive driving systems. The new solution features a self-learning algorithm to enable the implementation of advanced driver assistance systems (ADAS), like predictive headlights, curve speed warning and traffic-sign assistance, which require accurate and up-to-date positioning information.
Announced in 2016, EB robinos is the first comprehensive, hardware-agnostic software solution that enables carmakers and Tier 1 automotive suppliers to develop and bring to market highly automated driving (HAD) systems. With EB robinos Predictor, EB has enhanced its popular electronic horizon software — currently on the road in more than three million vehicles — making it accessible to a more diverse range of models.
EB robinos Predictor especially supports free OpenStreetMaps (OSM) which provides carmakers a cost-effective way to offer premium driver assistance features in even their entry-level vehicles. The software uses this mapping information to generate highly precise data, which is interpreted by EB's electronic horizon reconstructor software module into information usable by the car's electronic control unit (ECU). This enables cars to prepare for and respond to real-world situations.
Moreover, map data can be incrementally enriched over the air while the vehicle is driving, using EB's self-learning algorithm, meaning every vehicle always has the most accurate information about the road ahead.
"Advanced driver assistance systems not only make driving more enjoyable, but also much safer," says Dr. Björn Giesler, Head of Driver Assistance at EB. "Financial restraints shouldn't hold carmakers and suppliers back from offering these features to all of their customers, no matter which vehicle model they're driving. With our open standards approach, we hope to help automakers streamline the development and production of highly automated driving systems, and get them on the fast track to automated driving."


text:
How Length of Credit History Affects Your Credit Score
How long you've had credit affects your score. But paying on time and not using a lot of your limit matter more.
By Bev O'Shea
Bev O'Shea
personal finance writer | MSN Money, Credit.com, Atlanta Journal-Constitution, Orlando Sentinel
Bev O'Shea is a former NerdWallet authority on consumer credit, scams and identity theft. She holds a bachelor's degree in journalism from Auburn University and a master's in education from Georgia State University. Before coming to NerdWallet, she worked for daily newspapers, MSN Money and Credit.com. Her work has appeared in The New York Times, The Washington Post, the Los Angeles Times, MarketWatch, USA Today, MSN Money and elsewhere. Twitter: @BeverlyOShea.
Edited by Kathy Hinson
Kathy Hinson
Lead Assigning Editor | Personal finance, credit scoring, debt and money management
Kathy Hinson leads the core personal finance team at NerdWallet. Previously, she spent 18 years at The Oregonian in Portland in roles including copy desk chief and team leader for design and editing. Prior experience includes news and copy editing for several Southern California newspapers, including the Los Angeles Times. She earned a bachelor's degree in journalism and mass communications from the University of Iowa.
Whether you've had credit for six months or 20 years can make a difference in your credit score.
A long track record without any major slip-ups suggests that your credit behavior will be similar in the future — and lenders and credit card issuers like that.
Credit scoring company VantageScore combines two things in its 3.0 scoring model — how long you've been using credit and what types of credit you have — into a single factor and considers it "highly influential." FICO credit scores break it out a little differently, with the length of your credit history accounting for 15% of your score and the mix of accounts making up 10%.
Know how your credit is scored
See your free score and the factors that influence it, plus insights into ways to keep building.
Length of credit history vs. credit age
The "length of credit history" means how long any given account has been reported open, says Rod Griffin, senior director of public education for Experian, one of the three major credit bureaus.
"Generally, the longer an account has been open and active, the better it is for the credit score," Griffin says. "That's particularly true for an account with a positive payment history that has no delinquency."
The credit scoring algorithms calculate the average of how long all your accounts have been open. That average age of accounts is your "credit age."
It's all but impossible to get a score higher than 800 if you're young, because your credit age likely will be low.
Credit age matters, but other factors matter more
While credit age matters for credit scoring purposes, the only thing you can do about it is to keep your credit accounts in good standing and avoid closing credit cards unnecessarily.
Being an authorized user on an old, established account in which the primary cardholder has excellent credit may help your score a little, but the passage of time during which you build or maintain good credit helps the most.
Keep length of credit history in perspective, though: It's only one element influencing your credit score, and not the most important one at that. Here's a breakdown of the factors that affect your credit scores:
The biggest effects on your credit score come from:
Payment history — making sure that you pay all bills on time.
Credit utilization — using no more than 30% of your credit limits, and less is better.
If you use credit regularly and lightly, and pay your bills on time every month, you're doing the two essential things to have a good score. Sit tight and the average age of accounts will take care of itself.
About the author: Bev O'Shea is a former credit writer at NerdWallet. Her work has appeared in the New York Times, Washington Post, MarketWatch and elsewhere. Read more
Does Checking My Credit Score Lower It?
Why Did My Credit Score Drop After Paying Off Debt?
How to Calculate Your Credit Utilization Ratio
5 Tips for Lowering Your Credit Utilization
Dive even deeper in Personal Finance
What Is a FICO Score? FICO Score vs Credit Score
What Is a VantageScore?
Explore Personal Finance


text:
Q: Entity Framework - Including Collections on Derived from Base DBSet The main question I'm asking is:

Is there a way to keep a DbSet based off the base class and still support eager loading for a Derived object in a single retrieve method that only requires an Id?  The answer may be that you can't.  I'm just hoping I'm overlooking something.

Consider the following situation:
//Models
public class Base {
    public int Id {get;set;}
    public string BaseProp {get;set;}
}

public class Derived : Base {
    public string DerivedProp {get;set;}
}

//Context
DbSet<Base> Bases {get;set;}

//Saving
public void Save(Base obj){
    // Adding only for brevity
    context.Bases.Add(obj)
    context.SaveChanges();
}

//Retrieval
public Base Retrieve(int id){
    return context.Bases.FirstOrDefault(x => x.Id == id);
}

EF6 is smart enough to know when Base objects are actually Derived objects and populate the additional fields on save as well as retrieve the objects as Derived objects.
However, if I change the derived class to be:
public class Derived : Base {
    public string DerivedProp {get;set;}
    public ICollection<SomeLookup> Lookup {get; set;}  // Creates junction table with Id/LookupId as columns
}

I can still save (and it populates the junction table beautifully with the selected lookups), but I no longer can retrieve the full object in my Base DbSet because I can't change it to have an eager include on a collection that Base doesn't know exists.
I could virtualize the collection so it will lazy load when the mapping occurs down the line, but I'm wondering, and this is the root question:

Update: Essentially all I want to know is, if I only have an Id to work with for my retrieve, the following wont work, but is there something like it that will?
context.Bases.Include(x => ((Derived)x).Lookup).FirstOrDefault(x => x.Id == id)

The use case would be that I have a list page.  That page doesn't need to care what types it is because it only has the base properties on it.  Should I go into one of the edit pages, the server only gets passed the Id.
I'll settle for the lazy load if that's the only way as that will happen when I build the DTO after the retrieve, but I was wondering if there was some EF configuration that I don't know about for modelBuilder or a way to write a project query that I haven't found yet that allows an Eager Load for that Derived Lookup collection?
Update 2: Accepted answer based on him letting me know I can't do what I was hoping.  Also found this on the EF uservoice.

A:
Essentially all I want to know is, if I only have an Id to work with for my retrieve, the following wont work, but is there something like it that will?

If your derived objects use some type of Entity Framework Inheritence; Mapping the Table-Per-Type (TPT) Inheritance or Mapping the Table-Per-Hierarchy (TPH) Inheritance or Mapping the Table-Per-Concrete Class (TPC) Inheritance.
Then Yes,
db.Bases
  .OfType<Derived>()
  .Include(d => d.Lookup)
  .Where(d => d.Id = someId)
  .ToList();

Otherwise No, it will not.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Error in Node.js / Ubuntu 20 server configuration: 111 Connection refused I get these three lines of errors when I refresh my page:
2020/10/07 16:38:55 [error] 315270#315270: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 66.249.66.221, server: akadjg.com, request: "GET /robots.txt HTTP/1.1", upstream: "http://127.0.0.1:3000/robots.txt", host: "akadjg.com"
2020/10/07 16:38:58 [error] 315270#315270: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 71.218.84.112, server: akadjg.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "akadjg.com"
2020/10/07 16:38:58 [error] 315270#315270: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 71.218.84.112, server: akadjg.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: "akadjg.com", referrer: "http://akadjg.com/"

And running "netstat -plant" gives:
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:27017           0.0.0.0:*               LISTEN      315140/mongod
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      -
tcp        0      0 157.245.172.144:42856   172.67.168.253:80       TIME_WAIT   -
tcp        0    612 157.245.172.144:22      71.218.84.112:52609     ESTABLISHED -
tcp        0      0 157.245.172.144:80      66.249.66.93:37947      TIME_WAIT   -
tcp        0      0 157.245.172.144:22      71.218.84.112:51914     ESTABLISHED -
tcp        0      0 127.0.0.1:27017         127.0.0.1:55302         ESTABLISHED 315140/mongod
tcp        0      0 127.0.0.1:55302         127.0.0.1:27017         ESTABLISHED 315186/node /home/d
tcp6       0      0 :::80                   :::*                    LISTEN      -
tcp6       0      0 :::8080                 :::*                    LISTEN      315186/node /home/d
tcp6       0      0 :::22                   :::*                    LISTEN      -
tcp6       0      0 :::443                  :::*                    LISTEN      -

And in /etc/nginx/sites-available/akadjg.com I have:
server {
    listen 80;
    listen [::]:80;

    root /var/www/akadjg.com/html;
    index index.html index.htm index.nginx-debian.html;

    server_name akadjg.com www.akadjg.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/akadjg.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/akadjg.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

Where am I going wrong? I had this server working a few years ago on Ubuntu 14; this iteration is on Ubuntu 20. I think it's configured the same but maybe I've done something wrong when following the setup tutorials on DigitalOcean.
Oh, and my server.js file is:
var express = require('express') //Require express for middleware use
const app = express()
var http = require('http').createServer(app)
var io = require('socket.io')(http) //IO is the server

var bodyParser = require('body-parser')

var MongoClient = require('mongodb').MongoClient
var assert = require('assert')
var mongoose = require('mongoose')
mongoose.set('debug', true)

var url = 'mongodb://localhost:27017/test'

//BASICS
app.use(express.static(__dirname + "/served")) //Serve static files

app.get('/', function(req, res){
  res.sendFile('./index.html');
});

io.on('connection', function(socket){
  // socket.on('chat message', function(msg){
    // io.emit('chat message', msg);
  // });
  console.log("A user connected: ", socket.id)
});

http.listen(8080, function(){
  console.log('listening on *:8080');
});

//HANDLE USER LOGIN:
app.use(bodyParser.json())       // to support JSON-encoded bodies
app.use(bodyParser.urlencoded()) // to support URL-encoded bodies

mongoose.connect(url)
var db = mongoose.connection
db.on('error', console.error)
var User
db.once('open', function() {
  var userSchema = mongoose.Schema({
    username: String,
    level: Number,
    onePoRank: Number,
    twoPoRank: Number,
    type: String,
    tutDone: Boolean
  })

  // userSchema.statics.findOne = function(id, callback){
  //   return this.findOne({ _id: new RegExp(id, 'i') }, callback);
  // }

  User = mongoose.model('User', userSchema)

  // db.close()
})

app.post('/menu', function(req, res){ // Save new user or load existing one, and send that data back to the client.
  var username = req.param('username')
  console.log('username "'+username+'" parsed from form')

  //check the database for a user with that name:
  User.findOne({username: username}, function(err, user){
    if (err) {console.log("The user search caused an error")}
    if (user === null) {
      console.log("No user by name %s found--creating new user", username)
      var newUser = new User({username: username, level:0, onePoRank:0, twoPoRank: 0, type: 'human'})
      newUser.save(function (err, newUser) { //Add the new user to the database
        if (err) return console.error(err);
        console.log("New user %s saved to database", username)
        res.json(newUser)
      })
    } else { //User was found in the database
      console.log("User %s found.", username)
      res.json(user)
    }
  })

  db.once('close', function(){console.log("database closed.")})
  // res.sendFile('./menu.html', {root: __dirname+"/served"})
});

app.post('/user', function(req, res){ // Update the user in the database:
  var what = req.param('what')
  var username = req.param('user').username
  // var username = req.param('username')
  // console.log('username "'+username+'" parsed from form')

  User.findOne({username: username}, function(err, user){
    if (err) {console.log("The user search caused an error")}
    if (user === null) {
      console.log("No user by name %s found. That was unexpected.", username)
    } else {
      console.log("User %s found. Updating.", username)
      user[what] = req.param('user')[what]
      user.save(function(err) {
        if (err) throw err
        console.log('User successfully updated!')
      });
    }
  })

  res.json({'a':0}) //just to prevent an empty response error
});

A: I had to replace 3000 with 8080 in /etc/nginx/sites-available/akadjg.com.