Quantcast
Channel: User Dorki - Stack Overflow
Browsing index pages (35 articles)

Best practice to edit page with foreign keys - send all fields again or just...

Let's say I have a web system with Post database table, and this Post can contains Tags, so I'll have the tables: Post, Tags and PostTags.So Let's say I want to make a CRUD operations on Post, and I...

View Article


Create a snapshot table of other tables that have nested FK

Assume I have the following tables:Article (id[PK], home, category, userId[FK], locationId[FK])User (id[PK], name)Location (id[PK], address, name)Now I want to create a new ArticleArchive, that will...

View Article


Answer by Dorki for error TS2305: Module '"@inbaltickets/common"' has no...

It can happen due to two reasons:npm update doesn't change package.json file, therefore skaffold doesn't know of a change, you can try to do npm update --save, see reference here:...

View Article

How can I make a VS Code keybinding only apply when a specific View is...

I'm coming from other IDEs in which when you globally search for some content across your project (in Visual studio code it's done by pressing CMD+SHIT+F) and then want to move between the founded...

View Article

100% height on ::before element that his parent has overflow scroll attribute

I have a div with overflow scroll attribute and i want to see its background in a ::before (since backdrop-filter doesn't work with multiple divs otherwise)So my issue is to extend the ::before height...

View Article


Login request redirects to Account/Login?ReturnUrl

So basically I have this simple form in my index page:using (Html.BeginForm("ChangeUserName", "Manage", FormMethod.Post)){ @Html.AntiForgeryToken()<input name="newUserName"...

View Article

How to avoid td width expanding when it wrapped with enabled overflow and big...

I have a table with 2 columns, the first one should be 25% wide width and and 2nd one should be 75% wide.In the 2nd column, sometimes there's big content, therefore, I made a div inside with overflow:...

View Article

How to format selection with eslint

I found out that if I write in my settings.json that:"eslint.format.enable": true,"[javascriptreact]": {"editor.defaultFormatter": "dbaeumer.vscode-eslint", }Then I can format the whole page using ALT...

View Article


Error: ValueWarning: A date index has been provided, but it has no associated...

So I have a CSV file with two columns: date and price, but when I tried to use ARIMA on that time series I encountered this error:ValueWarning: A date index has been provided, but it has no...

View Article


Visual Studio Code React not showing error even after adding jsconfig

So I am building a REACT JS project, and after a while I noticed that it doesn't underline undefined functions nor wrong imports, for example if I does that:import React, { useState } from...

View Article

Fit canvas to screen in React

So I have this code base:import React, { useEffect, useRef, useState } from 'react';function App() { const container = useRef(null); const canvas = useRef(null); const [ctx, setCtx] =...

View Article

Understanding the event loop and partitioning in Node.js

I've read this nice doc guide: https://nodejs.org/en/docs/guides/dont-block-the-event-loop/And in some part of that article it's being said regarding to complex calculations without blocking the Event...

View Article

JS question I got using async/sync/timings

I received a js interview question that I don't know how to solve, hopefully you guys could help me, so it goes like that:A company made this code:(note: goo() cannot return 0, both foo and goo return...

View Article


How to run javascript code from string in safe way

I found some answers, but very old one and I wondered how can it be done?I've seen that eval() function isn't safe:Alternate for eval() to execute auto-generated JS code from the serverSo what are my...

View Article

How to clean canvas and re-draw again

So I made a simple example that if u click on a canvas, it keep drawing random lines,and it also pushes the current state into _history variable, and once you clicked on a "get previous" button, it pop...

View Article


Flexible pane exceed 100% height

It's basically CSS question, but since it's wrapped inside React, I tagged it as React as well.Demo to my problem: https://codesandbox.io/s/compassionate-bartik-z9lev(Those who don't know React, just...

View Article

React.js check if component exists

I have a list of components, and in real-time I want to whether components exists or not.For example I have a list of shapes ( they are components ): Circle, Square and more..And I want that the user...

View Article


React loop through map and display components

So I have a unique situation,in my States I don't have a regular list that I can do map and then in each iteration to display a component, for example:list.map(shape => <Shape {...shape}...

View Article

Answer by Dorki for React loop through map and display components

You guys gave great answers, but I found the simplest syntax:Array.from(myHashMap.entries()).map((entry) => { const [key, value] = entry; return (<MyComponent myKey={key} myValue={value} />);}

View Article

Javascript how to check if my mouse is out of an element and everything...

Let's say I have this code:<div id="check-div"><span><!-- Can be some inside elements here too --></span><!-- Can be more elements here as well ... --></div>How can...

View Article
Browsing index pages (35 articles)


Latest Images