Categories
Ask Mathematics

The equation $\sigma(n)=\sigma(n+1)$

In OEIS, the solutions of $$\sigma(n)=\sigma(n+1)$$ where $\sigma(n)$ denotes the sum of the divisors of $n$ including $1$ and $n$ , are shown upto $n=10^{13}$ The entry can be found already by entering the first three solutions $14,206,957$ It is mentioned that it is unknown whether there are infinite many solutions. My questions : Has […]

Categories
Mastering Development

How to use autocomplete() in jquery

I have a problem with jquery and autocomplete. When I start typing a city in a search filter I get the city I want but then the message pops on top saying: 1 result is available, use up and down arrow keys to navigate. It really messes up the whole page and I would like […]

Categories
CMS Development Magento

“Could not receive Stock Item data” Line Appear Instead of Admin Product Grid – Magento 2

“Could not receive Stock Item data” line appear instead of product grid in admin side. I have recently imported other db to my Cloud local setup. When I am doing indexing,I am getting error like this. SQLSTATE[HY000]: General error: 1449 The user specified as a definer (”@’%’) do es not exist, query was: DELETE price_index […]

Categories
CMS Development Wordpress

SQL: trying to update posts that have certain custom meta

struggling with an SQL command.. I want to change a post type from ‘post’ to ‘2month’ that have custom meta (low_jobs = ‘under 100’) and do not have certain categories UPDATE wp_posts.ID SET wp_posts.post_type = ‘2month’ FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ( wp_posts.ID NOT IN ( […]

Categories
Development

Two-Way Repeated Measures ANOVA: Error in lm.fit()… 0 non-na cases (rstatix)

I am trying to run a Two-Way Repeated Measures ANOVA using the R Statix package based on the description from here however I am running into the subject error with my dataset. The data consist of 10 replicate biomass measurements recorded at each of 8 Locations across 5 months (10 reps x 8 locations x […]

Categories
Development

Finding percentile_cont

Hope I can express this clearly. I am using the pgAdmin 4 tool in PostgreSQL 12. I am going through end of chapter (6) exercises in the book “Practical SQL” by Anthony DeBarros and am having problem getting my query to run. There are two tables with (total) population per county per state and I […]

Categories
Development

Flexbox nested in other flexbox – make a row in a column

I’m making a mock survey form and have put the inputs into a column flex-box, but I want to make the name field split between ‘first’ and ‘last,’ and share their horizantal space. I’ve tried enclosing them in a div and giving that enclosed div the flex property of row, but it seems to be […]

Categories
Development

How to minimize the sum of the elements in the final array after performing k number of operation

This question is asked in my interview coding and there were 12 test cases and i am only able to pass 8 of them. minSum(List values, int k) method need to complete. Example : nums = [10,20,7] and k=4 ans answer for this array is 5+5+4=14. Each operation consists of removing element from the array, […]

Categories
Development

How to apply ‘groupby’ in python if I want to aggregate by sum on a particular column?

I have a dataframe that looks like this : I want not repetition in of rows at leid, cp_id, run_seq, prod, curr level and I want to aggregate by sum tran_amnt. I did something like this, but it throws an error. data_gb = data.groupby(‘le_id’, ‘cp_id’, ‘run_seq’, ‘products’, ‘currency’).sum() but it throws this error: No axis […]

Categories
Development

How should I include javascript in a template in Phoenix 1.5

I’m trying to include a javascript file that uses chart.js in my phoenix 1.5 project that uses webpack. When I add something like <script>require(‘/js/graph’).Graph.draw()</script> in a template, I see the error Uncaught ReferenceError: require is not defined in browser console and the graph is not rendered. package.json { “repository”: {}, “license”: “MIT”, “scripts”: { “deploy”: […]