@Mat'sMug I almost post a comment like: WELCOME TO CODE REVIEW PLEASE DON'T POST IN ALL CAPS But decided it would just be "raging" more than helping...
I'm just curious is there an easier way to handle console colors rather than just doing something
like the code below. The problem is the code bloat I'm experiencing when writing a theming system for my console application. It contains almost 200 lines of code, just to handle the chat theme syst...
@skiwi In that sense, no C# doesn't support the diamond operator (inference) because C# generates new code to handle the generic list when it is compiled. In Java (about which my understanding is far from masterful), the compiler erases the generic type and wraps those calls with a cast so that it is compatible with older versions of the JVM that did not know about Generics (An ArrayList<String> becomes ArrayList with cast operators from object -> String).
In .NET you essentially get a new class (ArrayStringList) which is not backwards compatible with .NET 1.
I'm developing a room booking system using PHP for a school project.
I'm trying to create a variable name by concatenating values from two arrays together.
here are the two arrays:
$day = array('Mon', 'Tue', 'Wed', 'Thu', 'Fri');
$B = array('P1B', 'P2B', 'P3B', 'P4B', 'P5B', 'P6B');
and then...
@skiwi I see. No, the compiler will not infer from the type in the loop that the generic you are looking for is of type InteractiveCloth. You could write something like this however:
hEY @Phrancis do you know off the top of your head..... will LIKE '%SOMETHING' return records where the first word is SOMETHING along with records where it's the last word?
I wrote a program that copies a directory, from a source to a destination.
For doing this, I used this essential functions:
open(), write(), mkdir(), readdir().
This is the source code (ignore the main() function, this is not the final form):
#include <dirent.h>
#include <errno.h>
#include <...
Say I have a multidimensional array with associative values... I want to add some information to multiple arrays at the same time.
What kind of unexpected behavior might I expect from this kind of code? Al should have 3 entries in it, while Bob and Chris will each have two... right? It seems to w...
I'm looking for a design review of this simple REST API:
https://github.com/singularsyntax/CPAN-Net-BGP-REST#rest-api
General feedback is appreciated, as well as on these specifics:
Use of this format for a multi-component "primary key":
thisId=<IP Address>;thisAs=<integer AS number>;peerId=<...
I am just trying to apply 'mean filter' with using C#. The code below gets window size (3,5,7,9,...) from 'textBoxWinSize' and applys the mean filter. The code works right
I am new and I want to your comments and suggestions about my code so I can improve myself.
Can I make it more faster? How?...
I'm trying to calculate a problem which requires sum of digits in a^b, where a<=9 & b<=4000.
I have seen various other posts similar to this, but I haven't acquired best way.
I have created this:
b=b-1 ;
digits[0]=a ;
long long int len=1,carry=0,i ;
while(b--) {
carry=0 ;...
Welcome to Code Review! Please include the code you want peer reviewed, inside your question (don't just link to it). Per our help center, questions not including code can (and will) be closed as off-topic. Cheers! — Mat's Mug9 secs ago
Say I have a multidimensional array with associative values... I want to add some information to multiple arrays at the same time.
What kind of unexpected behavior might I expect from this kind of code? Al should have 3 entries in it, while Bob and Chris will each have two... right? It seems to w...
With a whole lot more of information, it could be a good question for Programmers, but right now I don't think there's much elsewhere you can go. At least not on Stack Exchange. — Simon André Forsberg8 secs ago
@Mat'sMug it means that just like us, they want sufficient context.
I'm tired today anyway. At least I remembered to remove the post notice as well.
Here's my second and last pimping for the day, 3 from Necromancer. Also, be sure to check out One Vote Short whenever you have some extra votes before the end of the day.
If the entire site is designed around "doing reviews" and that is the expected quality and context, it can do it (and it has... congrats on the graduation over there). But we'd really rather not get answers of "I like XYZ and think ABC would be frustrating to use"
@SharePointer, Let me know what you think of my revised answer, maybe post a follow up question let's see if we can counter those Down Votes. We all love reviewing code and would love to help you out if you give us a chance. — MalachiJul 16 at 15:36
And so, an arbitrary "design review" post that doesn't focus on a specific problem area... those get messy and don't encourage answers of the quality that we'd like to see on all the other posts.
Heres what my test.txt looks like:
18 19 20
21 22 23
22 23 24
23 24 25
24 25 26
25 26 27
28 29 30
29 30 31
I want to read in the integers in test.txt as strings then create a vector of 3 ints. If that makes sense, so the output is a vector looking like:
18 19 20, 21 22 23, 22 23 24, 23 24 25,...
I think if someone else is going to take a look at it, that will probably be me... but it will take some time... gotta make my Brainfuck Sudoku Solver first! — Simon André Forsberg14 mins ago
Welcome to Code Review! Unfortunately, it appears that your code produces an error and therefore it is not ready for review. Once you get it working as intended, we will be happy to review it and help you make it even better! — Phrancis4 mins ago
I get happy every time I read such a comment ^^
Welcoming, yet informative about why it's not on-topic, and includes an invite to come back.
Say I have a multidimensional array with associative values... I want to add some information to multiple arrays at the same time.
What kind of unexpected behavior might I expect from this kind of code? Al should have 3 entries in it, while Bob and Chris will each have two... right? It seems to w...
All I could write in a review would be: "Why on earth are you doing it this way?" which is more of a question than an answer, indicating that the question lacks context.
Without the context, I can't suggest a better way of doing it.