« first day (881 days earlier)      last day (3121 days later) » 
00:00 - 17:0017:00 - 00:00

5:03 PM
while (fast = fast.next) {
that's a bug in any language other than VBA right?
I mean, JavaScript uses "=" for assignment
 
@Mat'sMug You mean, except JavaScript?
 
@Mat'sMug nope, many languages can use that.
 
wait, JS uses "=" for equality checks?
 
no
it's assignment
 
that was the question..
 
Zak
5:04 PM
Am I right in saying that this is off-topic? codereview.stackexchange.com/questions/106358/…
 
.__.
 
but after it is assigned, it can have a "true"-ish value
 
the assignment operator returns a value in some languages, and while/if can act on that value
 
@Mat'sMug Well, in C#, if your fast can be implicitly converted to bool, that would work
 
@Mat'sMug Have you ever seen low level C? I just a little, but while (x = y) is all over the place
 
5:04 PM
(I think it'd need an aditionnal set of parenthesis
 
@TopinFrassi if I see this in C#, I get the writer fired
 
@Caridorc and null is equivalent to false, isn't it?
 
possible answer invalidation by Mast on question by Darren Estcourt: codereview.stackexchange.com/posts/106367/revisions
 
@Zak not that off-topic IMO.
 
@Zak It's asking for code explanation and I doubt he wrote it himself.
 
5:05 PM
@DanLyons equivalent to 0 that is the only integer that is not truthy, only C99 introduced bool
 
@Mat'sMug I'd try to get it banned from the software development world. ahah
 
Zak
@Mast As I understand it, he wrote an implementation of a common algorithm, but wants to know why the algorithm is structured the way it is.
 
hammered
 
It's been ages since I've touched C :)
 
I agree that it's off-topic.
 
5:06 PM
@Zak looking further, it's not that on-topic either... I won't hammer it but apparently @Mat'sMug just did :)
 
What about this question:
0
Q: Initializing a namespace tree

ShanimalI have a global namespace where developers attach object singletons, class definitions, constants, etc. Each JS file has its own crafty flavor of namespace tree initialization. Maybe a module pattern here: window.namespace = window.namespace || {}; window.namespace.utils || (window.namespace.u...

 
Thanks for tuning in all.
 
    class Program
    {
        class A
        {
            public A next { get; set; }

            public static implicit operator bool (A a)
            {
                return true;
            }
        }

        static void Main(string[] args)
        {
            A a = new A();
            while ((a = a.next))
            {

            }
        }
    }
@Mat'sMug :p
 
@200_success Looks very examplish to me.
 
@200_success hypothetical?
 
5:08 PM
That
 
@TopinFrassi that code could only be used for trolling your team
 
@DanLyons Don't
 
Migrate to Programmers?
 
@200_success if they'll take it, yeah
 
@200_success I don't think they'll take it
 
5:11 PM
Hello
 
@200_success only high quality question should be migrated, no one likes receiving low-quality posts by migration
@EthanBierlein Hi
 
@Zak a more diplomatic way of telling the OP we're not here to explain what their code does, is to tell them that on this site it's the OP's job to tell us what their code is doing ;-)
5
 
FYI, I'm doing an account merge today of a really old account of mine, so my profile might look strange for a couple of hours with totally different stuff.
My profile name might be "DatEpicCoderGuyWhoPrograms" for a little while, and my profile picture will be a picture of the doge meme.
 
@EthanBierlein you're doing, or asked Community Team to do it?
 
I'm doing.
I'm not being asked to do it.
Why?
 
5:19 PM
because they merge accounts all the time - the right way ;-)
 
I'm using the "contact" form to merge.
 
must be it
 
Anyways, is over.
 
@DanLyons Yup :p
 
This question is not example code. Really.
 
5:24 PM
that's almost as bad as the code I saw long ago where you could make a constructor in C# return null
 
0
Q: node.js architecture suggestions

thawtsI have a small node.js app (MY FIRST) I have models using mongoose, controllers for each and a seperate route, I feel like this is pretty good seperation but something about the number of route files i would have to create seems not route, basically every section of the restful api would have a ...

0
Q: Is there a cleaner way to include the necessary polyfills for every combination of browser support?

Nathan JonesMy project uses a Promise polyfill and the fetch polyfill, that I am only including if the browser does not yet support it // Browser doesn't have Promise if (!window.Promise) { require(['es6-promise'], function(promise) { promise.polyfill(); // Browser doesn't have Promise or fetch ...

0
Q: Optimized code for Warshall's algorithm for transitive closure

Poshan Bastolawell i was going through this code for implementing warshall's algorithm. i think time complexity for this simple problem is huge, there is too much (3) loops running there. time complexity for this code should be O(n^3). so, my question is that is there a way to optimize this code so that the ...

 
Constructors shouldn't be able to return values. Unless it's the type itself that the constructor is for.
Captain, captain, slow down my friend feed.
bbl
 
@EthanBierlein it's nothing so bizarre as taking the constructor for type T and returning something completely different, but you can rig it so new T() returns null instead of a new instance of T
395
A: What's the strangest corner case you've seen in C# or .NET?

Marc GravellI think I showed you this one before, but I like the fun here - this took some debugging to track down! (the original code was obviously more complex and subtle...) static void Foo<T>() where T : new() { T t = new T(); Console.WriteLine(t.ToString()); // works fine ...

 
possible answer invalidation by Barry on question by Poshan Bastola: codereview.stackexchange.com/posts/106374/revisions
Voted to close this question as off-topic as "Why isn't this code working?" must require full details of the error. Also, this question belong to codereview.stackexchange.comMr. Robot 55 secs ago
@Mr.Robot Code Review is only for working code. — RealSkeptic 38 secs ago
 
5:39 PM
Please rollback ccode edit at
2
Q: Optimized code for Warshall's algorithm for transitive closure

Poshan BastolaI was going through this code for implementing Warshall's algorithm. I think the time complexity for this simple problem is huge, there are too many loops running here. The time complexity for this code should be \$O(n^3)\$. Is there a way to optimize this code so that the time complexity can ...

 
@Caridorc done... you could have done it ;-)
 
@Mat'sMug hups, I thought rollbacking was mod only
 
@Duga someone help that guy get a badge: stackoverflow.com/a/32414480/1310566
 
nope, you have full edit privs :)
@SimonForsberg ho ho ho!
 
Good tip, Mat's I'll keep it in mind
 
5:46 PM
@SimonForsberg by upvoting?
 
8 mins ago, by Duga
@Mr.Robot Code Review is only for working code. — RealSkeptic 38 secs ago
deserves a badge!
the answer Simon linked to had 24 upvotes
> back to work
 
@Mat'sMug 23 before I was there.
 
now 27 :p
 
I'm voting to close this question as off-topic because review of working code belongs on codereview.stackexchange.comawksp 27 secs ago
 
1
Q: Class simulating a circuit pin (follow-up)

Gentian KasaIn a previous post I asked for a review on some code I wrote for an open-source project of mine. After the review I made some changes and I wanted to ask you for another round. This time I'm not putting all the comments in the code because I'm still working on them. Other than that, I'd ask you...

0
Q: Can I optimize this string formatting of a CAN message?

McAdam331I am writing a CAN bus logger application and need to format messages as quick as possible in order to prevent buffer overflows on our device. In some cases I am quick enough, but under heavy loads it is still pretty slow. I believe the bulk of the problem happens in my formatting block (I am usi...

0
Q: NQueens with Stacks

Alex SmadjaI'm working on the NQueens problem for my CS class but I'm having problems with stack overflow errors when my n is anything other than five. The main method and print solution method were written by my teacher so I'm not supposed to change those. Also, I'm supposed to complete this assignment usi...

0
Q: thread with mutex

cslrnrI have came across the following question in stackoverflow , Q : You are given a paragraph , which contain n number of words, you are given m threads. What you need to do is , each thread should print one word and give the control to next thread, this way each thread will keep on printing one w...

0
Q: Multi Dimensional Ascending and Descending Sort Array Function

Sorin GFSI'm back with improved version of previous Deca dimensional array sort function. This one is not just 10 dimension limited, it could be extended to unlimited number of dimensions by simply adding rows using same logic under each Select case iteration. Well, a limit still exists, it's the memory l...

 
5:54 PM
http://www.commitstrip.com/en/2015/10/02/can-you-you-sit-in-therell-be-technical-questions/
CommitStrip - Blog relating the daily life of web agencies developers
Can you you sit in? There’ll be technical questions
CommitStrip
1443808114
8
 
0
Q: C++ Text Based RPG

Adyn_GIt is currently unfinished, only case 1 of the switch(hunt) is available for choosing. Please give detailed feedback and/or quality explanations on improvements or fixes, I'm brand new to C++ and don't know a lot. #include <iostream> #include <string> #include <time.h> #include <stdio.h> #incl...

 
6:11 PM
0
Q: Are optimization questions better for SO or CodeReview?

McAdam331I asked a question on CodeReview today about improving the preformance of my application. I thought it was best suited their because their help center says: If you are looking for feedback on a specific working piece of code from your project in the following areas… Best practices a...

 
0
Q: Euler's conjecture in Java

phillipsKI know there is a solution when n = 5 - Clearly I am incremnting my variables solely by 1 each time through. How could I modify this code to disprove Euler's conjecture with int a = 72 int b = 84 int c = 110 int d = 113 static void eulerWhile(){ int a = 2; int b = 2; int c = 2; ...

0
Q: Class simulating a connection among two pins

Gentian KasaFollowing this post and the one before that, here I am asking for a review on another piece of code: the connection among two pins. As usual, be merciless in your review. Here it goes: public class PinConnection : IObserver<Pin> { #region variables private Pin _from; private Pin _to;...

 
"I know that my white space looks terrible and indenting is a good thing, but for ease of formatting it looks a little uglier than I would like." - I don't understand. Anyway, yeah, codereview.stackexchange.com is the way to go for this question. — Christian Hackl just now
Thanks all for the info. Didn't know about codereview. I am new here. Anyway I don't know how to do exception handling yet, but I am willing to learn and as far as integer quotients are concerned I am aware they aren't handled well this is why I added a modulo calculation for the remainder. If you have more constructive feedback I would love to know. — brndng 12 secs ago
 
@GrimaWormtongue He posted it here and it looks on-topic here.
 
0
Q: Why does my code keep asking for input?

BunThe logic in this code looks find to me, I'm stuck why this code keep asking for input? #include <stdio.h> int clean_stdin() { while (getchar()!='\n'); return 1; } int count_collatz_steps (int number) { int step = 0; while (number != 1) { if (number % 2 == 0) { ...

 
@CaptainObvious Because you told it to do that
2
 
6:31 PM
lol
 
1
Q: What is a more efficient, elegant, and better looking way to code my cpp console program

brndngI have been learning C++ programming. What you see here is all that I know how to do at this point. I look forward to learning more and I know there are better ways to accomplish a task such as calculating, or a less verbose method for displaying information. I want to hear from more experienced...

 
Zak
Right, I've only been in work for 11 hours, TTGH :)
 
-1
Q: NQueens with Stacks, finding more than one solution

Alex SmadjaThis is my code to solve the NQueens problem but I am supposed to find all possible solutions for any n up to 10. How would I go about having my problem store correct solutions and know when it has found all possible solutions? Also, my code thinks it finds a solution when n is 2, 3 and 4 which s...

 
ReMonking
 
7:11 PM
This actually belongs to codereview — renatoargh 13 secs ago
 
0
Q: Project Euler # 22: Names scores

mburke05Problem 22, here, asks the following: Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabet...

 
Zak
7:48 PM
@Mat'sMug Duly noted.
 
I'm voting to close this question as off-topic because SO is no code review site. — Olaf 50 secs ago
Hi, you can get the help you're looking for over on Code ReviewZak 8 secs ago
 
8:12 PM
0
Q: How would I change this line?

Akram OuldbabaaliSo I was going through my different types of items and listing them as heavy,medium and light. But when I reached rings that no longer made sense. But I dont know how to change the code to have rings not categorized into different groups. Im fairly sure it has to do with the public enum part but ...

 
Can someone please edit this? It says that " The challenge runs throughout September " but it should say " The challenge runs throughout October "
 
Zak
Hi @Justin, I don't think I've seen you in here before
 
You probably haven't @Zak
 
Zak
-1
Q: How would I change this line?

Akram OuldbabaaliSo I was going through my different types of items and listing them as heavy,medium and light. But when I reached rings that no longer made sense. But I dont know how to change the code to have rings not categorized into different groups. Im fairly sure it has to do with the public enum part but ...

Is this off-topic?
It's firmly in the area of "I really can't tell"
 
8:52 PM
@Gebb It's not necessary (or desirable) to "cross post" the same question to multiple SE sites. This has received enough attention here that I'd say it's a moot point, but consider Code Review next time for complete, functioning code. — Air 39 secs ago
 
Zak
Right, 'nite people
 
Graetings
 
0
Q: Did I calculate my rounds correctly in this encryption algorithm?

erotavlasI'm trying to implement this format preserving encryption algorithm in C#. But I'm getting negative integers for my left and right sides after doing the 8 rounds. I'm not sure if this is correct or not, or if I've implemented it correctly. Am I working with the correct data types? (i.e. integ...

 
0
A: Use filter_var_array on whole array, or inside iteration

palacsintIs this really the bottleneck in you application? If not choose the readable one. See Effective Java, 2nd Edition, Item 55: Optimize judiciously I know that this is a Java book but this chapter (and many others) is useful for every developer. Some other notes: I'd call the filtered variable so...

 
@CaptainObvious I'm a little confused on this post: the OP says that their code works.
I don't see why there are close votes saying that the code is broken.
 
9:04 PM
The last paragraph is suitable for Code Review, but not SO--and it's a completely separate issue anyway. — Dave Newton 16 secs ago
 
The code works to the best of their knowledge.
 
Zak
@SirPython "I'm not sure if this is correct or not, or if I've implemented it correctly."
It may work, it may not work, but what they're asking for is off-topic.
 
You're looking for codereview. — John Bollinger 18 secs ago
@Eser Sorry I moved the question to Code Review. They didn't like it, and told me to move it back here. :( — erotavlas 31 secs ago
@erotavlas I don't mean the question on CodeReview, but this one. — Artjom B. 17 secs ago
 
Zak
9:20 PM
Oh my god, It's back!
2
Q: Multi-dimensional ascending and descending sort array function

Sorin GFSI'm back with improved version of previous Deca dimensional array sort function. This one is not just 10 dimension limited. It could be extended to unlimited number of dimensions by simply adding rows using same logic under each Select case iteration. A limit still exists, which is it's the memor...

(On the plus side, it doesn't contain 200-line nested elseif statements anymore, so I guess that's something)
 
0
Q: Merging tags in two XML files with same attributes and different content

A.P.Background: From time to time I translate some Android apps: the developer sends me an XML file, e.g. <string name="foo">Foo</string> <string name="baz">Baz</string> and I send him back an XML file where the content of each element has been translated, e.g. <string name="foo">Translated foo</...

 
9:39 PM
This would be a great question for code review. codereview.stackexchange.comidjaw just now
 
0
Q: How create console application menu?

gstackoverflowSometimes I need to write simplest java console applications and menu look something like this: do { System.out.println("please select menu item"); System.out.println("1-create, remove, renme"); int select; Scanner scanner = new Scanner(Syst...

0
Q: working on printing BST Tree level by level

JohnPlease review and tell me what improvements can be possible : package trees; import java.util.LinkedList; import java.util.Queue; public class PrintBSTLevelByLevel { public static class Node { int data; Node left; Node right; Node(int val){ ...

0
Q: Using Python to rename multiple csv files in Windows

ernsI need to rename a large list of csv files that are generated from 3 different servers. The files are produced with a date stamp as the extension, which I need to move in each file name to retain the date stamp. The file name format before editing is as: billing.pps-svr01.csv.2015-09-01 ...

 
9:57 PM
@Air I meant "... if I posted it there". I did not intend to crosspost. My question was about whether it is as effective to ask on Code Review as is here (in terms of received attention). — Gebb 49 secs ago
 
10:18 PM
I think this question should be at : codereview.stackexchange.comEmpereur Aiman 12 secs ago
I'm voting to close this question as off-topic because this code works as is, this should have been posted on codereview.stackexchange.com — Tiny Giant 11 secs ago
I'm voting to close this question as off-topic because it is about improving working code, not solving a problem. It is more suitable for Code Review. — Ken White 30 secs ago
@Gebb That's difficult to answer. Sometimes questions get more or less attention and there's no clear reason why. Code Review is quite an active site, though; its most popular new questions in the past month have received nearly as many answers and about half as many views, compared with the same sample from SO. — Air 31 secs ago
 
0
Q: What can I do to better my VB.NET code?

Brad RobertsI've recently started a Computer Science degree at college, and I'd like to know what improvements I could make to my following code. Public Class Form1 'setup array Dim firstname(100) As String Dim age(100) As Integer Dim oldName As String Dim oldAge As Integer Private Sub btnRead_Click(sender...

 
10:48 PM
0
Q: Calculating change in Ada

kyle kI have written a change calculator using Ada. when the user inputs an amount of money it returns a list of the coins and bills needed to create that total. It starts off by trying to use the largest money types then tries smaller ones. I am still learning how to use Ada and would like to know ho...

 
@PeterDuniho you guys are impossible, where should I post this? And don't say Code Review because they rejected it for some strange reason. How do I get help with this? — erotavlas 12 secs ago
I am sorry you are getting what seems like the run-around. I can't speak for Code Review, other than to say that as I understand it, they want known-good code. The way to get help is to formulate your question in a way that is on-topic on the site where you are posting. Each site has its own guidelines, and there's no guarantee that an arbitrarily-formed question will be on-topic on any site. It's up to you to present your question in a clear, useful, answerable, on-topic way. You should have a better idea of how to do that after reading the link I provided above. — Peter Duniho 9 secs ago
@PeterDuniho I just want someone to review my completed work so I know I did the steps properly. That's what I thought Code Review was for. — erotavlas 44 secs ago
 
@CaptainObvious What can I do to better my title?
 
ReMoinking
 
11:03 PM
"This is my lecturers final code" please note that Code Review is for code that you have written yourself, rather than copied from a teacher's directions. — Phrancis 1 min ago
> DISCLAIMER: This is my lecturers final code, we were just to copy it essentially. I apologise for the bad variable naming etc. I also have experience with PHP, so I'm not in the dark about what is what.
 
@erotavlas The problem is that if you don't know if your code is correct then CodeReview is not for you. You can only know if your code is correct if you find test vectors (which don't seem to be published in the original paper or the NIST draft). Regarding Stack Overflow, checking your solution would require someone to understand the algorithm which is still in a research realm and provide you feedback on your code choices. That's just too big of a task or too broad as Peter put it. — Artjom B. 53 secs ago
 
0
Q: Parsing backwards Polish math

Joe WallisI've wanted to make a calculator for a long time now. So today, I wrote one of my first parsers, where the input is in reverse polish notation, \$1 \ 1 +\$ becomes \$2\$. It supports to following operators; +, -, *, /, // floor division, ^ or ** exponent, and % or mod modulo. While it's the bes...

 
@EthanBierlein Hello!
 
How goes it?
 
Cold and rainy, but at least it's the weekend
 
11:08 PM
Bah. It's nice and sunny here in Minneapolis.
 
Ah nice
 
Mmm. Sun's setting through the trees and it looks really nice.
Let me see if I can get a picture.
 
11:26 PM
That is very nice indeed!
 
0
Q: SQLite3 class in PHP not working

Jonathan BeaumontI'm trying to connect to an SQLite3 database through PHP however all the code that I have tried has failed and now I'm starting to think that I may have set up my system incorrectly. I am running Debian Wheezy on a RPI2 and have run the following commands while setting up sudo apt-get update su...

0
Q: Basic distance conversion program

user85942This is a simple program to convert miles, yards, feet, and inches appropriately. Everything intended for works but I feel my program is very redundant. How can I make it more efficient and less lines of code? I tried % but failed to find way to increment next values. #include <iostream> using n...

 
11:58 PM
The twelfth root of two or is an algebraic irrational number. It is most important in music theory, where it represents the frequency ratio of a semitone in twelve-tone equal temperament. == Numerical valueEdit == Its value is approximately 1.0594630943592952645, which is slightly more than 18⁄17 ≈ 1.0588 (107⁄101 is a better fraction; 11011⁄10393 is better still). As of December 2013, its numerical value in decimal has been computed to at least twenty billion digits. == The equal-tempered chromatic scaleEdit == Since a musical interval is a ratio of frequencies, the equal-tempered chr...
Wonder how you write that in code
 
00:00 - 17:0017:00 - 00:00

« first day (881 days earlier)      last day (3121 days later) »