UPDATE MyGMap
SET Lat = '1', Lng = '2'
WHERE Id IN (1, 2);
INSERT INTO MyGMap (Lat, Lng)
VALUES ('1', '2'), ('3', '4');
UPDATE MyGMap as row_1 INNER JOIN MyGMap as row_2
ON
row_1.id = 1 AND
row_2.id = 2
SET
row_1.Lat = '1',
row_1.Lng = '2',
row_2.Lat = '3',
row_3.Lng = '4';
const today = new Date();
const tomorrow = new Date(today.getTime() + (24 * 60 * 60 * 1000));
const formatter = new Intl.DateTimeFormat(navigator.language, {
year: '2-digit',
month: '2-digit',
day: '2-digit'
});
$('#datepicker').attr('placeholder', `Завтра ${formatter.format(tomorrow)}`);
navigator.language
можно использовать 'ru-RU'
. {
"name": "John"
}
import json
import atexit
class JSONController:
def __init__(self, filename):
self.handler = open(filename, 'r+')
atexit.register(self.close)
def load(self):
text = self.handler.read()
return json.loads(text)
def save(self, data):
text = json.dumps(data)
self.handler.seek(0)
self.handler.write(text)
def close(self):
self.handler.close()
json_controller = JSONController('./data.json')
data = json_controller.load()
data['age'] = 30
print(data) # {'name': 'John', 'age': 30}
json_controller.save(data)