« first day (563 days earlier)      last day (3457 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
Autolayout is super powerful... but can be a bit of a pain...
 
 
2 hours later…
1:36 AM
0
Q: Can my consecutive_find be improved?

Davidconsecutive_find() is a function that returns the beginning of a range that contains strictly N consecutive elements. It was part of a SO question that I answered. Currently this function runs in O(n) time. I wanted to know if there are any pitfalls with this function and if it can be improved a...

 
1:52 AM
0
Q: Codility MaxCounters Peformance in Python capping out at 77% performance

optical_anathemaMy problem is quite similar to the question found here, except I am attempting to answer the question in Python. Performance of Codility MaxCounter challenge solution def solution(N, A): # write your code in Python 2.7 counters = [0] * N max_count = 0 for x in A: if 1 <...

 
 
2 hours later…
3:38 AM
Duplicate? How about fizzbuzz? ;) — Mat's Mug 50 secs ago
 
3:57 AM
So many FizzBuzz, so little time.
 
4:27 AM
0
Q: Drawing a dashed line with pygame

Jovitodef draw_dashed_line(surf, color, start_pos, end_pos, width=1, dash_length=10): x1, y1 = start_pos x2, y2 = end_pos if (x1 == x2): ycoords = [y for y in range(y2, y2, dash_length)] xcoords = [x1] * len(ycoords) elif (y1 == y2): xcoords = [x for x in range(...

 
4:40 AM
Hi @Mat'sMug
got a quick question if you're still around
 
4:51 AM
seems everybody gone sleep. laters
 
 
1 hour later…
5:59 AM
0
Q: Possible optimization over runningn time and more efficient DS

CodeYogiHere is my code which tests whether a given string has unique characters. The function is_unique which does a linear search for each character in the string is O(n^2) (if I am right). Is there any more efficient way of doing the same with more efficient DS that takes less time (or space)? def is...

0
Q: Stop Watch Application 2.1

MikeAfter the tips from my previous review. I have come up with these changes: Separation of Concerns Use Delegates I'm asking you guys it this looks good. Other then separate out the FileButton_Click(), WriteResultsToFile(), and PromtSaveAsFileName() functions to another class would you recommen...

 
6:24 AM
Monking @all
 
 
1 hour later…
7:34 AM
0
Q: How to get Mid point of <g> tag in svg using javascript

VIVEK-MDUI working in SVG tags using javascript. I tried to get group tag <g> midpoint in svg.Is it possible to get mid point value of group tag using javascript? Here my demo group tag <g> <g id="object_7" transform="translate(573,703) scale(0.5,0.51)" style="pointer-events:inherit"> <path d="m-40,-19l...

 
8:17 AM
0
Q: Dynamic connections classes

BasI have an abstract Connection class which looks like this: abstract class Connection { /** * @var mixed $instance Represents the instance of the connection */ protected $instance = null; /** * @return mixed */ public function getInstance() { if (!$...

 
8:41 AM
0
Q: Omitting catch block

Rafał.SI want my method to use finally block that will assure that used EF entity is disposed after usage but I would also like to not handle exceptions in this Utility method. 1.I know that I can just go with current code but would it be possible to omit catch{} block? Would an exception from try{} bl...

 
9:02 AM
0
Q: Some functions are maybe not needed?

GorostasI have this code in JS, but think somewhere is more that is needed, can some some check it please and make his remark? // Common functions $(document).ready(function() { /* Function for creating different styling checkbox, radio input, and select */ // Create pretty checkboxes ...

 
 
1 hour later…
10:16 AM
0
Q: Expressing computations on values as State

Bartek BanachewiczI was writing an application with a few Monads in a transformer stack. The top level application state resides in a TVar, and various components of the application operate on parts of it. I wrote a helper function to extract those parts: hoistStateWithLens :: S.MonadState outerState m => ...

0
Q: Do i prefer composition over inheritance here?

overexchangeProblem Statement: A method called insertEnd() exists, but it runs in linear time, because every time it is called, it walks down the list to find the end. Without changing the meaning of this method or any other, modify the representation of a SList and whatever methods are necessary to mak...

0
Q: Sorting array with respect to two properties

Konrad VilterstenI'm sorting with respect to Width and Length. However, Width has the significance precedence, so Length is only vital if Width is exactly equal (both are integers). The comparison method I've implemented as shown below. Is this a neat trick with doubling the most significant value's comparer or i...

 
10:45 AM
0
Q: Codiliy AbsDistinct : why is this solution not O(n)?

DavidThis is part of a series of algorithmic lessons and tests by Codility. For copyright reasons, I cannot reproduce the question, but I can link to it here. The question requires a response in O(n) time complexity. My response (below) was detected as O(n*log(n)) by Codility, but I have no idea why...

 
10:59 AM
0
Q: Re-design a Python class

Marin Atanasov NikolovI have a Python class which defines various methods for connecting to a remote service and perform various API calls against that remote service. Over the time my class got extended a lot and got lots of new methods for performing various operations against that remote service. Currently I am t...

 
11:25 AM
0
Q: Better method definition

Neelam Mehtaprivate void checkIfAllowed(String someString, STATUS status){ boolean validStatus = false; if(some condition){ validStatus = true; } if (!validStatus) { throw new RuntimeException("Some message"); } } private void callingMethod(){ ... checkIfAllowed("test", "PENDING"); ... } Or ...

0
Q: how to Search text in PDF,excel and word documents if content available in file show file link and bind in grid(C# sample)

LALBABUI have a folder with a lot of PDF,excel and word files. I would like to develop an ASP.net application that enables the user to search by text in available inside pdf,excel and word and bind file in grid using the content provided by them inside a textbox.

 
11:49 AM
so much questions coming in
 
0
Q: Restricting user to one open tab in browser

Ali KazmiI had a requirement to restrict my web site's users to just one open tab in the browser. I am aware that this is not the best thing to do in terms of general user experience guidelines but its an internal application that doesn't play well with such a scenario so had to do it. Following is what ...

0
Q: How to make this JQuery script more reusable

user58361Any thoughts on how to make this script http://jsfiddle.net/BobanStanojevic/7p392tkt/ more reusable and ready for general implementation. Thanks

 
12:15 PM
0
Q: Is this an adult way of designing an algorithm framework in C++?

coderoddeI have very little experience in programming with C++ and the following small "program" is the 2nd one I have ever written in that language. I am most interested in comments regarding naming conventions and the way the code is modularized. Also, can you tell whether the code sticks to idiomatic u...

 
^ Should be on Parenting.SE.
4
 
@CaptainObvious How to make this title better..
anyways I begin to see people that are not chat-regulars comment on to-be-closed questions for the "right" reasons.
unfortunately most of these comments are missing a link to the help-center / meta
 
12:38 PM
@Vogel612 Only so much you can do from mobile unfortunately.
Monking @all!
 
@RubberDuck hmm true..
Thanks for putting a bounty on the lolcode FizzBuzz question btw ;)
 
You earned it.
 
The reason you have given creates this fuzzy feeling ;)
 
LOL. I was about to ask if you read the reason.
I'll leave it there for a while before I award it. Maybe it'll draw in a few votes.
 
12:54 PM
14 hours ago, by Mat's Mug
has to be applicable to all programmers. Including any that doesn't drink beer.
@Mat'sMug what kind of programmer doesn't drink beer?! ^
 
@RubberDuck the kind of programmer that doesn't drink coffee...
 
Coffee, Code, Beer.. the three essentials to life. (Not necessarily in that order.)
 
while we're at coffee.. there's a proposal on area51. that's in commitment...
it could use some people..
 
0
Q: Constructor function, prototype and making a modal

pixeltoothI'm playing around with prototypes, constructor functions and javascript - I'm not really a Javascript developer but am interested in this. So my question, am I on the right track with this code - Im looking for a code review from a js developer. I know the codes a bit funky. I created an examp...

 
1:14 PM
0
Q: Should a class own the responsibility of converting an incorrect data type?

MohamadThe ElectricalEngine class responds to the horsepower message. Because efficiency is calculated in percent a programmer can mistakenly initialize it with an integer instead of a float. class ElectricalEngine attr_reader :volts, :current, :efficiency def initialize(volts, current, efficiency...

 
@CaptainObvious We still have ??
 
Greetings, Programs.
 
srp is a meta tag and I have removed it. If you are concerned about violating the single responsibility principle, please mention that concern in your question. — RubberDuck 1 min ago
@Donald.McLean Greetings User!
 
okay Captain, now it's up to you
 
0
Q: I command thee: do SOMETHING

Vogel612I am currenly contributing to a Chat-Bot to be used across the whole SE-Network's chat which is implemented in Java 8. This bot is supposed to have commands. These commands again are supposed to be as flexible as possible, and based on chat messages. To allow easy and extensible implementation o...

 
1:31 PM
Sounds like it's broken?
From the title.
 
@Pimgd which question?
 
@Vogel612 Catchy title though
 
@Pimgd it was so easy, right?
 
easy?
 
the space-aligned variable names answer ...
 
1:36 PM
0
A: I command thee: do SOMETHING

PimgdIt horrifies me to say this, but I think you didn't add enough padding. private static final Predicate<String> FALSE = s -> false; private static final Logger LOGGER = Logger.getLogger(CommandHandleBuilder.class.getName()); private Predicate<String> matchesSyntax; ...

Yup
It was pretty easy
 
Thanks for the notes. I've just wasted 5 minutes trying to figure out what "burninate" means :D — Mohamad 5 mins ago
whooops
 
LOL. Thanks for posting the link @Vogel612. I should have done that to begin with.
 
0
Q: assignment types

Hana BizhaniIs there any problem in assigning Integer to int? int x= Integer.class.cast(parameters.get("PO_PAGE_CNT")); As Integer is the parent class and int is the instance, I think maybe in some cases I get ClassCastException or other type of Exception at run time. Is it right?

 
updated answer so it's not just about padding
 
hey
 
1:47 PM
@Pimgd the internal State of the Builder does not allow building. An UnsupportedOperationException is IMO reserved for non-implemented excessive interface methods. The feature works, point is the Builder doesn't have enough information to build a command yet
the Predicate is referentially equal to FALSE, which makes the command usable and there is no Consumer defined. These two things are the minimum requirements for a command
and the braces thing is formatting preferences again..
 
sorry
your if statement confused me
 
you're shooting too fast ;)
2
 
hmmh not really
 
I get the idea behind yoda,
but it just looks so out of place
formatting preferences is not the case here, it's more readability
 
1:50 PM
I am also using yoda only for this project.. it needs some adjustment but after that it's a matter of do or do not..
 
FALSE == matchesSyntax is just evil
I knew it was a predicate... for about 30 seconds.
 
then criticize that..
my highlighter gives me FALSE in orange and false in purple, soo...
 
I don't have solid reasons other than "confuses me"
Your formatting style confuses me because I keep scrolling to see if there's more than a error message on the line
But that's style.
 
hey that's a valid point in a review..
 
Thank you for adding your real code! — RubberDuck 19 secs ago
Back on topic ^
 
1:53 PM
Your conditional style confuses me because I'm not used to use of yoda-style for non-numerics
but that's style.
public CommandHandle(
    Predicate<String> matchesSyntax, Consumer<ChatMessage> executor,
    String helpText, String infoText) {
    this.matchesSyntax = matchesSyntax;
confuses me because the arguments are indented like the code
but that's style.
There's nothing concretely wrong, but it smells bad
like the last bit of milk in the carton
 
@Pimgd yea that one is.. meh. But alas style is style and I'd rather have a project conform styling than having my code look a teeny tiny bit better ;)
 
where's the project located
I wanna see other classes with variables
 
0
Q: Getting s3 objects with rails

amtestI have been using aws-sdk gem with rails, for uploading and downloading objects,and its working fine, but i am thinking, like this is my demo code begin s3 = AWS::S3.new bucket = s3.buckets[ENV['BUCKET_NAME']] bucket.objects.create(fname, data) object = bucket.objects[fname] exported_url = o...

0
Q: Arduino code for driving 7 segment displays

Vitim.usI made a little javascript app here http://blog.vitim.us/2014/11/character-generator-for-7-segments.html that let people generate bitmap for generating characters. Currently it generate code of a dictionary. But I want to also generate a example that let them play like the arduino samples, use it...

 
@Pimgd there is a github link in the question ;)
 
Because screw following your own evil formatting standards
 
2:01 PM
looks like it..
I swear I ran the formatter over this, though...
 
edit scars
Looks like @Unihedron is the author
well
that's why (editing scars, not "being Unihedron", lol) you don't use that formatting style
/rant
 
2:13 PM
1
Q: Design a Tips class that calculates the gratuity on a restaurant meal

user3363195I am taking a c++ course and our recent homework assignment was: Design a Tips class that calculates the gratuity on a restaurant meal. Its only class member variable, taxRate, should be set by a one-parameter constructor to whatever rate is passed to it when a Tips object is created. If no argu...

 
Who summoned me here?
Oh hi @Pimgd
 
hey everyone, one of my better answers in the CR world lies unaccepted on this question, can we give it some more attention and perhaps try to reform retain the user? codereview.stackexchange.com/q/40146/18427
 
@Malachi Congrats on silver answer badge
2
 
thank you Santa @Unihedron
 
This is pretty awesome: blogs.esa.int/rosetta/2014/11/17/…
 
2:29 PM
I was more aware of the space exploration missions this year than any other year.
 
0
Q: Fermat Primality Test in C

CharisAlex#include <stdio.h> #include <time.h> #include <math.h> #include <stdlib.h> #define MAXNUM 2000000000 #define MINNUM 1990000001 #define MAXTRIES 10 unsigned long long b,e,m,result; int modulo(b,e,m){ result=1; while(e>0){ if(e%2==1){ result=(result*b); } ...

 
Between Rosetta, the Falcon 9 flights and Hayabusa 2 scheduled for the end of the month.
Also, China's Moon mission and India's Mars mission.
 
I'm only actively following the Rosetta mission, not really taking time for the rest (yet)
 
And MAVEN reached Mars.
 
maven as in apache maven?
 
2:32 PM
And the NASA announced their future Space Flight Systel.
MAVEN as in Mars Atmosphere and Volatile EvolutioN Mission.
I sometimes wonder how much the actual goal of a project may be influenced by the choice of its name.
 
@Morwenn The goal of the project has to match the name
 
And there are also some interesting missions scheduled for next year: the maiden flight of Super Strypi, two missions towards the first Lagrangian Point, one (or more) fight for the Google Lunar Prize X...
 
.. I must admit I don't care all that much about space...
 
Also, Dawn should reach Ceres and New Horizons should reach Pluton and Charon while Akatsuki should reach Venus.
It's easy to be interested in deep space missions: there are no more than 3~5 a year :D
 
May I hate adapting my program and updating the build process in order to integrate with a third-party service?
 
2:40 PM
@skiwi any time ;)
you still should do it...
 
@Morwenn I was just listening to a BBC podcast that was all about Rosetta, do you know if it has went offline yet? They said they ran into complications landing and did not manage to land it where it would have enough sun for its solar panels to recharge it
 
At this point I really start to wonder whether I should integrate it with the build process at all...
@Phrancis Yep, since Saturday already I think
 
@Phrancis The grapples didn't work and Philae bounced 2 to 4 times before finally stabilizing.
 
As far as I'm aware it needs minimum 3h/day and optimal 6h/day sunlight in order to wake up again
 
But ended up near a high "wall" of rock, a place where it hardly gets enough sunlight.
 
2:43 PM
Did they manage to use the drill at all before it went off?
 
Yes.
They drilled and also turned Philae a little bit so that it could get a little bit more sunlight.
Philae managed to do some work and send the data back to Rosetta before running out of batteries.
 
@Morwenn I think they actually reached all of their major goals
 
Oh good, can't wait to see what they find in that old ice
 
Now they expect it to wake up when the comet will be closer to the Sun.
I mostly expect them to find really interesting things that only a few people will managed to understand x)
 
I wonder what the odds are that another civilization lands exactly on this comet to find out Philae already to be there
 
2:47 PM
About null.
 
So amino acid findings would make for really interesting research. I believe they have found some in meteors before, but never could get close enough to a comet to find out, until now
 
I still don't understand how they manage this level of accuracy for a 10-year travel at high speeds i deep space.
Towards a fast-moving entity.
 
It's mind-boggling isn't it?
 
A lecturer last week was calling amino acids the whole time "aminosaurs" (a bit too literal translation from Dutch), it was hilarious, and only at the end of the lecture I figured out he was not talking about dinosaurs
 
Java Nerds, get ready to tear apart my Answer! codereview.stackexchange.com/a/70195/18427
 
2:49 PM
@Malachi Hey, at least you made me click it
2
 
> You've earned the "Good Answer" badge (Answer score of 25 or more) for "Can this stored procedure be cleaned up or made even more efficient?".
 
Nice @Malachi!
 
I gotta keep spitting those out
maybe do some ASP.NET stuff now that I am trying to fill in the blanks from my flimsy 2-year degree....
 
@Malachi You are aware that your suggested rewrite for the Close method screams NullPointerException all over the place??
if (conn != null) {
    try {
        conn.close();
    } catch (SQLException e) {
        System.out.println("Error: " + e.getMessage());
    }
} else if (pStatement != null) {
     try {
        conn.close();
    } catch (SQLException e) {
        e.printStackTrace();
    }
}
 
I noticed Eric Lippert did a review on that one @Malachi I didn't think he was the Java type
 
2:54 PM
conn will always be null in the else if block given you get to entering it..
 
... use finally for good sake
 
@Unihedron ermph don't even try.
that whole method violates basic responsibility patterns like "take care of you resources yourself"
3
 
@Vogel612 it should be the other way around huh?
@Unihedron agreed
 
@Malachi either that, or you close the conn, and ignore the pStatement..
 
0
A: Constructor function, prototype and making a modal

xDaevaxSo, I'm not an expert JS programmer but there are a couple of things that can be improved. Naming I would encourage you to declare and name classes in the following way: var ClassName = function(arguments) {...} Having a capital letter for the class name helps it to stand out against standar...

 
3:04 PM
@Vogel612 I see what you are saying, if the connection is null then by logical reasoning there shouldn't be a pStatement anyway so we should ignore it
 
or at least not close the conn dependent on whether there's a Prepared Statement..
 
I don't think they should be checking for the prepared statement or the Result, those don't need to be closed
@Vogel612 I added to the answer
@Phrancis I saw his answer on the one vote off query
 
Dreamweaver can crash if it opens files that have their size as multiple of 8KB... WTF?
 
Dreamweaver?... WTF?
 
I don't even know what it is... But it sounds creepy to use by the nature of the bugs that occur there
 
3:17 PM
Textpad ftw.
 
3:35 PM
Does this Java code seem susceptible to SQL injection?
//build query
String query = "select id from business where ";
for (String add1 : add) {
    query += "streetAddress like '%" + add1 + "%' and ";
}
//find at least a partial match to the business name
if(name.length()>5){
    query += "businessName like '%" + name.substring(0, 4) + "%';";
}else{
    query += "businessName like '%" + name + "%';";
}
 
yes..
 
yes..
@xDaevax I voted to re-open
 
Perhaps one of you guys should address that, I don't know Java but I saw it as I was looking through MySQL questions.
Let me know if you do answer, I'd be curious to see how it is done with Java
 
@Nihathrael This is not PHP though (surprisingly) it is Java.
(or apparently, JAVA)
Disregard sorry @Nihathrael I should have actually clicked the link, I saw "index.php" in the link it confused me
 
3:48 PM
@Phrancis it's not done much differently from PHP..
you ask your connection to prepare a statement for you, set the parameters and then execute the statement..
that's all there is to it..
 
@konijn Thanks
 
-1
Q: Design patter folder structure

AjmeraInfoCan you please help me to define folder structure. What I should change on below structure.

 
@konijn I'm not sure Programmers.SE would really touch that question either, too vague and opinion-based, OP is not stating a specific problem and very little context is given.
 
@xDaevax Needs one more to reopen.
 
rly..
 
4:01 PM
alright I will look at it
 
@konijn I think SO might touch it, but I don't think it will be that well received even there
 
It's definitely not a terrific question, but it is answerable I think. There are some clear style issues, and there are better, more readable ways to assign values to multiple arrays simultaneously than what is listed.
 
someone already opened it, now I am done looking at it....lol
rather try to figure out C++ in VBA....lol
12
Q: Using CreateDialog in VBA in an Attempt to Create Modeless Dialog Boxes

CBRF23I want to create a modeless popup dialog in VBA 7.0. So far the most promising route seems to be CreateDialog. First I tried CreateDialogW and received Entry point not found for CreateDialogW in DLL. After opening the DLL, I verified this function was not listed. The MSDN reference linked abov...

 
@Phrancis Your follow up is on the spot then
 
Anyone have any concerns with this comment on an answer? I don't find the answer very good to begin with, but it appears it also breaks the code...
This peice doesent work.. $remote_addr = mysqli_real_escape_string($_SERVER['REMOTE_ADDR']); it needs to be $remote_addr = $conn->real_escape_string($_SERVER['REMOTE_ADDR']); — Kad Nov 14 at 8:25
 
4:20 PM
@xDaevax Does $content['Al'][]= array( "link"=>"/admin.php", "text"=>"AdminLogin", "icon"=>"wp.png"); add an entry to the $content['Al'], if not, what does that do? I am not used to see this
@Phrancis This type of answer was found more commonly in the beginning of CR.. Over time people tend to go to bulleted items
 
Downgrading to Java 7 from 8 sucks
 
@Pimgd Y U downgrade?
 
Guess what?
I am actually getting work done today!
 
@konijn tbh, that reads weirdly to me and may not do what the OP intended. That line alone creates an associative array $content with a key Al, whose value is an array, where the first index of that array is another associative array with three name value pairs.
 
with the amount of Coffee that I am drinking it makes time slow to a crawl so that I can think way faster!
6
 
4:35 PM
@RubberDuck Y cuz android
fkcers
 
lol
 
they don't have java 8
replacing new Callable with a lambda is easy
the reverse is a pain
 
On second thought, that may be the intent
 
Nokia is such a troll... They wouldn't make mobile phones for the coming X years because of the sellout to Microsoft... and then they start making tablets :)
 
@xDaevax Then I will decline from reviewing and leave it to a PHP pro ;)
 
4:46 PM
0
Q: An R function for checking whether a variable is binary or continuous

qedThis function takes a numeric vector and returns "con" if it's continous and "bin" if it's binary. It does not take the multinomial case into account, i.e. if a variable y has three possible values 0, 1, 2, it's treated like a continuous variable. Code: checkBinaryTrait = function(v, naVal="N...

 
Arrays in PHP are way more (perhaps too) complicated than they are in other languages. A PHP array is more like a hash map than an array.
 
4:57 PM
Toodles!
 
Doodles!
Can anyone check my answer and tell me if it's at least better than the first one?
0
A: Calculator using PHP with logging to MySQL database

PhrancisSignal-to-Noise ratio Take this with a grain of salt, I realize your teacher might actually have made that a requirement. Generally, comments should not be used to describe what the code is doing, as the code itself does a pretty good job of doing that itself. Comments should be used to explain ...

 
What
Android java doesnt even have multicatch
I feel like I have been betrayed
Basically downgraded to Java 1.6+
 
@Phrancis Did you read the the ### comments in the original answer, they go quite deep, it is not a bad answer at all
 
The format is hard to read, but I'll read into them
(especially since half the code is already comments lol)
 
:P
 
5:10 PM
OK @konijn I can see that they spent a good amount of time in the review and I upvoted accordingly
 
0
Q: How to make python 3.x work faster?

k4droid3sometimes when I write a python 3.x code with too many nested loops and some big values it just takes too long to give the answer. so my question is how to optimize my code so that it run faster or where should I learn optimizing? for example:- def isprime(n): '''check if integer n is a prime'''...

0
Q: Assorted Date Parser

wei2912I've written a date parser that parses different types of dates using Parsec. Credit for the original problem goes to https://www.reddit.com/r/dailyprogrammer/comments/2lvgz6/20141110_challenge_188_easy_yyyymmdd/ The following formats are as such: yyyy-mm-dd mm/dd/yy mm#yy#dd dd*mm*yyyy (month...

0
Q: Please tell me if this code respects Coding Standards and Naming Conventions

Robert CalceanuI am trying to learn C#. Please tell me if the following code respects coding standards and naming conventions because I want to write beautiful code. The purpose of this program was to help me understand different concepts that I've learned in the last few days but I was having difficulties thor...

 
@Phrancis Great!
 
5:28 PM
0
Q: Get missing sequential numbers from array

ZuckI have an array like Original = {1, 2, 3, 6, 7, 8, 9, 10, 12}. After removing some elements like Delete = {6, 7} from it, I want to get n sequential numbers which are not in the array, like IDs = {4, 5, 6, 7, 11, 13, 14, ..., n}. After getting the numbers I want the original array to be changed ...

 
OK thanks for editing and +1 for quick follow-up. Hope you get some good reviews! — Phrancis 13 secs ago
^^ new user seems promising!
 
monking
 
5:57 PM
doesn't support the Stream API and some other stuff, but lambda surely works. I think using multicatch can work as well.
 
Monking @janos
 
Thanks Santas... ;-)
> You've earned the "Good Answer" badge (Answer score of 25 or more) for "Regularity in the “Rusty Towel of Mutual understanding”".
 
@Mat'sMug I don't understand the context of this comment, was there a previous comment or something that has been removed?
Duplicate? How about fizzbuzz? ;) — Mat's Mug 14 hours ago
 
> I realize this is a duplicate question where only the language is different and the mods can delete it if they must, [...]
 
@Mat'sMug ok, thx
@rolfl perhaps I should start pimping this or this to see if I can get a golden answer badge or a Reversal badge...
 
6:02 PM
perhaps you should ;-)
 
-3
Q: Given a BST, transform it into greater sum tree

JavaDeveloperGiven a BST, transform it into greater sum tree where each node contains sum of all nodes greater than that node. Diagram is here. Looking for code review, optimizations and best practices. public class GreaterSumTree implements Iterable { private TreeNode root; public GreaterSumTree(...

2 more downvotes on the question and some more upvotes on my answer needed for golden badge ^^
 
@SimonAndréForsberg Can't help (any more) with either, though.
 
+1 just for the drop shadows
 
@rolfl had a feeling about that :)
@Mat'sMug now that's my Mug!
 
@SimonAndréForsberg Napalmed (and DV question)
 
6:05 PM
has JDQFactory retired?
 
Got a job maybe?
2
 
@rolfl finally
didn't he already had one though?
 
Maybe he found a job trimming trees and branches.
6
 
Maybe he caught onto the whole JDQ thing after it got posted as a meme....
 
6:06 PM
He knew of it officially before.
 
Okay. Just checking, because it's not exactly the nicest thing.
 
@rolfl for a moment there I thought he had turn into @Jamal. Then I noticed the exact link. I prefer this instead: codereview.stackexchange.com/users/28539/…
@RubberDuck I tried to make it sound nice in my Meta meme answer. Not everyone has Socratic around here.
 
Noone has socratic around here....
 
Great, I just found out Google has automatically translated the description of my app...
@rolfl JD?
 
6:09 PM
28 more to go for me, I think.
 
i.e. only JD has socratic.
 
@SimonAndréForsberg I think the meme answer itself is fine. I mean, he does have socratic, which is amazing, but we're not exactly nice about the JDQ's here in the 2nd monitor.
I only bring it up because of the golden rule. Be nice.
 
JD has never answered a question? Wow.
 
I don't think there's a problem with the JDQ concept.
 
@RubberDuck then we'd have to jamalize every user-specific meme we have.
 
6:11 PM
@Phrancis he has, but his answers were essentially non-review "Here's how I would do it"
 
He's been in chat, he knows the deal, he's big part of CR, and his contributions are valued.
 
I thought the more standard golden rule was "he who has the gold makes the rules"
 
@rolfl That's all that matters. I wasn't aware that he was aware.
 
@RubberDuck I have nothing against JD himself. It's some of his questions I have a problem with.
Questions don't have feelings, do they?
3
 
No. They do not.
And neither does code, but OPs and programmers do.
Anyway, not arguing. It was just a passing thought.
 
6:13 PM
For anyone with concerns, read on from here:
Jul 8 at 18:59, by rolfl
Anyway, @JavaDeveloper - you will find, that there is this whole chat side to Code Review, also, you are one of the site's most value-generating people. As the site's most prolific asker, you come up quite a lot in various places including some public newsletters and such
 
I especially have a problem with the BST question I just pimped. He doesn't explain what a "greater sum tree" is, and as shown by my answer, his code is not nearly tested enough. It fails even for his own input.
@RubberDuck It is a good thought. And it is always important to remember.
 
25
Q: A co-worker is using my cup

Paranoid AndroidI have a co-worker using my coffee mug at work. I want to make him stop without sounding like I'm being picky. I have tried making the point indirectly that the cup belongs to me but he still uses it. Our cleaner cleans the cups and puts them on a tray in the kitchen area, he usually arrives in ...

lol@ comments on the code printed on the mug
people are reviewing the code :P
 
If I left my mug at work, I'd put a sticky note saying "touch me and die" on it.
2
 
thank you Santa
> You've earned the "Good Question" badge (Question score of 25 or more) for "Is my coding technique progressing in terms of C# loops?".
 
@DanLyons Such as? I'm having a hard time finding it.
 
6:23 PM
I don't like the way sweetner enumeration is called Beverage, e.g. Beverage.Sweetner. Also, why is Cream a boolean property when it should be added via an Add() method. This entire code block reads like it was written by a design student who did a programming module to meet a course requirement. A design student who would ultimately go on to designing mugs, and not software. — DaveDev 3 hours ago
 
ahhh nevermind. =)
I'm no programmer but why the heck are you disposing of your cup after finishing your beverage? — Richard 10 mins ago
2
 
Why are my method names capitalized and have underscores? :( — asteri 11 mins ago
and lol:
Should this question be migrated to Code Review? Just checking ;-) — rolfl 5 mins ago
oh, my next answer will be my 400th!
3
(just noticed)
 
I wondered why the consume method took in the mug, and why you would need to dispose of the mug after you consume it
 
I hate to say this but it appears that you might have a resource leak in your cup. If Consume throws an exception - say because you dribble - Dispose won't be called. Of course, in this case, that's probably a good idea because it really doesn't appear that your Cup should be implementing IDisposable. — tvanfosson 4 hours ago
 
haha
2
 
6:27 PM
chat is being crappy I better get back to work
 
Heya.
 
0
Q: Basic text editor in Python with Tkinter

CaridorcI have finished writing my nice and little text editor in Python with Tkinter. I tried to achieve the best user experience that I could. I want this code to be 2/3 compatible, I tested it in both versions but if you could test it out again in the 2 versions too it would very knd of you. I did ...

1
Q: Javascrip/jQuery string handling

Joel BrewerRecently I wrote some code to take two arrays of data and create a title. Each array could have 0-n elements. However, the multiple if statements seem messy to me. Is there a nicer way to do this? Perhaps one that harnesses the power of jQuery better? var campaign_names = data["campaign_names"];...

 
@kleinfreund heya
you're here often now again, good to see :)
2
 
Hey hey, @Simon
Let's see how it goes on. I'm almost constantly busy, so there is not much time for things besides uni.
Not complaining, though.
 
Somedays I'm amazed that they let me go anywhere near a database.
6
 
6:40 PM
Gonna watch Interstellar tonight.
 
6:50 PM
if I keep answering C# questions and getting upvotes I will soon become a member of the silver club!
 
@konijn I was told to seek your input on a JS question I have.
 
:)
shoot
 
8
Q: Custom JavaScript validation using the factory / module patterns

xDaevaxI am in the process of diving a bit deeper into JavaScript development and am looking at some common language patterns (module, and factory in particular). In this code, my aim is to create a re-usable framework for creating custom field validators in JS that can be easily extended. In addition...

 
Though I gotto go offline, I will check this chat when I come back
 
00:00 - 19:0019:00 - 00:00

« first day (563 days earlier)      last day (3457 days later) »