« first day (783 days earlier)      last day (3253 days later) » 

12:00 AM
There are 1406 unanswered questions (94.3455% answered)
@maaartinus Done, but it isn't the best.
@Phrancis If you could, that'd be awesome
Alright, let me have a smoke real quick and then we'll look at it
By then the Cap'n should have posted my question...
@Hosch250 You've mist the part saying that I don't give a damn about some conventions.
Sorry, I skipped right to the code.
I guess my answer isn't any good then.
12:04 AM
Q: Do you Connect with my Groove?

PhrancisI'm new at groovy, and this is my first time writing a database connection script. It may seem like example code, but it is more like test code. It works as posted, and I'm planning to use this as a model for a larger business application, so I want to make sure I do it right. Are there any groo...

Q: User can choose to add one of two node types to a treeView, both of which have almost identical settings

RaymondAs I posted elsewhere before being directed here: I only recently started learning about the importance of refactoring and avoiding duplicate code, and it's still confusing me a bit. Here is a quick rundown of what the code I'll provide does: There is a context menu that comes up when a user rig...

Q: Tiny function to ensure a node of a BST has a valid relationship with its children

CarcigenicateI need to write a method to ensure that all of the nodes of a BST (Binary Search Tree) are valid. For a node to be valid, 2 things must hold: The left child must be less than the current node's value The right child must be greater than the current node's value. I decided to write a helper me...

@QPaysTaxes Come on man, there's been worse pun-funny titles cough cough @Mat'sMug cough
Your title should be an explanation of what your code does, not a question about your code (or, in this case, a witty pun). — QPaysTaxes 1 min ago
Coming from you @QPaysTaxes, really? (:P)
I ought to flag that as too chatty.
Just cause ;)
I didn't.
Original titles = more traffic = sometimes hot network questions = more more traffic :)
There was a meta post a while ago about best question titles
One word: Down with FizzBuzz, LOL
@Hosch250 I haven't read it yet. I actually consider a*b + c*d way better than anything else. And that's my system, leaving out the innermost spaces, whenever it helps readability. It's no exact rule, unfortunately.
But it is more than that.
I say two ifs.
One was if (condition >= condition)
The other was if (condition>=condition)
Hey @all, does .add() in C#, work with a null value
@Hosch250 That's why I'm saying it's not exact.
12:14 AM
Guys, for the lols I tried to make an account with the display name all
Maybe I'll write a formatter one day, which understands what I mean.
and it gave me somebody elses account
I just signed up and it gave me this profile
and it already had an answer on a question on Super User
You used their email, I think.
That's my best guess.
12:16 AM
I did use a throwaway email, so maybe
Working on it
@Quill Ready for self-referencing SQL joins?
Q: Thread-safe irregular rate limiter

IndigenuityGoogle's Guava library has a great RateLimiter, but I also needed a way to limit on an irregular basis, such as if an API I'm using has been throttled. I basically built a wrapper around Guava's RateLimiter, only using the simple acquire() method from it. import java.util.concurrent.Execution...

Q: Raw Text TCP Client

Motoko KusanagiYesterday I posted a request for a code review. After reviewing the code and the reviews, and after some sleep, I decided I can do better. In fact I logged on with the intent of deleting the question just as the first review was posted; so I was stuck with it. This is pretty much the same program...

@Phrancis It's Asp, not sql
I know nothing about ASP, I thought you were asking about SEDE queries
Nah, thanks anyway though
12:26 AM
Alrighty. I might do it anyways for fun ;p
@Quill there's no .add() in C#. Only .Add().
And yes, if your List<T> is a list of reference types, null is a valid value
A: Loading template file and replacing placeholders

allI would say suggest writing your input like so: function replace_tags($template, $placeholders){ $placeholders = array_merge($placeholders, array('<?'=>'', '?>'=>'')); return str_replace(array_keys($placeholders), $placeholders, $template); } $vars = array('{{NAME}}'=>'Bob', '{{USERNAME...

I need the 20 rep before I can bring that user here
Signed up, lol
@Quill lol
Sock puppets are ok. Just be aware that voting behavior will be monitored.
@all, hello
@all don't upvote @Quill's posts
12:39 AM
@Mat'sMug lol, of course not
I don't really know what the point of that was, actually
I also don't have enough rep to upvote yet, so lol @Mat'sMug
@QPaysTaxes goddamn, Caps Pls
I like how @all is the opposite of @nobody
@Mat'sMug @everybody would be better
It also seems better from a pinging point of view
there is an actual @nobody
12:42 AM
Yes, but @everybody would be a better antonym
@QPaysTaxes lol 2 hard
@all I believe 15 rep is enough to upvote
lol, my bad
It's not like he deserves it anyway, lol
@QPaysTaxes Don't feel like laughing when I read your sarcastic answers
I will stop this, and work on a bot later
@Phrancis that's 4. and what's wrong with that one?
12:45 AM
Bye Bye @all
I like your name, @all. But what is the plans? What kind of bot is in the works?
, I guess
pinging everybody in the room, I think
Although that would be annoying
yes, it would ^^
I guess @all: no-ping
@all: ping
12:46 AM
except it could be useful if the only users allowed to send commands are mods & room owners
or perhaps even turn off for certain users
I would like a clean way btw to determine programmatically (Java / Groovy-atically) who the room owners of a certain room is
@Mat'sMug Fair point
Maybe make one of those temporary rooms to send the command, although that seems a little over the top
12:47 AM
Once I get @Duga's interactiveness to work somewhat well again, there will be different authentication levels for different commands. Some commands should only be accessible to room owners, some to only mods, some to only me :)
@Quill before a bot is allowed in the 2nd monitor, a meta post is in order. we allow tools, not toys.
@Mat'sMug Of course, it's only an idea at the moment, and a toy is most certainly not what we need
My main goal for @Duga is that she is a tool. I hope she will always remain that way
@QPaysTaxes Fruit, time, or event?
12:49 AM
@QPaysTaxes Correction: I should probably not have the date command at all.
@SimonAndréForsberg Duga is our zombie slayer friend
Besides, we already know that @Duga and @RubberDuck like each other.
@QPaysTaxes Easter eggs are not tools.
@QPaysTaxes Sounds like a ... toy *GASP*
@QPaysTaxes Google is a tool, but has toys
run Chrome. Google is one click away.
well then...
I know, you can google a lot of things to get special effects. But neither @Duga nor Stack Exchange chat is Google.
12:51 AM
Wow, I really mangled that query, so far
@Duga and I are in <3
There is a permanent chat bot hanging around in the Java room on Stack Overflow, but that's a quite Java-specific work, and I believe it is also mostly a tool.
Anyway, good night folks.
Night @Simon
Night @Simon!
12:53 AM
Good night @SimonAndréForsberg
Later gator
Sounds like what you really want to ask is "how do I generate random numbers?" When you're eating an elephant, eat it one bite at a time. — nhgrif 11 mins ago
@QPaysTaxes - you need to work on your SNR.
@SimonAndréForsberg What's wrong with long variable names? Doesn't your IDE have code completion?
12:56 AM
I agree, @nhgrif - Simon André Forsberg is a huge name, but @Sim<tab> works fine.
@sim works just as well, too
@QPaysTaxes It's a filter I have, and you dip below the squelch-line more than you should.
In telecommunications, squelch is a circuit function that acts to suppress the audio (or video) output of a receiver in the absence of a sufficiently strong desired input signal. Squelch is widely used in two-way radios to suppress the annoying sound of channel noise when the radio is not receiving a transmission. == Carrier squelch == A carrier squelch or noise squelch is the most simple variant of all. It operates strictly on the signal strength, such as when a television mutes the audio or blanks the video on "empty" channels, or when a walkie talkie mutes the audio when no signal is present...
signal/noise ratio
Signal-to-noise ratio (abbreviated SNR) is a measure used in science and engineering that compares the level of a desired signal to the level of background noise. It is defined as the ratio of signal power to the noise power, often expressed in decibels. A ratio higher than 1:1 (greater than 0 dB) indicates more signal than noise. While SNR is commonly quoted for electrical signals, it can be applied to any form of signal (such as isotope levels in an ice core or biochemical signaling between cells). The signal-to-noise ratio, the bandwidth, and the channel capacity of a communication channel are...
My suggestion is that you should say less, and what you say should mean more. Otherwise people will just tune you out. I am at that point.
1:02 AM
Wow. My SEDE query gets more f*&ked up by the minute.
Anyone got any ideas for my Resx editor?
And no, Easter eggs don't count.
@Jamal Code was not changed, though?
True. If anything, the typo can be fixed. ;-)
ah, that's the part I missed!
1:05 AM
@rolfl check this out in your spare time tinyurl.com/nd9loaq
unless you don't like to draw mushrooms in your CRO...
Is that the mushroom one?
@Mehrad You can just use markdown to make your urls
I like hovering a link and seeing where it's going.
OK, that's cool
I should make a feature request for Edge - expand links to the file destination (for shortened links are re-directs).
1:08 AM
@Quill The link is about somebody making the CRO to draw a man riding a bike with a music input. So basically about using something for some purpose which isn't intended to do at all so I thought I do the same :P
Trouble is, I'm back on 8.1 again.
So, I don't have Edge.
Or the feedback app, which is more important.
@rolfl It's all the mushrooms
Ok how about you give me a suggestion as well? I am a frequent poster on stackoverflow, but I am open to suggestions from you. Can you give me an example of how I should rephrase my question? — AndyRoid 22 secs ago
Q: If-Else Conditionals Reduction

AndyRoidThis is a fun piece. I have this block of code here: if (minutes >= 60 && hours < 24) { return hours + " hours ago"; } else if (hours >= 24 && days <= 30) { return days + " days ago"; } else if (minutes <= -60 && hours > -24) { return -hours + " hours from now"; ...

1:15 AM
Yeah, that...
@Hosch250 First time I've ever heard someone complain about not having IE Edge
Not complaining.
Just saying I can't give feedback.
Ah ok
@rolfl me too
@CaptainObvious FGITW there.
1:23 AM
Q: implementation of C linked list (Queue) of C strings on mega AVR

Luke GaryI have been working on a mechanism to queue up strings coming into a system via a USART and have implemented it as a singly linked list. I have done my best to profile the code and its memory usage at runtime depending on the amount of data fed to the data structure, but can anyone see anything "...

@Hosch250 You realize that answer of yours will give the wrong results ;-) ?
@rolfl Really?
Well, his code seems to have both a negative and positive side on the timeline
So, 0 is now..... negative tiems are in the future, and positive times are in the past
So, +36 hours is 1 day ago, and -36 hours is 1 day away
1:27 AM
Oh, the output!
I get it, updating.
@rolfl Is this correct?
Thanks for the tip.
I earned my target (+50) inside of 24 minutes.
Maybe I have a chance to cap today.
@Hosch250 Go for it!
If just 3 more of those come along, and I see them in the queue and get an answer up before they are posted by Captain...
I'm voting to close this question as off-topic because it belongs to Code Review.SECactus 27 secs ago
@Cactus belonging on CR isn't a close reason; closing the question isn't going to help it migrate to Code Review either. If you think this post would be better off on CR, mention it in your custom moderator flag. — Mat's Mug 55 secs ago
@Cactus and upvoter: Just because a question is on-topic at Code Review doesn't make it off-topic here. I do agree that Code Review is probably a better site for it, though. — Hosch250 45 secs ago
1:50 AM
 * @note    Not debugged, prolly leakier than a diarrhea butt
Guys, wasn't I too rude in codereview.stackexchange.com/a/94723/14363? When I see how complicated the things can be made...
@maaartinus Not really, the question can almost be closed as stub code.
I upvoted.
> I'd just say, WTF is this doing?
gets my upvote
Thanks. LOL.
May 26 at 19:25, by nhgrif
Never calculate date time by hand. This rule is more important than not using GoTo statements...
1:57 AM
The OP just added more code of a different language to this question: codereview.stackexchange.com/q/94710/27623
He says it's a usage case
Get a damn database or something, all that stuff is built in and so incredibly accurate
Should it be removed?
Whoops, I meant Python/C.
1:58 AM
> added usage case
I never knew they could be used together.
Is it okay? I'm not sure that's what he's looking to have reviewed
it doesn't void any answer, I don't see harm there
But I'm also not sure it really serves any purpose in the question
@Mat'sMug Okay!
it might help clarify usage, no?
1:59 AM
2071-12-30 17:05:59
@Hosch250 I know they can, I'm just not exactly sure of the relation
Yeah, just saying it's new to me.
@Mat'sMug Mmmmm, yeah somewhat I guess
Seems fine then, although possibly a bit late.
Unless you want to update your answer now you've seen it...
Nah, doesn't affect my review
2:02 AM
My latest questions haven't gotten a lot of attention.
Kind of early, though, I guess.
So, I have 4 days to decide whether to run as mod.
Half of me says yes, the experience would be good, and I probably won't win anyway.
The other half says I won't be very good at it, and so on...
@Phrancis Agreed, but for things like "3 months ago" hardly anyone cares, that's it's just 2.95 month.
Depends who you ask I guess, I'm sure the IRS would care :)
Downvote into oblivion if you think this is crap, but I personally feel it's OK. Vote to delete even, no grudges
A: Conditionals for time specific data

PhrancisNot the best tool for the job. I frequently use database systems strictly for date-time calculations. Because they are really good at it. A Code Review regular once said: Never calculate date time by hand. This rule is more important than not using GoTo statements... Database connectors fo...

@RubberDuck Even Jon Skeet can't get Git Rebase to work:
I just did a git rebase, and it worked first time, doing what I expected it to. I feel so 133t right now. It'll all go horribly wrong soon.
I'm not surprised it doesn't work for me.
2:14 AM
I more often find myself git reset hard --HEAD
(or whatever)
@Phrancis that's hit hard --HEAD
I screw up Simon's repo semi-regularly
Rubberduck likes me to Rebase - Squash my commits.
But I've never been able to get it to work, and he tried on one of my PR's and couldn't do it either.
This is a great idea. I am doing this on a mobile product, so maybe using the SQLite DB on the device? — AndyRoid 1 min ago
@Hosch250 I'm pretty positive I'm not, I don't have the time
As awesome as I think it would be
2:19 AM
It would take away from my programming time.
I'm in the chat room the 30 minutes per day, but...
Did I hear we're going to have 5 mods total?
@Phrancis ???
I didn't hear that.
2:20 AM
I must have hallucinated
@Hosch250 I drop by on occasion
If we have that many, I might run.
I find the idea perverted, because of 1. the need to have some DB around, 2. inefficiency (round trip to DB), 3. exposing yourself to various DB quirks. +++ That said, it's an original idea. — maaartinus 1 min ago
I'm hoping that all the current mods run
@Mat'sMug About the community challenge, how is this going to work?
Won't it have to run client-side, thereby making new users not have any prompt whatsoever anyway?
A: July 2015 Community Challenge

Mat's MugTitle/Question Analyzer As we all [hopefully] know, posting code that doesn't work as intended is off-topic on this site. Given a title and a body, implement an AI that can detect if a Code Review question is likely to be off-topic broken code.

2:23 AM
@Hosch250 the goal isn't to actually hijack SE... just to implement the - indeed - client-side logic to make it work...
So, it will be a toy for the regulars?
Programming is programming...
Aren't all CC's toys for regulars?
So, here's some food for thought.
2:25 AM
CC's have no language consraints either, so if you want to make a console app in VB.NET that implements the logic, go ahead
I need to get on the web through C# some time.
I am going to start putting together an openSTV analysis app on IBM's bluemix system using Node.js, angular.js, and whatever else is needed.
@rolfl Cool.
The goal will be to have it as part of July, but also link it back to other elections so you can just "pull them" from other stack sites.
I personally find your challenge a bit more useful (and interesting).
I should do that now while I wait for RD to get off feature lock.
2:27 AM
I have been kicking around the idea for a bit, and think I will make a go of it. I need to learn angular, and bluemix, and this works as a template
@rolfl 'bout time!
So, this is a general invitation for anyone who wants to participate, with the condition that it will have to be linked in to those technologoes.
I upvoted all [re-]submittals btw
(Bluemix cloud provided service, node.js as the engine, angular.js as the presentation layer, probably botstrap for CSS.
maybe some d3 for pretty infographics
I should write a WPF MeedSTV app.
2:30 AM
on top of git, cloudfoundry, and I will likely use the eclipse support for javascript.
I don't know any of those :(
nor do I, really ;-)
that's the point
@Hosch250 Fancy way to say it's gonna be a challenge :P
@Hosch250 when @RubberDuck started working on RD, he had never written a line of C#
2:31 AM
The thing is, I'm still learning C#!
I bet I could get this up in a couple days.
@Mat'sMug How soon are you doing to release RD?
as soon as the resolver stops crashing
So, could be 1 day, could be 1 year?
end of week, latest.
I guess I'll do it.
It will take you guys a little bit to get Ninject up anyway, and I don't want to mess things up there.
Q: Ball Entity for a Entity/Component/System Soccer Game - Revision 1

alexpfxI made some refactorings in my classes. The original code is in this question. In that question I receive the suggestion to create a Factory for the class BallEntity. I myself forgot that BallEntity is just a kind o 'factory' or 'builder' for a "Ball Entity". Just because Entities in an Entity/...

2:38 AM
lots of happy returning customers lately, no?
@maaartinus Yes I saw that, and I respect the feeling completely. But, lesser of two evils?
Calculating date-time is one of the woes of writing code, and it just so happens that DBs do a superb job at it. But perhaps not enough of a reason to package SQLite with an app.
A: How to measure the wavelength of a laser pointer?

FlorisYour iPhone is a pretty good grating. I just did a simple experiment with an iPhone, a green laser pointer and a sheet of graph paper. This was the result: The display of the iPhone 6 has a resolution of 326 ppi - meaning we have a "grating spacing" of 25.4/326=0.0779 mm. Different models ha...

Though I'd argue, many mobile apps package SQLite anyways (for other reasons) so may as well take advantage of it
Code review probably works too assuming you have a working program in need of review. — Retired Ninja 34 secs ago
3:00 AM
@Phrancis I actually dislike all the DB stuff, so I'd never use it without someone pointing a gun at my head. but YMMW. I guess with Joda-Time (or JDK 8), there's everything you need in Java, isn't it?
3:21 AM
This code is obfuscated and not Unicode compatible. For junior engineers whom I'm trying to educate on how to write maintainable code, I would hold this up as an antipattern. Certainly it wouldn't pass code review. — ArchaeaSoftware 1 min ago
Q: program that generates a random hole number

Paul Kelleyis there any way I can have the same function but have it compiled? // change to change max and minimum numbers var number= random(1, 6); // makes number into intiger var integer = round(number); // creates background fill(0, 0, 0); // controls text size ...

@CaptainObvious Oof. I know that guy personally, so it's hard to VTC, but, aaaargh.
Oh, and Monk* &all
Is anyone still awake?
There is someone in here that starred that.
Talk to me, mystery person.
3:36 AM
Eek! A ghost!
I wish I didn't have to VTC that question.
Aww. The mug has gone quiet.
Q: Filter CSV file and display it using Highcharts

Sachi TekinaI created a function which reads CSV file and displays those values in a graphical form using Highcharts. Although it works, I have to read the CSV file twice because first: I need to get all the dates for the date values I need to read it again through a function based on the filtered values...

still lurking... just.. debugging 's IdentifierReferenceResolver
3:47 AM
Ah. I have no idea what the IndentifierReferenceSolver is. xD
Q: C++ Trie Implementation

tmck-codeI recently tried a basic C++ implementation of a Trie, and was looking for some feedback on my code style/choices. In particular I was wondering if I'd made the right choice spitting the program up into header files and using classes instead of structs? Inside the main.cpp there is a very basic...

Well, night anyways
Q: Who's using what and where - resolving identifier references, take 2

Mat's MugThe first version of Rubberduck's IdentifierReferenceListener class caused StackOverflowException that brought down the VBE and its host app with it. So I rewrote it, and I'm hoping not to get a CodeReviewException now. This code is used by an ANTLR listener that calls methods of the public inte...

@mjolka un-deleted. I extracted a whole class, DRY'd it up and turned the listener into nothing more than a series of calls into this IdentifierReferenceResolver class. It's still quite large, but I didn't have to remove any members to fit the 30K limit :)
4:01 AM
there's a joke in there somewhere about dis-membering
"// getter can't reference setter.. right?"
why not?
because of VBA's syntax for returning the getter's return value
Private f As Integer

Public Property Get Foo() As Integer
    Foo = f
End Property

Public Property Let Foo(ByVal value As Integer)
    f = value
End Property
Foo = in the getter block can only be assigning the getter's return value
ah ok
hmm actually...
4:07 AM
in FindModuleScopeProcedure why are you calling ToList?
Me.Foo = f
^^ this would call the setter (Property Let) and return 0
so damn, yeah, getter can, technically reference the setter... crap.
@mjolka good catch. no idea.
actually you can remove the Where as well, use the overload of SingleOrDefault that takes a predicate
yeah.. probably was there for debugging
just changed it now (in the code, not in OP)
DeclarationType is an enum?
public enum DeclarationType
    Project = 1 << 0,
    Module = 1 << 1,
    Class = 1 << 2,
    Control = 1 << 3,
    UserForm = 1 << 4,
    Document = 1 << 5,
    ModuleOption = 1 << 6,
    Member = 1 << 7,
    Procedure = 1 << 8 | Member,
    Function = 1 << 9 | Member,
    Property = 1 << 10 | Member,
    PropertyGet = 1 << 11 | Property | Function,
    PropertyLet = 1 << 12 | Property | Procedure,
    PropertySet = 1 << 13 | Property | Procedure,
    Parameter = 1 << 14,
    Variable = 1 << 15,
4:15 AM
is this .net 4.0 or 4.5?
i'd probably use an IReadOnlyList instead of a hashset for _moduleTypes and _memberTypes
3-5 members each, they're not being added to. Contains is going to be fast enough (possibly faster) using a list, i'd wager
done :)
or ... create IsModuleType/IsMemberType methods, and you could use a switch
i might be overthinking this
but i think i'd prefer IsModuleType(item.DeclarationType) to _moduleTypes.Contains(item.DeclarationType)
hmm me too... but yeah borderline overkill ;)
it's a private api
I'm thoroughly amazed that the VBE's "go to declaration" feature can't tell if an identifier is referencing a property getter or a property setter... and my code can
4:25 AM
@StephenMuecke, this might help a little: codereview.stackexchange.com/questions/94657/… This approach works perfectly but not best practice. needs to be refactored. — Kala J 30 secs ago
4:44 AM
> // todo: understand WTF [baseType] is doing in that grammar rule...
damn, I keep finding issues
screw it, I'm deleting that post.

« first day (783 days earlier)      last day (3253 days later) »