hello, guys, can anyone help me with this:
I am creating an object dynamically with bracket notation and it looks like this: {
'1': 'Wrong answer',
'2': 'OK',
'3': 'OK',
'4b': 'Runtime error',
'4a': 'OK'
}
but I want the 4b and 4a to be inside of an object
to look like this :
{
'1': 'Wrong answer',
'2': 'OK',
'3': 'OK',
'4':{
'4b': 'Runtime error',
'4a': 'OK'
}
}
so how do I set properties with bracket notation 2 lvls deep?
function getScore(T, R) {
const scores = {}
let result = 0
T.forEach((item, index) => {
const firstDigit = item.search(/\d/)
if (firstDigit === item.length - 1) {
scores[item[firstDigit]] = R[index]
} else {
scores[item.slice(firstDigit)] = R[index]
}
})
console.log(scores)
}
getScore(["codility1", "codility3", "codility2", "codility4b", "codility4a"], ["Wrong answer", "OK", "OK", "Runtime error", "OK"])
I am building a YouTube video trimmer, and currently, it takes the YouTube video ID, downloads the whole video from the server (Even it is like 10 hours long), and then it trims it according to user's inputted timeframe using ffmpeg.
Now the problem with this is that it takes so much time to download the whole video even if we want a small piece of it hence it is highly impractical.
I was thinking to implement something like an HTML5 video player does when you seek the video forward. It just jumps to the part where you seek-ed to without downloading the part you skipped over. How can I only download a part of a video file from a server in form of a buffer and then generate an already trimmed video file from that? I don't know if that is even possible on the server-side, but video players do it on the client-side.
Error: Cannot inject the dependency at position #0 of "WidgetStateService" constructor. Reason:
TypeInfo not known for "Object"
When working with the chrome devtools, how do you get the devToolsFrontendUrl to load inside of chrome? When i drop 'chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=10.0.3.6:4080/15d3e459-3f00-442f-b442-a35cea47d811' into my chrome browser it just tries to google the url....