How long does it actually take to get to Budapest by train? Or to Madrid? Guess! North Korea sends military reconnaissance satellite into space, North Korea says

If you buy your ticket for an ICE train from SBB, you cannot choose exactly where you will sit.
Traveling through Europe by train? That works! And all this comfortably directly from a Swiss train station – with a change you can go even further. But how long does that actually take? Enter your estimate here.

The SBB is considering a direct train from Basel to London. Although traveling to the British capital by train is fairly easy, direct is always better. This journey would take five hours. But how long do train journeys to European cities actually take? Try the quiz here:

The numbers
Many roads lead to Rome. That’s why we opted for the fastest one and used the SBB timetable for November. Only one of the trips below includes a night train journey, all others are day trains. Have fun!

“; questionContent += “

” + `` + `` + `` + “

” + lessLabel + “” + moreLabel + “

” + “” + “

`; reviewQuestions[idx].innerHTML = queryContent; } // Update value in text element var allSliders = document.getElementsByClassName(‘questionSlider’); Array.prototype.forEach.call(allSliders, function (slider) { // Loop over each element to attach the .oninput function slider.oninput = function (event) { var idx = slider.getAttribute(‘idx’); // now update according to span document.getElementById(‘r’ + idx + ‘-my’).innerHTML = this.value.toString().replace(/\B(?=(\d{3})+(? !\d ))/G, “‘”); } }); back reviewQuestions; } const roundStartMean = Math.round(((min + max) / 2) * 100) / 100; for (var idx = 0; idx[idx][5] = roundedStartAverage; } imageUrls = []; averageUrls = []; for (var idx = 0; idx < questionList.length; idx++) { var id = questionList[idx][3].split("https://www.watson.ch/").pop(); var picutreUrl = "https://www.watson.ch/api/2.0/images/" + id; pictureUrls.push(picutreUrl); cleanKey = questionList[idx][0].replace(/[^a-zA-Z0-9]/g, ""); var key = "slider-quiz" + projectId.toString() + "-" + cleanKey; var apiUrlWatsonMean = "https://www.watson.ch/api/2.0/key-values/" + key + "/histogram"; averageUrls.push(apiUrlWatsonMean); } Promise.all( pictureUrls.map(url =>
fetch(url) .then(response => response.json()) .catch(error => console.error(error)) ) ) .then(data => { console.log(data); for (var idx = 0; ID < data.length; idx++) { if (questionList[idx][4] != "") { questionList[idx][4] = "Bild: " + questionList[idx][4]; } else { if (data[idx].data.source != null && data[idx].data.source != "") { var pictureCredit = "Bild: " + data[idx].data.source; questionList[idx][4] = pictureCredit; } else { questionList[idx][4] = ""; } } } reviewQuestions = createQuestionContent(reviewQuestions) }) .catch(error => console.error(‘image’, error)); Promise.all( AverageUrls.map(url => fetch(url) .then(response => response.json()) .catch(error => console.error(error)) ) ) .then(data => { / / loop over data for (var idx = 0; idx[idx].facts); const values ​​= Object.values(data[idx].facts); if (keys.length != 0) { // transform keys to numbers for (let i = 0; i < key.length; i++) { keys[i] = parseInt(keys[i]); } let sum = 0; for (let i = 0; i < keys.length; i++) { sum += keys[i] * values[i]; } average = sum / values.reduce((acc, curr) => acc + current, 0); average = Math.round(average * 100) / 100; questionList[idx][5] = average; questionList[idx][6] = keys; questionList[idx][7] = values; reviewQuestions = createQuestionContent(reviewQuestions) } } // create a copy of question list var question listCopy = question list.slice(0); // sort the queryList by the average queryListCopy.sort(function (a, b) { return b[5] – A[5]; }); // TABLE //createTable(questionListCopy); // END TABLE }) .catch(error => console.error(error)); var reviewQuestions = document.getElementsByClassName(‘reviewQuestion’); if (reviewQuestions.length != QuestionList.length) { console.log(“questionList must be the same length as the number of divs (list: ” + QuestionList.length + “, divs: ” + reviewQuestions.length + “)! “) } reviewQuestions = createQuestionContent(reviewQuestions) function sendData(questionId, noReview = false) { cleanKey = questionId.replace(/[^a-zA-Z0-9]/G, “”); // find questionId in questionList with cleanKey for (var idx = 0; idx < questionList.length; idx++) { if (questionList[idx][0].replace(/[^a-zA-Z0-9]/g, "") == cleanKey) { questionId = idx; break; } } let dataToSend = { 'questionId': cleanKey, 'version': 0.9, 'projectId': projectId }; if (noReview) { // just get the mean dataToSend['userInput'] = null; document.querySelector("#r" + cleanKey + "-my").innerHTML = "-"; } else { // send my review let valSlider = document.querySelector("#s" + cleanKey + "-slider-input").value; dataToSend['userInput'] = parseFloat(valSlider); const key = "slider-quiz" + projectId.toString() + "-" + cleanKey; const jwt_token = localStorage.getItem("jwt_token"); const jwt_free_token = localStorage.getItem("jwt_free_token"); const user_id = localStorage.getItem("user_id"); let value if (user_id) { value = { user: user_id, value: dataToSend['userInput'] }; } else { value = { user: jwt_free_token, value: dataToSend['userInput'] }; } let optionen = { method: 'post', body: JSON.stringify(dataToSend) }; fetch(`https://www.watson.ch/api/2.0/key-values/${key}`, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${jwt_free_token}` }, body: JSON.stringify(value) }) .then(response => response.json()) .catch(error => console.error(error)); } document.querySelector(“#r” + cleanKey + “-wtsn”).innerHTML = questionnaire[questionId][5].toString().replace(/\B(?=(\d{3})+(?!\d))/g, “‘”) document.querySelector(“#r” + cleanKey + “-co2” ).innerHTML = questionsList[questionId][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, “‘”) solutionsSlider = document.getElementById(“s” + cleanKey + “-slider -solution”) solutionSlider.style.display = ‘block’; SolutionSlider.value = questionsList[questionId][1]; meanSlider = document.getElementById(“s” + cleanKey + “-slider-watson-mean”) meanSlider.style.display = ‘block’; meanSlider.value = questionnaire[questionId][5] * 100; document.querySelector(“#btnRate-” + cleanKey).disabled = true; document.querySelector(“#btnView-” + cleanKey).disabled = true; document.querySelector(“#s” + cleanKey + “-slider-input”).disabled = true; }

Leo Helfenberger
Leo Helfenberger

Soource :Watson

follow:
Amelia

Amelia

I am Amelia James, a passionate journalist with a deep-rooted interest in current affairs. I have more than five years of experience in the media industry, working both as an author and editor for 24 Instant News. My main focus lies in international news, particularly regional conflicts and political issues around the world.

Related Posts