Skip to main content

Posts

JS / HTML visual calendar

I want to create a hotel booking website, to be more precise - nice looking calendar with data from SQL with clickable elements. But now main question is how to create something like on the picture, can you advice a nice framework or any other solution? Via Active questions tagged javascript - Stack Overflow https://ift.tt/ux8l27M

Weird serviceworker behavior in iframes

Example.com/index.html defines a static iframe element with hard-coded src = another.com/frame.html. Another.com has a serviceworker that frame.html creates and successfully postmessages to. After another.com serviceworker is registered and responding to messages, reloading the top index.html (before the serviceworker timeout terminates) will again populate the iframe with another.com/frame.html, and even though the service worker continues to serve fetch requests, it no longer responds to postmessage, nor can serviceworker console.log messages be seen in the chrome devtools. Via Active questions tagged javascript - Stack Overflow https://ift.tt/HdSxJQE

some draggable items are misplaced when using react-beautiful-dnd

I'm trying to use RBD for my task management app, After setting it up i noticed that sometimes when i drag and drop a task to a populated column, its inserted at another index that the one i was aiming for, for example if i place it at the top it gets placed at the index 1, which is second from the top, im not sure how or when this happens i was only able to find this problem at certain patterns, for example if 4 tasks start at the todo column and the 2 other columns are empty, then i drag the top task to the second column and back to the top of the first column, it gets placed below the current top one, but when i drag the top one from the todo to the second column, then drag the task that is now the top one in the todo to the top of the second column it works correctly, i cant find a pattern to debug i tried to use console.log all day to find a pattern but i cant find anything, i use filteredTasks state to render the tasks in my tsx incase any filters are applied, if no filters a

Can't establish connection between client and server using node js with socket.io and express and a html file

I was following a Youtube tutorial ( https://www.youtube.com/watch?v=PXBy6pB4mTU&list=PLo6lBZn6hgcZ4-xQFjDPfWnONyq9vFnh9 ) for a simple web game with lobbies/rooms, until I stumbled upon this problem: when trying to get the client to connect to the server, I didn't get the expected: "a user connected" text outputted to the console. I'm using a html file and Node js with express and socket.io installed. I also tried searching the internet (stack overflow, expressjs.com and https://socket.io/docs/v4/troubleshooting-connection-issues/ )for solutions but couldn't really find any useful solutions, perhaps because of my bad understanding of code. I start my server.js via inputting "node server.js" in the Terminal of VScode and after that I start a live server of my Index.html file. The tutorial showed the expected "a user connected" (7:24 in the video) but on my side nothing happend. node js version: 9.6.7 express version: 4.18.2 socket.io vers

Not getting anything in RPC Call from JS in Odoo11

I'm trying to make an RPC call to a method in python, but in the form view nothings happens odoo.define('alicuam.show_modal_on_load', function (require) { "use strict"; console.log("js loaded"); var FormController = require('web.FormController'); var Dialog = require('web.Dialog'); FormController.include({ events: _.extend({}, FormController.prototype.events, { 'click .preview_btn': '_onPreviewBtnClick', }), _onPreviewBtnClick: function () { var self = this; // Guardar el contexto this._rpc({ model: 'crm.files', method: 'open_file_preview_dialog', }).then(function (result) { if (result && result.html_content !== null) { // Revisar resultado var dialog = new Dialog(self, { // Usar el contexto guardado title: 'P

Can MATLAB timetables be imported into Python?

I am generating MAT files with timetable variables using Matlab 2021b. I have never used Python before and want to ensure these MAT files can be easily read into Python as well. Is importing timetable variables from MATLAB to Python possible? If not, can Python accept regular table variables? Thank you! I have not tried to import the data to Python as I have never used it. I was hoping a user would know the answer so that we can target our processing and formatting approach. source https://stackoverflow.com/questions/77018647/can-matlab-timetables-be-imported-into-python

ModuleNotFoundError: No module named pyjanitor despite pyjanitor being installed

I've confirmed the pyjanitor package is installed - it shows up in pip list and I get a confirmation if I try to reinstall with pip install pyjanitor . But then when I run import pyjanitor I get the error: No module named 'pyjanitor' What am I doing wrong? source https://stackoverflow.com/questions/77018639/modulenotfounderror-no-module-named-pyjanitor-despite-pyjanitor-being-installed