« first day (464 days earlier)      last day (2155 days later) » 

2:00 PM
@skiwi And what if one of the tests fails? you gonna do a finally { throw new AssertionError(); }
just to fuck with the JVM?
 
@Vogel612 Well, I figured it was not the way to do it ;)
 
1
Q: PHP Form Builder Class

Hassan AlthafI would like my Form Generator Class to be Reviewed. I want to know about the following topics: Is this efficient? Is this having flaws? Is this using the concepts in the proper way? Are there any security issues? Is my coding style correct? Don't get confused in the end. I have not echoed an...

 
@Phrancis had a good night sleep?
 
2:19 PM
@Bhathiya-JaDogg-Perera you can make the question expand by posting only the link in a separate message.
not that I could help you anything with the question :(
 
3
Q: Single class unit test framework in Java

Bhathiya-JaDogg-PereraThis is a single class and dependency free unit test framework for Java. The only assertion available is assertTrue (this can be used for all test cases). What it does Execute all methods with annotation Test. should fail if any arguments are needed. Calculate elapsed time using a given repea...

Thanks Santa :D
 
Bhatiya
Sri lankan?
 
Me too.
Your name made me think so.
 
2:37 PM
@chillworld Yes indeed :)
 
Really, JavaFX 8, this is the only way to get a sub image under 100 lines?!
private Image getSubImage(final Image image, final int x, final int y, final int width, final int height) {
    BufferedImage sourceImage = SwingFXUtils.fromFXImage(image, null);
    BufferedImage subImage = sourceImage.getSubimage(x, y, width, height);
    return SwingFXUtils.toFXImage(subImage, null);
}
 
2:52 PM
0
Q: Outlook HTML Color Change in New Window

user3845582I have used in line css in my html for an email to be distributed via a sharepoint workflow. My problem now is when I test the email by sending it to myself the email looks exactly the way I want it in preview(box on right side of outlook screen), but the colors change when I open the email in ou...

 
2
Q: Effective image cropping in JavaFX

NotMyNameI'm trying to write a Jigsaw puzzle using JavaFX partly because someone asked me and partly because I want to give JavaFX a go. However, I am having difficulty with the actual cropping of the image. The idea is for the user to supply the image and the program to cut the image into smaller piece...

^^ @skiwi
 
hey, that's actually what I want
 
There's a tag? And it's a mess!
 
3:10 PM
yh
 
lol jigsaw tag.
 
Sounds like and should be rolled into Game maybe? Or at least Jigsaw into Puzzle
3
Oh wait that's on SO ;)
 
@200_success nobody has put it together yet?
 
It's a mess, and no-one can find the edge cases.
5
 
0
Q: Ajax call failing

NSaidWould you guys be able to help me figure out where my ajax call is failing? It does actually call the correct php script but it fails to delete a user as per their id. I have placed my code below. cms/users HTML <div class="container"> <!-- Static navbar --> <div class="navbar navbar-i...

 
3:33 PM
16 more Java upvotes until I have the banhammer. For some reason I can only answer 1 Java question for each 5 C# questions I answer
3
 
2 questions closer to VBA being eligible for a badge. Where's the Mug?
 
@JeroenVannevel Wait until Windows Phone gets marked lead (if ever, though there are high odds within the next 50 years), then C# will be a mess!
 
You'd almost wish for a small market share huh
SELECT * FROM QUESTIONS WHERE qNum = " + qNum + " ORDER BY RANDOM() LIMIT " + numQ, null
What a curious use of RANDOM()
Won't it randomly select a column to sort it at?
 
ORDER BY RANDOM is considered bad practice.
 
huh
if order by 1 orders the result set on the first column, why does order by random() suddenly means that it takes a random row from your resultset?
 
3:52 PM
@skiwi : is there a downloadable version of dashboard question ?
 
Thanks, Santa! One-away now
 
@JeroenVannevel I would prefer personally to do something like... SELECT *, RANDOM() AS RandomColumn FROM MyTable ORDER BY RandomColumn;
 
But then you return a random value as part of the result too
 
But that's still ordering by a random value which somehow doesn't order it but instead picks a row
seems like ORDER BY can be used to either select a row or to order by a column
That's sketchy and I don't like it
5
 
@rolfl depends what the purpose of the query is, I could see it having a use or not... suppose I had a table that contained the cards of a deck, doing what I did you be like shuffling the deck all the while preserving the new order so the game could be played
But yeah, selecting a completely random single result, I don't see the point
 
4:00 PM
@Bhathiya-JaDogg-Perera Nope, it should contain there all the files to make it run
 
@Josay is going to hit 10k in a day or two! he will be number 15!!!
 
So, while I was away I apparently got up-voted to the 5th top reputation. Thanks to all the Santas.
7
 
np. ... ;-)
The charts are .... pretty.
 
4:17 PM
your line looks like a tilted wave signal
 
@Schism just made it to 2k!
 
@Simon - your sort-3 answer went 'viral': codereview.stackexchange.com/a/58753/31503
and, if you do thee chart over 300 days, it is even prettier.....
 
@rolfl yeah, I noticed. Seems like that's the main reason for my repincrease.
indeed
 
I deleted my answer on that one, and regretted it ... ;)
 
and boom, another avid account in the SE network.
 
4:23 PM
Last night kinda sucked. :-/ I had to sleep through a ringing in one of my ears the whole time, but somehow I still feel asleep.
 
@Jamal at some point you are just tired enough..
 
And sometimes I don't fall asleep at all... which actually hasn't happened for a while.
 
@rolfl Understandably
@Jamal At least you didn't sleep on a bus :)
 
I did, just once... and it was okay. :-) It was a charter bus, though.
 
@Jamal You should have turned off your phone.... ;)
 
4:27 PM
lol
 
Was there something I missed that gave you tinnitus?
 
I don't think so. I haven't been around any very loud noises lately.
 
4:41 PM
@Jamal I'm doing it about four times a year :)
 
yeay, finally made it to one of @rolfl's charts :D
3
 
1
Q: Scanning a directory for plugins and loading them

janosI'm working on a simple dictionary tool, with a base class that can be extended by plugins to represent different dictionaries. The plugins are organized in the filesystem like this: plugins/ ├── dict1 │   ├── ... │   └── dict1.py └── dict2 ├── ... └── dict2.py Each plugin defines a cl...

 
Hey @nhgrif. How goes it?
 
Fine.
 
5:22 PM
Boy it got quiet quick.
@ducky, why did you kill chat?
 
How goes it @Bhathiya-JaDogg-Perera?
 
lol
It's like talking to my teenage daughter.
"How was your day?"
"Fine..."
 
@ckuhn203 sounds painful..
 
5:29 PM
he he, I'm an only child, I'm really spoiled :p
 
<-- should get his ass back to finishing that unit-test
 
@Vogel612 It could be worse. She's not hit her Goth phase yet.
 
@ckuhn203 I get the feeling teenage is not that teenage as I thought..
 
Just starting on this roller coaster ride @Vogel612.
 
which is actually probably quite fine, because then I don't have to think about how she could possibly be ...
ima just stop here....
note to self, don't think crap out loud in front of her dad.
 
5:33 PM
hahaha good call.
 
@ckuhn203 : your profile says age is 29, if she is 13, that mean you had her when you were 16 ?
 
maybe the profile age is base-16
6
 
holy someone did good maths there.
 
She's actually my step-daughter, but yes.
 
5:35 PM
IIRC the profile age is calculated from the given birth-date.
aaaand then it makes more sense.
 
I'm going to remove my previous message
 
@Bhathiya-JaDogg-Perera why that??
 
arr I can't do it
 
sure you can..
2 mins ago, by Bhathiya-JaDogg-Perera
@ckuhn203 : your profile says age is 29, if she is 13, that mean you had her when you were 16 ?
now you can't
 
5:36 PM
muhahahahaah, preserved for all eternity !
 
left side of the message..
there's a small arrow down, if you click it, this should show up.
 
No it's not there
 
5:39 PM
@Vogel612 And a damn good one.
 
@Bhathiya-JaDogg-Perera not allowed in germany...
 
interesting It's allowed in Sri Lanka
youtube is weird
 
which goddamn retard can't code his ternarys the right way round???
 return success ? Pages.PRODUCT_EDIT : Pages.PRODUCT_LIST;
 
monking!
 
one was supposed to get the ProductList returned on success...
 
@Bhathiya-JaDogg-Perera ?
 
@ckuhn203 I've hit a quite major maintainability/extensibility issue in my over-the-top OOP-in-VBA design - you might want to see this (and go "aw, why haven't I thought of that!") :)
 
@Mat'sMug That's why inheritance > interface
 
@ckuhn203 Or rather actually en.wikipedia.org/wiki/Hatsune_Miku
 
5:49 PM
not really. inheritance is 1/4 of the OOP picture. abstraction is another 1/4.
4
 
@Mat'sMug It sounds like something you may have been missing partly in your life
(cough job cough)
 
I'll rephrase, not having actual inheritance .
@Bhathiya-JaDogg-Perera @Vogel612, that's cool and all, but whoever wrote those lyrics should be lynched.
 
good grief yes.
 
@ckuhn203 they're japanese... The lyrics don't have to actually make a useful sense or anything..
3
 
5:52 PM
lol
 
actually polymorphism is more closely related to inheritance than method overloading. would be more like it.
 
polymorphism is more overriding, not overloading
 
yeah
I still would love to be able to overload methods though :)
 
@Mat'sMug are defaults not satisfactory for your needs??
 
what defaults?
oh, optional parameters
 
5:57 PM
 Sub method(someParam = defaultVal As Variant) As Variant
bleargh
or is that the syntax??
 
Sub method(Optional someParam = defaultVal)
 
^^ that
 
It's VB, it has to be as verbose as possible.
 
missing ByVal to be verbose and explicit ;)
3
 
^TS
Damn it.
 
6:00 PM
RSA
 
ty
 
can't call RSA... would have starred either way..
 
I feel like someone's starring at me...
5
 
public void testSaveWithEditAndDataLayerLockExceptionReturnsCorrectNavigationRuleAndAddsFacesMessage()
3
hmm... I should consider how I name my tests...
maybe throw in a few underscores??
 
6:05 PM
yup
snake case vs camel: vinaysahni.com/…
 
@Vogel612 I think you can drop the test prefix ;)
 
@Mat'sMug that would be the first idea..
but somehow it's not really getting shorter:
public void saveWithEditAndDataLayerLockException_ReturnsCorrectNavigationRuleAndAddsFacesMessage() throws DataLayerLockException {
WhenGiven_Then
meh...
 
isn't there an annonation to include a description
 
@Bhathiya-JaDogg-Perera they aren't seen in JUnit execution view..
 
6:09 PM
well from the name it's not clear whether the test should fail with an exception or return the correct navigation rule and add faces message.
no?
 
0
Q: VBA Ways to Speed Execution Time of Code

user3783788I've been writing some code that places some data in an empty worksheet and then formats the sheet by adding borders to all of the used cells. The code functions how it should perfect, but it takes a little bit of time to execute. I was wondering if there is any way I can speed up my code that I'...

 
@CaptainObvious YEAH!!
 
@Mat'sMug you prefer a try-catch with an impossible exception in your test-method??
additionally I think the structure is broken..
I am thinking about returning a mock from a mock..
 
You can also try posting this on the Code Review forum, since your routine works and you're just looking to optimize :) — RemedialBear 32 mins ago
 
an actually not misguided SO user ;)
 
6:15 PM
Welcome to CR! Is this all the code in a procedure? Can you edit and include the procedure's signature, too? Reading your SO cross-post it seems that this isn't all the code in the procedure.. please include as much context as possible :) — Mat's Mug 1 min ago
 
Mockito.doReturn(mockContext).when(resourcesMock).produceFacesContext();
// Some other stuff
Mockito.verify(resourcesMock).produceFacesContext();
Mockito.verify(mockContext).addMessage(any(String.class), any(FacesMessage.class));
Mockito.verifyNoMoreInteractions(productServiceMock, productListControllerMock, resourcesMock);
something's definitely odd..
okay this will have to wait until tomorrow..
TTQW, maybe laters ,)
 
6:36 PM
ugh, emailed the Microsoft recruiter without attaching my resume
Such a cliché mistake
Now I'll have a note saying "can't send emails lol" attached to my file
3
 
@JeroenVannevel You're done :( All chance is gone
 
Meh, I suppose I can always just change my identity
 
I also did a mistake last week, felt a bit stupid... I usually press forward all to obtain the emails and replace them, but I accidentally left the FW in :(
 
@JeroenVannevel can't you try to Recall it?
 
@Phrancis I kind of sent the email yesterday
She replied just now saying I should feel free to send her my resume
3
 
6:52 PM
lol
4
 
7:17 PM
@Mat'sMug How's that 20K going? I expected you to have reached it when I got home.
 
@SimonAndréForsberg hey! welcome back! I slowed down quite a bit, the race is now between tag badgeability and my reaching 20K ;)
 
@Mat'sMug Thanks :) That race sounds like it makes an interesting wall... any clue on how to measure such wall?
(The wall has 1250 Simon's on it btw)
@Mat'sMug And I thought I made bad puns during my France visit.
 
needs about 25 more questions, vs 605 points mugs ;)
@SimonAndréForsberg couldn't help that one! sorry! :D
 
@Mat'sMug I know that feeling. I haven't been able to help myself for the last week.
 
I can read so much in to that one comment
 
7:28 PM
@rolfl Reading between the lines, huh?
 
yup .... I was away last week as well (though I maintained the consecutive days thing).
I figured I could spend 10 minutes on, between 23:55 and 00:05 zulu time, every 2 days.
3
 
@rolfl Btw, while in France I did meet a guy from South Africa. Or maybe he was just a tall and intelligent monkey.
 
Could have been either.
> 285 days, 285 consecutive
 
I also met people from U.S., Taiwan, Hong Kong, China, South Korea, and of course most European countries (Sweden, Germany, France, Ukraine...)
 
Simon, the South Africans are everywhere now. Can't escape them
 
7:31 PM
@rolfl You just continue to impress me every day.
@rolfl The South African humans or monkeys?
 
Mostly the humans.
What does it mean when there's a monkey in a Swedish furniture store in Canada?
2
 
@rolfl Nothing? (Expecting a bad pun incoming)
 
omg it's real
 
7:42 PM
The monkey is not a lie!
 
0
Q: Arraylist does not retain results after Spark Foreach loop

sugeekList results = new ArrayList(); groupedData.foreach(new VoidFunction(){ results.add(res); }); results.size(); In this code if I print results.size inside the loop and outside it gives different results: inside it gives the actual number of results saved, outside it is always 0. Please help!!

 
8:13 PM
0
Q: Logo animation code

FedeI want to know if there is a better way to write this code. I'm struggling a little bit with best practices in jQuery. $(document).ready(function() { function logoAnimation() { var logo = $("div#logo-overlay"); logo.stop() .animate({top:'-90px'},{ ...

 
8:37 PM
Jon Skeet, Reading, United Kingdom
700k 291 4531 5909
look at that
he crossed the 700k today
 
Holy crap
2
 
look at all that gold.
I guess it's time for the devs to start looking at the next unit in the scale..... 1.0m
2
 
9:07 PM
0
Q: Implementing WCF method that supports either string or object as a method parameter

Mike ChristensenI have the following contract in a WCF-based web service: public List<string> GetAllPossibleQueryEngineHostNames(Instance instance); Obviously, I can call this and pass in an Instance object. However, I need to also support older versions of the client, which pass in a string like so: string...

 
Hello everybody!
 
Hey syb0rg
I post kill-cam, and noone knows what it means any more ..... times change quickly around here ;-)
 
Where is the kill?
 
0
A: Directory's disk usage list

rolflI just copied your code, pasted it in to a terminal, ran it, and it did exactly what it is supposed to do. Now, how to make it better? You don't mention it in the question, but using ls, awk, find, and sort together somehow seems unlikely to be the answer your tutor expected. You don't mention w...

 
9:16 PM
pew-pew
 
yeah, I know... but I sometimes feel it's pimping to make it too easy to find as well.
 
hey @nhgrif
 
Hi
 
hey
there's another zombie in my answer history, if people want to kill it.... ;-) codereview.stackexchange.com/questions/59538/…
Thanks santas!
Well, that drops the unanswered by two.
 
that's weird. I thought I went through all the unanswered bash....
 
9:23 PM
@rolfl I looked at that one but did not feel I understood pivots well enough to provide a useful answer. I UV both your answer and the question.
 
Thanks. The question is an interesting one, and it's a product of SEDE not being a full environment.
Really, it's trying to shoehorn functionality in to SEDE that belongs in a different language
 
Yeah it seems like it. Do you ever use pivots much? What for, I'm curious. I'm familiar with the Excel pivot but I don't guess it does the same thing in SQL, does it?
 
I have been using it a lot for SEDE queries.... like this one....:
Also, for the varius reputation races and stuff.
 
I know MySQL doesn't support the PIVOT keyword (big surprise...) neither does PL/pgSQL although there are workarounds
 
 select * from #results pivot (sum(Reputation) for Name in (['200_success'],['rolfl'],['Loki Astari'],['palacsint'],['Simon André Forsberg'],['Winston Ewert'],['Mat's Mug'],['konijn'])) as Pivoted order by RepDate ASC
 
9:31 PM
@rolfl seeing your code reminds me that I'm not very good with SQL :)
 
Never sure how I should respond to things like that..... since you are good with SQL.
and my code is not necessarily good, and I hacked most of it together, and it is amazing that it works.
 
lol.
I do notice you use lots of variables and I see cursors a lot... I guess I don't really understand why a cursor is needed, many times.
 
I have ended up using cursors a lot in SEDE... and its because you can't otherwise do loops.
 
I guess I'm mostly curious about... why you need loops
 
The way that reputation is managed in SE is complicated, and you can't replay the reputation without processing each reputation item at the exact right time.
For example, if you have a really good answer....
and it gets 25 upvotes.
the last 5 upvotes are not counted because they are > rep max @ 200
Now, if you get one downvote after all the upvotes, your reputation is now at 198
The order in which the events happen determins the effect of the event
 
9:42 PM
I see... in a complete environment, something like that wouldn't you instead do within a transaction, so that the state of the DB is consistent throughout?
I'm gessing SEDE does not allow that either
 
SEDE allows transactions, but, I think you are missing something still.
I can create # temp tables.
but I am read-only on the actual data.
The reputation query is really complicated, it has two cursors.... the outer cursor loops over the users you are interested in.... and the inner loop iterates, in increasing order, over all the events that happens to the user, in the order they happen in.
For a different reason I use cursors, have a look at this query.....
Have a look at the messages tag to see the queries that it runs in each loop through the cursor.
The cursor is needed because I am running a dynamic query for each system.
If I could connect with Java, or something, and do it externally, I would.
 
Wow, that looks like a hack indeed lol.
 
It is, but then I learned how to do really cool things with that, like: data.stackexchange.com/codereview/query/199310/…
 
That is cool.
Dynamic SQL sounds like it could be a nightmare to debug if you don't know what you're doing
 
9:59 PM
it is, even if you do know what you are doing. SQL in general is a PITA to debug
 
TTQW be back shortly. I want to play with SEDE some tonight now that you've shown me this stuff
 
I just had an answer from August 2013 unaccepted
 
0
Q: Is it ok to add models to test a Django view?

jleeothonI have a Django reusable app that adds functionality to class-based views. In order to test it: (1) is it enough to call the as_view method?, or (2) do I need to make some kind of request? In case (2), how can I not need to client().get(it)? In any of both cases. To test this class-based views,...

Hm... SO or Programmers?
 
too broad in any case, I think
I count 5 different questions
 
I wrote some dynamic SQL last week.
 
10:03 PM
0
Q: Is it ok to add models to test a Django view?

jleeothonI have a Django reusable app that adds functionality to class-based views. In order to test it: (1) is it enough to call the as_view method?, or (2) do I need to make some kind of request? In case (2), how can I not need to client().get(it)? In any of both cases. To test this class-based views,...

 
@JeroenVannevel Yeah, looks like it.
 
10:18 PM
Well... I was waiting on CptObv
0
Q: Do we need to update the link in the "Own or Maintain" close reason?

nhgrif This is the close reason I'm talking about. Currently, the "you own or maintain" link points to this meta question, but we've recently made a slight modification to the policy, per this meta question: Can we revisit "Did I write that code myself"?. Currently, the question and both answers are...

 
2
Q: Do we need to update the link in the "Own or Maintain" close reason?

nhgrif This is the close reason I'm talking about. Currently, the "you own or maintain" link points to this meta question, but we've recently made a slight modification to the policy, per this meta question: Can we revisit "Did I write that code myself"?. Currently, the question and both answers are...

 
10:45 PM
Any c# devs around?
 
crickets
@dreza - he's highest on the list and still in the room .... ;-)
 
@rolfl is it possible to query SEDE at the Sites level, e.g., get a list of all sites (I'm guessing databases, or schemas perhaps)?
 
Sure, it's in the cursor loop.... ;-)
 
I know you can query sys but is it one level above that?
 
10:53 PM
I'll take a look ;)
Nice
 
That gets you all the main (not meta) site databases, and then adds in the meta.stackexchange site as well (since it has no main site).
 
> Don't touch my junk. -- Nice title too
 
If you want to write queries accross sites, you can reference [stackexchange.Site]..Users
If you have a look at that query's history, it is a mess, and I use it as a scratch space instead of creating thousands of mini queries to debug things.
 
@StuartBlackler Here I am baby
 
@nhgrif - it has always been OK to post code you maintain.
 

« first day (464 days earlier)      last day (2155 days later) »