« first day (3191 days earlier)      last day (819 days later) » 

12:00 AM
REFRESH! There are 8056 unanswered questions (89.1934 answered)
If this code works and there is not problem other than the way it looks, the this is better suited for Code ReviewRandy Casburn 22 secs ago
 
 
1 hour later…
1:16 AM
possible answer invalidation by wcochran on question by wcochran: codereview.stackexchange.com/posts/273467/revisions
 
 
4 hours later…
5:28 AM
0
Q: Program that prints number of dolls ( matroshka )

Mike Lowell#include<iostream> #include<iomanip> using namespace std; int main() { // Prompt for and get the number of dolls. int numberOfDolls = 0; cout << "Number of dolls -> "; cin >> numberOfDolls; // outer loop for printing the dolls according to the number entered for (int i = ...

 
6:15 AM
Monking
 
6:48 AM
0
Q: Faster way to print Number of Descents in a permutation in R

amicharskiI am trying to find a more efficient way to print the number of descents in a permutation using R as my programming language. This code does it for the numbers 3 to 10: # this function finds the number of descents in a permutation numberOfDescents <- function(prm) { descents <- 0 for(i in se...

 
7:42 AM
0
Q: Task manager object for lazy initialization

trinalbadger587The Problem I am developing a Visual Studio extension for importing code. Because of the way Visual Studio works multiple threads could try to perform the same operation at the same time. Thus, I wanted a class that would ensure that a) each Task would only be performed when needed and b) each Ta...

 
8:04 AM
Please create an minimal reproducible example with a clear question, see: how to ask or check with code reviewiRon 27 secs ago
 
@Duga rollbacked
 
@RandyCasburn, the question needs a lot of work before it's suited to Code Review. You should have pointed the asker at A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. we need a good description of the purpose of the code to give context, and question titles should simply say what the code does (the question is always, "How can I improve this?"). It's important that the code works correctly; include the unit tests if possible. — Toby Speight 53 secs ago
I’m voting to close this question because it belongs to codereview.stackexchange.com/questions/tagged/powershelliRon 18 secs ago
 
8:31 AM
No @iRon, code is not ready for review until the functionality is complete. What this question needs is reducing to a minimal reproducible example so it can be answered here. — Toby Speight 33 secs ago
 
8:58 AM
In this 3 lines of code, there is definitely no UB. Additionally, since the reinterpret_cast is a NoOp here, there will also be not any UB in this line. There is no UB. I cannot understand the purpose of this discussion. Nobody would and should write such code. Additionally. Who uses raw pointers for owned memory together with new in C++? Or reinterpret_cast, which will not pass any static code analysis or code review . . . — Armin Montigny 6 secs ago
 
0
Q: How was this python code analyze these classes with class diagram

Mohanraj MAnyone please review my code and give some improvement suggestions. I wrote code but not to the best standards. I think this site give some valuable suggestions this code is for extracting xlsx or csv files int list of dicts and change the values of the dict objects after that concert that to jso...

 
9:16 AM
possible answer invalidation by quentin99 on question by quentin99: codereview.stackexchange.com/posts/273439/revisions
 
@Duga That's an off-topic question anyway - just needs one more close-vote.
 
@TobySpeight done
 
@TobySpeight Wouldn't the edit make it on-topic if we remove the original code? The answer was premature.
Answer could be removed.
 
No, the edit still has a placeholder for code not yet written: #COMMAND HERE TO REPLACE TABS/MULTIPLE SPACES TO SINGLE SPACE
 
Hmmm, yes.
I've removed the answer since they didn't get the hint in the comments not to answer off-topic questions.
 
9:55 AM
0
Q: powershell gui creating local user accounts

chkdskim trying to create a gui for creating local user accounts. the gui is just ruuning fine but i have a problem with creating the accounts. i want to add the account but the error message is that i need to convert the password to secure string. what does the code have to look like and where does it...

0
Q: Finf the nth term of fibonacci sequence

Apple PenOur goal is to find the nth term of fibonacci and need to get the sum of the sequence, also needs to print the Fibonacci numbers that are even, odd, prime. In this program the only problem is to display the prime, odd and even numbers. While the sum of the sequence is perfectly working. Can you p...

 
10:17 AM
my question in code review was closed because of the code wasn't running. but thats my problem. i don't know how and where to convert the password to secure string. can anybody help me with that. it is just that one line — chkdsk 52 secs ago
Hi there John and welcome to SO. If you don't have an issue with your code but simply are looking for feedback, then codereview.stackexchange might be the better platform to ask you question. — Emiel Zuurbier 5 secs ago
 
10:49 AM
0
Q: Custom sorting algorithm in Salesforce Apex

JessicaI had a scenario where I needed to sort a list of EmailTemplate, but didn't have anything to sort the list by (other than a common number in the Name property). The email templates looked something like this: Some email template - 1 Some other email template - 2 Another email template - 3 (with e...

 
11:16 AM
I think is better post this question on codereview.stackexchange.comSimone Rossaini 41 secs ago
@SimoneRossaini so before i delete can you tell me whats the difference between stackoverflow and codereview ? for future use — Taa Lee 40 secs ago
 
11:42 AM
0
Q: What is the best practice to secure session manager?

Taa LeeIs making a table for authorization token (UUID OR GUIDv4) with autoincrement, user_id, token, status (enum) then update status onPause() onResume() so when update token I get a new autoincrement to store with token in shared preference. Then on token update I just insert old token with user_id i...

 
12:36 PM
0
Q: Cool numbers (perfect squares and cubes) in Python

EpsilonHere's the cool number problem given to me by my senpai in competitive programming: A cool number is a number that can be at the same time written as the square of a whole number and the cubic of another whole number. Write a program in Python that returns the number of cool numbers for every gi...

 
1:15 PM
This code would not pass any code review. It is a very common opinion. — 0___________ 53 secs ago
 
 
1 hour later…
2:24 PM
0
Q: Better SASS variable name use for animation speed

Penny LiuThe whole application animation speed is rely on these sass variables which is not intuitive. Naming variables is cautious so please give some naming suggestions to make my sass variable names more meaningful. // Animation speed, can be used for transitions as well $anim-speed-slow: 0.5s; $anim-s...

 
2:34 PM
Welcome to the stackoverflow. Please consider posting posting these king of questions to code review sub-page (codereview.stackexchange.com) as this question for stackoverflow is a bit off-topic and probably will be closed. (see stackoverflow.com/help/on-topic for more info) — Drecker just now
 
2:50 PM
0
Q: phpfox coding issue

سهرت اللياليhi guys i want to call profile pic and cover photo in the index but i cant get it the right way so any help i guess the code cant call the right location of the pic <div class="profile_image"> <div class="profile_image_holder"> {if Phpfox::isAppActive('Core_Photos') && $aProfileImage}...

 
3:44 PM
2
Q: Implementation of generic hash table in c++

fbi open_upI am learning how to write generic code in C++ and I decided to write a hash table. Its key needs to be a primitive type and value can be any type. The hash function needs to be provided by the user. Type of the function is enforced to the user. I am looking for tips on efficiency of the code and...

 
IMHO codereview would be more suitable for this question. codereview.stackexchange.comgonczor 6 secs ago
 
4:05 PM
Monking
 
-1
Q: AttributeError: 'str' object has no attribute 'variables'

mineralI got this AttributeError. I think something's wrong when file_list extend read_all_file. But, I don't know how to fix it. class Gathering_img: def img_path(self, saved_img_path, gathering_path): self.saved_img_path = saved_img_path self.gathering_path = gathering_path de...

 
So, you would really write Node* dummy = reinterpret_cast<Node*>(new int8_t[sizeof(Node)]); instead of Node* dummy = new Node;? I mean you are a professional. Responsible for real products. How can such a line of code pass any major static code analysis tool or code review? Maybe my industry area is a little bit different, but such code is simply strictly forbidden. And why are you start talking about sentinels now? The most simple linked list has a nullpointer at the end. So, i cannot follow. And again, the 3 lines of code in the question, do definietly not have any UB. — Armin Montigny 10 secs ago
 
4:35 PM
Monking
 
4:55 PM
For code that is working where you desire refactoring, there is a stackexchange site codereview.stackexchange.com that would probably be more appropriate. — JNevill just now
Welcome to StackOverflow! I think that if you don't end up getting help on here, it might be worth also posting to codereview.stackexchange.com - this might be more up their alley. They have specific guidelines for posting that you need to look up, but otherwise if this code works then I think it's eligible for posting on there. — Random Davis 44 secs ago
 
5:23 PM
Incidentally your instincts are right: there are quite a lot of ways to get this less clunky, and wanting to cut down on repetition is a sound instinct (not answering here because it's off topic, but looks on topic for code review). But well done on getting it working :) — 2e0byo 14 secs ago
 
5:55 PM
I’m voting to close this question because it belongs on Code Reviewdjv 59 secs ago
@KnowledgeMan dev currently has 4 commits. Sounds like you want 2 commits there. What do you want your commit message to be for the second commit? You have "Import the whole web app from external source" and "Modify the Profile". Are you sure you want to even squash those together? Maybe what you want is 3 commits? Also, the merge commit about the PR isn't necessarily bad to keep around either. In my projects I keep those on purpose. Then someone could go look up PR #1 to see the code review comments and discussion, and previous versions of that branch before it was merged. — TTT 30 secs ago
 
Kaz
Hello everyone, been a while :)
 
@Kaz Hello!
 
6:52 PM
Hey
 
Kaz
How are you guys?
 
0
Q: Method of create a list where the values are joined by position

Brondby IFThe values I have are: [ ['a', 'b', 'c', 'd'], ['a', 'b', 'c', 'd'], ['a', 'b', 'c', 'd'], ['a', 'b', 'c', 'd'] ] To create a list where the values are joined by position I use this method: example = [['a', 'b', 'c', 'd'],['a', 'b', 'c', 'd'],['a', 'b', 'c', 'd'],['a', 'b', 'c', 'd']] list_1 ...

 
@Kaz how are you?
 
@Kaz Welcome back.
 
Kaz
7:37 PM
@SᴀᴍOnᴇᴌᴀ Old company got sold last year. I had them buy me out. Took the last 5 months off. Found a new job. Well, actually, the job found me :)
 
okay- what did you do in the past 5 months?
 
Can you explain what the actual problem with this code is, though? Because if this code works, and you just want to improve it, then SO is not the right place for that and you want to post this over on codereview.stackexchange.com instead. — Mike 'Pomax' Kamermans 37 secs ago
 
@Mast @Peilonrayz @SᴀᴍOnᴇᴌᴀ This closed question and this question that has 2 VTC have both been edited by use Nostradamus adding lab.h. Neither question was asked by Nostradamus.
I have approved the edits, but I am not sure I should have.
 
@pacmaninbw No, but thank you for notifying us.
We can fix this.
 
7:52 PM
:)
 
Feel free to use the 'causes harm' button for this.
@pacmaninbw I've rejected both.
For the record, I'm starting to get an idea of what this lab.h is. Some teacher got smart and modified this headerfile from Advanced Programming in the UNIX Environment for their own class.
 
Does your code currently work aside from the new feature you want to add? There are a bunch of things you’re doing incorrectly that lead to messy or nonsensical code. If your code works, you could post one of the adapters on the CodeReview StackExchange site so you can get feedback on how to clean it up. I don’t really want to try to answer your question with your code in its current state because I would have to change so much that’s not relevant to your question just to make a good example of how to do it. But the basic answer is to have a listener one your EditTexts that calls a listener — Tenfour04 32 secs ago
 
It's copied all over the web.
For example, Clemson University hosts a copy.
It's all over Chinese sites as well.
 
Interesting, however, the source for the library (functions) is not posted there.
Lunch (bruch) time TTYL.
 
8:15 PM
0
Q: Python : Is it possible to combine these two functions into one?

crazyrockyI have been creating a scoring program for a game of hearts. If there is a an even number of players then players will pass across. And an odd number there is no pass across. I created these 2 functions that work fine. But I keep scratching my head trying to simplify them into only 1 function. I ...

0
Q: Blended Tiles Rendering Shader (Unity)

PeakAliveI'm interested in creating a blended tile renderer in Unity, but I have no experience with custom shaders whatsoever (except DirectX11) I stumbled upon this topic: Unity surface shader to blend between adjacent tiles But I couldn't quite figure out what the different maps are refering to (the one...

 
21
Q: Is it okay to add someone else's linked code to the question?

Anton GolovSome questions link to the code they want reviewed, which is against site policy. Should one edit the code into the question in these cases? The problem I see is that all content on Stack Exchange is cc-wiki, which may not correspond to the wishes of the author. This is probably fine when the ...

 
 
2 hours later…
9:56 PM
@CaptainObvious seems like a rewrite request... "But I keep scratching my head trying to simplify them into only 1 function. I know its possible but I just can't get it right."
 
10:31 PM
0
Q: Get the total file size from a directory for each date using map and pairs

nsivakrI'm working on a project where the file name consists of actual dates but the data for the dates are split into multiple files. Developed the following program to count the number of files for each date (part of the filename) and also the total size. Wondering, if the same can be written in a bet...

 
10:46 PM
I'm curious... You say you saw this in code review. You mean someone actually wrote this for a project? Or do you mean it was part of some sort of tutorial/puzzle/interview? There'd be no good reason to write code like that for real. — CrazyChucky 32 secs ago
 

« first day (3191 days earlier)      last day (819 days later) »