« first day (757 days earlier)      last day (1944 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
There are 1403 unanswered questions
 
Wow, for the first time I didn't use up all my stars
 
@QPaysTaxes There's a first time for everything.
3
 
12:22 AM
MONKING
 
MONKEVENING
 
Monknight?
For the French under us, no, that's not the same as mon knight
2
 
Monking... always monking.
 
It's monking somewhere!
Stars, everywhere!
3
 
STAR-FEST
2
CALL IN THE ASTRONOMERS
2
 
12:37 AM
*says something to get in on the gasball-fest*
2
 
@QPaysTaxes It's easy, but not that easy.
 
Dang
 
@EthanBierlein @Donald.McLean Stars!
 
Oh, they do
I escape them with \
 
O.
2
 
12:39 AM
@Phrancis Old trick. Used in many languages.
 
Someone starred "O.".
3
 
Someone starred "Someone starred "O."."
2
 
Silly person.
 
Someone starred everything.
 
OH GOD RECURSION
 
12:40 AM
Everyone starred everything.
2
 
Somebody is running out of stars freaking fast.
2
 
At least 3 people actually
 
Good grief, we're all gonna be out of stars in minutes at this pace
 
I'm out.
 
@EthanBierlein Already?
 
12:41 AM
Yup
 
Gee, if only we had my idea of starring a comment giving the poster of the comment another star to use
We'd have an infinite amount
 
41 mins ago, by Duga
RELOAD!
About 40 minutes. You only needed 40 minutes.
 
That was the most extreme star-fest ever.
2
 
This ran out almost as fast as New Years
 
Thanks to me
 
12:42 AM
@EthanBierlein What do you mean, "was"?
 
I stand corrected, *still is
3
 
@Mast YOU CLEVER BASTARD
...and I should have been
I think I'm out now
Ethan, say something funny so I can check
 
@QPaysTaxes No, if I was a clever bastard, I would've posted that while everyone still had his stars left.
 
Oh hey look I'm a 3-star general
Nope not out quite yet
 
12:45 AM
 
You're welcome
 
@EthanBierlein ^ Getting there ;)
 
Dang, still not out!
 
Hah, I beat you @Phrancis
 
12:45 AM
0
Q: Bash script to kill a process by name

alphadeltaHere is a script that is supposed to kill a process by name. #! /bin/bash arg=$1 echo $arg temp='"['${arg:0:1}']'${arg:1}'"' echo $temp kill $(ps aux | grep $temp | awk '{print $2}') However, when I test it using sleep 100000...

 
@Phrancis Darn that's many stars.
 
Say "Aye" if you're out of stars.
"Aye"
 
AYE
Finally
Who the star still has stars
I will find you
 
Stars should be regulated like a currency.
3
 
And I will steal your stars
I salvaged one from an older post
Several, in fact
 
12:48 AM
 
@QPaysTaxes You're salvaging stars now?
 
@Mast Indeed
@Mast That I am
 
When out of stars, import new.
 
I still have stars, you guys already starred mostly everything ;)
 
12:54 AM
@Mast Between 23:55 and 0:05 on New Years had so freaking many stars
 
@EthanBierlein That's what, 3 canons in one pic?
 
@Mast You mean shows?
 
It's funny because it's would freak out everyone in the Sci-Fi Fantasy community.
 
Just go down from here
 
Or maybe fandoms
 
12:56 AM
@QPaysTaxes No.
 
@Mast Okie doke
 
"Canon" is a pretty common term to identify all the [official] things that compose a specific field of knowledge, such as Star Trek/Star Wars/Dr Who/Harry Potter, and is used for other stuff too. I think it goes way back to "canonization", e.g. historical / religious works and such.
(not to be mixed up with "cannon", the firearm)
 
@Phrancis Pretty much that.
 
Adjective: canonical (comparative more canonical, superlative most canonical)
  1. Present in a canon, religious or otherwise.
  2. According to recognised or orthodox rules.
  3. Stated or used in the most basic and straightforwardly applicable manner.
  4. Prototypical.
Noun: canonical (plural canonicals)
  1. (Roman Catholicism) The formal robes of a priest...
 
@Phrancis I prefer headcannons to headcanons
 
1:13 AM
@Mast / @QPaysTaxes / @EthanBierlein - just a head's up (official business....) - a couple of times recently, when there's been "official" chat happening in here, you folk have continued with idle chatter. The purpose of this room is to support the Code Review official business, and while idle chatter is fine when there's nothing else happening... you need to put your stuff on "mute".
 
@rolfl Alright
 
@rolfl Will do. I know exactly what you're talking about and it shouldn't happen.
 
My personal psychology is ... warped? but when I am trying to communicate "serious" things to people, and there's banter going on, it distracts from the important stuff.
 
@rolfl Sounds like a plan.
 
Anyway, I believe I have kicked you all at various times for that, but well, just respect the real purpose of this room.
 
1:15 AM
@rolfl I was never told it until just now, sooo
 
There we go, back to idleness.
 
backs into corner
 
I've never let it go that far. AFAIK I have never been kicked.
I hope I'll never let that happen in the future either.
 
I got kicked once and never told what I was doing wrong
 
Look, I am trying to strike the right balance here between telling yuou guys to have fun, but also to be mindful that this is the main chat room for the site.
 
1:17 AM
I got kicked once. I kinda deserved it as well.
 
@QPaysTaxes probably because communicating that would have distracted from the important stuff.
 
@rolfl You don't have to defend yourself. You're right. We can either accept that and do something usuful with it, or ignore it and face the consequences.
I'm not too proud of some of my recent actions. I hope it won't happen again.
 
Crazy thought, but (maybe) we should create a "The 2nd, 2nd Monitor" just for random chatter.
 
Or "3rd monitor"
 
But then I'd have to buy a third monitor...
 
1:19 AM
2^2 nd monitor?
 
@EthanBierlein You know you can create chat rooms whenever you feel like it, right?
 
Yeah, I just don't want to upset anyone.
 
I doubt anyone would mind a general chatter room
 
The appeal of another chat room has been contemplated before. If you can get the "inertia" going, I would encourage it.
on the other hand, it sort of needs to get a "critical mass", and that's hard to do.
 
1:21 AM
I just think that another "2nd Monitor" would make things "less fun"
 
most people would probably not go there... just saying, but that's probably changed since then.
Code Review, as a site, has three frequently used rooms already, and that makes it somewhat "rare" on Stack Exchange.
Most sites do not have an active chat room at all, the ones that do have active chat, have 1 room only.
 
Maybe that should be three frequent and one newly created "frequent" one.
 
Or this could become purely official business
And make a new one purely for talking
 
@QPaysTaxes Nah, that wouldn't be fun.
 
@QPaysTaxes Nobody is saying it should be purely official. But the moment something official is going on, the rest should die down to keep it clear.
 
1:23 AM
@Mast ...I know
 

 Burning Keyboards

Wanna have a talk? Are You bored? Do you have nothing else to ...
 
what I'm saying is that we could make it so that this is just official business and we have another just for fun
 
I don't often see a whole lot of "official business" going on in here, so we probably don't need another room. There seems to have been more "official business" lately though...
 
Welp nevermind then
Rolfl has us covered, as always
 
@rolfl I created that room as an experiment. The only other person who's really gone in there is @SirPython
 
1:25 AM
43 secs ago, by QPaysTaxes
what I'm saying is that we could make it so that this is just official business and we have another just for fun
That just would not work too well.
In large part because us mods are ... human?
 
But, but I thought, monkey, what, how????
 
...I'm confused
 
As it is, I have three rooms I keep tabs on "frequently". This room, the CR moderators hangout, and the stackexchange-wide moderators room.
adding another room would not work well for me, so I likely would not go there ;-)
 
Oh wow
Note to self: Never become a mod
 
A lot of the more "official" business goes on during week time, from my observation, though it does happen on weekends sometimes
 
1:27 AM
@Phrancis Indeed. There's less going on during the weekends.
Just look at the questions asked frequency.
 
Or evenings on weekdays.
 
Really, I think the best thing from a community perspective will be the regular "have fun in the 2nd monitor"....
but be prepared to let the official stuff take priority on the (few) occasions that's needed.
 
To be noted, @rolfl does lurk other places sometimes...
 
So, in other words, stay out of the way when official business is going on, and you're not specifically involved.
 
that ^^^
 
1:28 AM
ditto
 
There's a few things that I moderate heavily in this chat room, just to be clear....
1. I am heavy-handed with people who just come in here to ask for help, etc. This is not a help-desk
2. I encourage people to take tutoring sessions to other rooms
3. I get people to mute themselves when interrupting official stuff.
I really don't like being the ogre, but someone has to be for those things.
Otherwise the value of this room will be eroded
And really, this is, without doubt, the best chat room on the exchange
2
 
@rolfl We all love you for being the ogre. Somebody has to do it.
 
*ogre hug to @rolfl*
 
@EthanBierlein You stole my *ing technique!
 
I have to say, if I had to deal with an ogre, I'd hope it would be as considerate as our dear monkey mod ;)
 
1:32 AM
Sighs
Hands @QPaysTaxes back secret * formula
1 min ago, by rolfl
And really, this is, without doubt, the best chat room on the exchange
@rolfl That should be perma-pinned ^^
 
Yeah, don't you guys wish you had stars now... huh?
Thanks @Phrancis ;-)
 
Yes, but I always do enjoy myself a good star-fest.
 
On another note, I think (don't quote me) that The Tavern room is mostly for general chatter
 
The tavern and the bridge are commonly chatter-only.
 
@Phrancis Isn't that the room with Smokedetector?
 
1:35 AM
I'm voting to close this question as off-topic because it belongs on Code Review. However, make sure to visit the help center, specifically the how to ask guidelines before posting to make sure that the question is appropriate there. Stack Overflow is for help with fixing code, not well... code review. — Anonymous 33 secs ago
 
Dunno, never been there
 
@Duga uh?
Probably a fluke
 
The comment probably got deleted on SO after it was fed to Duga, and before Duga posted it here, so it did not one-box
 
@rolfl It's still there.
 
1:37 AM
@RubberDuck Heyyy
@Mast The latter one? Not to me.
 
I'm voting to close this question as off-topic because it belongs on Code Review. However, make sure to visit the help center, specifically the how to ask guidelines before posting to make sure that the question is appropriate there. Stack Overflow is for help with fixing code, not well... code review. — Anonymous 3 mins ago
As said, still there.
 
3 mins ago, by Duga
http://stackoverflow.com/questions/30552960/is-there-anything-wrong-with-my-fact‌​ory#comment49178193_30552960
That one.
Not there.
 
Ah, no.
 
@Phrancis - you use linux for writing music (like notes on paper?)
(scores, etc).
 
@JeroenVannevel What was that gif creator that you used for VSDiagnostics?
 
1:47 AM
@rolfl No, I don't write score music per se
 
OK, thanks... looks like lilypond, denemo, and canorus are common
 
I use this for OS X
 
will try them all. .. ;-)
 
@rolfl Sibelius is kind of the "status quo" for score music, but I have never used it
 
Download rate 3283KB/s ... nice.
 
1:51 AM
That is quite nice
 
OK, thanks... trying them now... got to get my wife to do it though.... she'll be the end user.
 
Ah, OK. Let me know if I can help any way, I know lots about music, just not much about sheet music software :)
I would have expected by now that musicians would have tablets instead of paper music, but there are certain logistical problems, specifically that the "master" sheet/tablet would need to read the conductor's motions so it can update remote musician devices accordingly
Actually a bit surprised someone hasn't invented that yet
 
0
Q: PHP function to create a Hex dump - Followup

Ismael MiguelThis is a followup of the following question: PHP function to create a Hex dump @Corbin made a very interesting review, and I re-wrote most of the code. function hex_dump( $value ) { $to_hex = function( $number ){ $hex = strtoupper( dechex( $number ) ); //if we don't check ...

0
Q: CSRF Token implementation

r3wti'm building a website where all data interactions are done over ajax other than the initial page load. Now i discovered the need for csrf tokens. i elected to deliver the token in a meta tag like so <meta name="csrf" content="JI8qMif9gHuD06m/HByCzg==" /> the function that generates the toke...

 
ugh i just turned off my pc
 
Hello
 
Thank you :)
 
@Phrancis Is there demand for it?
 
@QPaysTaxes Not really sure. The orchestral music field is pretty old-fashioned
The technology exists to make really good sounding virtual instruments, yet, no orchestra AFAIK has adopted any of these
 
My daughter is singing at a piano concert (yeah, I know).
Her song is in a given key, but she sings it transposed by a third.
(down).
 
@rolfl Totally legit, I have also struggled trying to help individual performers with this kind of stuff
 
2:15 AM
That's easy to do on the electric piano... but, the concert will have a grand piano... and, the accompanist is asking for a transposed sheet music ;-)
 
Man, I wish windows had something like garageband.
 
Also, my daughter is playing around with a piano-doodle.... and I thought she may want to document it as a sheet of music too.
 
@rolfl Transposing is usually easy, putting it on a sheet is the tough part
Transposition can result in really odd/unnatural keys for musicians, also
 
The accompanist is only going to have a few days to learn the piece... so, transposing and learing is too much to ask, apparently ;-)
 
Like playing a guitar tune in F instead of E on guitar, very weird
 
2:17 AM
What, an Eb is not a problem... right....
hey, perhaps I can push for a B# or Cb key?
 
Something something minor key with a half-beat quantization
(I don't know music)
(Can you tell)
 
Eb/D# should not be too bad on piano, it would be a nightmare on most other instruments
E or D is much more natural across the board
 
Hmmm, which key is it, C# that uses all the "black notes"?
 
B#
C# uses two black notes
 
Nahhh, B# uses no black notes...
 
2:20 AM
Owait
 
I weas yanking your chain with the Cb B# thing... are you yanking mine back again?
 
No, just been a while (high school) since I looked over that theory stuff
1998 all over again
 
Ohh... don't put a date on it.....
 
LOL
 
I think I passed royal conservatory grade 4 prac and grade 2 theory in about... 1984?
 
2:22 AM
Come to think of it, you were right, C# has 7 sharps
I got the formula backwards
 
tone tone semitone ;-)
 
Well, my formula version is different, but yeah ok :p
 
do ray me?
 
I'll ray you alright
 
Well, if you go "bar ram ewe" I would be worried.
That'll do, pig ;-)
 
2:25 AM
"Fa-Do-So-Re-La-Mi-Si" <-- sharps, in order of appearance
The last sharp +1 semitone = key
I calculated as -1 semitone instead
Or rather, key +1 semitone = last sharp
(or something, it's all pretty confusing)
do == bar ???
do == "dough", re == "ray", me == ... "me"
Anyways, lol.
Flats are even more confusing
 
@JeroenVannevel Oh cool, that would be super helpful if I ever get back to Learn OneNote (unlikely at this point).
 
2:59 AM
Night
Never mind, I'm not tired.
 
3:36 AM
This is offtopic here if the code works. Look at Code Review. — Carcigenicate 21 secs ago
There is a stack exchange specifically for these type of things found here. — Austin Brunkhorst 56 secs ago
 
0
Q: Inefficient code needs improving

hacker804I recently wrote a program involving a mySQL database using C#.The program is simple.It allows users to enter numbers and ensures that no same number is entered twice.The code below is the one I wrote.Now I know that it is not efficient and I need help in order to improve the code.How can I go ab...

 
4:08 AM
1
Q: Sending a C++ array to Python/Numpy and Back

rowmanI have asked my question here but it seems that Code Review might be a good fit for the question as the code is working. I am going to send a c++ array to a python function as numpy array and get back another numpy array. After consulting with numpy documentation and some other threads and twea...

 
4:27 AM
0
Q: Web App Not Loading Other Pages(HTML)

Fman HensI have an HTML page that functions as a Web App. So when you 'add to homescreen' it functions like an app. It uses HTML, CSS, and Javascript. I fixed the code to not open other pages(from the game selection menu) in the app instead of the default safari(So it was like a real app). I currently us...

 
4:41 AM
0
Q: Assigning functions for different location classes

prestokeysSuppose in a School, you can only study, teach, or walk; in a Mall, you can only purchase, walk, or sell; Outdoor, you can only study or walk. These actions are all functions that can be called, but we only want to make the appropriate functions callable in the different location types. Here's...

 
Stack Overflow is not a place for code review — David Heffernan 20 secs ago
 
5:03 AM
If this code works and you are looking for improvements, you are welcome to post it to Code Review instead. — Phrancis 20 secs ago
You should bring this up at codereview.stackexchange.com. One idea would be to use a dictionary that maps pairs of monster and player moves (defined as enums ideally, as suggested by @Mark), to Responses, where Response is just a parameterless void delegate. Then you'd accept such a pair of a player and a monster move in your method, let's call this struct Turn, and you'd just replace your entire method with the following two calls playerResponses[turn](); monsterResponses[turn]();. — Asad 10 secs ago
If the code works as intended and you are looking for improvements, you're welcome to post to Code Review. I would strongly advise to change your title to describe what the code does, if you decide to do that. — Phrancis 28 secs ago
 
5:23 AM
0
Q: Sort CSV file data by a specific column

nodebaseI am trying to open a CSV file, sort it by price, and then print the results to stdout. The columns of the CSV data are COL1,COL2,COL3,PRICE, (please take note of the trailing comma. The code runs and solves the problem of sorting by price, but my questions are: how good is the code? Where can i...

 
 
1 hour later…
6:31 AM
0
Q: Hangman game that could use improvement

user2803555I am trying to make a hangman game in python, it works but I want to make the UserGuesses list remember all inputs. import random HangmanWords = random.choice(open('words.txt').readlines()) word = str(HangmanWords) w = word.strip() #Tries = number letters NumOfTries = len(w) score = [] def tur...

 
6:41 AM
0
Q: Tic-Tac-Toe Game with html 5 canvas Recommendations needed

Abdulaziz AlaaI know it is a simple game but what i am doing here is practicing what i took in the Ai course and also playing a little with the canvas and trying to improve the readability of my code and using javascript as an object oriented language. I divided my code into 3 main classes(objects). 1- Board ...

 
Suggest you re post at Code Review, a site more open to questions on improving working code. — Pieter Geerkens 48 secs ago
 
 
1 hour later…
7:57 AM
0
Q: Which version is better, terse LINQ or descriptive foreach?

ZivI have a list of items, and a list of actions that extract data from those items. I iterate over the list of items and create a Dictionary for each item that has the data extracted from the item. I have written a foreach based version to get the data, it works well but is a bit long. I could see...

 
 
2 hours later…
9:28 AM
0
Q: Maze BFS in Python

user2015213Note: I'm a Python beginner. The program below was made for a game named checkio, and it works. I'm just wondering if there is any way to make the code more readable. def checkio(maze_map): #the walls of the maze are already surrounded by 1's start_x,start_y=1,1 stop_x,stop_y=10,10 ...

 
9:51 AM
I think this question fits better on Stack Code Reviewicecub 22 secs ago
 
0
Q: Number of pairs (a, b) such that a*b < N where a, b, N are integers greater than 0

Anjan0791long long factors(int N) { int nr = (int) sqrt(N); int b; int fix = N - nr * nr - 1; long long ans = 0; for (b = 2; b <= nr; b++) { if (N % b == 0) { ans += N/b - 1; } else { ans += N/b; } } if ( fix < 0) { ans = (2*ans) + N + fix; } else { ans = (2*ans) + N ...

 
oh, looks like nobody around
I'm looking for somebody who knows C#
to check if this makes sense:
private bool HasAlreadyVoted(MySqlConnection conn, string cnic)
{
    string query = "SELECT 1 FROM voters.voters WHERE CNIC = @cnic LIMIT 1";
    using (MySqlCommand cmd = new MySqlCommand(query, conn))
    {
        cmd.Parameters.AddWithValue("@cnic", cnic);
        cmd.Prepare();
        using (MySqlDataReader Reader = cmd.ExecuteReader())
        {
            return Reader.Read();
        }
    }
}
^^^ does this look correct? return true if a matching record exists, otherwise false
 
10:32 AM
0
Q: Codility PolygonConcavityIndex

user241506I have tried to solve Codility task PolygonConcavityIndex. Here is my score and full exercise explanation. Why my solution is inefficient and how to improve it? Performance: 33%, correctness: 50% public int solution(Point2D[] A) { boolean plus=false; for(int i =0;i<A.length;i++) { ...

 
10:50 AM
@CaptainObvious Off-topic? (Looking for a code explanation.)
 
@icecub: no, Code Review is for improvements to your own code, not explaining someone else's. — Martijn Pieters ♦ 36 secs ago
 
0
Q: C++ Design patter for multiple inheritance

user1391279 Problem Background I need to represent trajectory points and trajectories (encapsulating these points) in the form of a collection of classes. All trajectory points have two essential elements: time and state. A trajectory is an ordered set of trajectory points. The time can be discrete or co...

 
11:27 AM
@janos Looks about correct, yes
 
thanks @JeroenVannevel
 
Monking
Uh, wow, I've been programming in Python 3 for weeks and I just realized I don't know how to create a for loop
3
@EthanBierlein As far as I know there were issues when I wanted to do that, and that's why @Duga exists
I have a list like ["a", "b", "c"] and I need to transform it to ["a", "module", "b", "module", "c"], there's probably some Pythonic way to do it, but inserting during looping should work
 
@EthanBierlein If you want you can add a webhook to make @Duga post all the information about the repository as soon as they happen. That will also make your repository be included in @Duga's daily statistics.
@rolfl I guess Duga's Playground doesn't count there, huh? I assume those rooms are The 2nd Monitor, TCG Creation, and VBA Rubberduck.
@Phrancis that happens when the question has been removed before @Duga posted the comment
@rolfl Isn't that F#? (Is there even a B# key??)
 
11:49 AM
@SimonAndréForsberg I thought you were talking about programming languages for a moment there
0
Q: Weaving elements into a list

skiwiI have the following problem statement: Modify a given list such that one specific element is "weaved" into that list. Examples if the element is 'module': [] remains [] ['a'] remains ['a'] ['a', 'b'] becomes ['a', 'module', 'b'] ['a', 'b', 'c'] becomes ['a', 'module', 'b',...

 
well asked question ^^
 
Thanks :)
 
10 hours ago, by rolfl
I weas yanking your chain with the Cb B# thing... are you yanking mine back again?
 
Thinking about it more (of course after I implemented it), in Python it's probably possibly to return a tuple for every element in a list using a list comprehesion and then stripping the last element from the list
 
12:05 PM
1
Q: Weaving elements into a list

skiwiI have the following problem statement: Modify a given list such that one specific element is "weaved" into that list. Examples if the element is 'module': [] remains [] ['a'] remains ['a'] ['a', 'b'] becomes ['a', 'module', 'b'] ['a', 'b', 'c'] becomes ['a', 'module', 'b',...

 
12:33 PM
@skiwi who needs a loop when you have list comprehensions ;-)
this user would hopefully upvote @jonrsharpe if he had 15 rep:
1
Q: Maze BFS in Python

user2015213The program below was made for a game named CheckIO, and it works. I'm just wondering if there is any way to make the code more readable. def checkio(maze_map): #the walls of the maze are already surrounded by 1's start_x,start_y=1,1 stop_x,stop_y=10,10 class Point: direc...

 
1
Q: Lighting system

Lukas HäringI've been working on my new lighting system, at the moment it works really good but it has some bugs and color blending doesn't work as I want. Do you know some tricks to improve my code? the drawing system is based on pixel. this.draw = function(data, w, h) { var r = Math.floor(...

 
@skiwi I believe "zip" is the function you're looking for
At least that's how it's named in LINQ
 
12:52 PM
0
Q: Are reviews that ask us to DRY their code within the spirit of CR?

cimmanonThis is very closely related to my meta SO question asking Are DRY questions on topic?. Most of the questions over on SO asking for DRY are not suitable for CR and should not be migrated. In my mind, CR is the place you go when you think your code is production ready. If you know that your cod...

 
1:08 PM
Time to read the answers...
@JeroenVannevel I was thinking that was to sort of concatenate two lists together and then use an operator to merge the results
I just came up with this
list(itertools.chain(*[(x, "module") for x in ["a", "b"]]))[:-1]
 
zipping like a zipper
one from list A, one from list B, one from list A, one from list B, ...
 
Hmmm okay
I think @janos' way is the best one here
 
1:28 PM
Probably I don't even need the code though :(
I've got something majorly backwards in this part of the application, yet to figure out what exactly it is, but stuff doesn't add up
 
2:05 PM
Hey Franz, Thanks for the insight. I have almost fixed on netty itself as a solution. Was just curious if there was any other technology that beats netty considering I had a specific use case(only 1 client connection). Anyways I implemented my code using SIngle channel itself and keeping it open as long as I want. Its better now but not that great still. I will try moving my code to Codereview.stackoverflow. I think its better suited there. — naves 42 secs ago
 
Monking
 
This is not a code review site. Do you have any specific problem with your code? — Olaf 7 secs ago
 
2:22 PM
Shhh....
 
2:36 PM
0
Q: Better Exception Management Python

ajkumar25The following program generates the S3 URL and response(status code?) for the key, provided the bucket name and if the S3 URL is a mess(wrong url), then it generates empty string as URL and error as the response. The code works fine, but the way it handles the messy S3 url seems buggy to me. Ple...

0
Q: Highlighting duplicate rows in VBA

EDCI would like to highlight duplicate rows in Excel VBA. Assume I have the following exemplary table with 3 columns A, B and C for testing: A B C 1 1 1 2 3 4 1 1 1 2 2 2 2 3 4 2 2 2 The duplicate rows sho...

0
Q: I have 1 client and 1 server. Client passes Java objects (throughput 10000/sec). I am using Netty.I am short on CPU and this code consumes a lot

navesI have to make Server1 (Netty Client) talk to Server 2(Netty Server). I donot expect any response from Netty Server(Any optimization on this point? e.g closing some events might make it faster?). I am creating a Channel object and reusing it for connection. Code to send message. In real code I in...

 
@CaptainObvious Longest title wins?
 
@Duga CR.SO? What's that?
 
Moving sucks
3
 
2:52 PM
Yeah, it does.
I've had to move 8 times over the course of my life so far. So about once every 1 3/4 years.
 
I went to 6 different schools for K through 4th grade. Moved two more times after that (but stayed in same school).
And moved like 5 times since high school I think, but always in town. Now moving 3 hours across state.
 
Wow. I've only had to move schools twice so far. I was always in town as well too though.
 
5 s600 s500 s500 s1500 s1500 c5000 100 10 20 c5000 10 30
^^^ approximate distances in km for each move I have done.
^^^ s indicates crossing a state boundary, c indicates crossing a continental boundary
 
Yeah, my new house is 165mi away according got Google maps
But by tonight all of the hard part will be done and in 24 hours I will be at my new job.
With my new paycheck
 
And time for CR ?
 
3:36 PM
Nevertheless, don't cross-post your question. It is clearly a better fit for Code Review, please delete this one. — jonrsharpe 41 secs ago
 
4:15 PM
@nhgrif No expert out of experience, but I could imagine
@rolfl Heh, twice to a new country?
 
0
Q: Getting rid off nested if statements

Bram VanroyFor a plugin I'm writing in jQuery I have two optional parameters. For each parameter I do a check for its value. However, I'm curious if I can't write it shorter. Here is the fiddle and here's the code. (function ($) { $.rgbGenerator = function (color, options) { var args = $.extend...

 
4:34 PM
0
Q: Combine multiple DNS lookups function

Jrags87How can I combine multiple DNS lookups without nesting a whole bunch of IF ELSE statements? How would this impact performance? I would ultimately like the function to lookup all DNS addresses simultaneously. function checkInternet(isConnected) { require('dns').lookup('a.root-servers....

0
Q: U.S. Postal Service zip code and bar code class

Ritchie ShatterThis Program excepts either a 27 binary bar code string or 5 digit integer zip code. The program can return a binary bar code of type string from a 5 digit zip code of type int or vise versa. I would like to know if this is a good implementation of a class? What would you suggest? Also some of th...

 
Either I'm still bad at explaining bad titles, or this user just doesn't get it. Maybe someone else can help with this. codereview.stackexchange.com/questions/92294/…
 
@BramVanroy We are suggesting you to update your title to reflect what your code is actually doing. Your code is not trying to get rid of nested if statements, but it is doing whatever you designed it to do (something with RGB values). — skiwi 9 secs ago
I gave it a try...
 
As we all want to make our code more efficient or improve it in one way or another, try to write a title that summarizes what your code does, not what you want to get out of a review. For examples of good titles, check out Best of Code Review 2014 - Best Question Title Category You may also want to read How to get the best value out of Code Review - Asking Questions. — Simon André Forsberg 30 secs ago
When in doubt, use the auto-comments ;)
I think As we all want to make our code more efficient or improve it in one way or another, try to write a title that summarizes what your code does, not what you want to get out of a review. should get the message through
 
Yeah, I really should start using them. :-) Gotta break this habit.
 
4:41 PM
Learned something new today... When you are on a tight deadline and have a storage format that is already has implementations, don't try to improve it, but just use it
It's hard to maintain and it doesn't work if you name your modules "name" or "experience", but at least it works for short-term puirposes
 
@skiwi Done. It seemed strange to me. Wouldn't it be more logical to ask what you want from users rather than saying what your code does? Anyway, I edited it. — Bram Vanroy 3 mins ago
 
I'm replying...
 
@GarethRees Regarding this answer of yours: Shouldn't the region that was mapped be unmapped after the copy is completed? Closing the file descriptor does not unmap the region.
 
@BramVanroy That is really a question for our meta, or something we can chat about in Code Review chat room. In general though, consider how many titles would be like "Getting rid of nested if statements" or titles like how to improve this code / is this code idiomatic / etc...Simon André Forsberg 10 secs ago
 
I ask this now, since I'm only just now starting to encounter problems with this method that for some reason I didn't have before (something to do with running inside Xcode)
 
4:51 PM
0
Q: Guess the number game in java swing

NerdexMy "Guess the number" game dosent work and i could use some help in finding out why. Here is the code: import java.util.Random; public class jFrame extends javax.swing.JFrame { private int gissningar; public jFrame() { startaProgram(); initComponents(); } @Su...

 
I may wait for the OP to respond before I wipe the comments. Unfortunately, I cannot move them to chat unless Community auto-flags the post.
 
5:05 PM
@Jamal The title has been changed, what is there to wait for?
You don't have to wipe all though, but I think primarily the starting ones can be wiped.
 
I have wiped them all just now anyway.
 
ok, thanks
Here's also an answer to the question:
0
A: Converting any CSS colour to RGB(a)

Simon André ForsbergYou are right that returning an object where a is a function would not work, but it would work to return the result of a call to a function! You can also restructure things a bit to reduce duplicated code. By having a starting string or a starting object, and optionally adding to that string or ...

 
5:21 PM
@skiwi Twice not only to new countries, but to new continents.
I moved from South Africa to England, and then from England to Canada.
 
I moved from Oklahoma to Texas. :-)
 
@rolfl Ah right, I do remember you telling about England
 
I would humbly suggest you write (or record) some VBA code that accomplishes exactly what you want to do regardless of performance then try posting in Code Review (Excel) to see if performance improvements can be offered. — Jeeped 36 secs ago
 
This title was never improved?
 
@Jamal I think there's a lot of titles that hasn't been improved.
 
5:34 PM
I know, but I picked this one since it was a much more popular question.
 
6:30 PM
The dangers of leaving a test in failed state for too long: after fixing it and continuing development, I didn't notice a new single failed test.
 
I hate it when you discover new neat key shortcuts in your IDE by mistake...
 
-1
Q: Fraction class fails to compute square root two convergence

AndrewI have made a class that can add, multiply and divide fractions which is presented below class fraction { unsigned long long num, denom; public: fraction(int n, int d): num{n}, denom{d} {}; fraction& operator+=(fraction frac); fraction& operator*=(fraction frac); fraction& op...

 
6:51 PM
Shhhhh...
 
@SimonAndréForsberg Like which ones...?
I know about Ctrl+O in JetBrains products for quick-search
I only forget to actually use it when it would be useful
 
00:00 - 19:0019:00 - 00:00

« first day (757 days earlier)      last day (1944 days later) »