« first day (701 days earlier)      last day (3302 days later) » 

12:00 AM
There are 1285 unanswered questions
 
It's fun to see how much @Duga's reputation has increased over time
 
@SimonAndréForsberg I have. I am still awaiting upvotes.
 
@Duga HOLY CRAP! We got a problem!
@SirPython Pimp, damnit! How do you expect us to vote if you don't pimp?
 
Indeed
 
Now that everyone is reloaded...
2
A: Find Triangle Triplets from a list of given numbers

nhgrifFirst thing to comment on after copying and pasting into my IDE, the following line gives a warning: int size = vec_input.size(); Implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' Apparently, the size() method of Vector returns an unsigned long, and...

 
12:01 AM
@SimonAndréForsberg I don't feel comfortable pimping, especially on posts that I am not proud of ;)
 
@SirPython I can also recommend reading the following meta questions:
10
Q: Chat bot feature requests

rob0tNotice: project was disbanded I am the half-robot side of syb0rg that will be posting the recent answers of Code Review to the CR Answers chatroom. This is simply a place where you can post your feature requests. Implementation time will depend on many variables, such as the complexity of the ...

8
Q: Chat Bot for 2nd Monitor chat room

Lyle's MugFollowing these posts How far off-Topic can we get in the Code Review General Chat Room? What are the Stack Exchange limits on chatbots? Chat bot feature requests I found that there was a Bot running in Root Access, which is Superuser's main chat room. I gathered the code for this chat bot (...

@SirPython Then you have two problems.
 
How does everyone feel about closing an "iterative-review" question as a duplicate of the previous question if: a) it's been less than 6 hours between questions being asked, b) the original question doesn't have an answer marked as accepted, c) some, but not all of the suggestions in the only answer to the original question were implemented, and the new questions offers no explanation for not implementing some of the suggested changes (neither on the answer or the new question)?
 
@nhgrif Sounds like a meta post for guidelines to close as a CR dupe :)
 
Just trying to see where I stand:
original:
3
Q: Find Triangle Triplets from a list of given numbers

Steephen If a triplet of segments A, B and C are triangle triplets if and only if A + B > C A + C > B B + C > A Is there a better implementation for this problem? #include<vector> #include<iostream> void findTriangleTriplets( std::vector<int>& vec_input, std::vector<std::vector

iterative:
2
Q: Find non duplicateTriangle Triplets from a list of given numbers

SteephenI implemented an O(N^2) algorithmic solution but not sure it is better than my previous implementation Find Triangle Triplets from a list of given numbers in case of performance. I adapted almost all suggestions from answer except a structure to keep the triangle triplets. And @nhgrif pointed o...

 
@nhgrif a) No. b) Accepted answer don't always happen. I understand the thought behind that suggestion, but unfortunately I'll have to disagree. c) Maybe.
 
12:07 AM
@SimonAndréForsberg Let's talk about point B.
Part of Code Review is that the code you post be real code from a real project. The spirit of the rule is that you need to actually care about receiving answers on your question.
If you've posted an updated version of the code, aren't you done with that previous version of the code? You're encouraging people to comment on code that may not even still be in your source code any more.
(The lack of an accepted answer suggests that you're still looking for comments on the code. The existence of a question from the newer and improved version of that same code suggests that you're not looking for comments on that version of the code any more.)
When you look for things that need improving with a git repo, do you look at the Head revision, or some random non-head revision?
 
I think this discussion belongs meta..
 
@nhgrif I agree with those parts, it's just that it's pretty much impossible to enforce users to click that accept button. I think closing a question as a duplicate simply because the user didn't, or forgot to, click the magic accept button is a bad idea.
@Mat'sMug For once it isn't hypothetical! :)
 
You can re-open a question that's been closed as a duplicate.
But I'm not concerned about when the original question is weeks old and unaccepted.
I'm primarily concerned about this case where a new question is posted very quickly after the original question receives just one answer.
and more importantly, the case where some of the suggested changes aren't addressed (either by explaining why not implementing them or just implementing them).
... I'm posting a meta...
0
Q: Do there exist conditions for closing iterative review questions as duplicates?

nhgrifAs far as I know, we simply don't close questions as duplicates on Code Review. I think it's even been mentioned that a Code Review duplicate has to be basically an exact copy & paste of the previous question. To some degree, this makes sense. Code Review questions and answers tend to be highl...

 
I'll take a look on that meta tomorrow
Before I go to sleep, I find this suggestion useful:
2
A: What privilege should 30k users get?

MichaelTComment on (recently) (self) deleted posts I've occasionally had the situation where I'm trying to explain something to a new user about the site - new post review or just habitual refresh of the front page newest, or watching the chat room feed. My comment is about how the question doesn't fit...

 
If you use the @ to address a user, but the user has never been to the chat room, they're still notified, right?
 
12:19 AM
@nhgrif No.
Only mods have super pings.
 
in import BlogKit, 36 secs ago, by nhgrif
@Hosch250 Are you sure?
 
Yes, I am positive.
I did not get a ping, and we have discussed this before.
 
oh, one more thing! @Mat'sMug, you might want to share a bit of how we managed to boost Code Review 1 and a half year ago:
2
Q: What can be done to promote beta sites?

HariprasadOne of the problems that affect the users of beta sites is that they don't get enough views for their questions. So they post off topic questions on reputed SE sites. Usually, when I post a question in SO, I get at least 10-15 views within the first 5 minutes (The figures are not exact). But, wh...

(active chat room, the mission, etc...)
TTGTB
 
@SimonAndréForsberg Good night!
 
12:28 AM
0
Q: Do there exist conditions for closing iterative review questions as duplicates?

nhgrifAs far as I know, we simply don't close questions as duplicates on Code Review. I think it's even been mentioned that a Code Review duplicate has to be basically an exact copy & paste of the previous question. To some degree, this makes sense. Code Review questions and answers tend to be highl...

 
@SimonAndréForsberg Sounds like a duplicate of another MSE post I answered
But I'm on my phone for 2 days now, so...
 
12:46 AM
0
Q: Linked list library in c

cristid9I just finished my linked list library in C and I am trying to find out what should be improved. The functions provided by the library are members of the main data structure, this is a very important thing to mention. The entire project can be found here. Here is the source: #include <stdio.h> ...

 
12:59 AM
@nhgrif I acknowledge your concern and added reasons to my second questions for dropping the suggestion to use structure in place of vector
I am going to sleep. Good night to all
 
@Steephen Night.
 
Good night @Hosch250
 
0
Q: Sanitizing Function, is it secure?

James NixonThis is a sanitizing function , I wanted to know if this function is secure enough? public function clean( $input, $fordb = true ) { global $db; //is it an array? if( is_array( $input ) ) { //yes it is! let's clean each item individually. ...

 
1:20 AM
Welcome to StackoverFlow, please include any code you want to look at in the question. Also please post and code review questions to the code review web site. — Peter Lawrey 49 secs ago
 
1:32 AM
Peter refers to Code Review; make sure you read the tour there first. — Nathan Tuggy 17 secs ago
 
 
2 hours later…
3:08 AM
ACTIVITY
Two hours without you guys talking? I didn't think it was possible!
 
Shhh... sleeping
1
A: What privilege should 30k users get?

rolflRealtime and smarter feeds Many processes in Stack Exchange are cached, or have delays, that enable the higher performance of the site. I propose that these caches are selectively removed for 30K users, and that feeds become personalized and more "real time". For example: Review Queue "icon...

^^^ FYI, - anyone who ha been following that thread.
 
3:44 AM
On a different note, I don't care if people get extra privileges or not.
 
-1
Q: Is the a better way of replacing values?

Vicente BermúdezI'm trying to replace numbers with words. I'm trying to make something like this (With multiple other values): if(x.equals("1")) x = "January" I learned about x.replace("1", "January") but I want to know if there's a better way of doing this.

-1
Q: Why does the following C++ template give me compiler error C4430: missing type specifier?

Wandering IdiotI'm practicing templates from a not so well written C++ book and I receive the following compiler errors respectively, "error C4430: missing type specifier - int assumed. Note: C++ does not support default-int" and "error C2143: syntax error : missing ',' before '<'". Both refer me to line 10. -...

 
When you have to cover 10k to get it, I don't know how motivating it will be until you get reasonably close.
 
 
1 hour later…
4:46 AM
0
Q: Distance between angles as points

Andrew HundtThis code calculates the distance between angles, particularly for n-tuples of angles. One example where this situation occurs is as follows: I'm using a 2 arms, one 6 degree of freedom and the other 7 dof with revolute (rotating) joints. The position of the arm can be accurately represented as ...

0
Q: Encoding a string into base64

dylanweberI'm trying to create a simple HTTP client. In order to make one that is standard compliant, I must be able to extract user information from a URI and convert it to base64 and send it via an authentication header to the server. I created this demo program to test my progress on this function I've ...

 
 
2 hours later…
6:50 AM
0
Q: Jekyll plugin code improvement and testing suggestions

CynI recently created a gem for jekyll plugin to create some csv files. I put a little more effort into it and tried to make it something that other's might be able to use. I'm a little lost on how to test a jekyll gem and don't often use jekyll. I want to make the code less fragile and could use so...

 
3
Q: A PHP User System

Hassan AlthafThis PHP User System was built with MySQLi and I also used Composer. I'm planning to improve this, and add more stuff and release it as a sort of a module for Composer. User.php (Controller File in the src/Controller) folder. <?php namespace Application\Controllers; use Http\Request; use Http\...

 
 
1 hour later…
8:14 AM
0
Q: Dialog box asking for number

siemaWhat is the best way to create a dialog box asking for number? And avoid situations when an user can enter a letter or leave the dialog box empty? I wrote something like this but I think that it can be improved: private int giveInt(String message) { int result =0; boolean successful = fa...

 
8:26 AM
The Bitmap class is the singular .NET class that reminds you without fail that calling Dispose() is important. Miss just one and the odds your program bombs with OOM significantly increase. The class is entirely too small (24 bytes) to timely trigger a GC by itself. A memory profiler tends to be unhelpful, it only shows you that you used bitmaps (you already know it does) and a huge chunk of unmanaged memory without details. A thorough code review is required to find the bug. Can't get help with that here. — Hans Passant 47 secs ago
 
9:24 AM
+1 for code review. But please can you explain me this line n.ToString().ToCharArray().Sum(c => c - '0') == x ? — Chaker Mallek 1 min ago
 
9:55 AM
0
Q: Action Event and checking buttons

siemaI am creating a simple program with multiple buttons. Is this way of checking which button was pressed is ok? Is it better to use switch..case.. statement? public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if(source == buttons[0]) ...

 
10:12 AM
@ZygD - Here or in the new thread? I'd personally like to see the new thread get migrated to Code Review but that's likely because I'm new there. — Jeeped 16 secs ago
 
0
Q: I need to put these if statements into a module, or a while if i can. Assist in condensing

Ethan Buususing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace Project2 { class Program { static void Main(string[] args) { int[] ageForPeople = new int[10000]; int[] D...

 
10:27 AM
@200_success So so so awesome. Congrats on 60k!
59,999 is just a nice number. :P
 
10:43 AM
Thank you!
 
11:12 AM
Congratulations @200_success
 
0
Q: Cleaning up the Original Code in the Question

JeepedMost of the reviewers/answerers here should be familiar enough with Ctrl+K and Home,Shift+▼,Del keystroke combinations that an edit to provide some readability without losing the original content of the code submitted should supercede the site policy of not modifying the OP's original code. Cle...

 
0
Q: MySQL class that handles sanitization

Chosen WannI've written a MySQL class that handles sanitization of different data types. The reason I used this (and not prepared statements) is because this can be more dynamic. Prepared statmenets only supports four data-types: Integer Double String Blob This limits functionality and it doesn't all...

 
11:35 AM
Monking
 
11:49 AM
6
Q: Finding Pattern score

Steephen You are given 3 strings: text, pre_text and post_text. Let L be a substring of text. For each substring L of text, we define pattern_score as follows: pre_text_pattern_score = highest n, such that first n characters of L are equal to the last n characters of pre_text and occur in ...

2
Q: Find non duplicateTriangle Triplets from a list of given numbers

SteephenI implemented an O(N^2) algorithmic solution but not sure it is better than my previous implementation Find Triangle Triplets from a list of given numbers in case of performance. I adapted almost all suggestions from answer except a structure to keep the triangle triplets.The reasons to ignore ...

 
12:08 PM
0
Q: Java program to encrypt files using Shamir Secret Sharing

hoodakaushalShamir's Secret Sharing scheme essentially splits a secret into n parts, at least k of which are needed to recover it. I'm using that to encrypt/decrypt arbitrary files (it's part of a college project). Here's a rough idea of what I'm doing: Take a file, and read N bytes. Treat those bytes as a...

 
12:26 PM
0
Q: To find the largest number of fixed length with an array

Sanchit Handaclass Solution { public static void main(String args[]) { int arrayOfDigits[] = {4,3,2,4,3,9,1} ; boolean newNumber = true ; int requiredNumberLength = 4 ; int maximumNumber = -1 ; int firstDigitOfcurrentNumberNumber = -1 ; int lengthOfcurrentNumberNumber = -1 ; in...

 
12:46 PM
I think that this belongs on codereview.stackexchange.comCool Guy 1 min ago
 
0
Q: Python Socket programming for Web Server

kpksI have created a proxy server that receives requests, searches for the requested file in its cache. If available it returns the cached file. If file is not available then it will ask the actual server, gets it, stores it in the cache and returns the file to the client. Following is the code: fr...

0
Q: How do I make my C code faaster?

Da real NinjaThis is my code for calculating harmonic sum : #include <stdio.h> int main() { unsigned long long n; double m; double sum=0; scanf("%llu", &n); while (n>0) { m=1.0/n; sum+=m; n--; } printf("%lf",sum); return(0); } I have Intel Core2 Duo (...

 
@CaptainObvious How do I make my title beetter?
 
1:22 PM
@SimonAndréForsberg This question has been edited!!!!
Drat... the title is almost the same as what I was about to save.
 
@rolfl geez, I wonder who edited it!
 
Why do you think I am complaining.
 
I'm not :)
 
I mean, seriously, you post the comment here, then wait 25 minutes to fix it? And only do it when I am about done?
 
I just find it surprising that you tell me that the question has been edited when I did the edit
 
1:26 PM
Well, I had that message pop up when I was editing it.... a banner over the top.
It is me complaining to you....
 
@rolfl yeah, I thought someone else would have edited it in those 25 minutes. I just got back home from a long walk 25 mins ago, and then I realized that I might as well edit it myself :)
 
Yeah, talking privs... you see my 30K suggestion on meta.se?
8
A: What privilege should 30k users get?

rolflRealtime and smarter feeds Many processes in Stack Exchange are cached, or have delays, that enable the higher performance of the site. I propose that these caches are selectively removed for 30K users, and that feeds become personalized and more "real time". For example: Review Queue "icon...

 
yup. I've seen it. Haven't entirely decided about it.
I think it might require too much to implement it.
I mean, the idea is good, but is it feasible?
There's a reason why the feeds are cached, I believe.
 
There is, so the masses don't swamp the system.
but, that's why it would be a 30K priv.... you are no longer part of the masses, you are the 0.1%
Also, you follow the changes I put in to MicroBench?
I added Logging in, but just the framework for it, and some localized usage
Many existing locations need to be switched from System.out.println to LOGGER.*
I also made the name part of the uscale call, not just the report.
 
Now I've seen the changes :)
 
1:34 PM
That static block is a bit ugly, but necessary to get it to work. That's not a pretty solution... looking for suggestions.
Adding it to a main method is easier: github.com/rolfl/MicroBench/commit/…
Note that I extracted a bunch of common code to new class UUtils.java
 
@rolfl How about JUnit's @BeforeClass ?
 
That could work.... testing
 
What happens if the line is not there at all?
 
@BeforeClass
public static void setup() {
    UUtils.setStandaloneLogging(Level.FINE);
}
works.
without the line, there is no logging.
default log level is none.
 
1:42 PM
Sorry, scratch that.
I lie.
 
scratched.
 
without the setup, it defaults to the 'current' global log settings, which means.
logs printed to stderr not stdout.
Apr 05, 2015 9:42:22 AM net.tuis.ubench.UScale scaleMapper
INFO: Int Divide: Starting Scalability testing
Apr 05, 2015 9:42:25 AM net.tuis.ubench.UScale scaleMapper
INFO: Int Divide: Completed tests in 2896.793ms
look like:
With my change, the logs are to stdout, and have format:
 
the current global log settings, those can be modified by setting -Djava.util.logging, right?
 
FINE   2015-04-05 09:43:44.837 net.tuis.ubench.UUtils(getLogger): Locating logger for class class net.tuis.ubench.UScale
INFO   2015-04-05 09:43:44.844 net.tuis.ubench.UScale(scaleMapper): Int Divide: Starting Scalability testing
FINE   2015-04-05 09:43:45.034 net.tuis.ubench.UScale(scaleMapper): Warmed up results:
Task Warmup -> warmup: (Unit: NANOSECONDS)
  Count    :    1000000      Average  :    18.0000
  Fastest  :     1.0000      Slowest  : 35919.0000
  95Pctile :     1.0000      99Pctile :   395.0000
@SimonAndréForsberg Correct.
Calling the UUtils.setStandaloneLogging(...) inserts a 'custom' log handler for the package net.tuis.ubench and all sub-names in the hierarchy
 
1:47 PM
0
Q: Cleanup approach to MVC 4 windows group security to enable/disable controls in view?

ChakaThere are 3 window groups to add users and the application uses MVC 4. Here's my approach to add security attributes to my controllers and pass user's role to the view in order to enable/disable controls. Looking for ways to approve the code? Webauthorization.cs (the logic to check user's role &...

 
What it really means, is that, if you want to, you can let UBench integrate with whatever you already have set up, or, if you want, you can let UBench control the logging natively.
Logging is surprisingly hard to use.... and STDErr is often not where you want your logs to go.
this makes it a 1-step to override the behaviour to be what I normally want it to be ;-)
 
yeah, it feels a bit weird to have the logs go to stderr...
 
2:02 PM
@JeroenVannevel I've added your blog's feed to chat.stackexchange.com/rooms/22585/import-blogkit Gonna see how this goes.
 
2:15 PM
He might even pay taxes. No. — Santa Claus 2 days ago
 
0
Q: Can my linux pipeline be improved?

Nick RosencrantzI've compiled a simple linux pipeline and using my C style and modularization that I will use for my own operating system. Do you have something to say about this code (partly take from SO)? #include <sys/types.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> ...

 
@smci Thank you very much, I checked put the CodeReview website and I will keep in mind what you said about variables and capital letters, thanks for improving my Python. If it feels like I'm just simply dumb in it, that's because I just turned 16 and I am. :D — Botond Horváth 1 min ago
 
0
A: Find non duplicateTriangle Triplets from a list of given numbers

nhgrifAt this point, I can only re-recommend my suggestion of the Triplet struct. But let me elaborate more on why this is important, I guess. What happens if we go back to your original printing implementation? How we print isn't really important. Presumably, the point of finding these triplets st...

 
2:31 PM
0
Q: Deleting a node with two children in a binary search tree

user4275686The basic Idea would be to exchange the node's inorder successor value with node value . Now the node to be deleted is case 1.Leaf node case 2.A node with one right child(inorder successor couldn't have a left child else that would be the inorder successor value) following is the code for get...

 
2:42 PM
0
Q: Improving the exectution time of this program

user3450687My Iris recognition program work but it is too slow. Can you help me improve it? I am new to java :) This is part of the code: private static final int SCALE = 1; private static int irisCentrX; private static int irisCentrY; private static float maxVal = 0; public static float calculateLineInteg...

 
@Steephen It seems like in your original solution, setting i=0, j=i, and k=j returns the correct results. The only potential problem would be that the results are unsorted. But this can easily be resolved by sorting the input vector.
Because currently, all of your solutions ignore the case where i == j == k, even though this case meets all of the criteria.
2 + 2 > 2, 2 + 2 > 2, and 2 + 2 > 2
And given that the number of results is O(N^3), it'd be far more efficient sorting the input (N) rather than the output (N^3)
 
0
Q: c function problem, evaluating expressions inside a function

Mohamad Mistoim trying to solve the 3rd part of this question but im unable to understand its meaning nor what shall i do, any help?!

0
Q: Compile and run C++ code

parvI have created this bash script for Compile And Run c++ code, car++.sh. As I'm new to bash scripting, I'm not sure about good bash programming practices. Please review it to see if you could find any anomaly. #!/bin/bash found=false; output=; o_is_set=false; #retrieve output_filename from arg...

1
Q: Bitmap-based Sieve of Erastothenes

AgaresI have written a simple implementation of Sieve of Erasthotenes (in C, MSVC flavour), which I believe is correct (source below). Is there a way to make it faster and more readable? #include <stdio.h> #include <stdlib.h> #include <math.h> #include <intrin.h> typedef unsigned long long bitmap_ent...

0
Q: Java Improving program code

user3450687Hi guys that is my first Java project for the University. I am writing Iris recognition program. The Problem is that the program execution is too slow. Please help me too speed it up. Here is the code: private static final int SCALE = 1; private static int irisCentrX; private static int irisCen...

0
Q: Graph adjacency list implementation in C++

anthrI have been playing around with an adjacency list implementation of a graph class, on which I'd like to be able to run a build and test several graph algorithms. The code I have below works and I have been able to implement bfs, dfs, Dijkstra and Prim's algorithms, but I'm not very satisfied wit...

0
Q: MPI programation

kakamoI'm a beginner in MPI parallel Programming. I've written this little piece of code to draw the Mandelbrot fracta. the idea is that the first slave will claclulate the first half, stock it in pointer, and send it to master node who is waiting for reciving pointer, and the some thing for the second...

 
3:44 PM
 
@Duga Worst suggestion I've seen in a while
 
No kidding.
That question couldn't be more appropriate for Stack Overflow.
 
@Typo I'm sorry to have to tell you that you are wrong. Broken Code is entirely off-topic for Code Review. This question does belong on Stack Overflow. Please read Be careful when recommending Code Review to askersSimon André Forsberg 1 min ago
 
@Typo In what why is t his even remotely off-topic for Stack Overflow? Please, tell me. This is exactly the sort of question that is appropriate for Stack Overflow. I recommend you visit the help center before you try telling anyone what is or isn't appropriate for Stack Overflow, nevermind what's appropriate for other sites such as Code Review. — nhgrif 2 mins ago
Plus, I upvoted that question.
 
3:51 PM
I'm not sure how it got 2 down votes.
Unless it's a duplicate, I honestly can't see the problem with it.
 
I guess the edit history might have something to do with it: stackoverflow.com/posts/29458905/revisions
 
perhaps
Another reason to avoid structure here, it will add unnecessary 4 bytes for padding and it may impact cache usage — Steephen 15 mins ago
I'm not a C++ master, but I don't even understand that comment...
I'm pretty sure it'll try to align memory into chunks of 4... so it would never add 4 or more bytes.
If you make a struct with 5 bools in it, that struct takes 5 bytes, and it would expand it out to 8 bytes for alignment...
An expansion of 3 bytes...
 
4:18 PM
If your code works, then you can ask this question on Code Review But before that, please format your code. — Arun A.S 1 min ago
@ArunA.S Code formatting is very much under review at Code Review. Giving code any extra attention to its formatting than you would normally otherwise do just because you're posting the code to Code Review probably does more harm than good. — nhgrif 1 min ago
Might be better for codereview? — hd1 1 min ago
@ArunA.S I understand exactly what you meant. If this were posted to Code Review, almost all of the answers would comment explicitly on the formatting. Reviews of the content wouldn't likely happen at first. Most likely, the user would get several reviews of his formatting, and then after fixing that up, the code could be reposted as a new question, where the actual content might be discussed more in depth. You're more than welcome to discuss this further with me here. — nhgrif 44 secs ago
 
I don't entirely agree with you there, @nhgrif
I think Arun's suggestion of formatting the code is well-meant, and a good one
 
Yes and no.
I mean, it's by far not the worst suggestion... but to just say "please format your code" is fine if the question is just staying on SO.
And if it were, someone might edit it into shape on SO. I do that all the time.
But if someone isn't editing their code and they think it's acceptable to post questions to Stack Overflow in that shape, then they think writing code like that is fine.
But if they have that attitude, but then think they need to improve the formatting as the last step before posting to CR, then they're probably missing out on some valuable reviews.
Reviews that would demonstrate how to format your code well, as well as provide lots of reasons why the way they're doing it is problematic.
I think that blanket suggestion for something potentially on its way to Code Review elimates a massive learning opportunity for the user.
 
Does @Duga actually do anything? @SimonAndréForsberg
 
@Legato Do you not see @Duga hard at work around the clock?
 
@nhgrif I get the point, but I'd be surprised if the user got the formatting perfect.
 
4:32 PM
0
Q: Strongly connected components, component graph, semiconnected graph and new graph from SCCs

Dang Manh TruongI have written a program in C to do the following: Read a matrix (in file format, first line you have the size, then next are the entries). This is done by the "input" function Find the strongly connected components using the kosaraju algorithm (the one that uses the transpose). Done by the "SCC...

 
No, I mean pinging @duga.
 
Oh.
 
@nhgrif , actually I did mean to format it right now if it's on SO because most people wouldn't bother to read code that they cannot understand.
Or the codes that are hard to read
 
@ArunA.S Right. If that's staying on Stack Overflow, it needs to be formatted there.
 
@Legato @Duga does a lot. Pinging @Duga does nothing except bringing @Duga one step closer to integer overflow in the number of notifications.
 
4:33 PM
I've seen a lot of people do it. At first I thought it was a way to store messages somewhere else.
 
Definitely. But the question probably isn't a good fit and should just be closed there.
Especially now that he has just opened it here:
0
Q: Strongly connected components, component graph, semiconnected graph and new graph from SCCs

Dang Manh TruongI have written a program in C to do the following: Read a matrix (in file format, first line you have the size, then next are the entries). This is done by the "input" function Find the strongly connected components using the kosaraju algorithm (the one that uses the transpose). Done by the "SCC...

(And didn't touch the formatting)
 
@nhgrif Easy review points!
 
@Duga has a Y2K bug?
 
So, people do @Duga for no reason/out of habit?
 
Same reason people do @CaptainObvious
 
4:34 PM
@Legato People ping @Duga because it's fun!
 
Often times it's so that if I reply to something @Duga repeated here, other users can see what I'm talking about.
 
@Duga ping
 
@Duga For example, this is me replying to something @Duga said last night.
 
@nhgrif No, but I expect the number of notifications for a user to be stored as an int, and I don't plan on checking @Duga's notifications until next Winter Bash.
 
Oh, I see what you mean, on Stack Exchange.
 
4:36 PM
yup
 
@nhgrif , That's even poorly formatted than before ( the problem statement )
 
So, @ArunA.S I guess maybe your comment is just slightly confusing to me? If the code is staying on Stack Overflow, then it needs to be formatted. If it's coming to Code Review, it shouldn't be touched. Now that it's posted to Code Review, the Stack Overflow should be closed.
 
@nhgrif , I meant the problem statement ( not the code ) is formatted poorly.
 
He fixed it on Code Review.
 
I was the one who edited it.
 
4:40 PM
@DangManhTruong You can delete this question. You've cross-posted to Code Review and it is more appropriate there. This question isn't really a great fit for Stack Overflow. — nhgrif 1 min ago
I'm voting to close this question as off-topic because it has been cross-posted to Code Review and is more appropriate there. — nhgrif 1 min ago
 
Oh, I see, you did the edit for that. And he just abitrarily added some white space.
This is a pretty good Code Review question now.
 
I would love, love love love the ability to subscribe to a post. Good grief, I can't even begin to imagine how that would change some of the tedious stuff I have to do every day. Don't know about the rest of this, but that one'd be a winner in my book. — Shog9 ♦ 19 mins ago
Can't tell if sarcastic.... Shog9 can be convincing either way ;-)
 
Seems to me like before you get any sort of expedited migration power, you should have a large amount of rep on BOTH sites. A question shouldn't be migrated away unless it is off-topic on the original site. A question shouldn't be migrated to unless it is on-topic on the target site. And a question shouldn't be migrated at all unless it's actually a good question. Users with 200 rep on Site A and 30k rep on Site B wouldn't be a good judge of what should be migrated to or from Site A. You need to be familiar with both sites! — nhgrif 8 secs ago
 
5:00 PM
@nhgrif That is a good point.
 
This is a slightly problematic question I think:
0
Q: Deleting a node with two children in a binary search tree

user4275686The basic Idea would be to exchange the node's inorder successor value with node value . Now the node to be deleted is case 1.Leaf node case 2.A node with one right child(inorder successor couldn't have a left child else that would be the inorder successor value) following is the code for get...

 
5:16 PM
0
Q: Simple login/register system with wxWidgets and OTL libraries

morbidCodeThis is a simple register/login system for a future project. I used wxWidgets for GUI and OTL for database. I feel my code could be better. // db.h #ifndef DB_H_ #define DB_H_ #define OTL_ODBC #include "otlv4.h" otl_connect db; class MainApp : public wxApp { public: bool OnInit(); void...

0
Q: Alternate method to calculate shipping cost

jsp08 I 'm trying to optimize the following method. Any suggestions on how this can be done better? The shipping cost is based on weight and the total cost of products. Following are the conditions for calculating cost. When order is under $100, and all items under 10 lb, then shipping is $5 fl...

 
codereview doesn't get enough traffic. numpy speedup questions like this are quite common here on SO. — hpaulj 1 min ago
 
5:38 PM
0
Q: performance of nCr%m?

vivekI'm trying to find nCr%m. I have tried Euler's Modular Inverse method but It also happens to be slow. then I came across this implementation of Lucas Theorem: #include<iostream> using namespace std; #include<vector> long long SmallC(int n, int r, int MOD) { vector< vector<long long> > C(2...

 
6:00 PM
You can't just post code here and ask people to improve it. That might work for code review SE but be sure to read their guide lines. — Nico Schertler 1 min ago
There are a lot of issues with this code - you should probably post it to CodeReview for more thorough feedback. — Barry 1 min ago
Does the code work and do what it is supposed to do? If so, it can work at Code Review. — Simon André Forsberg 59 secs ago
 
0
Q: array of immutable objects initialized at compile-time: best practices

Nate LockwoodI have a class that contains defines 'magic' numbers at compile time such as basic array sizes, fixed ip address, etc. so that I have one place to edit if changes are required. In this nested class I need to define tuples of maximum and minimum values that correspond to each of 4 bands of an IR ...

 
@Barry First the switch statement that crashes the program needs to be fixed, then it can be posted on Code Review. Broken code is off-topic there, no matter how much it needs to be cleaned up. — Simon André Forsberg 1 min ago
 
6:38 PM
@hpaulj that was true 3 years ago. 45K visitors/day is quite a bit of traffic in StackLand. — Mat's Mug 32 secs ago
 
6:54 PM
@Mat'sMug Well said!
 
not to mention the voting. Q:0 A:0 is called a zombie on CR, and we kill those ...with votes.
 
We do need more reviewers though
@Duga is not a happy bot.
 
True. But it's not the traffic.
 
Mar 16 at 23:58, by Duga
There are 1185 unanswered questions
19 hours ago, by Duga
There are 1285 unanswered questions
 
Saw that
 
6:58 PM
No, it's not the traffic. We have the traffic. We just need the answers.
 
I haven't answered in a while...
2
 
Public shaming!
 
I posted a few, but they didn't really help because other people posted some too.
 
0
Q: Vanilla Javascript live filter

MohamadSee this this question for background. This is a live filter where results are filtered as you type. I've taken into account Kerri's answer and expanded on her recommendation. I've added a message that appears if no results are found, and a display for how many results are being displayed out of ...

 
My last answer was posted yesterday....
And before that, 03/31
I miss being able to answer 4-5 times a day, rep-capping twice a week.... beating @SimonAndréForsberg in the weekly rep leagues ...
 
7:14 PM
in TCG Creation, 19 hours ago, by Duga
Simon André Forsberg vs. Mat's Mug: 1836 diff. Year: +885. Quarter: +135. Month: +135. Week: +15. Day: +30.
I'm considering removing that notification actually, because I don't feel that I'm in any danger :)
 
@Mat'sMug: It's okay, your magic is gone. That doesn't make you any less of a programmer. Does it? Doeeesssss iitttt?!
 
@SimonAndréForsberg good! Then I can strike in silence!
@JeroenVannevel I'm not a programmer. I code in toy languages, remember? ;)
2
 
Ah yes, you're one of those windows plebs
 
And Windows people don't like helping others.
 
...
 
7:17 PM
150$ for a cheap windows laptop
That looks really interesting
Though I'd be more interested in that Surface 3
 
@JeroenVannevel Me too.
 
7:34 PM
A plus for moving this to codereview is that the standards for the question are tighter. A non-runnable excerpt like this would not be tolerated. — hpaulj 17 secs ago
SO is in its own league. You can't compare a site that has dozens of millions of users against any other. But a lot of answerers on Code Review don't care what the language is.. especially in the [performance] tag. You have a point about the example code though, but if everyone thought "I'll post on SO, CR is too small", then CR wouldn't have graduated like it did. CR doubled in size over the past 18 months... and I bet there would be more votes on CR if the question was on-topic and answered there. — Mat's Mug 1 min ago
 
Man, some people on SO are being really stubborn about when to and not to close "Swift" questions as duplicates of "Objective-C" questions.
35
Q: Why do Swift questions on Stack Overflow get marked as duplicates of Objective-C questions?

Mister OrkoWhy do Swift questions get marked as duplicates of Objective-C questions? Swift is attractive to new developers. A new developer may not be at a level to understand Objective-C syntax and may be asking a valid Swift question. For it to be marked as a duplicate of an Objective-C question is unfai...

(the example question I use in my answer is one vote away from being re-opened unfortunately)
 
8:04 PM
0
Q: Performance of objects-to-strings convertation

DenisBackground of Task: using OR/M I map a lot of rows from database to array of objects (~300k). In these objects some properties are marked with special attribute [Signed]. Row-by-row I combine them in string, calculate salted MD5 of string and compare to hash I received from database. Everything ...

 
@CaptainObvious What's a convertation?
 
8:17 PM
Lol.. it's when a database talks to a program
 
I don't know why this question got a downvote:
0
Q: What is the difference between a var and a weak var in Swift

nonamexdWhat is the difference between a var and a weak var in Swift?

This question has 151 upvotes:
151
Q: Differences between strong and weak in objective-c

ZhirayrI'm new to Obj-C, so my first question is: What are the differences between strong and weak in @property declarations of pointers to objects? Also, what does nonatomic mean? Maybe this question is stupid, but I'm new to Computer Science. I'm a web developer, so I know only basic programming pa...

 
@nhgrif Where there is SO, there is downvotes.
 
8:40 PM
2012 vs 2015: things have changed quite a bit...
 
9:02 PM
This question is off topic, you should post it here: codereview.stackexchange.comTypo 30 secs ago
@Typo nope. Code that doesn't work as expected is off-topic on Code Review. What's wrong with this post here? — Mat's Mug 35 secs ago
 
Thanks @Mat'sMug and @JeroenVannevel
 
Yeah. Whiskey Tango Foxtrot.
 
Second time today. Same question. Same user.
 
@SimonAndréForsberg They must have been hired to sabotage Code Review
 
9:15 PM
Must have been hired by PPCG
3
 
9:26 PM
I'm letting it go, I'd rip his head off. He's being obtuse and ridiculous. Some people have lots of time to waste it seems..
 
@Mat'sMug there's not even a question here — Typo 19 mins ago
@Typo Oh look, now there is one! — Simon André Forsberg 14 secs ago
 
@SimonAndréForsberg I know! Isn't it awesome!?? — Typo 38 secs ago
I'm speechless
 
Whiskey Tango Foxtrot...
 
I gave OP an upvote to counter stupidity
 
9:53 PM
shower-brainstorm...stop before you are completely dissolved.... — rene 2 hours ago
Ahahaha
 
The fact that you get that nervous feeling puts you ahead of oh so many other SO users! — Simon André Forsberg 5 secs ago
 
10:12 PM
I'm going to learn a new language tonight
 
ya hablo un poco español
I was thinking about GoLang
 
Go? Or GoLang? Are they different?
 
I think they're the same
> Go, also commonly referred to as golang
 
@TheMotherofJosephBeuys We really want good questions, and sometimes comments aren't enough to fully get the message across about what the expectations for a question are, nor how to fix a specific question (we only have a few hundred characters). That someone took the time to write this means that they believe that it can serve some good (or that nhgrif really likes the sound of keys clicking) - that you can write a better questions once you understand how best to utilize the Q&A site format. That you asked, got an in-depth answer, and are going to fix your question is wonderful. — MichaelT 1 hour ago
But nhgrif really likes the sound of keys clicking!
 
10:26 PM
Heh
You can import from a url..
Nevermind
Who names his directory structure like that
 
This question would be a perfect fit for the code review site — bali182 1 min ago
 
any other mugs coding on Easter?
should I use Razor or ASPX as my view engine? what is the biggest difference?
 
Razor
ASPX is ugly and outdated
Razor is flashy and new
 
well I will learn new on this project then...lol
I am creating a website for my wife (and eventually the rest of the family) to showcase and sell her artwork
 
10:42 PM
@bali182 I went ahead and posted it there, I didn't know about code review. Thanks! — Jire just now
 
I need a better computer. or to opt for windows 7 on my next one.
 
@Lyle'sMug What OS do you have now?
 
windows 8.1
my computer almost always feels laggy.
Visual studios is taking forever to set up this MVC project
it's not responding.....that could be why
 
0
Q: Problems with efficiency with the Game of Life

CarcigenicateTo help prepare myself for my final exam, I wrote a simple Game of Life. I want to expand it to have each sub-population represented by a character, but before I do that, I want to make it more efficient; because right now it's running at about 1 fps, which is way too slow (I'd like at least 3 fp...

0
Q: Java "rhythmic task controller" - Need help optimizing

JireThe purpose of a rhythmic task controller is to accept a task and execute all the queued tasks in a cycle or "rhythm" defined by the client code. A task returns true or false depending on whether or not it is "finished". A finished task should be removed from the controller's control and won't be...

 
some applications always want the Default screen 1. if I try to run Netflix on a screen and then open the start menu it closes Netflix. there are all sorts of weird crap with Windows 8.1
I broke VS2012
it doesn't want to create this MVC project. I wonder if I leave out the Test Project part of it , if it will finish creating it
 
11:00 PM
I'm voting to close this question as off-topic because it's now posted on Code Review: codereview.stackexchange.com/questions/85961/…dimo414 38 secs ago
 
Nope. Maybe tonight or tomorrow, but today I'm on my phone (and running low on battery) :)
 
@Lyle'sMug Hey, two mugs?
Nice seeing you.
 
good to see you all as well
Happy Easter
 
Same to you.
 
@Mat'sMug I am coding because the inbound amount of funds is not what it needs to be... I am going to try and set up a site for my wife ( and later on my family) to sell their paintings
 
11:07 PM
Talking about your Windows issues, is this a clean install or an upgrade?
I find clean installs usually work better than upgrades.
But, they take a lot more work to get going initially.
 
Are you looking for a code review or help resolving an error? — Fiddling Bits 2 mins ago
neither. this code compiles and functions. i do not need a review. i could just post that on CodeReview otherwise. I'm just not sure where to begin with finding a repeating instance. — jargonjunkie 1 min ago
 
11:26 PM
@Typo There are several questions on Stack Overflow that don't explicitly write out a question with a question mark. That doesn't make them off-topic. Moreover, if it's unclear what the question is asking, that DOES NOT MEAN it would be appropriate to just randomly shuffle it off to Code Review. If the question is bad (which this one definitely is not), then vote to close it as such. Meanwhile, before you make recommendations about other Stack Exchange sites, you should make yourself familiar with what is actually on-topic there. — nhgrif just now
 
@Hosch250 it was shipped with 8.1 I think
 
@Lyle'sMug OK.
 
it works well for the most part, but like the wireless mouse is laggy, and it's not the batteries I think it is the processor or something...
 
Mine came with 8, and I'm running 8.1 ATM, and it is quite fast.
I am using a wireless mouse, is it Bluetooth?
I've heard that Bluetooth actually doesn't work in some areas because so many people are using it.
 
it has a usb dongle that the Keyboard and mouse communicate with
 
11:31 PM
Oh, I've had one of those too.
I don't know, that mouse was really fast, but it was an MS mouse.
 
I hate wireless keyboard/mouse.
 
I live in South Dakota...maybe I should turn off the bluetooth on my phone
 
It might be the mouse isn't good at transmitting.
@nhgrif My keyboard is built in, but I prefer wireless mice because I only have to move the mouse, not the wires.
Plus, wires get in the way sometimes.
 
How heavy are the mouse wires you use...?
 
anyone want to check out this answer... I am unsure how I feel about it....
0
A: Approach to MVC 4 windows group security to enable/disable controls in view

Lyle's MugFirst thing that I saw when I looked at your code was the massive if statement nesting. there are two if statements that I saw right away that can be merged to prevent indenting more than necessary if (debugMode != "ON") { if (filterContext.HttpContext.Request.Is...

 
11:42 PM
0
Q: While True loop in Project Euler solution

MandeepI've been plowing through some Project Euler problems and recently came upon a problem where I used: x = 125874 while True: x += 1 if sorted(set(str(x))) == sorted(set(str(x * 2))) == \ sorted(set(str(x * 3))) == sorted(set(str(x * 4))) == \ sorted(set(str(x * 5))) ==...

 
@Lyle'sMug I quite like nested if-statements to be honest
Keeps the flow clear
 
I was thinking that I went a bit too far when I pushed them all into one conditional statement.
 
> Method dispatch is simplified if it doesn't need to do type matching as well. Experience with other languages told us that having a variety of methods with the same name but different signatures was occasionally useful but that it could also be confusing and fragile in practice. Matching only by name and requiring consistency in the types was a major simplifying decision in Go's type system.
"occasionally useful"
I'm sure Int, Intn, Int31, Int31n is much clearer
god forbid you have more than a few "overloads"
 
See code review rather than stack overflow. — Malik Brahimi 56 secs ago
Yes, here's the link. — Malik Brahimi 54 secs ago
 
11:59 PM
0
Q: List Comparison Algorithm: How can it be made better?

T.WoodyRunning on Python 3.3 I am attempting to create an efficient algorithm to pull all of the similar elements between two lists. The problem is two fold. First, I can not seem to find any similar algorithms online. Second, there should be a more efficient way. By 'similar', I mean a predesigned wa...

 
RELOAD!
 

« first day (701 days earlier)      last day (3302 days later) »