« first day (892 days earlier)      last day (3126 days later) » 

6:00 PM
SuppressFinalize is useless if the class has no finalizer. Similary the Dispose(bool) pattern is silly, because it will always be called with true as argument. — CodesInChaos 6 mins ago
 
You could ask one of the C# guys for a second opinion on your answer.
 
@JeroenVannevel Claimed to have looked at it already.
 
I mean, the guy you're arguing with this time has a better reputation around SE than the previous one. Don't take the earlier one too serious.
This one may accidentally know what he's talking about (don't take my word for it, my C# is crap)
 
@EBrown My take is that you're not in a strong position on that "argument" with CodesInChaos....
68+K On Stack Overflow, and a mod on Crypto, CodesInChaos is not a novice.
 
So? That makes him right by default?
You people care far too much about reputation.
 
6:04 PM
@Mast Accident?
 
@EBrown Nope, we care about what's right, and giving people bad advice.
 
Not right by default, but a proven history of knowing about things.
 
You appear to be giving bad advice, and being pig-headed about it, when challenged.
 
@EBrown No, but this one appears to know what he's talking about while the OP is just a noob asking stupid question. Ignore the noob, listen to the veteran.
 
@rolfl Then by all means, correct it. I don't have time to sit here and babysit anything. I'll just delete the fraking answer if everyone's going to gripe about it.
 
6:06 PM
@CodesInChaos As far as ReadBytes, I have no need to check for what Read returns, if you want to you are free to, I personally don't care. — EBrown 8 mins ago
You don't care, so don't care.
If you are not willing to learn things by writing answers too, then don't post things.
 
@StackExchange Whatever happens, just keep track of it in The CRonicles.
 
No, screw it, I'll fix the damn thing.
 
100 tabs closed so far, that's about 10%
@EBrown That won't learn you anything
 
@skiwi Being productive I see.
@EBrown That's the spirit.
 
@Mast Yeah... But I gotta do some stuff and then it's time to watch football while playing HearthStone
So that's the end of my productive time :P
 
6:09 PM
I've got to write a financial discussion on valuing stock and bonds.
But, well past lunch time, so I guess I'll do that later.
 
And I swear, I'm really going to post my controller library on GitHub this time and make it a proper project :D
On a related note...
14
Q: Event-based Xbox Controller polling

skiwiThe goal of the following code is to be able to use an Xbox Controller in a Java program, it works with the jinput library. Unfortunately this library is rather old, has little to no documentation and uses a polling system. There are some existing event-based (xbox) controller input systems, but...

Just one answer so far :(
Do I need to write worse code if I want to have more answers?
 
@skiwi A good one AFAICS
So incorporate it and post a follow-up if you want.
 
Either that, or a bounty.
 
Well, I dropped out of a dream job in a contracting agency a few minutes ago.
:(
The technical test questions were all computer science/algorithms questions... I have not done anything in comp sci.
Time to go look for algorithms courses
 
@ARedHerring I'm reading a book on interview questions to solve that part.
 
6:13 PM
And then there's this thing called equilibrium indicies which I have not heard about in all my years of programming
and I'm struggling to see how they are useful
 
fires up Wiki
 
Its really hard to explain... but I think I can do it in more english-speak than wikipedia can
 
@Mast It's got more of a high-level overview though, I hoped someone would also go down into the details
I personally don't fully agree with extensive builder patterns, etc. as they conflict with making a library easy to use, but I do agree that right now it's not as clear as it should be
 
@skiwi Can you make a post about a part of it without it feeling incomplete?
 
if you have an array A of N numbers given an integer X, you have to return the index of the array K, where K is greater than 0 (but less than N).
 
6:15 PM
@ARedHerring Not sure how difficult they where, but I would recommend every programmer an intro to computer science
O(n) notation and the theory around that (and it being applied) is in my opinion one of the most important ones
@Mast Not easily I think
 
@skiwi I didn't ask whether it would be easy
 
K is equal to the index between two groups of numbers in an array. The groups are created by taking all the elements that are equal to X into one group, and all the numbers not equal to X in the other group. The index between those two groups is K.
 
@skiwi I read about that in Knuth last summer, but I'm forgetting it.
 
@skiwi Don't suppose you have any online course links?
 
Knuth is really good, if you can find the time to really understand it.
 
6:17 PM
4
Q: Codility equilibrium index sample test - my stab at it

user3204946I am doing the following Codility Test to hone my skills, or lack of them. This is a demo task. You can read about this task and its solutions in this blog post. A zero-indexed array A consisting of N integers is given. An equilibrium index of this array is any integer P such that 0 ≤ P < N and...

 
I'm sure you're all aware
BUT BELGIUM BECOMES WORLD CHAMPION NUMBER ONE THE BEST AT EVERYTHING TONIGHT
 
</joke>
Well, you guys deserve a shot at it.
 
@Heslacher: the apartement is soaked with dog pee. And, just now, I stepped in his poop. Again. I'm never renting at a place with a dog anymore
I'm not sure if I like this whole "jeroen has no dates" trend though. Let's keep things realistic and positive
 
@JeroenVannevel Proof 'em wrong and you won't ever hear them again
 
Well I went to Oktoberfest with a brazilian chica last.. thursday
That counts as one
 
6:22 PM
 
Austin, bunch of criminals.
Cops have no idea of humour.
 
@JeroenVannevel Does if (variable != null && variable.Property == Enum.Value) have the same effects as if (variable?.Property == Enum.Value)? Does the null-condition affect that?
 
that's the same, yes
 
I thought so.
 
but more importantly: WHERE IS A LIVESTREAM ONLINE
 
6:26 PM
LOL, he got arrested for saying JUST DO IT. I would've loved to see that go down lol.
 
@KingCodeFish And all the bystanders went 'JUST DO IT' on the cops.
 
Haha, XD
Shows why he got arrested for public intoxication lol.
 
Zak
Wait, is this not a joke?
 
No, it's for real
Yeah, just google it with search entry, "Shia Labeouf arrested"
 
@KingCodeFish just google do it
2
Waiting for Nike to step in now
 
6:34 PM
0
Q: Ruby - changing value of variable without being repetitive

GcapI have a couple statements that look too bloated for good ruby practice. @q = @q=~/AND/ ? @q.split("AND") : "False" @q.each { |g| @q[g] = @q[g].strip } How can I reassign the values of @q and @q[g] without writing them twice?

0
Q: Striped closed poly-line

simplicis veritatisI'm working on class Striped_polyline which represents a closed poly-line filled with equidistant horizontal lines1. Here is the code: stripedpoly.cpp: #include <iostream> #include <vector> #include <algorithm> #include "Graph.h" #include "Simple_window.h" #include "stripedpoly.h" int main(){...

 
First of all thanks a lot for your comments to Ebrowns answer! I was trying to explain to him similar points as you did, bot no result! Finally, can you please show me how to handle deallocating resources in the best way? As Ebrowns answer's approach was flawed as you indicated. If I leave it as I have now, what if exception happens, when should I call CloseDppClient on my class? — quser 4 mins ago
Boy I fucking love being called out in comments on other answers.
 
And the help vampire keeps vampiring.
 
That and now he's being a dick.
 
Smile and wave flag.
2
 
@Mast It's definitely not flag-worthy.
 
6:39 PM
@EBrown The comment is not constructive IMO.
 
@Mast He raises legitimate concerns if you're into that sort of stuff.
> If I leave it as I have now, what if exception happens, when should I call CloseDppClient on my class?
My answer is not "flawed", implementing IDisposable is the route to go in this case. He just didn't get everything from me that he wanted.
 
@EBrown He raises help-vampirey questions in comments, that's not the same.
 
@Mast I'm not at all disagreeing with the help-vampire part; he seems to have absolutely no critical thinking skills. (And people thought those questions in school were worthless.)
 
hrmph. flag and yell at your potted plant if necessary
nothing more you can really do
 
Hmmm, my flag got declined. That doesn't happen often.
 
6:45 PM
@JeroenVannevel I won't mention it anymore. Sorry for that.
 
@quser The point was that when a method alters a parameter, best-practice is to use ref or out to indicate as such, otherwise your method has surprising/unexpected side effects that need to be documented - and because self-documenting code is superior to surprising but documented code, using out or ref is preferred in this particular case. Generally speaking, returning a value is preferred to using ref or out parameters. — Mat's Mug ♦ 11 secs ago
@EBrown
 
@Mat'sMug I was more worried on the IDisposable part.
 
But he was referring to the out/ref vs return value
 
Nice answer on a Python answer I wrote earlier today, thanks Santa?
 
> when should I call CloseDppClient on my class?
@Mat'sMug Do you have to move those comments one-at-a-time?
 
6:51 PM
0
Q: Comparing two fractions with boolean

jackI have this exercise for a Java class that is asking me to define two fractions as objects and then compare them using a public boolean greaterEqual(Fraction comp) method. I initially defined the field variables as double so that I would get the right results when I divide the numerator by the d...

 
and your whole question could go to code review codereview.stackexchange.comnjzk2 40 secs ago
You should check out other solutions on Code Review to Rock Paper Scissors Lizard Spock, here is my solution for example. codereview.stackexchange.com/questions/73369/…EpicPandaForce 34 secs ago
 
Is it appropriate to reuse EF IEnumerable results?
 
@EBrown they're copied to chat in bulk, but then I need to delete them manually and it's a royal PITA from my phone
@EBrown are you re-hitting the db?
 
@Mat'sMug Ah. That seems strange.
 
@EBrown It depends, is it fine for you to do 2 queries to database? Wouldn't it be better to enumerate it once and use this twice?
 
6:59 PM
@Mat'sMug Maybe? I'm not entirely certain.
 
@TopinFrassi that
 
@TopinFrassi Well here's what I have:
 
Usually, if you have an IEnumerable<> that comes from a DbSet<> queryable, you hit the DB each time you enumerate the... enumerable
 
Requests to speed up code don't really make for great questions on this site. Especially when you don't include data to test with or any timing/benchmarks you've done. If you need help with code that works maybe try Code Review instead. — MrFlick just now
 
var topicsEnumerable = masterDbContext.Topics.Where(x => x.ForumId == child.Id).OrderByDescending(x => x.LastUpdate);

if (topicsEnumerable.Count() > 0)
{
    childViewModel.Topics = topicsEnumerable.ToList();
}
 
7:00 PM
Don't
 
Alright, wilco.
 
var topicsEnumerable = masterDbContext.Topics.Where(x => x.ForumId == child.Id).OrderByDescending(x => x.LastUpdate).ToList();

if (topicsEnumerable.Count/*or .Length, I always mix 'em up*/ > 0)
{
    childViewModel.Topics = topicsEnumerable;
}
 
0
Q: Will this BOM schema work at the basic level?

Liger86I've been working on Bill of Materials mini schema for a while. At first I had single Part table where I've referenced itself. I was told it would be better to have separate table because we'd need to have info like quantity and that quantity is not part of Part itself. Here's the script... CREA...

0
Q: A method to capitalize first letter of a string

Don WhoI recently was given a task to capitalize the first character of a string provided the string does not begin with a non-alphabet. Below are the requirements and my implementation. Just want to know if there is a more efficient way to implement this. Requirements Please implement this method ...

 
@TopinFrassi What about .Any()? Is that useful here?
 
'Cause you'll hit the DB twice at worst, or go through your whole enumeration twice at best (which isn't good either).
 
7:02 PM
var topicsEnumerable = masterDbContext.Topics.Where(x => x.ForumId == child.Id).OrderByDescending(x => x.LastUpdate);

if (topicsEnumerable.Any())
{
    childViewModel.Topics = topicsEnumerable.ToList();
}
Or is that wrong too?
 
Same thing
 
Alright, thanks. :)
 
Each time you use Linq in an EntityFramework query without enumerating, a baby panda dies
3
 
LOL
Well I have ~6 places to fix this then.
 
@ARedHerring Not by hand... maybe Coursera is something, friends say it's okay, but I yet have to do something with it
 
7:04 PM
var topicList = masterDbContext.Topics
                    .Where(x => x.ForumId == ForumId)
                    .Where(x => (finalForumPermissions.ViewTopics == PermissionValue.Allow && x.Visible) || (!x.Visible && finalForumPermissions.ViewHiddenTopics == PermissionValue.Allow))
                    .OrderByDescending(x => x.LastUpdate);

NoTopics.Visible = !topicList.Any();
TopicsDataList.DataSource = topicList
                                .Skip((pageNumber - 1) * topicsPerPage)
                                .Take(topicsPerPage)
I assume that's all wrong, too?
 
Why 2 where calls?
 
Because I need to filter by both and it makes it more clear to me.
I can make them one Where call, but it has the same effect.
 
Extract a method if the predicates get unclear ;-)
 
I probably should.
Except it's LINQ to Entities, and I've no idea how to extract it in a way LINQ can understand it.
 
0
Q: I'm converting millions of Polar Coordinates to Cartesian Coordinates and would like some help on doing it faster

user86777I have a functional script that converts polar coordinates to Cartesian coordinates and then matches a value in a separate array to the coordinates. It works well, but I find that it takes a long time to run due to the length of the matrices being processed. Each file has four columns and 2,880,0...

 
7:10 PM
Welp, I guess I'm going to need to support Belgium now
2
 
@EBrown Yep, you really must avoid. If you use Resharper, it'll tell you when you enumerate a query more than once. Listen to it, otherwise you'll have a big overhead in your application.
 
@TopinFrassi I can't afford ReSharper...lol
 
@EBrown It works the same way as in any other Linq query. If you do something wrong, it'll tell you by throwing an exception :p But in this case, it shouldn't
@EBrown I have it with my job, which is good
Maybe an issue for VSDiagnostics :p
 
@EBrown get the 30-day trial, then cry in 30 days ;-)
 
The only alternative to that mess that I have is:
 
7:15 PM
@Mat'sMug Once you go Resharper, you never want to go back. So don't do it. ahah
 
Func<Topic, bool> whereCondition = x => x.ForumId == ForumId && (finalForumPermissions.ViewTopics == PermissionValue.Allow && x.Visible) || (!x.Visible && finalForumPermissions.ViewHiddenTopics == PermissionValue.Allow);

var topicCount = masterDbContext.Topics.Count(whereCondition);
NoTopics.Visible = topicCount > 0;

var topicList = masterDbContext.Topics
                                .Where(whereCondition)
                                .OrderByDescending(x => x.LastUpdate)
                                .Skip((pageNumber - 1) * topicsPerPage)
 
Why don't use just check the count at the end?
 
@TopinFrassi Pagination.
int PageCount = (int)Math.Ceiling(topicCount / (double)topicsPerPage);
 
hmmmm
 
I need to know how many topics exist altogether, then I need to know how many are on this page.
 
7:18 PM
Yeah, maybe in the case of pagination you don't have the choice. But it's been a really long time since I used EF (like... 2 years), so I'm not as fluent as I was before, I don't think I can help on that one
 
0
Q: Using Gradle to check and deploy Javascript

NoumenonI used gradle-js-plugin to lint and minify my Javascript, and wrote some tasks to automate uploading the scripts via FTP. Any feedback is welcome, but specifically I am concerned that The tasks I wrote myself like viewJshintResults are all imperative and not declarative The section after the /*...

 
Yeah, I think this should perform better, though.
I don't really want to load all topics of a particular forum into memory, and then filter, because if there are 100,000 topics that's a lot of data.
I can't believe I just did this...
 NoTopics.Visible = topicCount > 0;
Anyone see a problem with that?
 
Yeah
If NoTopics means what it seems to mean, yeah. :p
 
I just noticed it when I had topics and the "No topics to display" message...lol
@TopinFrassi It means what you think it means...lol
 
@EBrown What you can do is use an SqlProfiler (there are free one, or one included with MSSql I think) and see if the queries you make in your application are fine by you
 
7:22 PM
Good news is LINQ didn't complain about my filter.
@TopinFrassi Well I know LINQ assembles them exactly as I would expect, so I'll make that an issue for another day.
 
From my experience, it's very (very) important to Sql profile EF when you're not 100% confident what you're doing
 
It would be so much simpler if I didn't have to take visibility into account.
 
Yeah but you might see queries you didn't know you were doing
 
That is true...
 
+ it's not really long to do
 
7:23 PM
There's a profiler built-in.
 
Yeah
 
Ah damnit I have to shut my bot off.
> 600 rows in one minute
> IRC bot is all of them
Is there any way to filter the profiler to specific DB's?
 
I don't remember how to use it, but yeah it's easy.. lol (If you're talking about MSSql, but it's clear you can filter with any profiler, that's a base feature I think..)
 
Oh wow
This is really cool.
I should be using this for work.
 
@Heslacher it's okay. If we win tonight, I forgive everything
The 'raelis don't know what's hitting them
 
7:35 PM
@JeroenVannevel Didn't know they had a soccer team.
But hey, who knew the Belgians where still up and about either...
 
Looks like the ASP.NET Membership is executing a bunch of dynamic SQL?
That's peculiar.
 
@Mast If we win tonight we become no 1 on the FIFA ranking..
@EBrown elaborate
 
@JeroenVannevel Well it looks like it's executing an SP called sp_executesql with three parameters.
exec sp_executesql N'SELECT TOP (1)
    [Extent1].[Id] AS [Id],
    -- more columns here
    [Extent1].[UserName] AS [UserName]
    FROM [dbo].[AspNetUsers] AS [Extent1]
    WHERE ((UPPER([Extent1].[UserName])) = (UPPER(@p__linq__0))) OR ((UPPER([Extent1].[UserName]) IS NULL) AND (UPPER(@p__linq__0) IS NULL))',N'@p__linq__0 nvarchar(4000)',@p__linq__0=N'my email'
That's one of the statements it's doing.
 
If you log the DbContext, you'll notice it does a lot of them
I once looked into it but didn't make a blogpost about it
I probably should've
 
Yeah, of the 297 queries only about 12 are actual queries.
 
7:40 PM
@EBrown Ugly
 
The rest are SP calls to that sp_executesql procedure.
 
But could've been worse.
 
@Mast I can legitimately say I didn't write these. :)
 
Good ^^
Feel free to put them up for review anyway, as long as you're maintainer and have a decent understanding of how it works (which I guess you have).
 
@Mast I can't change them is the problem.
 
7:42 PM
Yeah, ASP.Net membership is terrible query-wise
 
They're part of the DbContext carp.
 
Put them up for review anyway, in case it changes.
 
@EBrown You can't change them but maybe you can cache some stuff?
 
I dunno, may sound iffy to some.
 
@TopinFrassi Yeah, I wonder how to configure caching on this.
 
7:42 PM
@Mast Put EF's auto-generated queries for review? :p
 
But hey, you want it to be good.
 
@EBrown Idk, where I worked we had to do it by ourselves
 
So it qualifies, right?
 
caching manually in EF?
There are 3 caching layers that I'm aware off but they're all blackbox
ObjectContext is a cache, execution plans are cached and something else which I forgot
 
I'll worry of it if/when it becomes a performance issue.
Something tells me EF isn't too performance dragging.
 
7:45 PM
@Mast Well, it's not your code!
@JeroenVannevel Well, cache the querie's results
 
But they're already cached in the ObjectContext
If you do things like .Find(), it will first look in there before talking to the DB
thought I suppose others like .First() might not
 
I don't do any .Find() stuff.
 
@EBrown It really can be. It depends on the complexity of your application!
 
I only use .First, .ToList, .Count etc.
 
@TopinFrassi For moral, practical, and legal reasons, we are only able to review code that you wrote or code that you maintain. Code Review is not the place to ask about someone else's code.
 
7:47 PM
Why do these noodles taste like tires
Good thing the soupsaucejuice is perfect
 
@JeroenVannevel doing web-based applications, the DbContext is "recycled" at each HTTP request, so we couldn't rely on its caching!
Or.. I think
 
11
A: My question was closed as being off-topic. What are my options?

200_successIf your question contains someone else's code… For moral, practical, and legal reasons, we are only able to review code that you wrote or code that you maintain. Code Review is not the place to ask about someone else's code. We also expect you to understand how your code works. If you are see...

@JeroenVannevel They're noodles, that's why.
 
DbContext can live both long and short perfectly fine
 
@TopinFrassi This is pretty complex.
 
@Mast Idk, I mean, point 1 you cannot modify the EF's query, point 2 it's auto-generated code
 
7:48 PM
Isn't the ObjectContext shared between DbContext instances?
 
@JeroenVannevel At the time, we didn't know this i guess :p
 
@TopinFrassi You want it to be good code and you maintain it.
 
@TopinFrassi Yeah, there's been quite some conflicting information on that already
 
I'm not saying it's a good idea to post it, but technically it should qualify I think.
 
Second half! Later skaters
 
7:49 PM
@JeroenVannevel Yeah, I'm not sure
@Mast I don't think so. It's not code you can change, I really don't get the point of posting it as a question. I'd VTC a question like that spot on
But eh, noone will do this
 
@TopinFrassi It's the internet, nobody knows who will do what next.
 
@Mast Well, then let's just say I don't care right now about that point until it happens :p
 
I'm rather displeased that I answered that question now.
 
0
Q: Java mybatis running in test but not in the main code

AndreFontaineI'm using mybatis to connect with postgres database, when I run the test all is ok: package org.agonzalez.batisrest; import java.util.List;.. @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations="/spring-config.xml") public class DaoTest { @Autowired private IOrdenM...

 
8:09 PM
AW YEAH BELGIUM IS THE BEST 1-0 WOOHOO THE WORLD IS OURS
 
We just scored too!!!
In our own goal
 
-1
Q: Creating a function for parameters in Python

AllisonI would like to preface that I have never struggled with anything more than I have with Python. I am trying to write a function partition() that takes a list of strings and a character as parameters. It prints the strings in the list that begin with a letter at or after the character (according ...

0
Q: KD Calculator in python

FugsThis is a program that I designed to accept input from a user (kills, deaths, kills and deaths per game, and desired kill/death ratio) and calculate the amount of games (with the number of kills and deaths per game that the user entered) required to reach the user's desired kill/death ratio. It w...

 
Bask in our glory, mere mortal soccer countries
 
0
Q: Using local class with static member function for recursion, how smelly is it?

Andrew VegvariI read many comments at this question that one really shouldn't use local classes for functionality like which my code provides, but I couldn't really put things into perspective and decide what better alternatives are there, if any. Some mentioned lambdas although they also pinpointed that with ...

 
WC HERE WE COME
 
8:24 PM
10 minutes, 3 goals to make and 1 goal to make for Iceland... what are the odds?
8 minutes, 2 goals to make and 1 goal to make for Iceland... what are the odds?
Ah right, this is why I hate football and don't watch it most of the times, those referees are incompetent as ****
 
Aaaand there's number 3 for Belgium
@skiwi want us to teach you?
hohoho
 
No need if the referees are blind, unless you can teach how to get proper referees ;)
 
riight...
less soccer, more codereview? :D
Belgium will either fail in the prelims or not get into it anyways
 
You're just jealous of how promising we are
The reign of the germans has come to an end
Belgium is here
 
Oh wait until Canada beats us all on the European Championship
5
 
8:34 PM
Canada plays soccer?
4
 
@JeroenVannevel They also have "free" healthcare.
 
@EBrown who doesn't
oh wait
 
@JeroenVannevel We don't ^^
@skiwi Wait for a long, long time
 
@Mast What?
Do you mean in a pedantic "we pay through taxes way" or..?
 
The Netherlands doesn't have free healthcare
It's only partially free
You pay the first couple hundred yourself and you're forced to have insurance (which you'll have to pay for ofcourse)
You get part of that back from taxes
But relative to most countries, I think we got one of the weirdest systems
 
8:46 PM
Belgium also has forced insurance and high cost through taxes but you get most money back except for a small amount (couple of euros often) to make sure you don't abuse it
unless you get meds that aren't covered (which isn't often). I think my Yellow Fever or Hep A+B vaccin was one of these
 
@Mast Funny how I consider it perfectly normal
 
Oh well, TTGTB, wife is at home this and next week so I won't be around as many nights as usual
 
you dog
 
There's some actual sleeping involved, something I tend to neglect while on my own
 
0
Q: Using custom OWIN middleware to log all request/responses?

BBauer42I am trying to log all request/responses using custom OWIN middleware. Here is the code: using AppFunc = Func<IDictionary<string, object>, Task>; public class LoggingMiddleware { private readonly AppFunc _next; public LoggingMiddleware(AppFunc next) { _next = next; } ...

0
Q: Estimate code quality of my js library

madtarasi wrote small js library for material design toasts(notifications). github repo - https://github.com/madtaras/madtaras-toast js file to estimate - https://github.com/madtaras/madtaras-toast/blob/master/lib/madtaras-toast.js Please write what are my mistakes and how can i correct them.

 
8:49 PM
you sloth
I think I'll head in soonish as well. I want to wake up earlier tomorrow so I can make some bacon and eggs
 
@JeroenVannevel You know what I need to make bacon and eggs?
 
I better be awake for my driving lessons too
 
Bacon, eggs, pepper, a pan, a pot and some bread
 
@skiwi Sidebar: if you're going to hit someone, hot them hard.
 
We went over this a few days ago
 
8:51 PM
@EBrown Well, that's not how you get a license
 
@skiwi See exhibit 1. ^^
 
I shouldn't drive over 135 km/h on the highway though
 
@skiwi You shouldn't drive that fast anywhere else either.
 
@SimonForsberg 130 is okay when passing someone, especially when it looks a bit fishy :P
 
Drive really fast. Excess of 200km/h.
 
8:53 PM
Or 140 on highways where 130 is max, my instructor's rule is that +10 is the max :P
But you are right @Simon, if you're going to drive fast, it should be on the highway :P
 
@EBrown don't do that. we'd like to see you in the 2nd monitor tomorrow.
 
@Mat'sMug I would bet that's debatable.
I work from home tomorrow so if I make it back tonight, I'll probably be here.
 
0
A: Session flash class

ghispiIn general functionality is fulfilled but i'd improve it a bit. Below you will find incremental (further ones will contain previous improvements) list of improvements. .1. Split get to two methods, get and peek, the former one would delete the returned flash message and the latter only return it...

 
You may want to ask this question on codereview.se as there's isn't really a programming problem to solve. — black 33 secs ago
 
9:18 PM
@RoboSanta Yes, deserves more +1:
Wow! Awesome review! Your improvements are really good. I will keep your advices in mind :) — Albert221 Apr 21 at 21:16
 
@skiwi technically, no it's not. It's not legal to drive over the speed limit just because you are passing by someone.
 
-1
Q: ask the user for 10 different intergers, then print the numbers from lowest to highest

Bob The builderpublic class DecisionStructues { public static void main(String[] args) { java.util.Scanner input = new java.util.Scanner(System.in); System.out.print("Enter 12 integers "); System.out.print (" Make sure they are different numbers: ") ; int number1 = input.nextInt(); int n...

 
@CaptainObvious trying to sort 10 integers with O(n) ? good luck with that.
 
In my experience (working on some relatively large 250k+ LOC Java applications) reflection tends to make code harder to understand and maintain and should be well thought through before introducing it (ignoring possible performance problems, that can easily be solved later on a case by case basis here anyhow). I can't remember a single bug due to forgetting to adapt the equals method when changing the state of a data function. Such data classes tend to be reasonably short and simple, so this is easily caught in code reviews at least. — Voo 53 secs ago
 
9:38 PM
1
Q: A Scala script for beautify scientific notation strings from Excel

qedExcel renders scientific notation in the engineering fashion, e.g. “4.2E-5”. That’s OK, but when you are writing a scientific paper, it’s likely that you want it to look like this: “4.2×10⁻⁵”. I have come up with a Scala script that does the job perfectly well: import java.awt.Toolkit import ja...

0
Q: How to optimize this code into a loop?

Leon GabanI have an Array viewObject.terms this array can contain up to 3 items. I need to iterate through the array and save the values into a data object. ie: data.term_id_1 = viewObject.terms[0].term_id data.ticker_1 = viewObject.terms[0].its_ticker This is what I first tried, but I get the error c...

 
0
Q: Downvoting trivial answers

BarryI think the most important question when reading an answer is: Will this answer make the code better? If the answer is yes!, that merits an upvote. But if the answer is meh??, I think the answer needs to be reconsidered. Oftentimes, with questions that do have serious issues worth mentioning, an...

 
@CaptainObvious Thought that was @TopinFrassi for a sec.
 
9:59 PM
So, I saw these two things today:
And:
You'll see what's funny about the second one if you find two important details.
 
Please read and follow stackoverflow.com/help/mcve. Show actual and expected output. Also, please document your code, rather then adding an external walk-through. Finally, code review requests should go to the code-review group; if you're asking about functional errors, you should again post actual and desired output. We're not a testing service, so I'm not quite sure what sort of "errors" you meant. — Prune 17 secs ago
 
@Hosch250 woah, that is weird
 
Hey @EthanBierlein :P I never knew there was a store called Haskell's lol. If only Python was one. :D
It seems Code Review thinks I'm some ruler of the undead. I just started and have two Necromancer badges. o_O
 
10:41 PM
Welcome to StackOverflow. Please read and follow the help documentation on posting, especially stackoverflow.com/help/mcve in this case. If you need a code review on your code, post it to the code-review site and ask for feedback; this isn't the spot. — Prune 30 secs ago
 
10:53 PM
Fun fact, minesweeper is np-complete. Also, your question is too broad. If you want help reviewing your algorithm or discussing potential solutions to your problem, codereview.stackexchange.com or programmers.stackexchange.com might be a better fit. — FGreg 54 secs ago
 
@EthanBierlein Lots of people use Dual Boot / Boot Camp
 
@EthanBierlein what.
that is not allowed
 
Yeah, I just noticed he has a calculator in front of the computer
 
11:10 PM
-1
Q: Update the Logistic Ridge regression code to be faster

user3478697This code takes really long time, Any one can help to make it faster!! NRfit.Ridge <- function(y,X,start,lambda,n.iter=30,tol=1e-4,verbose=TRUE) { ## used X rather than Z just because it's more standard notation n.pred <- ncol(X) II=matrix(0,nrow=ncol(X),ncol=ncol(X)) diag(II)<-1 B <- matrix(...

0
Q: Correct 4 bytes out of 65K to match a crc32 checksum

MikaloI have a corrupted png image. I checked and the crc32 checksum of the first chunk (size ~65k) does not match with the one I get. I am sure of this. Also, I have identified the 4 bytes that have the wrong value. I am sure of this. My question: Is there an efficient way to calculate the values of...

0
Q: Problems figuring out minesweeper code

user86799Trying to figure out, how to fill a new array or current array with numbers, corresponding to the number of mines adjacent to it. I have been trying a few different ways and i cant seem to get down the logic. I feel like arrays throw me off. My thought process would be to compare each cell to the...

 
Is Captain Obvious a bot like Duga?
 
@KingCodeFish no
Duga is a bot, Captain Obvious is a feed
 
Ah, I see. I'm a newbie in the chat rooms.:P
 
Duga is Java, Cpt Obvious is RSS
 
Ok, cool
Wait, you're employed as a programmer at 16?
 
11:13 PM
I am
Try reading this 2nd monitor guide that we put together, if you like
 
Ok, I'll check it out
Hey, is there a way to set what your main SE account is. Mine's set to SO, but I would like it to be Code Review.
 
Depends. There's not really a 'main' account, they're listed on your profile by descending rep
but you can set your chat profile to default to CR
 
Alright, thanks, it's changed
 
@KingCodeFish thank you for noticing the important detail
 
Hehe :P
 
11:17 PM
he's using excel, but he still has his calculator out
 
Yeah
@EthanBierlein Thanks for introducing me. :-)
 
No problem! ;-)
 
How come the javascript tag won't show up on my profile. Is there a certain way to participate in it?
Do I have to subscribe to it?
 
nah
 
What do you mean won't show up? If you click on your "profile" tab you can see tags you're actively involved with.
 
11:20 PM
it takes a while for the progress of tags to show up on your profile
that's what he means
 
Ok, I see. They seemed automatic, which is why I was unsure
 
yeah, I asked a question ~16 hours ago, and the effects haven't shown up on my tags. the system takes a little bit
 
I see, thanks.
 
11:43 PM
Greetings.
 
Hey @Legato
 
And what's the reason in posting that?
lol
 
why not, also it's pretty slow
 
Where is SirPython when I finally have Python questions. :P
 
11:54 PM
SirPython is here.
 
Are you sure you're not a ninja? Haha.
 
Maybe. You'll never know ;-)
 
I adjusted my current code from some suggestions I got here While it runs, I get a warning and I'm curious what I should adjust?
It's probably super simple, but I tried like 4 or 5 different things before finally landing on the current thing that runs but still complains.
Scope so weird in Python.
 

« first day (892 days earlier)      last day (3126 days later) »