« first day (2530 days earlier)      last day (1480 days later) » 

12:00 AM
RELOAD! There are 6465 unanswered questions (90.1284% answered)
 
12:24 AM
 
1:10 AM
0
Q: Python problem ABOUT TIME USAGE IN FOR LOOP for python

ThechomaniaI am working on some python coding and I really need to make the progress bar go up and down. But, I think python would be too fast if I didn't wait each time the for loop ran. So, I implemented a sleep function and imported time. Except, it didn't run. Can anyone help me?? import time a=10 fo...

-1
Q: Multiple window in 1 code Tkinter

YunYunSo I just learn tkinter and python from CS50. but I just want to modify a little bit. this the code I trying to make import tkinter as tk1 import tkinter as tk2 window1 = tk1.Tk() window2 = tk2.Tk() window1.title('LEFT EYE') window2.title('RIGHT EYE') window1.geometry("500x500") window2.geo...

 
1:48 AM
0
Q: I am using R Studio to install packages and load libraries but am receiving an error message and notifications of masking

Margaret Delp > library("tidyverse") Error: package or namespace load failed for ‘tidyverse’: .onLoad failed in loadNamespace() for 'broom', details: call: loadNamespace(name) error: there is no package called ‘backports’``` Not sure whyI am getting an Error message. I am using a Mac...

 
2:11 AM
 
2:25 AM
0
Q: Recursion - Max of integers in slice

overexchangeEach go routine is given 2K stack. GoLang by design does not have stackoverflow issues for lengthy lists, because it grows the stack size, if needed So am using recursive approach package expressions func Max(list []int) int { length := len(list) if length > 1 { if list[0] > ...

 
I'm not on the codereview stackexchange site (though obviously I could be since it's a one-click thing to join ... what I mean is, I never look there). — torek 33 secs ago
 
 
2 hours later…
4:13 AM
Nice start. When you get it working you should get a code review at: codereview.stackexchange.comMartin York 58 secs ago
 
4:43 AM
Ben Popper on April 07, 2020
Programming may teach you about the law of large numbers, but that doesn’t mean you’ll always have the answer.
 
4:58 AM
0
Q: How to find the index position of last occurrence of a given value in an integer array?

user13060550Below is the example what I'm trying to get. Integer array: {1, 2, 3, 4, 5, 1} Value: 1 Output:5

 
5:28 AM
@pacmaninbw Review limit. 20 a day per queue.
@CaptainObvious About that terrible title...
Not the only thing wrong with that question even. Oh well...
We can't save them all.
@CaptainObvious That, for example. How did you expect that would go down?
 
5:55 AM
0
Q: How do I use the NIST test suite to test the randomness of an RGB color image?

BSFUI would like to use NIST test suite for Cryptographic Applications on a color image to test whether the image is random or not. But I don't know how to do all these tests. I used some readymade python code of given on GitHub, but didn't understand anything from there. Here are some codes from t...

 
6:33 AM
-1
Q: How do I compute Fibonacci that returns an integer array of the Fibonacci sequence?

user13060550I'm trying to compute Fibonacci that returns an integer array of the Fibonacci sequence, the size of which is controlled by a given positive integer number Below is the code I got: public int[] computeFibonacci(int size) { int n1 = 1, n2 = 1, n3 , i , count = 10; System.out...

0
Q: Speed up function for calculating Archimedean density functions

NutleI am not sure whether this is the right place to ask this, so please correct me if it's not. I am following this paper (e.g., Corollary 3.3) for some derived functional representations of the densities. Example code for one of the families: (x will be a vector of 1xd; tau, lambda - scalars) 'j...

0
Q: Is this code for Gaussian Mixture Model correct?

Marlborough321I am learning GMM to do color segmentation. I found a good resource online with the following GMM code: import matplotlib.pyplot as plt from matplotlib import style style.use('fivethirtyeight') import numpy as np from scipy.stats import norm np.random.seed(0) X = np.linspace(-5, 5, num=20) X0 =...

 
7:25 AM
My insertIntoArray function was clearly not working at all, thank you for the explanation. May I ask you what do you mean with code review and what are the benefits of it? I'm new in coding and any advice is really apprecciated. — skydakis 14 secs ago
 
 
2 hours later…
9:04 AM
0
Q: Leftist Tree in Dyalog APL -- can it be made more compact/idiomatic?

xpqzFollowing great feedback given in response to my previous question, I was encouraged to consider a different type of heap structure, the Leftist Tree. It lends itself better to a functional implementation. It's already shorter, but is there anything else I should consider in order to make this mo...

 
 
2 hours later…
10:39 AM
-1
Q: Power menu (Shutdown, Reboot, Sleep) in ELISP

Artemios Antonio BalbachI'm using emacs and I'm just starting out getting into ELISP programming. I've written an interactive function which lets me shudown, reboot my machine as well as put it to sleep. As I'm a total beginner, I'd like to know what you would do differently in the following code to make it better, ligh...

 
11:36 AM
0
Q: PHP multiple images upload - Security issue

UrelI tried to create with PHP a multiple image upload (a description is associated with the images) , but I'm almost sure my code is wide open to SQL Injection. Here is my code: <?php $mysqli = new mysqli('localhost', 'database', '', 'my_database'); $timestamp = time(); $success_images = []; $to...

 
 
1 hour later…
12:40 PM
Personally, I would only use virtual when needed. I'd rely on code review/staticv analysis t make sure that the d'tor is virtual if there are any virtual functions in the class. — NathanOliver 17 secs ago
 
12:54 PM
Hi @Sudhir, this question belongs in the code review Stack Exchange site, as it is not about a problem but about reviewing code. — Titulum 20 secs ago
 
1:30 PM
-1
Q: jquery update hidden and a tags

JeffersonFirst off, not the greatest with jQuery but know enough to get by. I created this mock up that is base on my application and wanted to see if there is a better way to update hidden values and a tags. When the form is saved I am using the sortorder to find the corresponding a and hidden tags to ge...

 
1:49 PM
-1
Q: Sorting an array using a Binary Search Tree with C++

Vittorio A.Introduction This is my first post and I hope to be in the right place, if not I am sorry. I received some feedback from the Stackoverflow community about my post here and they told me that my code should get a review; I will be honest, I don't know exactly what it does mean. I understood that C...

 
2:02 PM
Code review: use parameterized query instead of string concat to build query. See why-do-we-always-prefer-using-parameters-in-sql-statementsSelim Yıldız 33 secs ago
 
posted on April 07, 2020 by CommitStrip

 
2:27 PM
0
Q: Calculate the Degrees of a Clock Hand Based on Input Time

Seth ThomasThanks for checking this out. As the title suggests, I'm a novice programmer - I started with Java years back and now mostly use VBA to automate tasks for my internships. I want to graduate from VBA and get into Python/R to properly automate tasks. The snippet of code below is a little project ...

 
2:37 PM
Monking
@RMunroe when I bike(d) to work I periodically saw a man walking with a stick with a light on it and had some loud music playing as we commuted over a bridge in the morning - I wonder if he did that because he had been hit by a bicycle or something similar
 
@VittorioA. Code review is a processes that all professionals use to check your code. It is where other developers read your code and point out: 1) Errors 2) Bad practice 3) Better techniques 4) Design patterns that could be used 5) Conventions used in the language (idioms). — Martin York 35 secs ago
 
3:05 PM
-2
Q: Edit and delete contacts - address book in java

Szarl3jI new person in the java world. I began my adventure with java one month ago. I trying create my own address book where i can add,edit,search and delete contacts. Right now I was stoped because don't known how to create methods for edit and delete cntacts. Please help me. ControlPanel Class ...

 
3:43 PM
-1
Q: Retrieving images from Mongodb to client side using Nodejs

POLOS TutorialsI'm have a little knowledge about NodeJs and I'm starting learning IT but I'm facing some problems So I tried to send Image which is working fine as expected but the problem is How to serve that image and display it into html side : The use model that I'm using is below img: { data: Buffer, con...

 
3:56 PM
Thank you @MartinYork I will take a look to Codereview. — Vittorio A. 17 secs ago
 
0
Q: Python Flashcards

ShinoxSelf taught newb here. Goal here is to make a streamlined flashcard program where users can create their own decks, similar to Anki, but this is for my own learning. Any feedback and criticism is greatly appreciated. from tkinter import * # This opening code is to create a window and menu optio...

 
Today's robo-reviewing completed. Strange that the last Cpatain Obvious post isn't in the CV queue yet tho :/
 
4:17 PM
@Peilonrayz sometimes they don't appear there until ~18-20 minutes after they are posted
even if there are CVs
 
Ah ok. I saw it in the new posts queue minutes after it posted. Strange
 
4:55 PM
possible answer invalidation by Sunil Chaudhary on question by Moamen: codereview.stackexchange.com/posts/239609/revisions
 
@Duga Please can someone handle that. I don't have the auto comments atm
 
I wouldn't say that's an invalidation, actually
AFAICT it's just adding an example run with some data and converting the whole thing into a codesnippet
 
5:21 PM
yeah - I considered approving since the user who suggested it was the one who answered it and the additions were the snippet with output, but couldn't remember if there was a policy on edits to questions - I know there is a meta post about changes to code in answers....
 
@Vogel612 Meta says don't edit code in questions if you're not OP. Maybe I didn't read it clearly enough
 
though I do see this post, with answers that might suggest its acceptable:
11
Q: Is it okay to convert a question code block into a working snippet?

konijnWe tend to leave the source code alone as all aspects are valid for code review. But, questions like these are just asking to be converted to a snippet ( there's a link to JsFiddle even!) Just wanted to know your input on this.

 
Converting to a snippet is ok, but changing the code is different.
 
How come none of y'all told me about tmux before?
 
@DerKommissar I hadn't been familiar with it - if I had then maybe I would have...
 
5:29 PM
It's amazing
Probably the best terminal tool ever
Saves me so much pain
 
why are you only using raw console terminals in the first place?
 
Reasons
 
valid :)
 
Can you tell what I'm working on?
I'm also trying to figure out why all 3 8-core servers have 8GB of RAM, but my one 4-core server has 32GB of RAM...>.>
 
I don't have the compute to fold myself, but that seems like a pretty beefy setup there :)
 
5:42 PM
Between my desktop and these 4 servers I have 40 CPU cores and 1 1080TI folding.
 
@DerKommissar What's great about it? Is it like a tiling terminal emulator?
Recently changed from urxvt to kitty because of ligature support. But didn't see tmux when looking for alturnates
 
It's basically a single-terminal multiplexer.
I love it.
I can keep a several SSH sessions open in a single terminal window and navigate between them fluidly, vs. having to monitor a dozen terminal windows.
It isn't exactly what I wanted, but it's doing well so far.
 
6:15 PM
0
Q: Jumping back in std::ifstream and std::ofstream

DoctorNuuCase A. I need to look for something in an istream, then possibly jump back to start over. Case B. I need to write to an ostream, then sometimes jump back some chars to overwrite stuff. Are the following pieces of code safe? (i.e. guaranteed not to crash) // Case A std::ifstream Stream; // or ...

 
6:40 PM
@Vogel612 I often do it when remotely editing on Linux or Unix.
Especially when I'm running on windows.
 
6:51 PM
@CaptainObvious Hypothetical question not really asking for a review, just advice.
 
7:30 PM
-1
Q: Generic data-access repository with MongoDB in Net.Standard 2.0

VRoxaI worked in a data access layer of MongoDB in a .NET Standard environment. The main purpose of this is having a scalable generic repository pattern to extend. First, I wanted to define a base model where to inherit. The reason for that is that I want all my models to have an exact property by Id...

0
Q: Forum web scraper in Lua

ZidgelI've written a short web scraper in Lua (run in LuaJIT for speed) to download every post from a specific forum (not general purpose... yet). It takes about 12 hours to run and download 500,000 posts and there are no errors. I'm wondering how I can make it faster. I know different places where the...

 
7:56 PM
@pacmaninbw is it still too hypothetical after revision 2?
 
@SᴀᴍOnᴇᴌᴀ Ellipses in the code, so yes.
 
0
Q: moving player right or left depending on swipe

user221612In my Player.java class, I want to incorporate a function that moves my player according to the left or right swipes. I also used time in seconds in order to vary the movement in an cyclic way: ''' class MyGestureDetector extends SimpleOnGestureListener { @Override public boolean...

 
8:31 PM
@pacmaninbw coffin nailed
 
 
1 hour later…
9:58 PM
Code Review is the place to ask for improvements to working code. — Barmar 55 secs ago
If it works, it's off-topic here. Consider posting on Code Review. — Chris 59 secs ago
 
0
Q: Optimizing performance of hashing array algorithm's implementation

Long NguyenI wrote the following C++ code and since I am a novice in C++ and do not really have anybody who can give me advice, I think this site would be a good place to ask. The algorithm takes the first two elements a1 and a2 of an array, calculate the difference a2 - a1. Then the first two elements a1...

 
10:21 PM
-1
Q: Find if some words in array value are in same array php

petteI have to find where a given string is in my multidimensional array. So this is my array $input = array(array('time' => '18:31:00', 'artist' => 'LUIS RODRIGUEZ & DEN HARROW'), array('time' => '18:32:00', 'artist' => 'J BALVIN'), array('time' => '18:33:00', 'artist' => 'THE BLACK EYED PEAS FT J B...

 
11:05 PM
I'm voting to close this question as off-topic because it belongs to codegolf.stackexchange.com or codereview as there is nothing that is not working here. — KamilCuk 18 secs ago
 
11:37 PM
0
Q: Django voting implementation

khashashinI am creating a translation application and the users can add new translations to the "core" language, e.g. a Latin translation of the German word, and other users can vote on this translation. A translation can only be voted up or down once by the same user. Here are my django models for these ...

 

« first day (2530 days earlier)      last day (1480 days later) »