Notes, summaries, assignments, exams, and problems

Sort by
Subject
Level

C++ Code Examples: Essential Algorithms & Programs

Classified in Computers

Written on in English with a size of 5.54 KB

C++ Code Examples: Essential Algorithms & Programs

Here are some fundamental C++ code examples covering various algorithms and programming concepts:

Factorial Calculation

#include <iostream>
using namespace std;

long factorial(int x) {
 int i, f = 1;
 for (i = 1; i <= x; i++) {
 f = f * i;
 }
 return f;
}

int main() {
 int n;
 cout << "Enter the number: ";
 cin >> n;
 if (n < 0) {
 cout << "Factorial is not defined for negative numbers";
 } else {
 cout << "Factorial = " << factorial(n);
 }
 return 0;
}

String Length Finder

#include <iostream>
using namespace std;

int main() {
 int length = 0, i;
 char s[20];
 cout << "Enter the string: ";
 cin.getline(s, 20);
 for (i = 0; s[i] != '\0'
... Continue reading "C++ Code Examples: Essential Algorithms & Programs" »

Synthesis and Sources of Aromatic Hydrocarbons

Classified in Chemistry

Written on in English with a size of 3.14 KB

Preparation of Naphthalene

Naphthalene is a fused-ring aromatic hydrocarbon with two benzene rings. It can be prepared via the following methods:

  • From Coal Tar: Coal tar, a by-product of coal processing, is a major source of naphthalene. It is extracted and purified using distillation followed by crystallization.
  • Synthesis from Benzene: Benzene undergoes a series of reactions to form naphthalene:
    • Alkylation: Benzene reacts with alkyl halides (like methyl chloride) to form methylbenzene (toluene).
    • Cyclization: Toluene undergoes further reaction with chlorine and heat to form naphthalene.

Preparation of Anthracene

Anthracene is a tricyclic aromatic hydrocarbon consisting of three fused benzene rings. It is mainly obtained from coal tar but can also... Continue reading "Synthesis and Sources of Aromatic Hydrocarbons" »

Insect Biology: Adaptations, Behaviors, and Ecology

Classified in Biology

Written on in English with a size of 5.34 KB

Insect Defenses Against Predators

Three Plant Mechanisms to Defend Against Insects

  • Physical: Thick walls
  • Chemical: Phytochemicals that kill insects
  • Entrapment: Pitcher plants

How Insects Overcome Physical Defenses

  • Specialized mandibles
  • Evolution
  • Immunity to phytochemicals
  • Specialization to survive the digestive liquid of pitcher plants

Insect Parasitism

Endoparasites

Approximately 20% of insect orders include endoparasites. Some orders that include endoparasites are:

  • Hymenoptera
  • Diptera
  • Strepsiptera

Ectoparasites

Some orders that include ectoparasites are:

  • Anoplura
  • Mallophaga
  • Siphonaptera

Three Challenges Faced by Endoparasites

  • Respiration
  • Excretion/getting rid of toxic nitrogenous waste without killing the host
  • Avoiding the host's endocrine system

Insect Social Behavior

Subsocial

... Continue reading "Insect Biology: Adaptations, Behaviors, and Ecology" »

Mastering English: Connectors, Grammar, and Prepositions

Classified in Other languages

Written on in English with a size of 6.69 KB

Essential English Connectors and Their Meanings

Here's a list of common English connectors with their Spanish translations:

  • First of all - En primer lugar
  • In my opinion - En mi opinión
  • Personally - Personalmente
  • As far as I am concerned - Por lo que a mí respecta
  • From my point of view - Bajo mi punto de vista
  • To begin with - Para empezar
  • Firstly - Primeramente
  • Secondly - En segundo lugar
  • That's why - Esto es por lo que
  • Therefore - Por lo tanto
  • As a result of - Como resultado
  • Consequently - En consecuencia
  • As - Como
  • So - Así que
  • Whereas - Mientras que
  • So...that... - Tan...que...
  • Such a...that... - Tan...que...
  • On the one hand - Por una parte
  • However/Nevertheless - Sin embargo
  • Anyhow - De todas formas
  • Anyway - De cualquier manera
  • In spite of/Despite - A pesar de
  • On
... Continue reading "Mastering English: Connectors, Grammar, and Prepositions" »

Thriller Night: A Song of Horror and Suspense

Classified in English

Written on in English with a size of 3.8 KB

Thriller Night

It's Close to Midnight

It's close to midnight and something evil's lurking in the dark.

Under the moonlight, you see a sight that almost stops your heart.

You try to scream but terror takes the sound before you make it.

You start to freeze as horror looks you right between the eyes.

You're paralyzed.

Thriller Night Begins

'Cause this is thriller, thriller night.

And no one's gonna save you from the beast about to strike.

You know it's thriller, thriller night.

You're fighting for your life inside a killer, thriller tonight.

You hear the door slam and realize there's nowhere left to run.

You feel the cold hand and wonder if you'll ever see the sun.

You close your eyes and hope that this is just imagination.

But all the while you hear the creature... Continue reading "Thriller Night: A Song of Horror and Suspense" »

English Modal Verbs: Ability, Possibility, Obligation, and More

Classified in Other languages

Written on in English with a size of 3.55 KB

Ability

Expressing ability with modal verbs:

  • Can (present ability): Can you speak French?
  • Will be able to (future ability): She will be able to speak French in two months.
  • Could (past ability, unrealized potential): I could have gone to university when I was younger.
  • Be able to (general ability): She is able to speak Chinese.
  • Was/were able to (past ability, achieved action): We were able to escape the fire.
  • Couldn't/were not able to (negative past ability): We couldn't/were not able to finish the project.

Possibility

Expressing degrees of possibility:

  • May (higher probability): He may be in his office.
  • Might (lower probability): She might be 30 years old.

Certainty

Expressing certainty or impossibility:

  • Must (certainty): He must be over 70.
  • Can't (impossibility)
... Continue reading "English Modal Verbs: Ability, Possibility, Obligation, and More" »

Medios alternativos en la solucion de conficto

Classified in History

Written on in English with a size of 2.27 KB

diga la naturalez ade lps medios alternativos de solucion de conflictos
son contrahegemonicos porque nacieron , en lo moderno en rusia para oponerse al poder opresor del estado
carasteristicas de los medios alternativos de solucion de conflictos
si son voluntarios , si son formales ,
la mediacion y la negociacion son informales
el arbitraje y la mediacion son formales

que limita al poder hegemonico de los gobiernos
lo alternativo o segunda opcion y posibilidad de resolver los problemas , sin la intervencion del poder opresor y hegemonico del estado
A YEGAR A UN ACUERDO


explique los principales procesos alternativos
transaccion o negociacion , mediacion, arbitraje y conciliacion
cricis que atraviesa ell poder judicial
el congestionamiento... Continue reading "Medios alternativos en la solucion de conficto" »

Centos 5.5

Classified in Technology

Written on in English with a size of 5.39 KB

#useradd nombredeusuario :: para crear usuarios

#passwd :: nombredelusuario

#groupadd :: nombredelgrupo :: (forma normal)

#groupadd -g 600 nombredelgrupo :: (guid sobre 650)

#userdel nombredelusuario :: para deletear usuarios

#groupdelnombredelgrupo :: borrar el grupo

#usermod -G nombredelgrupo nombredeusuario :: para asignar usuario a grupo.

opcion 2: editar archivo /etc/group -> grupo:x:600:usuarioqueseagregara

#nano /etc/shadow :: para poder ver los usuarios y poder bloquearlos

#passwd -l nombredeusuario :: para bloquear usuario

#passwd -u nombredeusuario :: para desbloquear usuario

#sudo passwd :: para cambiar la contraseña de root

# tail /etc/passwd :: paraver informacion de usuarios

#su nombredelotrousuario :: para iniciar sesion como el usuario... Continue reading "Centos 5.5" »

Case

Classified in Physical Education

Written on in English with a size of 10.65 KB

1. Classifique as variáveis em qualitativa e quantitativa. () Cor preferida. () Índice de liquidez. () Sexo. e) qualitativa, quantitativa, qualitativa .
2. Classifique as variáveis quantitativas em contínuas (c) ou discretas (d).
( ) População: atletas Variável: altura ( ) P.: pacientes de um hospital Variável: pacientes com insuficiência cardíaca. ( ) P.: bebês monitorados em uma UTI neonatal Variável: peso b) contínua, discreta, contínua.
3. Em uma escola de ensino médio, há 300 alunos divididos em 6…..b)36
4. São fases do método estatístico:
1. A apuração. 2. A coleta. 3. A crítica. 4. A definição do problema. 5. O planejamento.
Qual a ordem correta dessas fases? b. 4, 5, 2, 3, 1
5. Considere a série abaixo. Podemos

... Continue reading "Case" »

Finan midterm

Classified in Language

Written on in English with a size of 9.13 KB

Opportunity Cost of Capital: Expected rate of return given up by investing in a project.
NPV: Present value of cash flows minus investments
Payback period: Time until cash flows recover the initial investment in the project.
IRR: Discount rate at which project NPV = 0
Profitability Index: Ratio of net present value to initial investment
Opportunity Cost: Benefit or cash flow as a result of an action
Net Working Capital: Current assets minus liabilities
Depreciation Tax Shield: Reduction in taxes attributable to depreciation
Operating Leverage: Degree to which costs are fixed
Market Index: Measure of the investment performance of the overall market
Maturity Premium: Extra avg. return from investing long vs. short- term treasury securities
Risk Premium:... Continue reading "Finan midterm" »