« first day (3016 days earlier)      last day (1003 days later) » 

12:03 AM
REFRESH! There are 7744 unanswered questions (89.3498 answered)
 
12:33 AM
 
1:04 AM
0
Q: Insertion Sort code in Java

gssI have written basic insertion sort in java and I would request you to please spend some time on this code and give me your review of code. Is there anything I could have improved: package elementarySorts; public class InsertionSort { InsertionSort(int [] input_array){ System.ou...

 
 
2 hours later…
3:07 AM
0
Q: Mean and Variance for Math Library

Suryasis PaulTaking forward the code written for the math library previously mentioned here. link. Wrote templatized functions for mean and variance. std::accumulate( or summation in general) is likely to cause overflow. Should I go for an incremental approach? 2.Another point of concern is for templatized ...

 
3:32 AM
0
Q: How to compute the $((1-\alpha )\times 100)^{th}$ percentile of the null distribution in R

user246812For fixed \$n\$ and arbitrarily preselected values \$mu\$ and \$sigma\$. First, I generated a random sample of size \$n\$ from \$N(\mu ,\sigma)\$, say \$x_1 ,x_2 ,\ldots ,x_n\$; Second, I arranged the obtained sample from the smallest to the largest. Next, I estimated \$mu\$ and \$sigma\$ by \$ba...

 
3:57 AM
1
Q: Data storage and processing in Python

SatiI have a piece of code that downloads acupuncture data from Wikipedia and consolidates it into an acupoint, meridian and extraordinary meridian dictionary stored as .pkl files in the working directory. import pandas as pd import wikipedia as wp import json from hanziconv import HanziConv as hconv...

 
5:39 AM
Monking
 
 
1 hour later…
6:50 AM
0
Q: Carry Lookahead Adder - SystemVerilog

CarsonI have been learning SystemVerilog before I go back to school and decided to try and implement a Carry Lookahead Adder. As far as I can tell, it works correctly though I haven't tested extensively, just the tests you see on the testbench. I would like some feedback on best practices, things to av...

 
7:20 AM
Of course that doesn't work, why would the key contain the whole whitelist? Hard to say what to use without seeing the whole code. Maybe create a question on Code Review once everything works. — raznagul 40 secs ago
 
 
2 hours later…
9:00 AM
@MaartenBodewes Thanks for the offer :) It's rare I'd actually need 10k a simple good 404 is good enough 99% of the time
-64
Q: Some changes to the profile while we make it responsive

Aaron ShekeyOn our way to a fully responsive Stack Overflow, we just shipped some changes to the user profile. We won’t be enabling responsiveness just yet, but the top portion will be ready to be squishy. I hope these changes are low impact on our way to a fully responsive profile. Think of this as more a r...

 
 
1 hour later…
10:08 AM
0
Q: Weighted draw/raffle (biased towards undrawn)

martixyI tried to implement a weighted draw. The idea of which is, you can have disproportionate probabilities of drawing different items. In this particular case, I want to cumulatively bias the probability towards drawing undrawn items. That is, the longer an item hasn't been drawn, the higher its cha...

 
10:57 AM
0
Q: Concurrent processing of a slice

AlwaysLearningNewStuffI am trying to learn Go concurrency patterns and best practices on my own. I have invented a simple task for myself. I want to process a slice of integers in a parallel manner by dividing it into sub-slices and process each with a goroutine. Below is the solution I have at the moment, I seek cons...

 
11:11 AM
This question might fit better on the codereview site. — imsmn 54 secs ago
 
11:22 AM
0
Q: Logistic Regression for non linearly separable data

AlbertJIris Data Set consists of three classes in which versicolor and virginica are not linearly separable from each other. I constructed a subset for these two classes, here is the code from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split import numpy as np iris ...

 
11:34 AM
I've posted to code review, if anyone needs the link: codereview.stackexchange.com/questions/265770/…Vesa95 34 secs ago
 
11:44 AM
I’m voting to close this question because this question belongs to codereview. — cassandrad 8 secs ago
 
0
Q: Input Data Validator (good practice)

Vesa95I work at an application that receives data from user and I try to write a validator function for it, but I'm not sure if this is the correct way to proceed. Example: The user will input a number (as string, don't ask why I don't use an int, let it be a string), let's say "103", and I'will use th...

 
12:12 PM
0
Q: The best tensorflow neural net I got so far for iris dataset

AlbertJCompared to my another post Logistic Regression for non linearly separable data which uses one-layer net, i.e. Logistic Regression to classify the iris data set, this post is to discuss the tensorflow method. iris = load_iris() x_train, x_test, y_train, y_test = train_test_split( iris.data, i...

 
1:01 PM
1
Q: are these linked list implementation functions abiding by good practises?

programmerc3981143I am a beginner in C and am learning linked lists, i have made a program to implement a linked list, and allowing certain operations on the linked list. There is 3 functions: addnode() // adds node to end of list printlist() // prints the whole linked list insertnode() // inserts a node after a s...

 
1:26 PM
0
Q: Queries using ORM and PostgreSQL

ProtractorNewbieAfter yesterday suggestions, I was told... recommended to move over to ORM and I did. I choosed to use PeeWee together with PostgreSQL. Queries for storing and get information from postgreSQL This is how my currenty code looks like: import pendulum from peewee import ( Model, TextField, ...

 
1:51 PM
0
Q: the sum of the squares of two integers i and j gives a number n

Electro-Mechanical Clinic Offihello everyone I took the following function from the previous discussion: def sumSquare(n): l1=[] if n == 0: return [] else: i = 0 while i * i <= n : j = 0 while(j * j <= n) : if (i * i + j * j == n) and (i and j not i...

 
2:26 PM
possible answer invalidation by jaumebonet on question by jaumebonet: codereview.stackexchange.com/posts/265561/revisions
possible answer invalidation by jaumebonet on question by jaumebonet: codereview.stackexchange.com/posts/265561/revisions
 
2:55 PM
@Duga Rolled back
 
0
Q: Obfuscate email React component

MauricioRobayoI've written this Email component which obfuscates the email until the user hovers over it: import { useState } from "react"; import styled, { css } from "styled-components"; type SegmentWrapperProps = { first: boolean; }; const SegmentWrapper = styled.span<SegmentWrapperProps>` ${({ first }) =

 
3:11 PM
possible answer invalidation by Toby Speight on question by programmerc3981143: codereview.stackexchange.com/posts/265776/revisions
possible answer invalidation by Toby Speight on question by programmerc3981143: codereview.stackexchange.com/posts/265776/revisions
 
@Duga I used a code block for some of the description. I've changed it again, so expect another notice. I'll stop now.
 
3:26 PM
possible answer invalidation by Toby Speight on question by programmerc3981143: codereview.stackexchange.com/posts/265776/revisions
 
Questions about improving otherwise working code may be better suited for Code Review, but be sure to follow their content guidelines and How to Ask to ensure an on-topic question. — jmoerdyk 39 secs ago
 
0
Q: powershell script for creating a Domain Controller

BKSI don't have a lot of experience creating/managing an active directory environment. I needed to set up a domain controller quickly on Windows 2016 and Windows 2019 OS to test out a solution. Rather than doing all the steps manually, I try to create a script. I followed different online tutorials ...

0
Q: How to simplify that repetitive code?

John KI have a for which loops for X files, if the current file is the file Y i have to skip it if the condition dcc.payload.v[0].dn === dcc.payload.v[0].sd && dcc.payload.v[0].dn > 1 is true, else i have to make my checks and return the result. The issue is that after adding that new condition my code...

 
possible answer invalidation by Toby Speight on question by programmerc3981143: codereview.stackexchange.com/posts/265776/revisions
 
@CaptainObvious @Mast et al - reopened with new title displaying contents from CSV files in an HTML table
 
3:37 PM
Monking
 
3:50 PM
Welcome to Stack Overflow! If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 20 secs ago
 
Interesting, they have changed what is shown in the profile. No more last seen or other history.
Not quite true, but last seen is gone.
 
@pacmaninbw Indeed. You can see on Meta (scroll up to this morning) that people are really happy (/s) about the change.
 
-118
Q: Some changes to the profile while we make it responsive

Aaron ShekeyOn our way to a fully responsive Stack Overflow, we just shipped some changes to the user profile. We won’t be enabling responsiveness just yet, but the top portion will be ready to be squishy. I hope these changes are low impact on our way to a fully responsive profile. Think of this as more a r...

(for posterity ... or the kids)
downvote score almost doubled
44
A: Some changes to the profile while we make it responsive

blackgreenfeature-request Please put back the "last seen" and "member since" metrics The "Last seen" metric is very useful for curation activities and to calibrate engagement with other users. Some actual use-cases that come from my experience with the site: knowing whether a user might have seen my comme...

and it is also mentioned in other answers
 
@SᴀᴍOnᴇᴌᴀ What's the "or the kids" joke? Complete fwoosh here
 
@Peilonrayz altered quote from Home Alone... maybe its just the thoughts in my head coming out through my fingers :|
 
4:02 PM
My understanding pop-reference skills are... pretty darn bad. Thanks never watched Home Alone :)
 
Okay, I understand wanting the profile to fit on a mobile screen, personally I like the last seen info and don't care if someone knows the last time I logged in.
 
@pacmaninbw I agree. I too am not a fan of the change
 
I don't have enough rep to look at both scores on the question, are there any positive votes?
 
+21/-142
 
4:44 PM
0
Q: Java generic 3 median quicksort is too slow

NoobProgrammerMy generic 3 median quicksort public class Util { final static int CUTOFF = 27; public static <T extends Comparable<? super T>> void quicksort(T[] a) { quicksort(a, 0, a.length - 1); } private static <T extends Comparable<? super T>> void quicksort(T[] a, int low, int ...

 
5:09 PM
0
Q: Speeding up Infinite map in Ursina

shayan bahrainyI made an infinite map in Ursina, but the game freezes for a second every time I press 'l' to generate a new area. My Face code: class Face(Button): def __init__(self, position = (0,0,0),block = generate_block((0,0,0))): super().__init__( parent = scene, position = pos...

 
you can ask your questioncode review for better reach. from starting what i can see is, this function archive is doing a lot of thing, like connection, validation, coversion, insertion, error handling. so this should be avoided in an ideal case as this limit the scope of change and refactor in future. you can read on this SOLID Prinicipal. PS. in case of software engineering interview, try to corelate the situation with the code strategy, prinicpal — sahasrara62 15 secs ago
 
5:33 PM
0
Q: Short (user)script to store current URL and close tab in qutebrowser

Carla_display#!/bin/sh #Path where to store saved urls. URL_FILE="$QUTE_CONFIG_DIR/saved_urls" #Arguments are appended to the url (ie for comments) printf "$QUTE_URL $*\n" >> "$URL_FILE" printf "tab-close" >> "$QUTE_FIFO" Often have lot of tabs open, so thought it'd be useful to make a script do this. I do...

 
5:54 PM
This is too broad a question for SO. If your code is working properly and you want to improve it, you can ask on Code Review instead, but first read their How to Ask page. If your code is not working properly, please ask a specific question. See How to Ask for tips. — wjandrea 42 secs ago
 
0
Q: Why is this python code bad?

CYRUSI had an interview a few days ago in python and the last question was: say what's wrong with the archive function in terms of scalability, architecture, security. The purpose of this function is to archive data from one database to another. I said that the code was written in a way that was unrea...

 
@CaptainObvious might not be written or maintained by OP...
 
6:23 PM
0
Q: GUIComparer with MVVM dialog to allow user input in ArrayList sorting algorithm

Greedodownload Bit of an esoteric title, but let me explain. I wanted to create an IComparer that can be supplied to a sorting algorithm, which rather than using the >, <, = comparison operators on the two values, or some custom property of 2 objects like this fantastic PropertyComparer class, instead...

0
Q: How my code is slow (by .01 sec)

TitaniumI was solving a question on a coding website and this website has a limit for execution time of code , my code takes 1.01 sec but the limit is 1 sec , I an unable to find any changes in my code that can decrease the execution time, Due to the large size of the question I am unable to write it her...

 
6:56 PM
possible answer invalidation by Toby Speight on question by NoobProgrammer: codereview.stackexchange.com/posts/265788/revisions
 
7:09 PM
Welcome to Stack Overflow! Please take the tour and read How to Ask. SO is meant for specific problems, so people here are going to focus on your main question and not the other problems with your code. You could ask on Code Review if you'd like. — wjandrea just now
 
@pacmaninbw It's not doing so well, a lot of moderators have voiced their concerns and it broke a couple of workflows. So there are 7 downvotes for every upvote. Considering it takes more reputation to downvote than to upvote... It's impressive such a minor change caused such a negative reaction.
 
@Duga its okay... just formatted results.... and OP is the one who "answered"
0
A: Java generic 3-median quicksort

NoobProgrammerThe error was in this line: if (low + CUTOFF > high) { insertionSort(a); It should had been if (low + CUTOFF > high) { insertionSort(a,low,high); And the corresponding change to insertionSort

 
possible answer invalidation by donald on question by donald: codereview.stackexchange.com/posts/265593/revisions
possible answer invalidation by donald on question by donald: codereview.stackexchange.com/posts/265593/revisions
 
 
1 hour later…
8:52 PM
0
Q: Sieve of Eratosthenes in Vyxal

userI'm trying to learn the golfing language Vyxal because I occasionally contribute to it, and I'm slightly ashamed I can't even use it. To do this, I started with implementing the Sieve of Eratosthenes in Vyxal. I'd like to know how to make this code more readable and idiomatic, and, if there are i...

 
Monking
 
@user it appears you may be a pioneer with questions, at least on this site
 
It's an esolang, so that's to be expected
 
9:42 PM
0
Q: A better way to extract COVID data from Worldometers

Amirhosein RezaeeI was trying to fetch some data (Daily new cases and daily new deaths) from Worldometers and I came up with this: import requests from bs4 import BeautifulSoup as bs import numpy as np import matplotlib.pyplot as plt # Plotting Function def plot(data , country): fontsize = 10 csfont = ...

0
Q: Get popular arch packages

ajr-devGet a list of popular arch packages with a popularity greater or equal than the given one. It asks for the popularity if it isn't given. Then gets the total number of packages and iterates until it gets the whole list of packages, one thousand at a time because if I try to grab them all the api g...

 
10:06 PM
0
Q: Cursed error generator in Javascript

emanresu AI've made some code that generates cursed errors like this: BadError on line 58: S(Y5YN6c/$sIcI\"h>mH424`Ihkt&!3aolsjBHZ%\\J| ^ The problem isn't with the code. It's with you. And the code: function genCursedError(){ let rand = x => x[~~(Math.random() * x.length)], h, q, v; ...

 
10:21 PM
Please repeat on topic and how to ask from the intro tour. You've asked multiple question in one post. Your posted code fails to run due to syntax errors. You haven't shown any specific problem: "make it better" is not focused enough, and efficiency questions are usually the purview of CodeReview, not this site. Finally, asking for "any suggestions" for an undefined feature is off-topic: write the code and post it with a clear specification of your execution problem. — Prune 42 secs ago
 
10:56 PM
0
Q: Javascript Word Vectors Demo

qwrThis is my WIP attempt at an open-source web demo for exploring word vectors as part of my research. The functionality will be explained separately from the site. It is also my first time using HTML, JavaScript, and CSS in a non-trivial manner, and I am making use of modern HTML and JS (ex. ES6) ...

 
11:46 PM
1
Q: Bisection, linear reccurences and even fibonacci numbers

N3buchadnezzarSo this code is yet another attempt at solving the second Project Euler problem to improve my handling of Python. The purpose of the code is to solve the problem below Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

 

« first day (3016 days earlier)      last day (1003 days later) »