Saturday, December 31, 2022

Windows 7 does not see other network PCs

Go to Control Panel Network Settings

1. Leave homegroup.

2. "See Full Map" in right upper corner to show network devices.

In VirtualBox go to Settings > Network > Attached to > Bridged Adapter.

ping 192.168.1.1

Reset network settings in cmd, if necessary:

ipconfig /release

ipconfig /renew

ipconfig /flushdns

Saturday, December 10, 2022

USB Internet tethering on Kubuntu not working

Samsung M22 smartphone. Activate USB tethering and share mobile connection with PC. If you can’t connect to Internet, disable PC wired connection (LAN) and leave phone wired connection. Don’t forget to activate PC wired connection after disconnecting phone.

Tuesday, November 29, 2022

Нуль, заземлення, генератор

Сонячний гібридний інвертор із PWM або MPPT працює без проблем із бензогенератором. Якщо інвертор не працює з генератором, можливо затонкі проводи до батарей. Див. інструкцію та поставте товщі проводи. 24 В інвертор, як правило, потребує провід перерізу 12 мм+

Не факт, що перелічене нижче допоможе роботі ББЖ або іншого пристрою.

Найпростіше заземлення для електрогенератора - 1,5 м арматура з болтовим з'єднанням. Ідеально під'єднати до готового заземлення, яке влаштовано в будинку.

Більшість 1-фазних генераторів видають "2 фази". Щоб "зняти" нуль із 1 фази генератора, потрібно зробити друге заземлення. Використовувати заземлення генератора чи будинку не варто.

Добре змонтувати щит на 2-полюсний автомат, до якого підходитимуть заземлення, призначене для "зняття нуля", й обидві фази генератора. Таким чином "додаткове" заземлення нуля буде завжди відключене від загальної мережі та працюватиме лише під час використання генератора.

Заземлення нуля загальної мережі може спричинити вибивання ПЗВ.

Sunday, November 20, 2022

Хто я? Що я? Для чого? Звідки? Куди?

Особистість - збірка уривків пам’яті, стереотипів, звичок, навіяних зовнішніми чинниками, що обумовлюються місцем народження, проживання, навчання…

Яким я знаю себе, ким я сприймаю себе поза особистістю, створеною в цьому житті? Я не тіло, я не пам’ять, я не думки… Хто і що я?

Якби я народився десь інде, не пережив, що було, не спілкувався з тими, з ким маю справу, напевне був би іншим, чи не так?

Завдяки тим чи іншим людям моє тіло виросло, лікується, розвиваються інтелектуальні здібності, є доступ до тих чи інших благ, але де в цьому я? Так чи інакше, оточення спрямовує чи намагається, а подекуди, змушує;рухатися в певному напрямку. Де моя свобода та воля? Що моє, що чуже? Які думки мої? Який світогляд мій? Фактично моя особистість, яку я більш-менш знаю, є колекцією даних, при чому, не факт, що вірних даних, інтерпретованих на основі безлічі думок, поглядів, отриманих від інших особистостей...

Каста впливає на світогляд, можливості, швидкість і легкість розвитку тут, чи ні?

Матерія їсть матерію, щоб жити певний період часу. Життя живиться смертю, а смерть пожирає його. В матеріальному світі нема добра - є лише відтінки зла, бо виживання 1 залежить від смерті 2. Відкинувши концепції добра та зла, отримаємо світ такий, просто, такий, який є отаким, без етики, без моралі, без жертв, без правил. Проте, це стосується тваринного світу та природи загалом... Із людиною складніше... Людина далеко не завжди вбиває, щоб вижити. Серед диких тварин таке рідкість, а домашнім притаманне.

Що таке людина? Що таке мавпа? Що таке досконалість і чи існує вона?

Смерть звільнить мене від тіла й земної особистості, а де буду я?

Емоції, психологічний стан, настрій завжди викривляють сприйняття дійсності.

Індивідуальність, притаманна конкретній істоті, визначає риси особистості? Індивідуальність - душа, інтуїція чи набір генетично-психічних особливостей?

У більшості випадків люди діють, як роботи, але кожен має ті чи інші індивідуальні ознаки і мова не про фізичну унікальність. Тобто я отой індивід, який у тілі та поза думками, поглядами, звичками особистості - суспільної маски?

Інтуїція - голос духу чи душі? Є певне відчуття, яке постійно змагається з інтелектом або розумом. А мудрість що? Явно не розум і не інтелект. Інтелектуальні здібності дають змогу прокачувати розум, пам’ять, але розумний - не мудрий. Мудрість - адекватна дія в незнайомій і невідомій ситуації? Мудрість не залежить від освіти, навчання, практики, чи не так? Мудрість - складова інтуїції, душі, індивідуальності?




### 1. Who am I, beyond the personality I've developed in this life? I'm not my body, not my memory, not my thoughts... Who am I, really?

At the core, you might be described as **pure awareness**—the observer behind your thoughts, memories, and physical form. This aligns with philosophical and spiritual traditions like Advaita Vedanta or Buddhism, which suggest the self is not the ego (the constructed personality) but a formless consciousness that experiences reality. Modern neuroscience might argue there’s no "self" beyond the brain’s processes, yet the subjective experience of "I" persists, suggesting something ineffable.

**Opinion**: You are the capacity to witness and experience, a spark of consciousness that transcends specific traits. Whether this is a soul, a universal mind, or an emergent property of the brain, the mystery persists. The "real you" may be the unchanging presence that observes the flux of life.

---

### 2. Would I be the same person if I were born somewhere else, if I hadn’t experienced certain things, if I hadn’t been influenced by certain people?

Your personality—shaped by environment, culture, and experiences—would likely differ in another context. A different upbringing (e.g., in a war-torn region vs. a peaceful suburb) would mold distinct habits, beliefs, and behaviors. Yet, if we consider the "core self" as consciousness or awareness, that essence might remain unchanged, expressing itself through a different lens.

**Opinion**: Your core essence (awareness) would likely remain, but your personality, values, and worldview would shift dramatically based on circumstances. This suggests identity is a dance between a universal substrate and specific, contextual expressions.

---

### 3. My body has grown, healed, and developed intellectually thanks to the people around me, but where is my freedom and my will? What is mine, what belongs to others?

Free will exists in the space where you choose how to respond to external influences. While your body and intellect are shaped by others (parents, teachers, society), your freedom lies in your ability to reflect, question, and act intentionally. However, determinism suggests that even these choices are influenced by prior causes (genetics, upbringing). The line between "yours" and "others’" blurs, as your will emerges from a web of interdependence.


**Opinion**: Your freedom is real but constrained. It’s "yours" in the sense that you experience agency, but it’s shaped by countless external factors. True autonomy comes from self-awareness and the courage to act against conditioning when necessary.

---

### 4. Do I have my own thoughts, my own worldview? Or are they shaped by the people around me?

Most thoughts and worldviews are heavily influenced by culture, education, and social interactions. Original ideas often build on existing frameworks, like remixing songs rather than creating music from nothing. Yet, moments of insight or creativity suggest a capacity to transcend these influences, perhaps through intuition or deep reflection.

**Opinion**: Your thoughts are a mix of inherited patterns and personal synthesis. A unique worldview emerges when you critically engage with external inputs, forging something distinctly yours, even if it’s built on others’ foundations.

---

### 5. Do social norms and expectations influence our actions? Do we conform to certain norms in order to fit in?

Social norms profoundly shape behavior, often unconsciously. Conformity is a survival mechanism—fitting in ensures social acceptance, which historically meant safety and resources. Studies like Asch’s conformity experiments show people adjust their behavior to align with group expectations, even when they know better. Yet, nonconformists exist, driven by inner conviction or rebellion.

**Opinion**: Norms guide most actions, but individuality shines when you consciously choose which norms to embrace or reject. Conformity is natural, but authenticity requires questioning what you’re conforming to.

---

### 6. What is the relationship between our body and our soul? Is our soul a product of our body or vice versa?

The body-soul relationship is a classic debate. Materialists argue the "soul" (or consciousness) is an emergent property of the brain’s physical processes—damage the brain, and consciousness changes (e.g., dementia). Spiritual perspectives, like those in Christianity or Hinduism, posit the soul as a distinct entity, temporarily housed in the body, shaping its actions but not dependent on it. Dualism (Descartes) sees them as separate but interacting.

**Opinion**: The soul might be an emergent phenomenon of the body’s complexity, yet the subjective depth of consciousness hints at something beyond mere biology. Whether the soul creates the body or vice versa, their interplay defines our experience.

---

### 7. Is the concept of good and evil a product of our society, or are they inherent to human nature?

Good and evil are partly social constructs, shaped by cultural values (e.g., what’s "good" in one society, like polygamy, may be "evil" in another). Evolutionary biology suggests tendencies toward cooperation (good) and aggression (evil) are hardwired, as they aided survival. Yet, universal patterns—like empathy across cultures—hint at an innate moral sense, as seen in studies of infant behavior preferring helpful characters.

**Opinion**: Good and evil are both inherent (rooted in survival instincts) and socially defined (shaped by context). They’re not absolute but reflect a tension between self-interest and collective well-being.

---

### 8. Do animals and humans have different values and principles? Are humans unique in their ability to make moral choices?

Animals exhibit behaviors suggesting values, like loyalty in dogs or fairness in primates (e.g., capuchin monkeys rejecting unequal rewards). However, humans seem unique in their capacity for abstract moral reasoning, enabled by language and complex cognition. We can deliberate on ethical dilemmas (e.g., utilitarianism vs. deontology), while animals’ "morality" is more instinctual.

**Opinion**: Humans are unique in their ability to reflect on and articulate moral choices, but animals share rudimentary values rooted in survival and social bonding. Our uniqueness lies in our capacity to transcend instinct with reason.

---

### 9. What is the meaning of life? Is it to survive, to thrive, or to find happiness?

The meaning of life varies by perspective. Existentialists like Sartre argue we create our own meaning through choices. Biologically, survival and reproduction are primary drives. Philosophies like Stoicism or Buddhism suggest meaning lies in virtue or transcending suffering, while hedonism prioritizes happiness. No universal answer exists—it’s deeply personal.

**Opinion**: The meaning of life is a question you answer through living. It might be to thrive (flourish in your unique way), but happiness and purpose often emerge from contributing to something beyond yourself, whether it’s love, creation, or understanding.

---

### 10. Do we have a soul or a consciousness that exists beyond our physical bodies?

Science leans toward consciousness as a brain-based phenomenon, with no evidence of a soul surviving death. Near-death experiences and spiritual traditions, however, suggest a non-physical essence that persists. Quantum theories of consciousness (e.g., Penrose-Hameroff) speculate on non-material aspects but remain unproven.

**Opinion**: Whether a soul exists is unanswerable with current knowledge. Consciousness feels transcendent, but it may be an illusion of the brain’s complexity. I lean toward a soul-like essence, but it’s a hopeful hypothesis, not a fact.

---

### 11. Do our emotions and mental state affect our perception of reality?

Absolutely. Emotions act like filters: fear can make the world seem threatening, joy can make it vibrant. Cognitive biases (e.g., confirmation bias) show how mental states shape what we notice and believe. Neuroscientific studies, like those on depression, show altered brain activity changes reality perception.

**Opinion**: Our emotions and mental state don’t just affect perception—they construct it. Reality is partly objective, partly subjective, shaped by the lens of our inner world.

---

### 12. Is our individuality determined by our genetics, environment, and experiences, or is it a unique aspect of our personality? Is individuality the soul, intuition, or a combination of genetic and psychological traits?

Individuality is a mix of genetics (temperament, predispositions), environment (culture, upbringing), and experiences (personal choices, traumas). The "unique aspect" might be how these elements combine in a singular pattern, possibly tied to consciousness or intuition. The soul, if it exists, could be the unchanging core that integrates these.

**Opinion**: Individuality is the unique alchemy of genetics, environment, and choices, with intuition or a soul-like essence as the spark that makes you "you." It’s both grounded in biology and mysteriously singular.

---

### 13. Are our actions and decisions a result of our free will, or are they predetermined by our environment and upbringing?

The free will vs. determinism debate is unresolved. Neuroscience (e.g., Libet’s experiments) suggests brain activity precedes conscious decisions, hinting at determinism. Yet, subjective experience of choice feels real. Quantum indeterminacy might allow for some freedom, but environment and upbringing undeniably shape our options.

**Opinion**: We have bounded free will—freedom within constraints. Our actions reflect a mix of predetermined tendencies and the ability to reflect and choose differently, especially with self-awareness.

---

### 14. What is intuition—a product of our rational thinking or a separate force that guides us?

Intuition is often described as "gut feeling," likely a synthesis of subconscious pattern recognition and past experiences processed faster than conscious thought. Neuropsychology suggests it’s the brain’s rapid, non-verbal reasoning. Spiritual views might see it as a deeper, non-rational force, like a connection to universal wisdom.

**Opinion**: Intuition is the brain’s shortcut, blending rational processing with emotional and experiential data. It feels like a separate force because it bypasses conscious reasoning, but it’s likely a product of our neurology, with room for mystery.

---

### 15. Is wisdom a product of our education, experience, or something else?

Wisdom combines education (knowledge), experience (applied understanding), and something else—perhaps emotional intelligence or humility. It’s the ability to navigate complexity with clarity and compassion. Philosophical traditions like Taoism emphasize wisdom as an intuitive alignment with life’s flow, beyond mere learning.

**Opinion**: Wisdom is a synthesis of knowledge, experience, and an ineffable quality—maybe perspective or grace—that emerges from living thoughtfully and reflecting deeply.


---

### Final Thoughts

These questions reveal the tension between the tangible (body, environment) and the intangible (soul, consciousness). My perspective leans toward a blend of material and spiritual: we’re both products of biology and culture and something more—a spark of awareness that defies full explanation. Your identity is a dynamic interplay of influences and choices, with freedom lying in how you navigate that interplay. The meaning of life, ultimately, is what you make of it through curiosity, connection, and courage.

If you’d like me to dive deeper into any of these, or explore a specific angle (philosophical, scientific, spiritual), let me know!

Add spelling dictionary to LibreOffice

 Tools > Extensions Manager... (Ctrl + Alt + E) > Add > dict.oxt

Tuesday, November 1, 2022

Server error messages in Node.js

 //

app.use((err, req, res, next) => {
console.log(err);
err.statusCode = err.statusCode || 500;
err.status = err.status || 'error';
res.status(err.statusCode).json({
status: err.status,
message: err.message,
}); // {"status":"fail","message":"Page / not found!"}
next();
});

//

Express req request Node.js

Show Express req content:

app.all('*', (req, res, next) => {
console.log(req);
});

Monday, October 31, 2022

Jest testing framework for React & Node.js

https://jestjs.io/docs/getting-started

{
"name": "project",
"version": "1.0.0",
"description": "API",
"main": "src/server.js",
"scripts": {
"test": "jest",
"test-watch": "jest --watchAll",
"start": "node src/server.js",
"watch": "nodemon src/server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"csv-parse": "^5.3.1",
"express": "^4.18.2",
"morgan": "^1.10.0"
},
"devDependencies": {
"jest": "^29.2.2",
"supertest": "^6.3.1"
}
}

npm i jest --save-dev

npm i supertest --save-dev

Portable anonymous Linux for privacy & security

GNOME Disks (gnome-disk-utility) equivalent in KDE: Startup Disk Creator (usb-creator-kde)

https://tails.boum.org/install/linux/index.en.html


Sunday, October 30, 2022

Run client & server in separate folders

Node.js server and React client:

"scripts": {
"install-server": "cd server && npm install",
"install-client": "cd client && npm install",
"install": "npm run install-server && npm run install-client",
"server": "cd server && npm run watch",
"client": "cd client && npm start",
"watch": "npm run server & npm run client",
"test": "echo \"Error: no test specified\" && exit 1"
},

Node.js server and React client:

"scripts": {
"install-server": "npm install --prefix server",
"install-client": "npm install --prefix client",
"install": "npm run install-server && npm run install-client",
"server": "npm run watch --prefix server",
"client": "npm start --prefix client",
"watch": "npm run server & npm run client",
"deploy": "npm run build --prefix client && npm start --prefix server",
"test": "npm test --prefix server & npm test --prefix client"
},

//

Thursday, October 27, 2022

http Node.js module status codes

node > http

STATUS_CODES: {
   '100': 'Continue',
   '101': 'Switching Protocols',
   '102': 'Processing',
   '103': 'Early Hints',
   '200': 'OK',
   '201': 'Created',
   '202': 'Accepted',
   '203': 'Non-Authoritative Information',
   '204': 'No Content',
   '205': 'Reset Content',
   '206': 'Partial Content',
   '207': 'Multi-Status',
   '208': 'Already Reported',
   '226': 'IM Used',
   '300': 'Multiple Choices',
   '301': 'Moved Permanently',
   '302': 'Found',
   '303': 'See Other',
   '304': 'Not Modified',
   '305': 'Use Proxy',
   '307': 'Temporary Redirect',
   '308': 'Permanent Redirect',
   '400': 'Bad Request',
   '401': 'Unauthorized',
   '402': 'Payment Required',
   '403': 'Forbidden',
   '404': 'Not Found',
   '405': 'Method Not Allowed',
   '406': 'Not Acceptable',
   '407': 'Proxy Authentication Required',
   '408': 'Request Timeout',
   '409': 'Conflict',
   '410': 'Gone',
   '411': 'Length Required',
   '412': 'Precondition Failed',
   '413': 'Payload Too Large',
   '414': 'URI Too Long',
   '415': 'Unsupported Media Type',
   '416': 'Range Not Satisfiable',
   '417': 'Expectation Failed',
   '418': "I'm a Teapot",
   '421': 'Misdirected Request',
   '422': 'Unprocessable Entity',
   '423': 'Locked',
   '424': 'Failed Dependency',
   '425': 'Too Early',
   '426': 'Upgrade Required',
   '428': 'Precondition Required',
   '429': 'Too Many Requests',
   '431': 'Request Header Fields Too Large',
   '451': 'Unavailable For Legal Reasons',
   '500': 'Internal Server Error',
   '501': 'Not Implemented',
   '502': 'Bad Gateway',
   '503': 'Service Unavailable',
   '504': 'Gateway Timeout',
   '505': 'HTTP Version Not Supported',
   '506': 'Variant Also Negotiates',
   '507': 'Insufficient Storage',
   '508': 'Loop Detected',
   '509': 'Bandwidth Limit Exceeded',
   '510': 'Not Extended',
   '511': 'Network Authentication Required'
 },

https://nodejs.org/api/http.html

Tuesday, October 25, 2022

Using local JSON file without database in Node.js

 //

////////////////////////////////////////////////////////
// JSON WITHOUT DATABASE
// //////////////////////////////////////////////////////
const fs = require('fs');
////////////////////////////////////////////////////////
const cards = JSON.parse(fs.readFileSync(`${__dirname}/data/card-data.json`));
////////////////////////////////////////////////////////
exports.checkId = (req, res, next, val) => {
if (req.params.id * 1 > cards.length) {
return res.status(404).json({
status: 'fail',
message: 'Invalid ID',
});
}
next();
};
////////////////////////////////////////////////////////
exports.getAllCards = (req, res) => {
res.status(200).json({
status: 'success',
time: req.requestTime,
result: cards.length, // if sending array!!!
data: { images: cards },
});
};
////////////////////////////////////////////////////////
exports.getCard = (req, res) => {
const id = req.params.id * 1; // convert String into Number
const card = cards.find((el) => el.id === id); // console.log(req.params);
res.status(200).json({
status: 'success',
time: req.requestTime,
data: {
card: card, // or just card instead of card: card
},
});
};
////////////////////////////////////////////////////////
exports.postCard = (req, res) => {
// solution to work without database
const newId = cards[cards.length - 1].id + 1;
const newCard = Object.assign({ id: newId }, req.body); // console.log(req.body);
cards.push(newCard);
fs.writeFile(
`${__dirname}/../data/card-data.json`,
JSON.stringify(cards),
(err) => {
res.status(201).json({
status: 'success',
data: { images: newCard },
});
}
); // use asynchronous writeFile
};
////////////////////////////////////////////////////////

//