I am trying to create a 3x3x3 Rubik’s cube using HTML and JavaScript. My current issue is that the current code uses 27 cubies to create the overall cube. The issue is the cubies currently have the 6 colours around each cubie. Whereas, I want each face of the overall cube to have 6 colours. So the corner cubies would have 3 colours, the middle edge cubies would have 2 colours, and the center cubies of each face would have 1 colour. The first image shows you what the current code looks like and the second image will show a rough idea of what I want it to look like. I also want to be able to rotate the faces using keys. For example: The left face could be rotated should rotate anti-clockwise using ‘q’ and clockwise with ‘a’ the right face should rotate anti-clockwise using ‘w’ and clockwise using ‘s’. The front face should rotate anti-clockwise using ‘e’ and clockwise using ‘d’ and the back face should rotate anti-clockwise using ‘r’ and clockwise using ‘f’. The top face should rotate anti-clockwise using ‘u’ and clockwise using ‘i’ and the bottom face to rotate anti-clockwise using ‘j’ and clockwise using ‘k’. This is the current code that correlates to the first image (The rotations are incorrect in this code):
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>3x3x3 Rubik’s Cube with Three.js</title>
<style>
body {
margin: 0;
overflow: hidden;
}
#rubiksCubeContainer {
width: 100vw;
height: 100vh;
}
</style>
</head>
<body tabindex=”0″>
<div id=”rubiksCubeContainer”></div>
<script type=”module”>
import * as THREE from ‘https://cdn.jsdelivr.net/npm/three@0.121.1/build/three.module.js’;
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100);
const renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.getElementById(‘rubiksCubeContainer’).appendChild(renderer.domElement);
const cubieGeometry = new THREE.BoxGeometry(1, 1, 1);
const createCubie = (x, y, z) => {
const colors = [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xff8800, 0xffffff];
const materials = colors.map(color => new THREE.MeshBasicMaterial({ color }));
const cubie = new THREE.Mesh(cubieGeometry, materials);
cubie.geometry.faces.forEach((face, index) => {
face.materialIndex = Math.floor(index / 2); // Each face has two triangles
});
cubie.position.set(x, y, z);
scene.add(cubie);
return cubie;
};
const createLayer = (layerNumber) => {
const group = new THREE.Group();
for (let x = 0; x < 3; x++) {
for (let y = 0; y < 1; y++) {
for (let z = 0; z < 3; z++) {
const cubie = createCubie(x * 1.1 – 1.1, y * 1.1 – 1.1, z * 1.1 – 1.1);
group.add(cubie);
}
}
}
group.position.set(0, 1.1 * layerNumber, 0);
scene.add(group);
return group;
};
const topLayerGroup = createLayer(1);
const middleLayerGroup = createLayer(0);
const bottomLayerGroup = createLayer(-1);
camera.position.set(5, 5, 8);
camera.lookAt(scene.position);
const animate = () => {
requestAnimationFrame(animate);
renderer.render(scene, camera);
};
window.addEventListener(‘resize’, () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
window.addEventListener(‘keydown’, (event) => {
switch (event.key) {
case ‘i’:
rotateGroupCounterClockwise(topLayerGroup);
break;
case ‘u’:
rotateGroupClockwise(topLayerGroup);
break;
case ‘k’:
rotateGroupCounterClockwise(middleLayerGroup);
break;
case ‘j’:
rotateGroupClockwise(middleLayerGroup);
break;
case ‘m’:
rotateGroupCounterClockwise(bottomLayerGroup);
break;
case ‘n’:
rotateGroupClockwise(bottomLayerGroup);
break;
case ‘a’:
rotateColumnCounterClockwise(0);
break;
case ‘q’:
rotateColumnClockwise(0);
break;
case ‘s’:
rotateColumnCounterClockwise(1);
break;
case ‘w’:
rotateColumnClockwise(1);
break;
case ‘d’:
rotateColumnCounterClockwise(2);
break;
case ‘e’:
rotateColumnClockwise(2);
break;
}
});
animate();
const rotateGroupCounterClockwise = (group) => {
group.rotateOnAxis(new THREE.Vector3(0, 1, 0), Math.PI / 2);
updateRenderer();
};
const rotateGroupClockwise = (group) => {
group.rotateOnAxis(new THREE.Vector3(0, 1, 0), -Math.PI / 2);
updateRenderer();
};
const rotateColumnCounterClockwise = (columnIndex) => {
const columnCubies = [
// List of cubies in the specified column
topLayerGroup.children[columnIndex * 3],
middleLayerGroup.children[columnIndex * 3],
bottomLayerGroup.children[columnIndex * 3],
topLayerGroup.children[columnIndex * 3 + 1],
middleLayerGroup.children[columnIndex * 3 + 1],
bottomLayerGroup.children[columnIndex * 3 + 1],
topLayerGroup.children[columnIndex * 3 + 2],
middleLayerGroup.children[columnIndex * 3 + 2],
bottomLayerGroup.children[columnIndex * 3 + 2],
];
// Use the X-axis as the rotation axis (1, 0, 0)
const axis = new THREE.Vector3(1, 0, 0);
// Rotate each cubie in the column on the specified axis
columnCubies.forEach((cubie) => cubie.rotateOnAxis(axis, Math.PI / 2));
// Update the renderer to reflect the changes
updateRenderer();
};
// For rotating the column clockwise
const rotateColumnClockwise = (columnIndex) => {
const columnCubies = [
// List of cubies in the specified column
topLayerGroup.children[columnIndex * 3],
middleLayerGroup.children[columnIndex * 3],
bottomLayerGroup.children[columnIndex * 3],
topLayerGroup.children[columnIndex * 3 + 1],
middleLayerGroup.children[columnIndex * 3 + 1],
bottomLayerGroup.children[columnIndex * 3 + 1],
topLayerGroup.children[columnIndex * 3 + 2],
middleLayerGroup.children[columnIndex * 3 + 2],
bottomLayerGroup.children[columnIndex * 3 + 2],
];
// Use the X-axis as the rotation axis (1, 0, 0)
const axis = new THREE.Vector3(1, 0, 0);
// Rotate each cubie in the column on the specified axis
columnCubies.forEach((cubie) => cubie.rotateOnAxis(axis, -Math.PI / 2));
// Update the renderer to reflect the changes
updateRenderer();
updateRenderer();
};
const updateRenderer = () => {
renderer.render(scene, camera);
};
</script>
</body>
</html>
Nursing Role and Scope
/0 Comments/in Health Medical /by bonniejecintaQUESTION
Peer response 1: ANA
In the realm of clinical experiences, behaviors demonstrating authority and the acceptance of responsibility are pivotal to the operation of healthcare environments. One distinct observation of authority was noted in the behavior of a senior nurse overseeing the admission process of new patients. This individual’s demonstration of authority was characterized by clear communication, decisiveness, and the ability to delegate tasks effectively. The senior nurse provided direct instructions to junior nurses and healthcare assistants, ensuring that all necessary steps were taken for the patients’ admission, including documentation and initial health assessments. The clarity of instructions, coupled with a confident demeanor and the capability to make swift decisions, underscored the senior nurse’s authoritative role.
In contrast, a memorable instance of an RN (Registered Nurse) accepting responsibility occurred in a situation where there was a delay in administering medication to a patient due to a miscommunication. The RN, upon realizing the mistake, immediately acknowledged the oversight to the patient and their family. This acceptance of responsibility was done openly and sincerely, with the RN explaining the cause of the delay and the steps that would be taken to prevent such occurrences in the future. Additionally, the RN informed the supervisory staff about the incident and participated in a review of communication procedures within the team.
These observations highlight the importance of authoritative behavior and the acceptance of responsibility in clinical settings. The ability to command respect and ensure efficient workflow, as demonstrated by the senior nurse, is essential for maintaining order and ensuring patient care standards. Similarly, the willingness to accept responsibility, as shown by the RN, is crucial for building trust with patients and their families, as well as fostering a culture of accountability and continuous improvement within healthcare teams.
These reflections are based on direct observations during clinical rotations and underscore the significance of leadership qualities and professional accountability in nursing practice. Such behaviors not only influence the quality of patient care but also contribute to the professional development of nurses and the overall effectiveness of healthcare teams.
References:
Johnson, A., & Thompson, B. (2021). *Leadership in Nursing Practice: Understanding Authority and Responsibility*. Philadelphia, PA: Lippincott Williams & Wilkins.
Martinez, L. F., & Garcia, E. P. (2020). “Accountability in Nursing: A Review of Responsibility Acceptance in Clinical Incidents”. *Journal of Clinical Nursing Studies*, 8(3), 112-118. https://doi.org/10.1016/j.jcns.2020.05.00
Peer response 2: DAYANA
A critical situation where an individual was a leader but needed to have the role of a manager is when the team leader empowered the nurses by sharing information regularly. Sharing information plays a critical role in gaining trust among the team members. That enables the nurses to act responsibly since all the team members are aware of the problems and situations they will encounter (Munro & Hope, 2020). The nurses have an opportunity to focus on achieving the desired outcomes and include the amount of excellence required to remain productive.
A situation in which a manager needs more ability to lead a group of people is when the team leader needs more effective communication skills. For managers to succeed in overseeing teams, they must have effective communication. It is worth noting that each group member has a unique personality, and there are possibilities of miscommunication (Afriyie, 2020). Failure to communicate effectively meant that the nurses could not do what they were expected of them and complete it on time.
A situation in which a manager is also a leader is when the human resource manager is mindful and growth-oriented. It is worth noting that the best leaders should have the ability to incorporate mindfulness into their activities within the organization. Whenever leaders and managers become mindful and self-aware, they always motivate the best of the nurses to become the best of themselves. Another situation is when the manager remained transparent, hence behaving like a leader. That included sharing information with all the nurses within the healthcare organization as a way of building trust. Transparency provides employees with an opportunity to communicate honestly, hence developing solutions to their challenges.
GWU Job question-sample analysis technical skill
/0 Comments/in Computer Science /by bonniejecintaquestion-sample
Task: create technical interview questions and answers based on the job question-samples. Make sure to cover all the concepts and tools mentioned on job question-samples. Create questions and answers separately for each job post/ question-sample. (
JOB1 penetration tester
Your key responsibilities
Our cybersecurity professionals possess diverse industry knowledge, along with unique technical expertise and specialized skills. The team stays highly relevant by researching and discovering the newest security vulnerabilities, attending and speaking at top security conferences around the world, and sharing knowledge on a variety of cybersecurity topics with key industry groups. The team frequently provides thought leadership and information exchanges through traditional and less conventional communications channels such as speaking at conferences and publishing white papers.
As part of our Penetration Testing team, you’ll identify potential threats and vulnerabilities to operational environments. Projects here could include penetration testing and simulating physical breaches to identify vulnerabilities.
Our professionals work together in planning, pursuing, delivering and managing engagements to assess, improve, build, and in some cases operate integrated security operations for our clients.
Skills and attributes for success
To qualify for the role you must have
Ideally, you’ll also have
JOB 2: penetration tester
Perform internal and external pentest against systems to determine vulnerabilities and offer mitigation strategies.
Perform web app pentests
Perform vulnerability risk assessment
Perform physical pentests and social engineering
Perform cyber incident response as needed for programs
Qualifications
– Bachelors’ degree from an accredited college in a related discipline, or equivalent experience/combined education, with 3 to 6 years of professional experience; or 1 to 3 years of professional experience with a Masters’ degree.
– Must have a Secret Clearance.
– 3 years in Pen Testing and Vulnerability Assessment, with specific emphasis on web application and enterprise network environments.
– 5 years of professional experience in incident detection and response, malware analysis, or cyber forensics.
Experience with the majority of the tools listed below:
• Kali Linux
• Metaspoilt
• Burp suite pro
• Cobalt Strike / Empire
• Tenable Nessus
• Debuggers such as Immunity
• Bloodhound
• BladeRF / HakRF
• Hak5 equipment
• Wireshark / tcpdump
Specific experience in at least 1 of the following specialties:
• Mobile application testing
• Cloud infrastructure testing
• RF Testing
• Mainframe systems
Preferred Qualifications:
Understanding of Cyber Kill Chain & Intelligence Defense.
GWU Job QUESTION analysis technical skill
/0 Comments/in Computer Science /by bonniejecintaQUESTION
Task: create technical interview questions and answers based on the job QUESTIONs. Make sure to cover all the concepts and tools mentioned on job QUESTIONs. Create questions and answers separately for each job post/ QUESTION. (
JOB1 penetration tester
Your key responsibilities
Our cybersecurity professionals possess diverse industry knowledge, along with unique technical expertise and specialized skills. The team stays highly relevant by researching and discovering the newest security vulnerabilities, attending and speaking at top security conferences around the world, and sharing knowledge on a variety of cybersecurity topics with key industry groups. The team frequently provides thought leadership and information exchanges through traditional and less conventional communications channels such as speaking at conferences and publishing white papers.
As part of our Penetration Testing team, you’ll identify potential threats and vulnerabilities to operational environments. Projects here could include penetration testing and simulating physical breaches to identify vulnerabilities.
Our professionals work together in planning, pursuing, delivering and managing engagements to assess, improve, build, and in some cases operate integrated security operations for our clients.
Skills and attributes for success
To qualify for the role you must have
Ideally, you’ll also have
JOB 2: penetration tester
Perform internal and external pentest against systems to determine vulnerabilities and offer mitigation strategies.
Perform web app pentests
Perform vulnerability risk assessment
Perform physical pentests and social engineering
Perform cyber incident response as needed for programs
Qualifications
– Bachelors’ degree from an accredited college in a related discipline, or equivalent experience/combined education, with 3 to 6 years of professional experience; or 1 to 3 years of professional experience with a Masters’ degree.
– Must have a Secret Clearance.
– 3 years in Pen Testing and Vulnerability Assessment, with specific emphasis on web application and enterprise network environments.
– 5 years of professional experience in incident detection and response, malware analysis, or cyber forensics.
Experience with the majority of the tools listed below:
• Kali Linux
• Metaspoilt
• Burp suite pro
• Cobalt Strike / Empire
• Tenable Nessus
• Debuggers such as Immunity
• Bloodhound
• BladeRF / HakRF
• Hak5 equipment
• Wireshark / tcpdump
Specific experience in at least 1 of the following specialties:
• Mobile application testing
• Cloud infrastructure testing
• RF Testing
• Mainframe systems
Preferred Qualifications:
Understanding of Cyber Kill Chain & Intelligence Defense.
Case Study: Privacy and the Right to Be Forgotten
/0 Comments/in Computer Science /by bonniejecintaQUESTION
Henri was a well-known shopkeeper and
café owner in a small town on the outskirts of Paris. He was thrust into
a vortex of controversy in the summer of 2007 when he was falsely
accused of sexual harassment by a disgruntled clerk under his
employment. Henri was completely exonerated, but links to old, damaging
articles in the local newspaper remained accessible through Google. That
newspaper was particularly aggressive in its initial coverage of the
events and did not give Henri the benefit of the doubt, despite his
protestations of innocence. Years later, people still brought up the
incident to him or his family, often with an accusatory tone. Henri
wanted this portion of his past, full of these false allegations and
innuendos, to be expunged. Since most people came across this reporting
through their search of Google.fr, he had asked Google for its help in
suppressing the links to these old stories. Google was not interested in
responding to his repeated requests for its assistance in removing
these links.
There
are two attributes of internet data that cause problems for victims
like Henri: internet data are both permanent and easily accessible. Web
pages are rarely deleted, and sometimes those that are deleted are
nevertheless preserved by caching services like Google Cache and the
Internet Archive. At the same time, search engines like Google and Bing
make all of those data exceptionally easy to access.
It
seemed that people like Henri would never be able to control
incriminating information about their past circulating on the
internet. However, in 2014 the European Union Court of Justice issued a
surprising court order against Google. It demanded that the search
engine company remove hyperlinks that connect search engine users to
content that is “no longer necessary,” or “inadequate, irrelevant, or no
longer relevant.” Exceptions are warranted if there is some
“preponderance of public interest” at stake. Thus, if someone like Henri
asks Google to remove these links to “irrelevant” and outdated
material, the search engine company must oblige this request.
The
European Court’s decision was based on the “right to be forgotten,”
which was cited as a basic aspect of a person’s overall privacy rights.
The legal authority of this right to be forgotten is found in the Data
Protection Directive adopted by the European Parliament in 1995. The
Directive established a comprehensive privacy framework in the European
Union, requiring that data “controllers” respect the privacy rights of
all “data subjects.”
Advocates
of this right claim that individuals should be able to insist on the
removal of old, irrelevant material that infringes on their basic
privacy rights. Skeptics of this new legal development, on the other
hand, expressed their unease about the burdens placed on search engine
companies like Google. There was also concern that the deletion of
these links for private interests could lead to “counterfeit histories.”
What
about the public’s right to know this information that is now filtered
out thanks to an individual’s complaints about irrelevancy?
The
EU’s decision establishes a new but more precarious boundary between
privacy and free speech that clearly favors privacy. The decision is in
keeping with Europe’s tradition of giving equal weight to privacy and
free speech rights. In the United States, however, priority is generally
given to free speech rights, and so it is probably unlikely that
a version of the “right to be forgotten” will be codified in U.S. law.
Google
agreed to comply with the European Court’s ruling but acknowledged the
difficulties with implementation. Within a few months after the ruling,
Google had received over 100,000 requests for the removal of links to
“irrelevant” or “unnecessary information.” The EU’s order, however,
applied only to European domains such as Google.fr or Google.co.uk—not
to Google.com itself. Some privacy rights advocates claim that this
doesn’t go far enough and that the ruling should apply globally in order
to fully protect the data rights of European citizens. There are other
questions about how extensively to apply European privacy rules, such as
whether or not publishers should be allowed to appeal Google’s decision
to remove links to their content.
What
is your opinion on the EU’s decision tu more precarious boundary
between privacy and free speech? What are your thoughts about the United
States leaning towards free speech rather than privacy? What do you
think will be the best way to balance privacy and free speech? EU’s way
or USA’s way? Why?
Real estate.
/0 Comments/in Humanities /by bonniejecintaQUESTION
ACTIVITY: Final Paper Part 6 (FHA & Conventional Loans)
This is the last section you will write for the final paper, other than the introduction and conclusion (in Module 14). This week’s focus is a comparison between FHA and conventional loans, as we learned in Chapters 9 and 11. This activity will examine both conventional and FHA loan financing through the lens of your buyers.Please. no plagiarism. no AI. original work only
Instructions
Write three paragraphs about your subject buyers (as listed in your profile data) that you have been writing about for Module Activities 4, 6, 8, and 10. The first paragraph will be an overview, the second paragraph will examine FHA loans, and the third paragraph will discuss conventional loans. The two loan types must be applied to your subject buyers so please connect the textbook material with your BORROWERS’ specific situation.Please. no plagiarism. no AI. original work only
Module 12 Supplemental Resources
Acronyms and Explanations
Front end ratio = Housing costs. PITI + HOA + any other costs, example: Mello-Roos
Back end ratio = housing costs (above) + ALL OTHER DEBTS THAT APPEAR ON YOUR CREDIT REPORT
FHA Debt Ratios = http://www.fhahandbook.com/debt-ratios.phpLinks to an external site.
Mortgage loan differences.
TEMPLATE
<your name>
<today’s date>
<class>
<textbook>
<module / chapter #>
Recommended Loan Program
<Write one overview paragraph recommending either the conventional or FHA loan program for this buyer. Compare and contrast the loan types below by answering the following questions with complete sentences. Which type of loan do you recommend for your subject borrowers FHA or conventional? Why do you recommend this loan type? What are the pros and cons? Paragraph must be 5 sentences. Cite the textbook page number in parenthesis.>
FHA Government Loan
< Write one paragraph explaining the FHA government loan program approaches from Chapter 11 in the textbook. Discuss the specifics of this loan program and whether it would be a good fit for your subject borrowers. This paragraph must be 5 sentences. Cite the textbook page.>
Conventional Financing
<Write one paragraph describing the conventional loan financing methods from Chapter 9 in the textbook. Discuss the specifics of this loan program and whether it would be a good fit for your subject borrowers. This paragraph must be 5 sentences. Cite the textbook page.>
EXAMPLE
Ima Student
May 12, 2021
BRE-126
Real Estate Finance by Huber, Walt
Recommended Loan Program
For Mickey Mouse and Minnie Mouse, I recommend the FHA loan program for their new home purchase financing. FHA and conventional loans are similar because …. In contrast, FHA and conventional mortgages are different in the following aspect: <insert reason>. The advantages of the FHA loan for the Mouse borrowers are… The disadvantages <insert>, however, are outweighed by the advantages. Therefore, the FHA mortgage will best suit their situation (p. 123).
FHA Government Loan
The FHA mortgage loan is <insert>. The loans are insured by the federal government, which minimizes the risk for lenders. This loan program offers borrowers…. (p. 456). It has the following qualifications for borrowers… FHA would be a good fit for Mickey and Minnie Mouse because <insert>.
Conventional Financing
Conventional mortgages, on the other hand, require <insert terms>. Borrowers applying for this program need to qualify by <insert> (p. 789). The benefits of a conventional loan include <insert>. However, this loan also requires the borrowers to <insert>. Although the conventional mortgage is a good option, it is not the best choice for the Mouse borrowers and their situation.
music 111
/0 Comments/in Writing /by bonniejecintaQUESTION
Before completing this week’s discussion, you will need to read the third chapter in How To Listen To Jazz (pp. 51–72) by Ted Gioia. There are some concepts covered in this chapter that you will need to use in order to complete this discussion.
Ted Gioia does a nice job of explaining some of the “inner workings” of jazz. One of the things he talks about in Chapter 3 (“The Structure of Jazz”) can be especially helpful in trying to “demystify” jazz. This isn’t true for all jazz, but a pretty big percentage of jazz tends to follow a pattern like this:
Play the tune, more or less “as is”
Take turns improvising a series of variations based on the harmony/melody of the tune
Play the tune, again, more or less “as is”
Sometimes there is an introduction before the tune or a coda after it. Sometimes there is some other stuff going on in the improvised section(s). But, in general, 80+% of jazz follows something resembling this structure.
With this in mind, I would like you to listen to an example of this. In the 1930s–50s, it was common for jazz musicians to do this exact thing with popular songs of the time. Songs from Broadway musicals, popular songs from other genres, and other (at the time) well-known songs were the “starting point” for a lot of jazz musicians at the time (and still are, today). This is really useful if you know those songs … but quite a lot fo us simply don’t. Chances are, your knowledge of old Cole Porter songs or stuff from 1930s Broadway shows isn’t really all that great (mine isn’t). So, when you hear a jazz band play these songs, and improvise variations on them, a big part of the “puzzle” is missing; the improvised variations lose a lot of their “wow” factor when you don’t know the original song. And, out of tradition, a lot of contemporary jazz performers are still playing a lot of these songs, so going to a modern jazz performance, you might still be a little lost with all of the references to eighty-year-old tunes.
A bit later in this discussion, I will share a jazz version of a song that you might know. It is a version of the song “Blackbird” by The Beatles, performed by the Brad Mehldau Trio, one of the most well-respected groups on the scene today. This version follows the same pattern I laid out at the beginning; first, we hear the original song, then some improvisational material based upon it, then the original song again.
Now, for the “discussion” part, I would like you say a few things.
Did you know this song before today (the original)?
If so, were you able to “follow” it once the band started to improvise?
If not, did hearing the original song first help you find something to follow as you listened?
Did anything surprise you as you listened? Did you enjoy the performance?
In How To Listen To Jazz, Ted Gioia describes a common pattern of jazz compositions (and improvised solos) typically unfolding in predictable groups. Specifically, he says something about how “listeners can benefit from trying to conceptualize many jazz performances as an unfolding of …” What does he say, here? (Hint: check out pp. 70–1 toward the end of Chapter 3.)
Did you hear this happening in “Blackbird?”
NUU Web and Graphics Design 3x3x3 Rubiks Cube Javascript Questions
/0 Comments/in Programming /by bonniejecintaQuestion
I am trying to create a 3x3x3 Rubik’s cube using HTML and JavaScript. My current issue is that the current code uses 27 cubies to create the overall cube. The issue is the cubies currently have the 6 colours around each cubie. Whereas, I want each face of the overall cube to have 6 colours. So the corner cubies would have 3 colours, the middle edge cubies would have 2 colours, and the center cubies of each face would have 1 colour. The first image shows you what the current code looks like and the second image will show a rough idea of what I want it to look like. I also want to be able to rotate the faces using keys. For example: The left face could be rotated should rotate anti-clockwise using ‘q’ and clockwise with ‘a’ the right face should rotate anti-clockwise using ‘w’ and clockwise using ‘s’. The front face should rotate anti-clockwise using ‘e’ and clockwise using ‘d’ and the back face should rotate anti-clockwise using ‘r’ and clockwise using ‘f’. The top face should rotate anti-clockwise using ‘u’ and clockwise using ‘i’ and the bottom face to rotate anti-clockwise using ‘j’ and clockwise using ‘k’. This is the current code that correlates to the first image (The rotations are incorrect in this code):
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>3x3x3 Rubik’s Cube with Three.js</title>
<style>
body {
margin: 0;
overflow: hidden;
}
#rubiksCubeContainer {
width: 100vw;
height: 100vh;
}
</style>
</head>
<body tabindex=”0″>
<div id=”rubiksCubeContainer”></div>
<script type=”module”>
import * as THREE from ‘https://cdn.jsdelivr.net/npm/three@0.121.1/build/three.module.js’;
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100);
const renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.getElementById(‘rubiksCubeContainer’).appendChild(renderer.domElement);
const cubieGeometry = new THREE.BoxGeometry(1, 1, 1);
const createCubie = (x, y, z) => {
const colors = [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xff8800, 0xffffff];
const materials = colors.map(color => new THREE.MeshBasicMaterial({ color }));
const cubie = new THREE.Mesh(cubieGeometry, materials);
cubie.geometry.faces.forEach((face, index) => {
face.materialIndex = Math.floor(index / 2); // Each face has two triangles
});
cubie.position.set(x, y, z);
scene.add(cubie);
return cubie;
};
const createLayer = (layerNumber) => {
const group = new THREE.Group();
for (let x = 0; x < 3; x++) {
for (let y = 0; y < 1; y++) {
for (let z = 0; z < 3; z++) {
const cubie = createCubie(x * 1.1 – 1.1, y * 1.1 – 1.1, z * 1.1 – 1.1);
group.add(cubie);
}
}
}
group.position.set(0, 1.1 * layerNumber, 0);
scene.add(group);
return group;
};
const topLayerGroup = createLayer(1);
const middleLayerGroup = createLayer(0);
const bottomLayerGroup = createLayer(-1);
camera.position.set(5, 5, 8);
camera.lookAt(scene.position);
const animate = () => {
requestAnimationFrame(animate);
renderer.render(scene, camera);
};
window.addEventListener(‘resize’, () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
window.addEventListener(‘keydown’, (event) => {
switch (event.key) {
case ‘i’:
rotateGroupCounterClockwise(topLayerGroup);
break;
case ‘u’:
rotateGroupClockwise(topLayerGroup);
break;
case ‘k’:
rotateGroupCounterClockwise(middleLayerGroup);
break;
case ‘j’:
rotateGroupClockwise(middleLayerGroup);
break;
case ‘m’:
rotateGroupCounterClockwise(bottomLayerGroup);
break;
case ‘n’:
rotateGroupClockwise(bottomLayerGroup);
break;
case ‘a’:
rotateColumnCounterClockwise(0);
break;
case ‘q’:
rotateColumnClockwise(0);
break;
case ‘s’:
rotateColumnCounterClockwise(1);
break;
case ‘w’:
rotateColumnClockwise(1);
break;
case ‘d’:
rotateColumnCounterClockwise(2);
break;
case ‘e’:
rotateColumnClockwise(2);
break;
}
});
animate();
const rotateGroupCounterClockwise = (group) => {
group.rotateOnAxis(new THREE.Vector3(0, 1, 0), Math.PI / 2);
updateRenderer();
};
const rotateGroupClockwise = (group) => {
group.rotateOnAxis(new THREE.Vector3(0, 1, 0), -Math.PI / 2);
updateRenderer();
};
const rotateColumnCounterClockwise = (columnIndex) => {
const columnCubies = [
// List of cubies in the specified column
topLayerGroup.children[columnIndex * 3],
middleLayerGroup.children[columnIndex * 3],
bottomLayerGroup.children[columnIndex * 3],
topLayerGroup.children[columnIndex * 3 + 1],
middleLayerGroup.children[columnIndex * 3 + 1],
bottomLayerGroup.children[columnIndex * 3 + 1],
topLayerGroup.children[columnIndex * 3 + 2],
middleLayerGroup.children[columnIndex * 3 + 2],
bottomLayerGroup.children[columnIndex * 3 + 2],
];
// Use the X-axis as the rotation axis (1, 0, 0)
const axis = new THREE.Vector3(1, 0, 0);
// Rotate each cubie in the column on the specified axis
columnCubies.forEach((cubie) => cubie.rotateOnAxis(axis, Math.PI / 2));
// Update the renderer to reflect the changes
updateRenderer();
};
// For rotating the column clockwise
const rotateColumnClockwise = (columnIndex) => {
const columnCubies = [
// List of cubies in the specified column
topLayerGroup.children[columnIndex * 3],
middleLayerGroup.children[columnIndex * 3],
bottomLayerGroup.children[columnIndex * 3],
topLayerGroup.children[columnIndex * 3 + 1],
middleLayerGroup.children[columnIndex * 3 + 1],
bottomLayerGroup.children[columnIndex * 3 + 1],
topLayerGroup.children[columnIndex * 3 + 2],
middleLayerGroup.children[columnIndex * 3 + 2],
bottomLayerGroup.children[columnIndex * 3 + 2],
];
// Use the X-axis as the rotation axis (1, 0, 0)
const axis = new THREE.Vector3(1, 0, 0);
// Rotate each cubie in the column on the specified axis
columnCubies.forEach((cubie) => cubie.rotateOnAxis(axis, -Math.PI / 2));
// Update the renderer to reflect the changes
updateRenderer();
updateRenderer();
};
const updateRenderer = () => {
renderer.render(scene, camera);
};
</script>
</body>
</html>
I need help with my discussion board
/0 Comments/in Humanities /by bonniejecintaQUESTION
American Family
1.Coontz titled her work “The Way We Never Were” because of the ideals surrounding what a “Ideal American Family’’ is meant to look like. The phrase “American dream” of a family with two kids and a dog, in a suburban house with a white picket fence, has long been sed to describe what the typical American family looks like, which is often not what most families actually are. The idea that the man of the house is to be the breadwinner and the woman is meant to be the housekeeper, has since been somewhat forced out of society. It was expected that marriages and families were always to work out and the couple are supposed to stay together till death and be happy for all of their lives, when quite the contrary is true. Coontz touches on this topic when she says that “I found that the male breadwinner family of the 1950s was a very recent, short-lived invention and that during its heyday, rates of poverty, child abuse, marital unhappiness, and domestic violence were actually higher than in the more diverse 1990s.” Furthering that this idea of an “ideal family” was never actually ideal.
2. According to the Pew Research Center, more children are growing up in households with arrangements other than two parents in their first marriage. This means increased rates of families with parents in their second marriage, parents who aren’t married, households with just one parent, or children living with neither of their parents. Furthermore, two parent households are most common among Asian families and highly educated parents, with white families taking second place. This means that race and social class are tied to the percentage of two parent households in the US. Another interesting trend is that the number of children per household has declined in recent decades, with one and two child families being most common nowadays, and families with three or four children declining in popularity. Another graph also shows a correlation between race, education, and family size: white, Asian, and highly educated parents are likely to have the least children in comparison to Black and Hispanic households and parents with less education.
Woman in Hip Hop
1. The study was combined by Critical Race Theory and Black Feminist Theory to get the concept of rap music. It is examined on how racism is common in our daily living for people of color and a certain race is more judged from others. They write how black women are “sapphire” and “jezebel” in sapphire women are headstrong, bossy, and dominating over men and jezebel they are labeled has fierce, sexy, and driven. Wallace states there stereotyping and its started from slavery days that women are able to do more physical work.
2. A large portion of the students who participated in this study defined independence in relation to financial stability. This means milestones such as moving out, owning a car, having a job, and more are all indicators of and contributors to one’s independence. Additionally, some students cited the level of parental involvement they received as another consideration in their definition of independence. Some stated that their parents fostered them into independence by giving them more and more financial a decision-making freedom as they grew up, but on the flip side, others stated that they are still heavily reliant on their parents in their adult lives, which they feel limits their independence. According to the article, female artists in rap “define independence by condemning the disrespectful treatment of women in society by addressing societal issues like harassment and domestic violence” (Moody-Ramirez & Scott, 59), including artists such as Queen Latifah, Eryka Baduj, Sister Souljah, and more. On the flip side, male rappers’ representation of independent women can vary from artist to artist, with some placing women “in positions of sexual exploitation and moral degradation”, while others “promote positive and uplifting messages about the Black experience” (Moody-Ramirez & Scott, 58)
Criminal Justice Question
/0 Comments/in Law /by bonniejecintaQuestion
Criminal justice professionals in management positions are accountable to the public and to their teams, supervisors, and subordinates for the decisions they make in the line of duty. Individuals in every branch are expected to analyze the complexity of different situations and to determine ethical ways of responding to them. As a manager, you will need to be ready to speak to the ethical factors that inform decision-making strategies used in various criminal justice environments.
Imagine that you manage a team at an agency that has been invited to participate in a focus group for the ethics board. The focus group plans to compile a report on best practices in ethical decision-making to manage situations and dilemmas. For this assessment, you will prepare a response that you would present in the focus group.
Select one of the following criminal justice environments at the state or federal level as your focus for this assessment:
Interaction between law enforcement and the community
Crisis scenario or disaster situation
Create a 15- to 18-slide Microsoft® PowerPoint® presentation as if you were a criminal justice manager presenting to a focus group on best practices in ethical decision-making to manage various situations. Your presentation should include the following information supported by evidence from your research:
Summarize the case that you selected and explain the ethical considerations in the situation. Describe the environmental and cultural factors involved and relevant background information.
Identify the originating causes influencing the dilemma. Determine ethical solutions for addressing these causes and preventing similar issues in the future. Summarize the protocol or process that the individual should have followed and identify any process changes since this incident.
Explain how you would respond to the situation and how you would apply ethical decision-making strategies in a similar situation.
Whether you use the presentation template example or another template of your choice, include the following slides and topics in your presentation:
Title
Introduction
11–13 content slides
Conclusion
References
PCOS Peer Response
/0 Comments/in Health Medical /by bonniejecintaQUESTION
Peer Responses – Pratiksha
Length: A minimum of 170 words per post, not including references
Citations: At least two high-level scholarly reference in APA per post from within the last 5 years
Globally Polycystic Ovary Syndrome (PCOS) affects around 8% to 20% of women during their years according to diagnostic criteria (Singh et al., 2023). The prevalence varies across populations due, to environmental factors.
Pathophysiology
The underlying mechanisms of PCOS involve metabolic disruptions mainly characterized by levels of androgens and insulin. Increased androgen levels originating from the ovaries and adrenal glands result in symptoms such as hair growth (hirsutism) and acne while disturbing ovarian function (Witchel et al., 2019). Imbalances in the ovarian axis worsen excess androgen production, influenced by genetic factors affecting steroid production. Additionally, insulin resistance contributes to insulin levels, which in turn stimulate androgen production and lower sex hormone binding globulin levels intensifying the effects of androgens.
Clinical Presentation
Common symptoms include cycles, hirsutism, acne, weight gain and difficulty conceiving. Long term implications involve metabolic issues, like diabetes, abnormal lipid levels and cardiovascular problems (Bulsara et al., 2021).
Diagnostic Criteria
To diagnose syndrome (PCOS) healthcare providers consider various criteria outlined by the Rotterdam ESHRE/ASRM Sponsored PCOS Consensus Workshop Group in 2004. These criteria involve the presence of two out of three key features; hyperandrogenism (HA) ovulatory dysfunction (OD) and polycystic ovarian morphology (PCOM) observable on ultrasound scans. The Androgen Excess and PCOS Society (AE PCOS) criteria also consider hyperandrogenism and ovarian dysfunction for diagnosis. Anti Mullerian hormone (AMH) plays a role as an indicator in PCOS reflecting the maturation and development of ovarian follicles. Elevated levels of AMH can hinder development contributing to the dysfunction commonly seen in PCOS cases.
Non-Drug Treatment Approaches
For women with PCOS lifestyle modifications are fundamental in managing the condition alongside medication. Engaging in activity is vital as it improves insulin sensitivity and overall metabolic health. Including both aerobic exercise and resistance training in routines has been shown to enhance insulin sensitivity and regulate androgen levels. Following glycemic index (LGI) diets that’re high in fiber and plant-based fats can provide metabolic benefits by helping to regulate glucose levels and hormones that control appetite.
It’s important to steer diets that’re high in calories, sugar and saturated fats to help reduce inflammation and insulin resistance linked to PCOS (Singh et al., 2023).
Pharmacological Management
Oral contraceptives (OCPs), including both progesterone-only pills and combined estrogen-progesterone pills, serve as first-line therapy for menstrual irregularities and ovulation suppression (Bulsara et al., 2021). Antiandrogens such as spironolactone, flutamide, and cyproterone acetate are preferred for managing hirsutism. Insulin sensitizers like metformin improve insulin resistance and restore menstrual regularity, while thiazolidinediones (TZDs) offer additional benefits in improving ovulation and reducing androgen levels (Bulsara et al., 2021).
Education
Patient education on lifestyle modifications, contraception, and long-term health risks is crucial. Encourage adherence to treatment and regular follow-ups.
Follow-up
Regular monitoring of menstrual cycles, androgen levels, and metabolic parameters is essential. Adjust management strategies based on patient response and goals.