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

7:05 PM
0
Q: Should we sign up for Winter Bash 2014?

JamalWinter Bash 2014 is approaching! We signed up for it last year, and it was a really big hit. I'm still posting this in order to get an official word from the community and to make new users aware of this event. Since the moderators have just received the announcement, there isn't much new info...

 
0
Q: Clojure programming exercise

PiotrI'm learning Clojure and have written small function to calculate change. Don't like few things about the code, primarly would like to replace reqursive call with something more idiomatic. Could you please comment on the code and suggest better (more Clojure like) way of implementing it? (def in...

0
Q: Is it possible to vectorize this simple function?

N1B4I'm currently implementing a function jordan_partition that takes a scalar surface temperature t_sfc as input, and based on its relationship to the freezing point t_frz, a fractional ice content f_pice is returned. t_frz = 273.15 def jordan_partition(t_sfc): """ Determine fractional ice c...

 
0
A: Should we sign up for Winter Bash 2014?

Mat's MugDo we really need to ask? Of course we should!!

 
^^ That
 
7:21 PM
HATS
3
 
I wonder...
40
Q: What are the fantasy secret hats you'd wish to get?

Loïc Faure-LacroixI had for some days the fantasy of getting a grinch hat. I know there is a hat when you only do upvotes in a day and believed it could make sense to have the same kind of hats for downvotes only. It would be the grinch hat. The programmer that ruined christmas. What are the fantasy secret hats y...

 
Console.WriteLine(chatLog.FindByUser('@RubberDuck').Max((x) => x.TimeStamp).Message);
 
@xDaevax Huh?
 
Just echoing your sentiment. ;) about the hats and such
 
0
A: Should we sign up for Winter Bash 2014?

Simon André ForsbergNo, we should not because I won't be able to get the special New Year's hats since I will be AFK!

 
7:27 PM
^^ insta-downvote
3
@kleinfreund earning a [meta-badge:peer-pressure] I guess :) — Mat's Mug 57 secs ago
 
lol, someone just had to be a little negative :)
there was way too few downvotes on meta
 
IKR
 
who says it will be hats again?
I don't think so
 
@janos because it hats to be
 
No one, but a duck can dream @janos.
 
7:36 PM
Budum-Tss.
 
Do you see this fedora? @Ducky needs a new hat.
 
it was hats last year, so I doubt it will be the same
 
@RubberDuck You're already wearing a hat, no new hat for you!
 
my bet is on masks
 
@janos I thought it was always hats?
 
7:37 PM
the year before was mustaches
 
@janos 255.255.255.0. That's my mask.
3
 
that could make a fun mask indeed :)
 
Hello everyone.
 
hi @Mike!
 
Hey @Mike!
 
7:38 PM
welcome to The 2nd Monitor!
 
We're just talking about Winterbash. =)
 
What's winterbash?
 
lol
 
7:39 PM
@ducky RSA
 
@Mike it's a gamification of the whole SE system, for the holidays. fun fun fun :)
 
Abby T. Miller on December 15, 2013

The gatherings of family and friends, the giving and receiving of gifts, the making and/or breaking of New Year’s resolutions – however you and yours celebrate, the end of a calendar year heralds many traditions.

Here at Stack Exchange, we wanted to get each of you an awesome, personal gift, and mail it to you as our way of saying “thanks.” But our accountant pointed out that there are 4.5 million of you, which promptly reminded us that the holidays aren’t about gifts. The real spirit of the holidays can only be captured with… …

@Phrancis danka
 
@Mat'sMug It's gamification within gamification.
 
posted on November 18, 2014 by Naman Dixit

I am a beginner in Pygame/SDL; right now, I tried to write a small Pong clone. Everything else works except that the collision detection between the ball and pad is undetected most of the times (but not always). Code follows (I have commented around the piece of code I think is culprit): import pygame from pygame.locals import * import sys WHITE = 255,255,255 BLACK

 
Ohh cool
 
7:41 PM
@Captain quit drinking
 
Ohh the 2nd Monitor. I get it now. If I only had a second monitor on this computer. I was thinking, "How do these guys get work done while going back and forth between programs."
2
 
Work? What's that?
 
@Mike They probably don't :)
 
@Mike also, the site is about code reviewing, which is read from another perspective, and by another person on another computer, and thus The 2nd Monitor :)
 
Hey! I get work done... Sometimes.
 
7:46 PM
why is that last @Cap obvious different from the others?
and why can't I get @Cap to auto-complete properly like the others?
 
Looks like it picked up the formatting from the blog post
Used to be able to, but it's not a real user so with recent changes to chat it seems to have disabled it.
You can just click on the left and hit Reply though
@CaptainObvious Get your formatting straight
 
@janos he just gets into that mood sometimes, no one really knows why...
 
I see, I see
 
@janos I don't think you've ever been able to ping Mr. Obvious without replying directly to one of his messages.
 
@SimonAndréForsberg he used to autocomplete.. before that last chat system update
@StackExchange too
 
7:49 PM
@SimonAndréForsberg We used to AFAIK, before they put in that feature that shows you user picture
 
^^ that
 
I wasn't around back then
 
Guessing it looks for a valid user ID and @Captain's is -263
 
@janos I think you were, it wasn't that long ago.
 
a year ago I've never logged in to chat, ever
 
7:51 PM
@Mike It's not usually this chaotic. We're usually talking about Code, or the site.
 
^^ yeah, yeah
 
We just got kind of excited about Winterbash. =)
 
trying to find out when this chat change was done, but searching chat is like.... yeah, I don't know what...
 
Oh, and @ducky lies through his teeth. It usually is this chaotic actually.
4
 
hahaha
 
7:54 PM
@SimonAndréForsberg I think it was in September
 
Do you guys ask simple questions about code here? Like what are the buttons at the top of applications called? ie. File, View, Edit
 
October 30th or so.
Oct 30 at 0:46, by RubberDuck
Anybody notice that we now get auto complete pings on mobile?
Sometimes simple, sometimes not so simple.
 
@Mike file, edit, view, history, bookmarks, tools, help (Firefox)
 
All the time @Mike - Each of use kind of has a language or two (or 20 @Simon) that we use and we ask each other things
 
@Phrancis me, 20? Oh no.
 
7:57 PM
0
Q: Bring back the chat feed autocomplete!

retailcoderIt's just.. cultural. This might be only affecting the morale of the folks in The 2nd Monitor chatroom, but before that chat system update that somehow changed how autocomplete works, we used to be able to "ping" our lovely questions feed, using the @ notation, and the system would happily autoco...

 
@Mike If you have a question about user interface design, then User Experience might be the more appropriate place.
 
Thanks @si
Thanks @SimonAndréForsberg, @Phrancis, @200_success
 
Don't be a stranger @Mike there's always someone lurking here :)
 
I'm not always a fan of Shog9, but the man has a point:
Use the reply feature. If clicking the little arrow is too much work, install the keyboard script. — Shog9 ♦ 4 mins ago
 
0
Q: Javascript Parsing CSV (I think its CSV?)

wellbutrinSo this is part of a bigger project I'm doing to get better at javascript. It's basicly the beginnings of a combat log parser for World Of Warcraft. It looks abit messy right now and I could really use some feedback at this point since I'm not really sure if I'm moving in the right direction her...

 
8:10 PM
@CaptainObvious I think it's a question.
 
Dang I need 20 rep to talk on User Experience. Can I ask you guys a question?
 
What's up @Mike?
 
@Mike I believe 20 rep on some SE site is enough. If you can talk here, you can also talk on UE.
 
I'm working on a Password safe. If the user clicks the add button it will open up a new Form and ask for the necessary information. Once that's filled out and the user Clicks 'Add' on the new form I want that Login to be returned to the main form. I don't know the name of what I'm trying to do so I can't look it up. What am I trying to do?
 
What language(S) are you working with? JS, PHP...?
 
8:19 PM
c#
 
@Mat'sMug can probably point you in the right direction!
 
Is there a name for what I'm trying to accomplish?
 
@Shog9 what would actually be nice is if the mobile version featured that little arrow. But I guess you're right, we're just somewhat lazy ;) — retailcoder 30 secs ago
@Mike authentication?
 
@Mike callback
but authentication is also correct
 
8:27 PM
sounds like you want/need to add some callback / delegator / eventlistener when the Login button has been clicked
 
I think this is a good starting point
 
@Mike what language is it?
?
what @Simon says
 
ah
then you need to register the button's Click event
button1.Click += MyClickHandler
and then have a private void MyClickHandler(object sender, EventArgs e) method in that scope
 
0
Q: Sorting with nested if statements

BillyIs there a way to write this more simply? if(criteria.SortBy =="name") { if (criteria.SortDirection == "ascending") { physicians.OrderBy(x=>x.Name); } else { physicians.OrderByDescending(x=>x.Name); } } if...

0
Q: Sql Injection and how?

bhartayI have code like this. i want to be sure that is it vulnerable to Sql injection if yes, then how? $pid = $_REQUEST['product_id']; $query1 = "SELECT * FROM products WHERE id = '" . $pid . "'"; $result = mysql_db_query($dbname, $query1) or die("Failed Query of " . $query1); $thisrow=mysql_fetc...

 
8:34 PM
@Mat'sMug I'll be working on this somemore. I'll upload it for code review later. Thanks for your help.
 
@CaptainObvious INJECT... ALL THE DATABASES
 
@Phrancis WHY AM I OUT OF STARS?
 
You're always out of stars by like lunch time, @ducky ;)
2
 
@Mike great!
 
@janos FGITW
 
8:39 PM
uhm, low hanging fruit....
 
> If yes, then how can it be improved?
 
@Phrancis Just on days I hate my dayjob.
 
@Phrancis @Jamal added that (nicely done!) after I already answered ;-)
 
Gotcha
 
9:30 PM
reviewing "design pattern" example source code
I have never seen so many empty classes and so many layers of fluff to print a simple message
 
@Pimgd I see lots of empty classes when I look around the university before lectures start!
 
also many obscure crashes because the code is semipseudo code
you can't just new SomeObject() in actual code, people.
 
At least the comments are funny sometimes
// pass sprite_B ass the successor of child_A
// pass NullHandler ass the successor of sprite_B;
 
@Pimgd Should it be VTC as pseudo-code?
 
9:34 PM
I wish I could VTC it
But it's a book =)
 
Link?
OH LOL
 
I swear, I was also thinking it was about a question
 
@Vogel612 that was fast: I wrote quite a lot there, you digested all that so fast?
 
btn = _stage.addChild(new Sprite()) as ReusableButton;
btn.exitCommand = new ResumeCommand( whateverPauseable )
TT_TT
Yeah, that'll work! Create an Object, then expect it to magically be cast into a Button! Or maybe a List! Because programming is like magic, anyway
 
@Phrancis wow. hats off to this guy!
 
9:39 PM
@Pimgd The creepy part is that it will even work in some obscure languages!
 
what.
why.
 
@janos I'm sure it takes nerves of steel to review such bad code, hope he gets the accept (no offense to your answer)
 
he should. I upvoted. I think the user knows too what he should do
 
public class AbstractArrayCollection extends AbastractCollection
Guess the compiler error
Why would you bother compiling your own code, anyway
2
At least I have learned one thing
Do not accept contract work through Stack Overflow
spare time is precious
 
contract work through SO ??
 
9:53 PM
yeah
When someone finds your email address and offers you money to do something
like reviewing a book for mistakes in code examples, including the source code download provided with the book
 
@janos I am a fast reader and I was able to check it the moment you answered
I will sure reread it a few times though.
 
you're fast
anyway, gotta go now
 
But as of now it's by far the best amswer :)
 
maybe not "by far"
anyway, really have to go
 
String( getTimer() ).toString();
 
9:55 PM
see you guys
 
....
Was the original not stringy enough?
 
0
Q: final fields and multiple constructors in java

Ryan The LeachThe following is a excerpt from a class that is supposed to represent a reflection of an object in a 3d world, like in a mirror. After I started I discovered that mirroring is a property of an object, it is either mirrored, or it isn't. Multiple mirrors don't come up with unique objects but jus...

 
When you're creating AbstractArrayIteratorFactory's, you've gone too deep
 
@CaptainObvious Just wanted you to know that I am not lazy
 
10:26 PM
1
Q: VBA Code Profiling

enderlandI have wanted a way to do code profiling in VBA for quite some time. It becomes very complicated to figure out what methods are actually being executed for how long and how often in complex Access applications. A key reason this is complicated is that many form events or function calculations ha...

 
> Strongly prefer uniqueidentifier (with sequential increment) over int IDENTITY for surrogate keys
^^ anyone can say why?
 
Sounds pretty arbitrary, but I have not used surrogate keys yet... Check MSDN?
 
static protected const Email_Expression : RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i
Oh shit, they're using an email regex
What's the correct one again?
 
center@cannothold.bleh
 
@Phrancis I'm designing a normalized data store - the "surrogate key" is just the key that my data warehouse is going to be using - it replaces the arbitrary "row_id" from the source system, and I use it instead of the "natural key" to lookup records.
 
10:31 PM
> Surrogate Key

Surrogate keys are keys that have no business meaning and are solely used to identify a record in the table.

Such keys are either database generated (example: Identity in SQL Server, Sequence in Oracle, Sequence/Identity in DB2 UDB etc.) or system generated values (like generated via a table in the schema).
> The INT IDENTITY is favorite for surrogate key because it is automatic, fast (in indexes) and slim (4 bytes only).
 
1
Q: Java - Better way to make a text based RPG game?

ArmanI started making a text based RPG game and before I spend a lot of time on it, I wanted to know if there is a better way to make it. Currently I'm using switches to flow through the game, I also know some people use a lot of if statements but is there a more efficient way? Here is my code, (two c...

 
@Phrancis great. that's what I'm using. any idea why one would strongly prefer uniqueidentifier for those?
 
Isn't anything "unique" usually slower? (since it has to check for uniqueness)
 
a GUID is unique by definition..
Globally Unique IDentifier
 
I'm not as sure with TSQL; in PostgreSQL I use the SERIAL pseudo-datatype for PKs and it will remember which is the next key even if the records are deleted/truncated, so uniqueness appears to be ensured there
 
10:37 PM
sounds like a seeded identity column
 
Perhaps IDENTITY does the same thing
 
wait, truncated too?
 
Yep. Only way to reset it is to drop the table
 
truncate table reseeds an identity column in SQL Server
 
Well you got me scratching my head now, I'll try it tonight from home
 
10:40 PM
TTGH - later!
 
Later, I'll tag you once I find out about truncate
 
@CaptainObvious try using some classes...
 
good morning
 
Hi @overexchange
 
I have a working implementation of that class diagram too =D
some of the lines are missing, though.
crickets
Clearly everyone is in awe of my amazing class diagram for modeling an overambitious RPG.
 
10:50 PM
That is a massively overdone-looking diagram :D
 
It serves as a useful reminder to me that at some point it has to stop
2
But it's all implemented
Just severely lacking in content
ooh I found a working version online
It's filled with promises of future content that were never fulfilled.
Pretty much just a huge engine and very little content.
 
TTQW BBL
 
11:36 PM
i had a query, i am using protected field in my SList class for head & size here to make these 2 fields as a member of subclass TailList
1
Q: Use composition or inheritance to enhance this linked list?

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: Im having trouble creating this yahtzee game in java

DeeBasically i have to create the yahtzee game with the methods like 4 of kind 3 of kind, small straight, large straight, etc. Im having trouble figuring out a way to check if the dice rolled fit in any of these categories. im new to java. The program consists of seven rolls, where every roll can ha...

 
but if i make head & size as private in SList, can we still access them in subclass TailList?
 
00:00 - 19:0019:00 - 00:00

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