« first day (962 days earlier)      last day (3352 days later) » 

20:01
If a router gets overheated, any clue how much amperage/wattage it could draw? Could it lead to a plug getting killed?
(I don't even know if the router is overheating, it's just an assumption because it tends to lag heavily at times and overheating could be one of the causes)
I suggest this question is a better fit for codereview.stackexchange.com, provided that some working code is added. — jaco0646 36 secs ago
@skiwi That could be dealing with congestion.
@Hosch250 It wasn't lagging in the past and number of devices hasn't changed, but it started lagging at some point, so yes it's likely congestion, but I have no clue why
Doesn't mean anything except one or more of the devices started sending a stream.
I'm suspecting the router is dying, but shouldn't cause this much trouble I think
20:14
@skiwi If you don't trust the heat it's generating you could put it on a metal flooring.
It will do wonders for your heat dispensation.
It will act as a makeshift heat-sink.
@mjolka per OP's own words, yes
> The following is a contrived example I've created to show what my problem is
Who's going to make it a comment so OP knows he should edit his question?
0
Q: Pattern for returning results based on multiple parameters

AkankshaI am working on legacy code where a method is supposed to return results based on mulitple parameters. The pattern used in code works but I'm thinking if it could be improved further. I'll give an example Let's say I have a class JobPosting which has various properties class JobPosting { i...

The following is a contrived example I've created to show what my problem is -- problem is, contrived examples are not good on this site, because reviewers can't really point out what's bad in your actual code, and that leaves the ugly in. cough. What I mean is, this would be a much better question if you showed us real code - note that "hypothetical/example code" is off-topic on this site. — Mat's Mug ♦ 37 secs ago
20:20
Very good Mug.
It's almost close-worthy.
Almost.
Not worthy enough IMO.
Although it would help a lot if OP simply fixed his code.
On a totally unrelated note, people are watching too much Star Wars nowadays.
@Mast : "syntax" has broader meaning that just referring to code, and can apply to natural language also, or as Yoda's tortured syntax would have it "to natural language apply it may". However you are correct in that the term it is inappropriate in this case. — Clifford 2 mins ago
@Mast i thought about answering "use immutable objects", but figured i would be told that was impossible for reasons X, Y, and Z (that are not given in the question)
@mjolka He already has a good answer, he simply messed up his boolean calculation.
@Mast sorry, i was referring to the example code question
possible answer invalidation by AShelly on question by AShelly: codereview.stackexchange.com/posts/114393/revisions
@mjolka Ah, I assume you're on mobile and therefore can't use hooks?
20:26
@Mast i'm on my laptop, just haven't properly woken up yet
And yes, since he exemplified his code, there may very well be reasons not included in the question that should've been there.
It's one of the reasons why such code isn't allowed.
20:50
I either need some coffee or a good night's sleep. I think this code has me beat.
@RubberDuck Want to Rubberduck through it?
I'll be the duck, if you want.
2
"be my guest duck", he said
Nah. I'm over it.
so, moar coffee it is then? ;-)
I have four global state ArrayLists that should all contain the same data, but don't and need to be kept in sync.
20:53
easy: just remove 3 of the 4!
@Mat'sMug more like blow the next hour of my day here.
LOL. and watch everything break...
@RubberDuck hey, I read the foreword and introduction of M.Feather's book - I think I'm going to have a love-hate relationship with that book!
Ahhh. The whole, "If there's no test, it's already legacy" thing.
I drank the koolaid.
20:55
actually, "if there's no test, it's bad code"
I felt ashamed for commenting-out 450-some tests
2
Well, that ^'s not exactly true.
Untested code can be good code.
You just can't change it without fear of breaking it.
can be clean code, he says. but not good code. it's not good code because ^^
Maybe I need to read it again. =)
0
Q: Angular controller scope inheritance vs service

battle2048On my site I have a navbar component that I want to customize for each and every ng-view I end up loading. Currently I'm doing this as follows. I have a NavCtrl for the navbar itself and my ng-view directive sits outside the scope of this controller. And I use a navbar service to change/override ...

0
Q: Using components instead controllers in EmberJS v2

izumerootI am beginner in EmberJS. I have made todomvc for ember v2 for learning Ember. My implementation works without controller. I use components instead controllers. Because in documentation I see Controllers are very much like components, so much so that in future versions of Ember, controller...

21:07
@RubberDuck deep down I know what I'm going to read in that book: that all the restructuring I've done for 2.0 should have been incremental, to keep the code in a working state all the time, and yada yada. As if breaking changes were putting the project at risk of sinking. Wait, ....
I'm a cowboy
@RubberDuck but hey, did you see #889?
@Mat'sMug I kind of wish I hadn't...
                            if (qtyPicked != qtyToPick)
                            {
                                _detailRecs[i] = "DET|" + detIndex + "|" + thisItemKey + "|" + qtyToPick;
                                // Set ShipQty Objects
                                _qtyShip[i] = new ShipQty(detIndex, thisItemKey, qtyToPick, myReader["ItemID"].ToString().Trim(), Convert.ToInt32(myReader["TrackMeth"]));
                                _distRecs.Add(detIndex + "DST|" + thisItemKey + "|" + qtyToPick + "|||");
I hate this jerk.
_detailRecs, _qtyShip, and _distRecs are all array lists.
@RubberDuck Your company sells Meth?
2
Two of them store pipe delimited strings.
21:21
@RubberDuck That's awful!
and let me guess, changing ArrayList for List<T> would break it
@Mat'sMug _detailRecs[i]
1
Q: Queue implementation in Java

ClockworkThis is my Queue implementation in Java. Would appreciate a review of the code. import java.util.Iterator; public class Queue<T>implements Iterable<T> { private Node first, last; private int size; @Override public QueueIterator iterator() { return new QueueIterator(); ...

0
Q: How to reuse this method

LozeputtenHow can I make this code dry. In my opinion I'm defining 2 methods which clearly does nearly the same how can I improve this? private IEnumerable<Tuple<double, DateTime>> GetCarHdopById(int id) { var tp = new List<Tuple<double, DateTime>>(); db.OpenConnection(); ...

0
Q: iterate list to map entries in python

ArunI have two files namely: File1: CL1 AA XX YY ZZ SS \n CL2 3_b AA File2: AA string1 AA string2 3_b string3 My expected output is: CL1 AA string1 CL1 AA string2 CL2 3_b string3 CL2 AA string1 CL2 AA string2 For this I wrote a following code: import numpy as np print("Reading Fi...

So, yeah.
But I think I can deal with it by calling ElementAt() instead. Trouble is, these are really all the same object, but that object doesn't exist.
uh, List<T> has an indexer
21:23
Does it?
Yeah. IEnumerable doesn't, though.
even IList<T> does
@Mat'sMug why wouldn't it?
@SimonForsbergMcFeely that's a question for ducky ;-)
love the hairboat alongside the ducky with last year's lightbulb hat
Bahahahaha. I like my Hairboat.
21:32
I like my "grampa mug" hat
with a xmas hat it would look like "santa mug"
there's no santa hat this year is there?
Not unless it's a secret.
Working code that you want improvements on should be posted in codereview.stackexchange.com, not here. — jfriend00 18 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comjfriend00 28 secs ago
Mod can you delete this question. I have posted it on Code Review but it won't let me delete because of the answers. — Michael LB 31 secs ago
@Duga that's not how flagging works
21:48
@MichaelLB mods don't get notified for every comment out there - use the "flag" link, and enter a custom flag reason to contact a moderator. I think the best would be to leave it here, and edit to include a link to the cross-post, on Code Review to link here, and here to link to the CR post. — Mat's Mug 43 secs ago
Monking!
monking!
How is everyone's day going?
only +35, I'm actually working today :)
lol. +0 today for me. I've been running around all afternoon doing fun things.
21:58
-1
Q: Setting input values using jQuery/AJAX

Michael LBI have the following code which sets input values using jQuery/AJAX. Can the repetition of the code be shortened in anyway? It's mainly the AJAX requests I'd like shortened. It doesn't seem right to be making so many AJAX requests but despite my research I can't seem to find a way to improve thin...

If the code works fine, is it not better to have on CodeReview? — DangerZone 5 secs ago
Naruto answer; accepted non-selfie answer with 0 score:
0
A: Toggle functions for drop down for a clock time widget

Gary StoreyThere a few simple things you could do to help clean up this code. The first thing I always recommend is to create a closure for your script using an IIFE. This allows your code to run in its own scope and keeps everything out of the global scope. You can also pass in jQuery to the function exp...

@RoboSanta He talks?
Wasn't that old though, November 23rd.
Fixed it anyway, reads like a solid answer.
that's 30 days
Seems I downvoted the original question. Oh well.
22:08
Discussion of this question is now over here: codereview.stackexchange.com/questions/114788/…jfriend00 41 secs ago
22:56
0
Q: Fake bank account class

MagirldoogerJust some reviews on how to make it more efficent or clean and what I should fix in general class bankAcc { public: bankAcc() = default; bankAcc(string fn, string ln) : firstName(fn), lastName(ln) {} bool createUser(istream &is); bool login() const; private: bool correctLogin...

to the mod doing my flags: that was some fast response time :-)
That was more than one mod.
oh? either way, :-)
Average flag response time is currently 13 minutes.
@Quill-HATMANIAC Multithreading improves the processing time when it doesn't cause deadlocks.
23:02
yeah, comments were getting removed as I was flagging the ones after them
-1
Q: Sort array by reversing chunks

CharlieSo, I have a working (C++) program, but it's not optimized enough. The goal is to sort the array, but you can ONLY swap chunks of it, and it's about the amount of swaps you have to do to get the sorted array. It IS allowed to sort it, and use that sorted array to sort it, as long as you provide t...

don't forget "break;" when creating a switch statement...
23:20
possible answer invalidation by Normal Human on question by C Python: codereview.stackexchange.com/posts/114560/revisions
0
Q: Speed up a double for loop or reapproach duplicate removal?

Dirk HauptI have lines_list_copy of the form: [['a1', 'b1', 'c1', 'd1', 'e1'], ['a2', 'b2', 'c2', 'd2', 'e2'], ... ] I needed to remove all duplicate entries where a,b,c,d are identical. So note that I don't care about what value e has. So for example, If lines_list_copy = [['a1', 'b1', 'c1', 'd1', 'e1...

23:31
anyone use CodeAcademy?
I used to. Why?
@Malachi Yup.
Anyone up for a quick JS question to review?
0
Q: Find the longest word

MastThe challenge is simple: Return the length of the longest word in the provided sentence. The solution is just as simple: function findLongestWord(str) { arr = str.split(' '); size = 0; for (var s in arr) { if (arr[s].length > size) { size = arr[s].length; } } return...

Code is almost short enough to fit in the one-box, that can't be good...
This is off-topic.
0
Q: Find the longest word

MastThe challenge is simple: Return the length of the longest word in the provided sentence. The solution is just as simple: function findLongestWord(str) { arr = str.split(' '); size = 0; for (var s in arr) { if (arr[s].length > size) { size = arr[s].length; } } return...

23:44
> Update (Dec. 22): Thanks, everyone, for your feedback to this proposal. We're going to digest this one over the holidays and should have a follow-up announcement answering your questions and addressing your concerns after the new year. We won't be making any hurried decisions on this topic, and certainly not without ample opportunity to integrate your ideas into the final decision. So continue letting us know what you think. You'll hear again from us soon.
@CaptainObvious Should've tagged it . No matter how much JavaScript I see and write, I still feel like one.
@Mast I keep getting errors where it makes me reload the page. is there a way I can set it so it doesn't check the code until I tell it to?
@Malachi Never had that problem before. If it hangs, rebooting your browser usually solves it.
any SQL people in here want to double check some of my SQL work from 2 years ago? someone just accepted an answer of mine, and I suggested a left join in the answer.
5
A: Speed up application and avoid SQL Timeouts

Malachitry this Query const string Sql = @"select top 1 d.UID, d.CreatedDate, d.Location, m.number from master m with (NOLOCK) inner join documentation_attachments da with (NOLOCK) on m.number = da.accountid inner join documentation d w...

I may need a Where column IS NOT NULL
idk
i am going to bed early tonight I think
@Mast it's like that tab keeps refreshing for some reason
@Malachi Yea, it has happened but I thought it was Firefox at fault, not necessarily CodeAcademy. Rebooting the browser fixed it for me, did you try that?
not yet. I will try it tomorrow morning. I might go back to Chrome, IDK yet. chrome would remember my tabs and stuff. Firefox is doing a lot of weird stuff lately, can't figure out it it is Windows 10 or Firefox yet...
23:53
0
Q: Simple OpenGL-2D Program

MORTALI have created mini-opengl program that draw simple chess board on screen by using SFML windows model only. The program runs fine. The main purpose of this program is to keep it as simple as possible and it is not rely on any of OpenGL helper functions like glOrtho or gluOrtho2D for converting co...

If you'd like a review of your code, codereview.stackexchange.com, especially given the fact that your code is working. — Oren Hizkiya 10 secs ago

« first day (962 days earlier)      last day (3352 days later) »