« first day (2413 days earlier)      last day (78 days later) » 

12:00 AM
RELOAD! There are 6294 unanswered questions (90.0854% answered)
12:59 AM
Capitalize your class names or risk the wrath of code reviewers in your future. Use camelcase for instance names e.g. Player randomPlayer = new Player();MarsAtomic 26 secs ago
Q: Function conversion between C++ to JavaScript syntax

RedI had a simple C++ function that worked great, all it did was search a given string for a character. bool StrSearch(std::string BaseStr, char Search) { for(int i = 0;i <= BaseStr.size();++i) if(BaseStr[i] == Search) return 1; return 0; } std::cout<<StrSearch("div","v"...

1 hour later…
2:28 AM
Q: Asynchronous paging with partial views

DenisI'm trying out .net core with mvc in a personal project, the latest functionality I've added was a project catalog, primarily ajax based, it's displaying a list of projects fetched from the database using web api in a catalogish order and interface. Web API Starting with the infrastructure la...

1 hour later…
3:52 AM
1 hour later…
4:54 AM
Q: simple but code not efficient enough

VihaanThis is a code for a HackerRank question. The code is a simple one , performing shifts of nos to the left . The input is in format: The first line contains two space-separated integers the size of and the number of left rotations you must perform. The second line contains space-separated intege...

5:38 AM
I'd recommend you to ask a question on Code Review if you want critique. Stack Overflow focuses on fixing broken code, and your code isn't broken (as far as I can tell). — Peter G 38 secs ago
6:17 AM
Q: VBA - Sequence Generator from previous max sequence based on certain conditions

r00tI'm new to VBA programming so the following code may look terrible which is why I want ways to understand how to better optimize it and other future codes. Sub test() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Application.DisplayAlerts = False Dim arr(1 To 4...

6:37 AM
Q: Priority queue with Max-Heap

YongHyun KwonI'm studying with book "Introduction to Algorithms" and implemented PriorityQueue without existed Class. I made a MaxHeap class with Array and made a PriorityQueue with my Heap class. Actually code is working and refactored code I did my best, but I'm beginner so I need feedback for anybody. ...

7:18 AM
Q: Sequence Generator from previous max sequence based on certain conditions

r00tI'm new to VBA programming so the following code may look terrible which is why I want ways to understand how to better optimize it and other future codes. Sub Sequence() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Application.DisplayAlerts = False Dim unique...

Q: IdNumber: a string of fixed length and with character constraints

SomeBodyIn my program, I have special id numbers. They have a fixed length of 10 characters and may only contain digits and lowercase letter. I created my own data type for this. I want to be able to assign string values to it (with the implicit operator). When I do so, there should be automatically a ve...

8:19 AM
For this kind of review cases codereview.stackexchange.com can be a better address. But, even if you post there or here, you'd better share the code you're using right now. — vahdet 43 secs ago
Q: Arduino (ESP32) RFID card reading solution. (Blocking code to non blocking)

Dr.RandomI have a working code for a custom made RFID reader modul(125khz). I have to parse the signals coming from it with an esp32 to be able to read the tag code. I came to this solution in Arduino c++ for esp32: static bool decodeTag(unsigned char *buf) { unsigned char i = 0; unsigned short ti...

9:02 AM
Q: Check if there's exactly 1 match in a vector

Kunal TyagiThe challenge is to iterate over the vector only once and return the value within the range of the zero. However, if there are no matches or more than 1 match, deliver an error. The vector is unsorted and has no guarantee on it's size or the range of data. More technically, the number of data acc...

Q: Order of the columns all over the place

ebeThe code below is written as part of a parser, which files would be also added here: XMLParser, parser, Name, GenericElement, attrib It reads an XML file, turn it into a dataframe using pandas and then parse it into an Csv file. The reason I’m asking this question here it is because the code wo...

9:43 AM
Q: Code to remove columns in a (fasta) file with more than 90% '-' characters in that column

BiomageContext: This script reads in a fasta file, counts the number '-' characters, alphabetic characters and total characters for each sequence (sequence descriptions are on lines marked with '>'), and then prints out a processed file with columns where 90% (or more) of '-' characters are removed. ...

10:10 AM
possible answer invalidation by Heslacher on question by akhil: codereview.stackexchange.com/posts/233858/revisions
@Duga thats ok
@SimonForsberg just a thought, and only if you have time and want to do it, could you change @Duga behaviour about answer invalidation on question which are closed as off-topic?
10:36 AM
@Heslacher you could submit a Pull Request to the repository
AIUI Simon hasn't had a lot of time to work on Duga lately.
10:48 AM
Me neither :-(
And the last time I coded in Java, well I can't remember anymore :-)
11:05 AM
Q: Is it possible to use "reduce" instead of for to set data to MapObject?

user2006734I want to remake and sort an array. Is it possible to use "reduce" instead of "forEach" or "map" ? return beeProps.valueInfos.reduce (reduce()) woule be great. ---> ---I would like to gether same "Number" Object to a array ---> const makeTableArrayMap = (beeProps: beeOfProps) => { cons...

11:36 AM
@vadian My intention was to solves a problem. It's not a code review. — Adobels 28 secs ago
@Heslacher That would involve another API call I think. Nothing I will implement at the moment.
Shouldn't be too hard, but I prioritize other things.
ok thanks
Q: Check Managed Sites Up/Down Status - Works Only Sometimes?

James Anderson Jr.I have a page on my website that is intended to check and reveal the online/offline status of web properties (i.e. managed websites). However, it only works some of the time. I can't seem to find out why it usually always breaks when the page is loaded after the first time. My code is here:view...

12:07 PM
Q: Show me better way doing this in Flutter. Should I use "Stack" in this situation rather than "Row"

JemomeiI am just starting to code by my self in flutter. I ve built this so far, here is the image. Can you show me what would be the better code? more cleaner. I used Row widget for it, but I guess I should maybe go with the Stack. Because now i want to add text field box in the middle of app bar that ...

12:32 PM
hi... yes you can but what you want to do is a bit involved which is why I used the first doc as kind of proof of concept.. To implement this you would really need to review the posted documents... all of which have code snippets showing how to achieve the individual steps required. Combining it all together to have a deployable code base for creating and sharing views programmatically is unfortunately beyond the scope of Google Support. WE are limited in code review and direct recommendations, or writing code for users of the platform mostly for legal reasons — Paddy Popeye 29 secs ago
12:45 PM
Get rid of all the unsafe blocks that are just doing pointer casts and you will probably fix quite a few bugs. Then, if it's working, perhaps you could post it on Code Review to get feedback on the other uses of unsafe. If it's still not working, you can post it here after creating a minimal reproducible example. Note that Stack Overflow does require you to post all the code necessary to reproduce the problem, not just a link. — trentcl 35 secs ago
1:30 PM
While I'm not sure about speed-up improvement requests, your question may be better suited at codereview.stackexchange.com . — 0 0 34 secs ago
2:26 PM
Please consider posting instead to codereview. — Frontear just now
Q: Web api get data with many optional parameter in .net core

RaskolnikovI would like to do refactoring of web API implement in .net core Goal is to simplify get method and to implement this to be mora according to rest philosophy. I would appreciate any advice. As you can see the logic has many invalid combinations and too much code in one method. namespace Api.Tr...

@CaptainObvious Based on the title I have decided to VTC for broken code. It could also use more of a description.
Do the code work? Then this is more of a review question and might be better of on the Code Review SE. — Some programmer dude 27 secs ago
@CaptainObvious I'm adding the tag
I'm voting to close this question as off-topic because requests about improving existing code should be asked on Code Review instead. — EJoshuaS - Reinstate Monica 58 secs ago
@Someprogrammerdude good point. donegeneric_opto_guy just now
I'm voting to close this question as off-topic because it better fits to code review. — generic_opto_guy 14 secs ago
2:52 PM
Q: Design a generic hardware interface

Eliran NoachI am trying design a generic hardware facade interface for different camera types. below is my incomplete generic interface for camera devices template <class Data,class Configuration> class CameraDevice : public Device { public: CameraDevice(DeviceModel model); virtual void startStream...

Q: Generic Type Trait example

user9400869I want to check that a some type has some methods: using Arg_t2 = int; using Arg_t3 = int; template<class T> struct ValidType{ using Ret_t1 = T; using Arg_t1 = int; // ... Ret_t1 method1(Arg_t1,Arg_t2,Arg_t3); //... }; Therefor I wrote a type-trait: #include <type_traits> tem...

3:13 PM
Q: PHP array return array vs passing as reference

wawaI'm not sure if Code Review is the proper SE site. If not, please point me in the right direction. Let's assume we have a simple function, where you can pass an array and it will do some work on it. For simplicity sake, let's just assume you pass an array of integers to the function and it doubl...

I'm voting to close this question as off-topic because it is not about specific problem in the code, but about reviewing the code. Such questions could be asked on Code Review. — Tsyvarev 6 secs ago
Ryan Donovan on December 12, 2019

Did you, like me, wait until the last minute to buy holiday gifts for your programmer friends? Maybe we can help. We asked our engineering team what gifts they like and would appreciate receiving. We’re publishing their responses in full below in the hopes that you can find inspiration for your upcoming holiday gift frenzy a la Jingle All the Way. 

If, like the Angular framework, you are opinionated, then drop us a comment about the gifts that we forgot to highlight. Because I still have some shopping to do.  …

3:30 PM
@MathieuGuindon I'm reading that as a request for me to put out two more Brainfuck code questions...
Q: Cryptopals first challenge - hexadecimal to base64

chrysaetos99I've just started the cryptopals-challenge, and now wanted to show my solution to the first challenge here: public class Challenge1_1 { public static void main(String[] args) { String hex = "49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f...

possible answer invalidation by wawa on question by wawa: codereview.stackexchange.com/posts/233928/revisions
4:03 PM
I think this should be asked on codereview stackexchange. — Felipe Gutierrez 14 secs ago
4:16 PM
This should be moved to code review codereview.stackexchange.comvendettamit 9 secs ago
4:30 PM
@SimonForsberg yes!
Q: C# Linq search list within list

AlexI am writing a domino draw game in C# and would like to know if there is a simpler/better way to know the player that has been dealt the highest double bone (where x equals y) and what bone it is: public class Player { public string Name { get; set; } public List<Bone> Bones; public ...

feels guilt for never actually writing the BF interpreter in VBA I promised @Skiwi like 4 years ago
4:53 PM
@MathieuGuindon It's not too late!
@MathieuGuindon You're like there that I forgot ;)
Err, that sentence doesn't make any sense at all
5:04 PM
A brainfuck emulator in Excel, using cells as tape.
What is your question? Please update your question to be formatted correctly and add a question. If you are asking us to "improve this script", then please use the code review SO site — I.T Delinquent 25 secs ago
I'm voting to close this question as off-topic because this site is not designed to help improve code. Try codereview. — Sedrick 54 secs ago
Q: c# Recording Data in web app

JeffersonI would like to record client information when they go into a location on the web site so I created this class that will collect data and insert it into the database. string filename = Path.GetFileName(context.Request.Url.AbsolutePath); string cust...

5:23 PM
@skiwi you probably still have that browser tab open, now that I think of it
5:49 PM
@MathieuGuindon 4 years ago is a long time though.. Tabs usually don't survive switching to a new pc
wait you mean you actually end up reading and closing all these tabs?
Well, mostly, yes
Q: C# Recording Traffic Data

JeffersonI would like to record client information when they go into a location on the web site so I created this ProcessRequest class that will collect data and insert it into the database. This will collect HttpContext and send that data to a Store Procedure that will then insert into a database table. ...

@CaptainObvious should have edited previous post
6:01 PM
@MathieuGuindon If he can find it in all of the tabs he has open.
@LCC Close-Voters: feel free to enlighten the rest of us with a comment that explains what context is missing and how that makes the code unreviewable. — Mathieu Guindon ♦ 17 secs ago
Sporry, didn't read down to the new computer until after.
I'm starting to get very annoyed with these LCC votes now
Let's burn that reason entirely.
thinking the problem might not be LCC itself
6:05 PM
@CaptainObvious @MathieuGuindon Thought that looked awfully familiar.
Yeah IMO it's not a LCC problem, but a user problem.
Welp, at least the question improved quite a bit already.
I thought the new need details or clarity would kill of LCC.
I clicked on my hat but I don't see it on my avatar in chat?
OK, it just took a while.
it's there... just... vewy shmoll
Looks like the hat I got in Russia when it was the USSR.
6:12 PM
during Winter Bash in soviet Russia, hat gets you
wonders how tired that meme is
6:40 PM
Q: Delete older entries in a SQL database where the non unique id matches

koreus737DELETE FROM myTable WHERE EntityID IN (SELECT EntityID FROM myTable WHERE ID = @ID) AND Dated <= (SELECT Dated FROM myTable WHERE ID = @ID); Given that in this database each row in the table represents an update to an Entity where ID is the autogenerated unique id of the row, EntityID is the i...

@MathieuGuindon I honestly don't think that reason has ever not been misused...
7:00 PM
Q: How can i write my code for multiple buttons and their event handlers in javafx more efficient?

Jamie BovingtonIn my project I used this code to create a GUI using javafx. The aim was to have a screen that had 7 buttons on it. Next depending on which button is pressed another set of buttons will appear on the screen. The use then chooses one of these which then sets an integer variable subchapter to a val...

Q: Caesar-Cipher - 2nd follow-up

chrysaetos99I hope it is ok, to ask multiple questions about the same project. If not, I would be happy, if someone could tell me. I've now used the tips, you can find here and there, to improve my code: import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; import...

7:14 PM
@410_Gone was it abused back when it was all about "hypothetical code"?
7:27 PM
@MathieuGuindon Huh, the old close reason had three different reasons in it. "hypothetical code" was then moved into its own close reason.
7:40 PM
If your solution works but you want it to work better, Code Review may be a better place to ask. — user4581301 38 secs ago
Q: Bomberman AI State Machine

Ryan SwannI am currently making an online Bomberman and wanting to make some sophisticated AI for it too to work as a good portfolio piece for my application to game companies. I have laid out my AI state machine like this and wondering your thoughts on it. This is my first time doing something like this...

@MathieuGuindon In Soviet Russia, tired is meme.
8:08 PM
IMO you'll want a more robust callback mechanism than that. See if this post gives you food for thought — Mathieu Guindon just now
9:00 PM
possible answer invalidation by Edward on question by Nevralgeek: codereview.stackexchange.com/posts/222664/revisions
9:12 PM
Hi Phalanx, welcome to StackOverflow. This question (as currently worded) may actually be more appropriate for [](codereview.stackexchange.com) or another StackExchange site. If there is a specific part that you are looking for help on (a value not being calculated correctly, an Exception being thrown, etc), rephrasing the question would help. — Brydenr 49 secs ago
9:32 PM
@Duga it is off-topic because of borked code and Edward is attempting to make it on-topic
9:45 PM
Q: Destructuring an object in function definition vs destructuring in function body

abhinavWith extensive use of destructuring in javascript, what is a better approach when doing the following. function a(object1, { desProp1, desProp2, desProp3 }){ // do something } vs function a(object1, object2){ const { desProp1, desProp2, desProp3 } = object2; // do something } Pe...

10:06 PM
Q: Calculating the average of all nodes in a Binary Search Tree using visitors

PhalanxI'm required to calculate the average value of all nodes in a BST using a Visitor, I'm not sure if I did this correctly or if i could just calculate the average with inOrder() and therefore I'm not really utilizing the visitor. import java.util.*; public class Node{ int val; Node left;...

10:27 PM
Q: Daffy Duckifier

CalebWould this Ruby code work? It's supposed to translate normal text into daffy duckth thlang. # Daffy Duckifier print "Pleathe enter a thtring!: " user_input = gets.chomp user_input.downcase! # turns "s" into "th" if user_input.include? "s" user_input.gsub!(/s/, "th") else puts "Nothing Found...

Hello from AWS!
Duga has been upgraded!
Or at least working on it... but this is a good first step!
11:02 PM
You are right -- my solution probably does slow things down, but it fixes the problem you had in your question. If the solution answered your question, it should be marked as "Accepted" so others can benefit. If you are looking for an optimization of my answer, I suggest you head over to codereview[codereview.stackexchange.com/], they are experts at optimization over there :) — wundermahn just now
11:23 PM
ಠ_ಠ Hmm I just got 3 announcer and 1 booster badges in the past hour...
@SᴀᴍOnᴇᴌᴀ You too?
is Duga visiting our links?
thanks, gal!
Not that I know of.
@Duga It seems like there's still some issues to sort out with that...
11:47 PM
> 2019-12-12: Announcer, Booster, and Publicist badges are now awarded per individual post (question or answer) rather than counting clicks on shared links to answers toward the parent question.
A: Recent feature changes to Stack Exchange

gnat December 2019 2019-12-12: Announcer, Booster, and Publicist badges are now awarded per individual post (question or answer) rather than counting clicks on shared links to answers toward the parent question. 2019-12-11: It is now possible for moderators to prevent users from commenting on a sp...

Q: Finding total values for each day - Postgresql

arthionneI wrote an SQL query to find how many leases were "active" for each day of 2018. So if a contract began on 27/12/18 and ended on 27/12/18 and another one began on 27/12/18 and ended on 28/12/18, the number for 27/12/18 is 2 and the number for 28/12/18 is 1. My query works fine but while trying t...


« first day (2413 days earlier)      last day (78 days later) »