Categories
Database Development

Is it bad practice to calculate within the insert query?

I am trying to do a web application for time sheets. I have three options to calculate the value of hours (AFAIK): In the form In the backend In the query Is it smart or bad practice to do this calculation in the SQL query? with list as (select code_id,code_ppu from code) insert into hr […]

Categories
Development

Adding to an SVG Map

I have found a map of the UK that I have now personalised. Codepen:- https://codepen.io/scottYg55/pen/pooOvWq I now need to add Republic Of Ireland to the map to so it looks like this image:- https://www.intersystemsuki.com/wp-content/uploads/2020/01/map.png. How can I easily do this within the SVG, is there an online generator for example that I could use? Any […]

Categories
Development

How to manipulate data in arrays using pandas (and resetting evaluations)

I’ve revised the question for clarity and removed artifacts and inconsistencies – please reopen for consideration by the community. One contributor already thinks a solution might be possible with groupby in combination with cummax. I have a dataframe in which the max between prior value of col3 and current value of col2 is evaluated through […]

Categories
Development

How do i use DragMove() on a ScrollView in WPF C#?

I am making a program in WPF that uses a scroll bar with content inside. I decided to use a scroll view since my options were limited and I keep coming across complications when using it and the error I’m stuck at right now is with moving it. I can’t seem to drag when using […]

Categories
CSS Development

Animate (draw) SVG Fotography paths and fill, using CSS (JS)

So, I wanted to animate a huge SVG photography, I have done it a year ago but have lost track of how I have done it. The SVG inside the given code part is not the full image since it has too many characters… but you’ll get the sence of the scale and structure by […]

Categories
Development

How to get the number of values from a drop down menu when there is only one default value in the DOM?

Ok straightforward but there is a snag. I am trying to get the number of values from a drop down menu. The drop down menu always has a default which is reflected in the DOM. As you can see in the html there is only one. Firstly what xpath should I use driver.FindElement(By.XPATH(“//div[@class=’Select-value’]”) but this […]

Categories
Development

Use a for loop to calculate and print the average of the third list items in a dictionary

I have the following dictionary and am looking to calculate and print the average of all prices (3rd item in each list): right now I have each list item recalled to find the value. This is simple to do for a short dictionary but I am hoping there is a shorter/simpler way to do this […]

Categories
Development

can’t multiply sequence by non-int of type ‘numpy.float64’

I was programming a error back propagation NN where I have this hidden layer local gradient hl_loc_grads, learning rate parameter as eta and input_data[i] as input from csv file. Here is hl_local_grads = [0.00195312 0.00195312 0.00195312 0.00195312] with class <class ‘numpy.ndarray’> eta is 1 and Train data is [[1, 16, 10.5, 2, 1, 100, 25], […]