Random activity
When the HTML button element with the id getActivity Btn is clicked, a GET request has to be sent to the given URL and set HTTP response value in the HTML paragraph element with id activityName, activityType and the HTML img element with id activity Img should change according to the response
<div class="bg-container text-center">
<button class="get-activity-button p-1 mt-3" id="getActivityBtn">Get Activity</button>
<div class="mt-2" id="result">
<div class="d-flex flex-row">
<div class="w-50 d-flex flex-column justify-content-center text-center">
<p id="activityName" class="activity-name">Buy a new house decoration</p>
<p id="activityType" class="activity-type">recreational</p>
</div>
6. A counter of how many people have signed a Cause should be visible to anyone 7. Ability to see signature counts and actual new signatures as they happen 9. Ability to share causes on social media like Facebook, Twitter, and Reddit.
Mobile
i want code in between write code here
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
class Mobile {
// Write your code here
}
function main() {
const brand = readLine();
const ram = readLine();
const battery = parseInt(readLine());
const song = readLine();
const isOnCall = JSON.parse(readLine());
const myMobile = // Write your code here
myMobile.fullcharge();
myMobile.playMusic();
myMobile.stopMusic();
myMobile.endCall();
myMobile.makeCall();
myMobile.endCall();
}
Creating and consuming promises.
1.For taking shower,
resolve with "Taken Shower" text,if the isHotWaterReady is true.and reject with "Hot Water Not Ready",text if the isHotWaterReady is false.
2.For having breakfast,
resolve with "Had Breakfast",text,if the isBreakfastReady is true and reject with "Breakfast Not ready" text,if the isBreakfastReady is false
3.For getting to work,
resolve with "Got ti Work",text
i/p:the 1st line of i/p contains a boolean isHotWaterReady
the second line of i/p contains a boolean isBreakfastReady
input:
true
true
output;Taken Shower
Had Breakfast
Got to Work
input:true
false
output:
Taken Shower
Breakfast Not Ready
input:false
false
o/p:Hot Water Not Ready
i/p:false
true
o/p:Hot Water Not Ready
CCBP login
When the submit is clicked and the value of the HTML input elements with I'd names is empty and password is not empty then the text content in the HTML paragraph elements with I'd name ErrMsg and resultMsg should have an error message and "Fill in the required details " respectively
When the submit is clicked and the value of the HTML input elements with I'd name is empty and password is not empty then the text content in the HTML paragraph elements with I'd password ErrMsg and resultMsg should have an error message and "Fill in the required details " respectively
*This cases are not executed getting error please help*
CCBP login
this case error
capital country
this case is error please help
The goal of this coading exam is to quickly get you off the ground eith the array method every().there is a selection going on for the civil service sector candidates have to participate in x number of events and, the condidates who score more than 75 points in every event will be selectedgiven candidatesList as input,it contains objects with the name of the condidate and an array consisting of points achieved in each event by the condidate.filter the condidates who have scored more than 75 points in every event
log the array consisting of the names of the selected candidates in the console
i/p:the i/p will be a siongle line containing an array with names of the selected candidates
constraints:keys of objects should be given in quotes
input:
[{'name':'Blake Hodges','points':[76,98,88,84]},{'name':'James Anderson','points':[0,98,12,33]},{'name':'Matthew Norton','points':[89,67,83,93]}]
output:
['Blake Hodges']
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString
.trim()
.split("\n")
.map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
let myArray = JSON.parse(readLine());
/* Please do not modify anything above this line */
/* Write your code here and log the output */
let min = myArray[0], result = undefined, index = 0;
while (myArray.length) {
myArray.map((e, i)=> {
if (e < min) min = e;
index = i
})
if (min % 3 === 0 && min % 2 === 0) {
result = min;
break
}
myArray.splice(index, 1);
min = myArray[0];
}
console.log(result)
}
other logic is solutiion
<div class="bg-container text-center">
<button class="get-activity-button p-1 mt-3" id="getActivityBtn">Get Activity</button>
<div class="mt-2" id="result">
<div class="d-flex flex-row">
<div class="w-50 d-flex flex-column justify-content-center text-center">
<p id="activityName" class="activity-name">Buyanewhousedecoration</p>
<p id="activityType" class="activity-type">recreational</p> </div>
<div class="w-50"> <img src="https://assets.ccbp.in/frontend/react-js/ranactivity/party.png" id="activityImg" class="activity-img" /></div></div></div>
<div class="d-none mt-5 mb-5" id="spinner">
<div class="d-flex flex-row justify-content-center">
<div class="spinner-border" role="status">