This is a game that is supposed to be based on strategy and guessing.
The letters need to match in a ABCD fashion on each button on buttons[0] - buttons[3] ... and buttons[n] - buttons[n] in each square, kind of like a matrix, although there is no matrix math involved.
This is how the game star...
In simulating physical equations (such as fluid dynamics) it is common to write an application that deals with 1, 2, and 3 dimensions. A common C/Fortran approach is to make all vectors (for example) have a size of 3, and then to carry around a global constant to say how many elements are valid. ...
there's a large bit of truth: when I tackle a complex problem, it happened more than once that I hadn't "split the problem" enough, and wrote massive ugly half-assed unmaintainable code filled with bugs. There's a reason @RubberDuck never dared looking at RD's parser/resolver code, and there's a reason @Hosch250 had to refactor my "Rename Identifier" implementation ;-)
C#
StyleCop (free)
It can be run from inside of Visual Studio or integrated into an MSBuild project.
ReSharper (commercial)
A paid Visual Studio extension (possibility for open-source "community" license though) with a free 30-day trial.
FxCop (free)
Can be run standalone, but later versions...
you know @RubberDuck I've just realised what you remind me of. My cousin had a personal Superman-style Rubber Duck which he used as a monopoly piece called SuperDucky. It looked just like your duck, but with a cape :)
I wrote my own version of a search binary tree in Java. Could someone kindly review it?
public class Tree {
private Node root;
public Node find(int id) {
Node current = root;
while(current != null) {
if (current.getId() == id)
// Node fou...
rolfl reviewed my code, told me it was terrible, I went back and made a version and I want a double check that the newest version trying to incorporate both answers is not terrible
Managing updates from other threads into Swing is a hard problem. In MVC design, if you don't want to have the Presenter be responsible for Thread safety, you can end up with deadlock issues, and also too many little tasks getting started; not great.
I have written a class designed to manage th...
I think that such question should clearly state that it is a follow-up question to a previously asked question.
A good follow-up question should include, in my opinion:
Which question it is a follow-up to
What changes has been made in the code since last question
Why a new review is being aske...
@IsmaelMiguel The closing statement was already made many minutes ago, you are just trying to continue (as usual) a pointless discussion. I suggest you drop it.
@Vogel612 This is what irritates me of this chat room. No one here is actually on the same page for anything, so we just string arm until we get what we want.
Yeah, that feature is sure helpful, but I was wondering about the other ones. They seem to put lambdas everywhere now, which I like. But I'm not sure everyone's ready for this!
@Deke Maybe you can ask about specific issues you have with your solution. If we don't know what you want to fix about it, this is just a code review. — 31eee38438 secs ago
This is an updated version of: Class to manage updates coming in from another thread
Changes:
I removed the race condition, I believe
Removed the need for checking for InterruptedException, and therefore a LOG in this class
Added a lock to ensure that all updates are properly processed
Removed...
f= open('C:/python27/Company_Data.csv', 'r+')
import sys
nonecount={}
try:
for line in f.readlines():
for none in f.read().split():
if none not in nonecount:
nonecount[none] = 1
else:
nonecount[none] += 1
except:
e=sys.info()...
http://www.commitstrip.com/en/2015/09/04/when-your-colleague-uses-some-random-code-he-found-online/ CommitStrip - Blog relating the daily life of web agencies developers When your colleague uses some random code he found online CommitStrip 1441387633
I know I'm sticked to the C# features, but I'm looking for what Microsoft might implement in C# 7 and there's quite a lot of very nice things. I just looked at no#1 and I'm already waiting for it : github.com/dotnet/roslyn/issues/2136
So, you have found your way to the CodeReview.SE main chat room, The 2nd Monitor, perhaps for one of these reasons:
You were invited or "pinged" by a site moderator or other user to discuss a post on the main CodeReview.SE site;
You visited CodeReview.SE for the 1st or Nth time, and noticed the...
What is a Zombie? Why are Code Reviewers so violent and talking about killing Zombies all the time? And what ammo are they talking about? What is a TS? What does RSA mean?
And what other Code Review-specific memes are there?
(As the number of memes grows and grows, and Malachi's wish to vote fo...
I'm wondering if there is a better (cleaner?) method than my current implementation. I'm currently encoding a PHP SimpleXMLObject (USPS Tracking API) to JSON and looping through said JSON object via Javascript to operate the front-end.
Examples from my current implementation below:
Function to ...
public (int sum, int count) Tally(IEnumerable<int> values)
{
var s = 0; var c = 0;
foreach (var value in values) { s += value; c++; }
return (s, c); // target typed to (int sum, int count)
}
a better example would be how F# handles TryGetValue on dictionary: you can have it return a tuple of (bool found, T value) instead of dealing with out parameters