12:00 AM

12:32 AM
Got it fixed. Apparently needed Kotlin standard library in the Java project.

If this solution works, it may be better suitable for CodeReview. — Turing85 30 secs ago

1 hour later…
1:39 AM
0

Can someone please review my solution and advise a better solution to convert each character in a string to Array excluding any character (i.e , / ; -). The solution I have applied is below but I am sure it can be simplified. Many thanks in advance. public static void main(String args[]) { ...

1:51 AM
If you have a version of the code that does work, Code Review might be a more appropriate place to seek improvements. — JaMiT 31 secs ago

2:20 AM
0

I have written a function to calculate all strong components in a graph. How do I make this cleaner and nicer? import java.util.* import kotlin.math.min private fun readLn() = readLine()!! // string line private fun readInt() = readLn().toInt() // single int private fun readStrings() = readL...

2:39 AM
Avoid referring to UserForm1 in the code-behind of UserForm1: that will not work as you expect, the minute you start New-ing up your forms. Use Me to refer to the current instance of the form. That said this code might interest youMathieu Guindon 19 secs ago

2 hours later…
4:46 AM
1

I recently solved Advent of Code 2019 Day 6 in C#. Part 1: You've landed at the Universal Orbit Map facility on Mercury. Because navigation in space often involves transferring between orbits, the orbit maps here are useful for finding efficient routes between, for example, you and San...

3 hours later…
7:52 AM
0

https://github.com/timcassell/ProtoPromise I'm working on a C# Promise implementation (based off Promises/A+ and ES6 with some alterations). I'd like some feedback, if anyone has any to give. The most glaring issue it has right now is it is not thread safe, which I plan to get around to soon. O...

8:12 AM
0

I was given a Perl script that should be executing a linux command that performs a diff on two files: my($file1) = shift; my($file2) = shift; my $old="removed"; my$new="added"; my $unchanged=""; my$changed="changed"; open(FILE, qq(diff -d --old-group-format="$old" --new-group-format="$new" --...

2 hours later…
10:08 AM
A further downside of postman is a horrible developer experience in terms of handling collections in git...Collections need to be imported and exported with every change, and code reviewing huge json files is a pain compared to — Mahatma_Fatal_Error 12 secs ago
This is probably better suited to Code Review. There is no actual problem here. — Alexander Cécile 52 secs ago

10:30 AM

-1

I'm writing a game server, recently I found a bug which happens when two requests coming to my server at the same time. Here is the method: public async Task<(Game game, string error)> AddWinner(Game game, GameUser user, int card) { if (game.Winners.Count < game.MaxWinners) { /...

10:55 AM
I'm voting to close this question as off-topic because questions about improving working code are off-topic for Stack Overflow. This question may be on-topic at codereview.stackexchange.com, but check their help pages first to ensure that it is and to see how to best ask your question there. — T.J. Crowder 31 secs ago

11:42 AM
For code reviews, ask this question on codereview.stackexchange.comSaurabh P Bhandari just now

1 hour later…
1:03 PM
@CaptainObvious I'm confused why this has been nuked into the ground. Can anyone guess why?

1:16 PM
What do we do when we get a migration and all 4 answers don't have any insightful observation - just "use this code"?
3

I've this sample list which has nodes and their neighbors if they have any. The problem is to find the node which has the highest number of neighbors. neigh = [['A'],['A','B'],['A','C'],['B','D'],['C','A']] The neighbor are calculated in both directions. Example: ['A','B'] are neighbors to eac...

-1

Basic idea is to use a Class, with static methods to add and remove references in a static vector, that keeps track of these references, and check that vector upon exit. The class is detecting intentional leaks that I create, but maybe you can find a case where it does not detect the leak, that ...

@Peilonrayz what do you expect me to do here?
it's not like I have any other options as a mod...

@Vogel612 I feel like a dick downvoting, and voting to delete the posts.

then don't?

1:40 PM
Could you provide your code in one code block? I'm interested in this, but I don't copy multiple code blocks. Also do you think there are class attributes, not instance attributes, that are defined in __dict__ but not on the type? — Peilonrayz 44 mins ago
@Peilonrayz Any time I've edited my code in a Q post here it's been rolled back, so I don't think it's wise to try to revise it.
or reorganize it even.

That's probably to avoid answer invalidation, but you have no answers so it won't matter here.

-1

I have a little problem, I wouldn't know how to sort a String list. I don't want to sort it alphabetically, I want to sort it from highest to lowest or from lowest to highest. String line = "hello" + "world" + "54"; String line1 = "red" + "color" + "895"; String line2 = "blue" + "col...

If you don't want to that's fine, it'll just deter some people - like me - from answering.

I use multiple code blocks to insert discussion and avoid scrolling code blocks. It's quite intentional and my preference to keep it the way it is.

1:56 PM
MOnking

@Peilonrayz What do you expect from SO, that's what they do?
I'd say ignore the previous answers, because they don't matter on CR. Write a good code review.

-1

My VBA code currently loops for 5,000 iterations and takes about 25 minutes to collect the output data in the Output excel sheet. Is there a way to reduce the time taken for instance by improving the copying and pasting of values, collecting the output data in some kind of array etc.? Given that ...

3:06 PM
-1

I am an old python newbie here, migrating from fortran77 ;) Still unsure of the python terminology at the moment :( The python3 script below fetches a large list of matching files in a folder tree, in the format: [ fully_qualified_folder_name, [list of matching files in this folder] ] Being ...

possible answer invalidation by Peilonrayz on question by Samira Kumar: codereview.stackexchange.com/posts/233626/revisions

@Duga Fixed the mathjax bug, should be ok

3:26 PM
-1

if ((commandBuffer.compare(0,endOfVerb,"south") == 0) || (commandBuffer.compare(0,endOfVerb,"s") == 0)) { commandOk = true; Room *southRoom = currentState->getCurrentRoom()->getSouth(); if (southRoom == nullptr) { wrapOut(&badExit); ...

3:46 PM
I'm voting to close this question as off-topic because this would be a better question for codereview.stackexchange.comFrankerZ 30 secs ago

3:59 PM

4:39 PM
Brainfuck interpreter written in C on codereview might give some ideas. Your use of the stack to handle nested loops is probably a good idea. — Peter Cordes 48 secs ago
subq \$1,(%r12) is an 8-byte sub; your cells are 1 byte so you're allowing carry-out to propagate between cells. That's a bug, IDK if it's the cause of the problem you're asking about. Also related Brainfreeze: A Brainfuck compiler in C on CodeReview talks some about x86 asm sequences that implement BF "instructions". JITing vs. dispatch with a chain of branches isn't a big difference as far as what the blocks need to be. (And BTW, for performance you might want to dispatch via a jmp table(%rax) after a movzx load.) — Peter Cordes 13 secs ago

5:30 PM
1

Just for fun, I created a script called TinyBF which can compress Brainfuck programs into a format half their size. For example, take a famous hello world program clocking in at 78 bytes: --<-<<+[+[<+>--->->->-<<<]>]<<--.<++++++.<<-..<<.<+.>>.>>.<<<.+++.>>.>>-.<<<+. When put into TinyBF format...

research prototype codebases are a neverending source of pain
I need to work on a module in such a codebase that contains the model for implementing a spec
There's some fluff around serialization and deserialization of that model, but the most infuriating (at least right now) part of all the mess is that there are some entities in the model where instances have no field for their primary natural key
And there is literally zero documentation on why anyone thought that was acceptable in any way shape or form
ughhhhh and the spec was written in word and the pdf export doesn't expose an outline.

6:18 PM
Breathe

6:44 PM
A deep deep breath

@Vogel612 Wat
Welp, that's kind of an important step not to forget.

yea, I'm very much weirded out by how apparently nobody though that might be a useful thing to have
all these entities are accessed through a parent entity which stores the children in a map.

7:13 PM
0

I am in the process of setting up WordPress with WooCommerce, one of the requirements is a bit of integration that takes a person from another website directly to a specific product. I have set the external product references in tags on the products an example incoming query would be: http://lo...

7:34 PM
0

I have a fair few years experience with programming, and am currently working in a software development role, writing internal web applications in C#. This is the first C++ code I have ever written, so I therefore don't know the conventions, code smells, do's/don't's of the language. I decided ...

0

I am creating a small library for controlling bars of leds and have some doubts about my design. I have 2 basic entities in the design so far: BarService (and implementation) template<class T> class BarService{ public: virtual void turnOnLeds(T* bar, int end) = 0; class PinBarService : pu...

@Peilonrayz @Vogel612 Such questions are a pain. I'm not sure if they should have been migrated. Probably best to have a dialogue with SO mods about this. The question surely fits better on CR than on SO, but the answers aren't good CR answers. Personally I'd recommend adding a comment and if possible, edit an answer to improve it (not too much, but just add a brief explanation about why that answer could be better than the original code)
@410_Gone If you use anything Kotlin, then yeah you would need that.
Nice to see that you're using Kotlin by the way :)

8:26 PM
@SimonForsberg Yeah my Android project wouldn't build because a referenced project used Kotlin...which seemed odd to me

@410_Gone If you also would have used Kotlin it wouldn't be as odd :D

8:50 PM
@SimonForsberg Yeah...the app is Java but some of the libraries I built are Kotlin.

9:17 PM
0

new to multithreading. I wrote this program which should be a solution to the producer-consumer problem. The problem is that both a producer and a consumer end up in the waiting state. What seems to be wrong? (And everything else what is wrong ^_^) Thanks in advance. Main class: package produce...

2 hours later…
10:47 PM
My two cents:
0

I will only address the question "Should titles reference external resources", to which I believe the answer is: Yes. It's perfectly acceptable to reference external resources in titles. If I see the title "Advent of Code Day 5", I might already know exactly what that question is about as I mys...

10:57 PM
@CaptainObvious Sounds like an off-topic problem
@Peilonrayz That question completely lacks description about what the problem to be solved is - see codereview.meta.stackexchange.com/q/1226/31562