javascript

How do I swap array elements?

let arr = ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'] What is the easiest way to add the 0 element 'вс' to the end of the array? I got it like this: let shiftElem = arr.shift() arr.push(shiftElem) Is it possible to make it easier?

Java server for Android applications

I need to make a server in java that will work with the database and perform other functions. The choice fell on the server b ... to fix it. It is possible to completely change architecture or toolkit. The main thing is that the server is written in Java.

Calculating the location of planets in the solar system

Creating a Nasava analog of a 3D map of the solar system on THREE.js and Vue. Faced with the problem of determining the curre ... ed a response to ishya on git). Maybe someone knows suitable APIs for loading the location of planets in the solar system?

Chessboard - one formula

I noticed that in chess problems they often draw the board using the condition that if the remainder of the division by 8 is ... { background-image: url('https://gyazo.com/1b53d5bd1715435422adeea81a5fbf73.png'); } <div id="board"></div>

how to open a second modal window from one modal window

I ran into a problem with modal windows, namely, a problem where when I click in one modal window, the second one should "fal ... modal window at the same level as the first modal window: How hang the second one on top of the first one I don't understand

Sending files from a website to Google Drive

I'm looking for a solution to the problem on the Internet, maybe someone can tell me here. The situation is this, a Google fo ... for me, the data is entered in the table, and the files do not fall into the folder, I changed 2 idishnik tables and folders

Debugging JS in react applications that use REST

Dear sirs, there is a question related to debugging js when using react. The story was arranged as follows: First, I develo ... xt of the error in the form of an image: If you can see something in it, what I missed - please write. Thank you in advance!

How to split by the '\'character in js

I'm trying to split a string by the character \, it doesn't work, I tried \\ the same thing, just the whole string is returne ... Who knows how to do it? Maybe with regulars somehow? let a = "ABC\EG\SSDF\NSDFSD\SDFSDF".split("\\"); console.log(a);

Delete html tag content

Hello. How can I delete the content of an html tag in javascript? I.e. I have a function: <html> <script> functio ... > The essence of my task is that at the end of the execution of the ttt function, the contents of the tag are deleted.

Cost Calculation Calculator

There are two sliders, the number of calls and the average duration of the call. There is a total cost of the call. The value ... with the implementation, please. (The noUiSlider slider, I couldn't load it here, so I wrote the value for input manually).

Bootstrap Modal window

When creating a bootstap modal window, it closes immediately after opening it. Inside the youtube video window. How to fix it ... .net/8hz1c733/ On every case. Maybe I have an outdated jquery library? Or do you need to connect something to support html-5?

How to pass the id of the current element

Eg: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="js/calkulator3.js"></scrip ... ou can create one that will determine the id of the pressed button and already pull the value from this ID. How do I do this?

Bootstrap 3, menu nav-pills

How do I select the active (clicked) section/link in the menu? What JS should I add from Bootstrap and what should I add to t ... ;/a></li> <li><a href="#">Messages</a></li> </ul> Example menu: changeip.ru

How do I make a GET request in pure JavaScript?

How can I use javascript to make a GET request and get a response from it (the html code of a certain page)? For example: sit ... true); x.onreadystatechange = function ()alert(x.responseText);} x.send(null); </script> But it opens an empty alert.

Smooth block appearance

I have such a section of the markup (I will immediately make a reservation that the markup was not done by me, it was provide ... in_modal").fadeIn("slow"); }); </script> But no smooth appearance occurs. Tell me, where did I do something wrong?

Scaling the image with the same aspect ratio

I have this div: .photoBorder { width: 120px; height: 120px; border: 1px solid black; } .photoImage { t ... : height or width. And it is also necessary that it is located in the center, and the free edges are filled with black color.

jQuery.each()

I bypass the elements in this way: jQuery.each($('#content_wrap > .an_post'), function() { setTimeout(function(){cons ... adeIn(1500); }); That is, so that 4 elements disappear one after the other with a difference in animation of about a second.

Working speed: CSS vs JavaScript

Which is faster, and therefore which is better to use CSS or JavaScript. For example, there is a group of elements, and I nee ... perties using JavaScript? We are not talking about pure JavaScript, but the question is also relevant for it, but about GWT.

authorization window in the browser

Please tell me how to force the browser to open a window for authorization, using js?

Why doesn't Angular innerHTML output the code in the frame and not all the markup elements?

I put this code where the value contains the text of the entire page with frames, videos, photos, text. Only the text with st ... ]['rendered']"></div> Is it something to do with security? How do I make everything display "as it is in the code"?