it's like a fkced up interface that later gets an implementation, but if you put the implementation in the definition then it means something completely different than if you had put it in a separate place
It is probably the nastiest exception you could ever get. Invariably caused by native code corrupting the GC heap. Well, you have some. The exact location where it crashes is rarely the place where the corruption occurred. It isn't detected until the GC collects the heap, that always happens later. A good code review, unit tests, randomly commenting out code is the way to get somewhere. — Hans Passant6 secs ago
I am implementing a binary search to retrieve all matches of a specified value. Instead of a regular binary search that would just return the first match, I want to get that first match AND all matches above and below it in the set of objects.
For example, I have an array of objects that are sor...
Here I have implemented a queue. Is this a correct, efficient queue implementation? what issues are there if any and what can be done to make it better?
import java.util.*;
public class Queue2{
private int amountInQueue;
private int[] queue;
private int rearIndex;
private int fr...
"Self-sponsored team building" has to be the stupidest idea a manager could ever think of. If my manager ever came up with some rubbish like that, I would rather keep my money than attend some fake event which will supposedly build the team. And if they have a problem with that, and push their "team building" too much, I will just build my team somewhere else. Does that sound like "team building" to anyone? It doesn't to me either. — Masked Manyesterday
^^
Maybe employees should fund their own salaries? They're the ones who benefit from it after all. — TheMathemagician21 hours ago
@Mast "Your logic is that the team benefits from the team building events, so the team should fund it. Then, if the employees benefit from being paid a salary, so should the employees fund their own salary." - something like that.
StackOverflow is not a code review service. There is codereview.stackexchange.com for that. If you want to get help - please provide a minimal reproducible example, your desired output and show what you've tired. Try reducing the problem to a specific problem as much a possible. See here — David Arenburg21 secs ago
This is called a code review. Also, we can't reproduce this. This is type of XY problem, when you focus on the solution rather the problem. We need to understand the problem in order to provide solutions. If you want someone to review your code, try at CodeReview SE — David Arenburg16 secs ago
Of-course, if you're going towards Code Review, don't forget to read their on-topic help centre as well. It would be a shame to have a negative reception on two sites. — Mast40 secs ago
I wanted to start a simple hello world app for Angular 2.
When I followed the instructions in the official quickstart the installation created 32,000 files in my project.
I figured this is some mistake or I missed something, so I decided to use angular-cli, but after setting up the project I co...
Why would you even bother counting number of files. If your hello world app is working, everything is fine — hendrix3 hours ago
Nonononono, that's not how you develop.
If you see tens of thousands of files appearing in your project folder, you take a step back and wonder how it happened, just like every sensible being.
FG : 16 mil rows , 2 columns AB : 1.3 mil rows , 1 column
I have a dataset with 16 million rows and may increase upwards of 30 million. I am using the parLapply to run across three cores in R. But its taking literal two days to run to completion. When I try smaller datasets of about 60,000 it ta...
We have a class which acts as a time interval, containing a LocalDate and two counts of minutes since midnight.
One of the methods on this class converts these values into two DateTimes.
Since DateTime has time zone information built-in this conversion might fail if the time is in the daylight sa...
@DanPantry I suspected as much. But I wouldn't expect to get the entire SDK downloaded for a simple Hello World program either. I'd expect I'd need to download the SDK before trying anything with such an amount of files involved.
@N3buchadnezzar Nonononono. You can try various SEDE queries first.
I do not see anything synchronous, and you are using the standard fs library, you should be fine. But I think this question belong more to codereview.se :) — DrakaSAN8 secs ago
@Mast Meh, you can install modules globally if you want it that way.
Plus, that's not a "simple hello world" project.
That's a "simple hello world" in a dialect of JavaScript that isn't available yet using a framework and for the browser with the JavaScript equivalent of Maven or Gradle.
I wrote a small program in Python that finds primes (how original) up to some limit. I tried to produce very clean code, so I'd be vary grateful if you could point out any improvement I could do to make it more pythonic and more readable.
I'm also interested in knowing whether or not it can be s...
@Mast I don't think it's stub code. IMO, stub code means "not enough context to offer any meaningful advice". There, I could probably say, at the least, put it in a function that takes the values as parameters
@SteveBerman You don't have enough reputation to talk yet. This is the Code Review general chat. Did you have a question about our site? We also have a Code Review Meta. If you're wondering what's going on here, have a look at the chat FAQ.
@N3buchadnezzar I'll keep dragging your pieces till you drop it.
That's an Angular 'template'. Apparently they wanted to keep HTML and JavaScript separate, by adding a load of identifiers that no one else ever used. @Mast
it's my solution to equal stacks problem. I thinks it's really messy and slow. could you give me some thoughts about how to optimize given code and algorithm(i'm pretty sure problem can be solved way effectively)
import java.io.*;
import java.util.*;
import java.util.stream.*;
import java.text....
@sos If you have a working solution that you think is inefficient, then you should ask (an on-topic questin) at codereview.stackexchange.com. This is not the place to ask for general implementation ideas. — chepner20 secs ago
What is your specific problem? This is no code review/discussion forum, but a Q&A site. As a sidenote: short is not guaranteed to have 16 bits. If you need fixed width integers, use them! The C standard provides appropriate declarations in stdint.h. — Olaf7 secs ago
I am new with c# and I've been working on a simple program but seems there is something wrong that causes a "Parser Error" keeps showing up. I don't understand the error. Any help?
I created a small ruby script at work to recreate a text file I use for a test in the Java application we are supporting.
I'm still really new to the ruby paradigm and wanted to know if that small script respect most of the spirit of it.
The content of the file doesn't need to make sense since ...
I'm learning kotlin and java. As a code-kata I wrote the roman to decimal converter. I'd be very grateful for code review.
I was trying to keep things simple and funcional. I'd especially appreciate any comments on the functional style (e.g. the non-purity of some mappings).
Converter tests:
...
@Zak Maybe that is how it starts. You have so many bookmarks that you start using tabs. It is a slippery slope. Soon you will start writing down urls on post it notes.
I learned HTML, CSS, JS, and Bootstrap then I grabbed a PSD and tried to code it from scratch (to get experience and something for my currently-non-existent portfolio). Here's the result. I need someone to look at my code and tell me if there's something wrong with it. You know, did something the...
Now the other tricky part is that I cannot close too many on one day, because if Firefox crashes then it loads back its old savepoint and has all the tabs opened again