« first day (1144 days earlier)      last day (2876 days later) » 

12:00 AM
RELOAD! There are 2457 unanswered questions (93.0090% answered)
 
12:25 AM
possible answer invalidation by user69786 on question by user69786: codereview.stackexchange.com/posts/132586/revisions
 
12:35 AM
0
Q: Absolute value function in MIPS

user69786The following is my implementation of the absolute value function in the MIPS assembly language. I would very much like to hear constructive criticism of my code from you as well as any words of wisdom you want to pass my way. The code is heavily commented. ######################################...

0
Q: Sketch of Chutes and Ladders game

EdwardThe classic Chutes and Ladders game has a grid of 100 squares with various "chutes" (which send a player backwards) and "ladders" (which promote a player forward). The goal here was to randomly create a series of these chutes and ladders such that the net effect is that there are 50 more squares...

 
@Duga seems okay
 
-1
A: Anagram in Scala

D.CYou could reduce whitespace which could potentially improve the efficiency of the code.

 
@Jamal that doesn't make sense unless you are writing in whitespace or maybe oOo
 
 
1 hour later…
1:57 AM
0
Q: Modular JS Revealing Module Pattern Nooob

AverageJoeSo I am just getting started with Modular JS and I am converting a spaghetti coded jQuery UI using the revealing module pattern. My concern is, basically, am I doing it right. tab_template: <cfoutput><ul class="list-group form_wrapper"><li class="list-group-item form-group"><div class="row"><d...

 
2:33 AM
Stack overflow is not the place for code reviews. Having said that, I would not store the index, you will have to update it when adding, deleting new groups. I would just track the id of the current group — Juan Mendes 29 secs ago
possible answer invalidation by julekgwa on question by julekgwa: codereview.stackexchange.com/posts/132013/revisions
 
3:09 AM
@Duga The edit appears not to invalidate the answer, amazingly.
 
Questions like this are better suited for codereview.stackexchange.com since you don't really have a programming problem. Note however that project structure is very subjective and will elicit a variety of opinions. There is no "one size fits all" — charlietfl 1 min ago
 
3:30 AM
0
Q: itoa base function in C

julekgwaThis is a function that converts an integer value to a null-terminated string using the specified base and stores the result in a char array that I must allocate (with malloc). I have decided not to use malloc. Allowed functions: malloc. Loops: while Please review my code. char *itoa_base(int va...

 
3:54 AM
I like @Brythan's answer here. — Cary Swoveland just now
 
4:06 AM
since these are all working code samples and you are trying to ask for comparison, this is probably a better fit over at code review. codereview.stackexchange.comClaies 32 secs ago
 
http://www.commitstrip.com/en/2016/06/20/coder-bingo/
CommitStrip
Coder bingo
CommitStrip
1466444269
 
5:00 AM
 
5:13 AM
0
Q: endianness conversion C++

Alex ZywickiI have written some code that is designed to be an endianness utility for c++. It functions as I intend, but the code used in the conversion is somewhat complex and I would like to find a way to make the code more clear. The Code: #include<type_traits> #include<cstdint> #include<iostream> enum...

0
Q: What's the correct and right way of implementing this code?

htmlcoding876My Code: https://jsfiddle.net/p2Lnf4tg/22/ Codes: 1, 2 and 4 "don't" let you highlight the image with your mouse. What's the correct way of doing this, I saw these codes, but which one is right? There are some many different ways to do this code I'm confused about which way is right. If you w...

 
Monking
 
5:55 AM
possible answer invalidation by forethought on question by forethought: codereview.stackexchange.com/posts/132493/revisions
 
6:07 AM
@Duga seems ok
 
6:17 AM
monking @all
 
6:35 AM
seems fine to me - if you have working code you should be asking on code review, not here — Dagon 16 secs ago
@Dagon, thanks, I have asked the question at Code Review now, I'll vote to close this question off. — thePav 18 secs ago
 
@Monking !
 
6:55 AM
0
Q: Better way to check the status of a PHP website

thePavI currently have a system which loops through a bunch of my website domains and checks their status and sends me a notification letting me know if they are up or down. The stripped down version of the relay code is below, I've removed the email/DB update code etc. It pings a transponder (a file ...

0
Q: Reactjs Tab Component

JeemusuI made a simple bare bones Tab component, any hints, tips, advice appreciated. Tab.js Component import React from 'react'; class Tabs extends React.Component { constructor() { super(); this.state = { activeIndex : 0 } } handleOnClick(key, eve...

 
7:28 AM
Morning
@Mat'sMug I'd like to say it's me, but someone probably coined it before I did
Actually I think it was @Phrancis..
 
@200_success, please have a look at the edit history. IMO, OP's original title wasn't that bad. Though I believe "Transform a double loop with if statements into logical operations on arrays", describes the problem more accurately. — Stewie Griffin 10 mins ago
 
Zak
Also, I am in awe that you're so generous to provide world class programming lessons to me/random strangers! CR is a whole different level than SO^^ — findwindow 11 hours ago
Monking @all
 
@StewieGriffin As a rule, any title that mentions "if statements" is a bad idea.
I made an attempt at an appropriate title by guessing what the code was doing, the. removed the "random" part at the author's request.
 
Wow, first time I get home from work with no pings.
No notifications, no rep.
Boring day.
Oh well.
 
Zak
There's a new reviewer in need of some upvotes (their naming is horrible, but the rest of the answer is solid): codereview.stackexchange.com/a/132555/81541
 
7:38 AM
0
Q: how to declare a modelviewcontroller(mvc) in javaFx

Priyahow to declare a mvc in JavaFx eclipse for a simple calculator application.

 
Zak
damn, I was one vote from mortarboarding yesterday
 
for best practice go to codereview (codereview.stackexchange.com) — asteriskNinja 6 secs ago
 
@Zak If you're that close, it's OK to suggest voting on a worthy post in the chat room.
 
@asteriskNinja Just a note. If you're going to recommend people go to Codereview, please point out that they will need to re-write their question to avoid it being closed. In this case, the OP would need to embed all the code that they want reviewed directly in the question. — Zak 41 secs ago
 
Zak
@200_success I don't keep an eye on my rep day to day. Just noticed it this morning when looking through my notifications.
 
7:44 AM
@asteriskNinja Questions asking "What is best practice?" and questions containing pseudocode are both off-topic on Code Review. — 200_success 5 secs ago
 
@Duga That's really not good :S
Looks like we need another Call of Duty
 
@200_success Ok :) Just curious, can I ask why? It seemed appropriate to me.
 
@StewieGriffin If statements describe what the code is, not what it does
We're not very interested in what the code is, because the review may likely change that. We're more interested in what it does, which provides proper context to any reviewers.
 
@EBrown ouch
Your original code
 
7:55 AM
Yeah
The actual code was longer than what I posted.
 
Did string.Normalize suit your issue?
We may end up running into the same thing
 
Yeah.
Interesting, that seems to be working quite well, and is just as quick as my switch. (Maybe even faster.) I think it's safe to say that this resolves my issue, and I'm not sure why I decided to do it the hard way. (I'm not sure how I missed that SO question. I guess I just assumed no one else has this issue.) — EBrown Jun 12 '15 at 17:50
 
^^ As for "why you decided to do it the hard way": it's instinctive to do things the hard way if you don't know the easy way
 
> The 200 lines I mentioned earlier doesn't even cover a quarter of the characters I have to support.
 
Besides if you always took the easy route you'd never learn <:
 
7:58 AM
I did finish that switch block at one point, 1k lines of one method.
And all those lines were 1 switch block.
 
Did your hand look something like this at the end?
Replace "I must not tell lies" with case:
 
No.
Though, I did lose a bit of my sanity.
 
> a bit
> is up at 2am on a tuesday
(I think it's 2am)
 
And somehow I lost 10 Meta Stack Exchange rep from a user being removed.
@DanPantry 4am
03:59:57
 
Oh that's much better...
 
8:00 AM
Yeah.
Just got home from work not long ago.
 
Naruto answer; accepted non-selfie answer with 0 score: Quiz program in Java
 
I'ms till stuck in LA timezone mode (because the person Im' communicating with in Riot is in LA)
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Date picker consisting of three component pickers
 
My day was awesome until 00:30.
 
Ooo I interrupted @RoboSanta. Get in
 
8:00 AM
Then it got carp.
 
Why is that?
 
Zak
> Solidity is like programming in JavaScript, except with your bank account accessible through the Document Object Model.
 
Well they put me in a different department today, from 1600 to 0030, because I hate my current department, and at 0030 they moved me back to my normal department.
 
@DanPantry you have a point =)
 
Zak
@EBrown Funny. I lost 10 CR rep the same way.
 
8:01 AM
@EBrown wat
 
@DanPantry Yeah, so from 0030 to 0330 I was in my normal department.
 
@StewieGriffin As a general rule we ask authors to modify their titles to describe what their code does and not what it is.
 
Which is horrible.
I hate it.
With a passion.
Like, I seriously have nothing good to say about it.
 
Zak
Tech stack inter-relationships
This is my corner:
 
LOL
Notice how Java is completely separate from all the good stuff.
There are only two things in the Java group I even use: Swift and Git/GitHub.
C++/C group I belong to.
 
Zak
8:12 AM
Can anybody see CR on here? because I can't.
 
I don't see Server Fault or DBA on there either.
 
@Zak What's the link between Woodworking and Sexuality?
5
 
@JoeWallis Well...
 
@EBrown notice how php and mysql stick together like siamese twins? and almost everything not java hangs in there?
just saying
 
I think that's a topic that is not suitable for this chat room @JoeWallis :P
Nope. Not gonna risk it
cus that'll get starred and/or flagged
 
8:17 AM
@DanPantry more like starred-out-of context
I like it. Very appreciable. sexist though
 
Yes, that's why I removed it :P
 
@Zak or Language Learning ;-;
 
@Zak That's a trifecta I do not want to take part in.
Maybe because Code Review doesn't have any relationships with other sites other than "This belongs on Code review" "NO IT DOESNT" "Thanks I've cross posted to CR"
3
SO and CR are like an old married couple where SO is the one making the rash decisions and CR is telling it off all the time
 
no, that's Programmers and SO
The amount of "go to programmers" comments vs the amount of "go to CR" comments leans in favour of Programmers
 
Programmers is the 40 year old, balding, middle-aged man having an existential crisis because he doesn't know what he is doing in this life or his purpose
3
And neither does anyone else :P
 
8:21 AM
I was going to call Programmers a "misunderstood" 20yr old with colourful hair... oh wait
 
Ha, jokes on you, I'm 21
:^)
Anyway. I've derailed this topic successfully. Back to user support
 
@DanPantry I always wondered what the point of that smiley was
 
@Vogel612 It's basically a trollface
 
@DanPantry This chatroom is now about spiderman?
 
@Vogel612 Tongue in cheek.
 
8:22 AM
@Vogel612 Look at me. Look at your keyboard. Now back at me. Your keyboard is now diamonds.
Anything is possible with power of JavaScript
 
@DanPantry magic
 
@Vogel612 an aside: fancy a round of LoL later? I haven't played in a couple of days because I've been sucked into WoW again
 
#define later. but yea, sure
 
@Vogel612 7pm UTC+2
 
sounds good
~back to writing up a question
 
8:33 AM
Then you are on the wrong site. Code Review if for working code which needs to be optimized. — Ralph 29 secs ago
 
@skiwi oh, hun.
BWT I thought I should mention that in my new job, if I do get it, a large part of it will be code reviewing code for security.
So CR has helped in more ways than one :)
The next stage is an on-site full day interview which will see how I mesh with the team, playing a few games of LoL with the team (Which has to be the best interview method I've heard of, lol) and individual programming interviews with a developer
I'm hoping that doesn't include Fizzbuzz since I haven't studied algorithms in a very long time
 
FizzBuzz is not an algorithm test
it's just "can this person actually program a basic task"?
 
It's still an algorithm :P
I wouldn't have issue with a fizzbuzz test, just a point of saying I have no idea what the programming interviews will have
The questions I was asked in the technical interview were very web-based, such as asking what sql injection/xss was, how I could prevent them, downsides, that sort of thing
 
Zak
8:50 AM
@DanPantry Video gaming as an interview, where do I apply? ^^
 
@Zak Haha. I think the idea is to see how well you perform as a team player in game as well as your attitudei n game
 
0
Q: Snake game in C for Linux console

sergeyrarPlease help me improve this code. Move snake using : a w s d. (My compiler doesn't support initialization of index variables inside loops, so please ignore this part) #include <stdio.h> #include <string.h> #include <termios.h> #include <unistd.h> #include <fcntl.h> #include <ncurses.h> #define...

0
Q: Follow the Rubberduck - Part 3: JavaFX MVC and MVP Matrjoshka

Vogel612After the last post had some minor improvements for me and the beta release was actually used for some things, I decided that the GUI was too ugly to continue like this and rewrote the whole GUI in JavaFX. The Matrjoshka - Usage This posed some challenges for MVC / MVP, because of some peculiar...

 
Riot Games Inc.
 
Don't think tehy have any VBA openings.. :P
2
 
8:51 AM
I remember seeing some openings in finance, though
@Quill Programming on an iPad?
 
apparently, yeah
 
Something about programming on a tablet (i.e, without a keyboard) irks me
Programming is not programming without the clicky-clacky of keyboard keys
 
@DanPantry keyboard steals my overview
 
Say what you will about Apple, though, their UX is impeccable as always
And its a good thing to try and encourage more "normal people" to learn to code
 
@DanPantry Jokes on them, coders are not normally people
Screw it, I'm leaving that typo there
 
9:05 AM
@skiwi In 20 years, that comment will probably be accurate even with the typo
 
9:16 AM
Meh, robots are stupid.
Useful, but stupid.
 
@Mast we can say this about humans too ^^
at least some of them
 
Case in point: I have about 10 tickets referring to the same issue raised on the same day AFTER informational communications were sent out explaining the issue wasn't working
 
@DanPantry So you told us it wasn't working? We'll make sure you know it's not working!
 
9:46 AM
0
Q: simplify the if and else conditional part in angular js ng-class function call

SivaRajiniBelow Angular JS function in ng-class $scope.highlight = function (row, column) { var columnName = column.toLowerCase(); //Quantity Highlight if (columnName.indexOf("units") != -1) { //340b Provider ID and service Date C340B_flag //duplicate RX ID...

 
hmm... something wrong with my question??
 
because only 7 views ?
 
yea I'd have expected more traffic (and votes) even at this time
 
Zak
Designing databases is hard :(
The more I think about it, the more stuff I realise I need to account for.
 
@Vogel612 I needed to figure out what you mean with "Matrjoshka". I first thought some new strange framework until I understood that you mean that puppet.
 
9:55 AM
if there was a framework of that name, I'd have tagged... but yea that is misunderstandable
 
@Quill es2016 has been finalised. It only includes ** and Array.prototype.includes. sad face. :(
 
> >not using Babel
 
Also, Windows is denying me access to a folder I created.
And is telling me to get the Administrator.
I am the administrator.
 
Windows is bork
 
Windows likes doing that
 
9:59 AM
I use the CLI to delete those folders
 
I also don't haev the ability to modify the permissions of the folder. Or view them.
 
login as administrator and then do something... "This action requires administrator privileges. Please give the administrator password to ..."
 
And I can't use the CLI to delete the folder either because I don't have permission. Also, chmod doesn't fix it.
 
boot in safe mode as the Admin
 
especially funny when you access a folder that doesn't have read perms set for Administrator
 
10:00 AM
You're telling me I have to boot into safe mode.. to remove a folder.. that I created?
This is why Windows sucks.
$ chmod +rw cultures
chmod: changing permissions of 'cultures': Permission denied
 
@DanPantry try running windows explorer as administrator. Then you should be able to delete that folder.
 
what.
 
0
Q: C# BigInteger formatting for endless game

Thijs RiezebeekI am working on an endless tower defence game in Unity. To keep track of money, damage, hitpoints and stuff like that I will be using BigInteger, which can represent arbitrarily large integer values. Unfortunately, Unity does not come with a BigInteger implementation, but I managed to find one on...

 
@Heslacher Nope
Run as Admin -> You require permission from teh computer's administrator..
.........
This is a folder I just recreated via git checkout
 
luv u windoze
sudo rm -rf cultures
 
10:02 AM
> windows
> sudo
 
bash subsystem?
 
doesn't have sudo
sudo isn't bash. it's a unix program
 
apt-get install sudo
that's beyond stupid though...
 
apt get is again a unix program, not bash
 
bash subsystem comes with apt
at least that's what they said in the demo
 
10:04 AM
Not this one :(
Oh, no, this is W7
Not W10. I'm using Git Bash
As in W7 you're gonna Git Bashed if you don't get out of the way
2
no more git clean for me I guess
 
10:21 AM
Monking
 
monking @skiwi
 
Npoljoh
 
Still going with this, I see? :P
 
Has there been a date for the Bash subsystem yet?
 
It's in beta for windows insiders, I believe
 
10:24 AM
or a possibility to install it on regular W10 would also work
> To date, my sources have said that Microsoft has been aiming to complete and release Redstone 1 in June 2016. Earlier this year,
:( That one hasn't arrived yet, right?
 
Monking
 
I still need to upgrade to W10 before 29 July, but I'd rather use Bash directly than install Git Bash or MINGW or stuff again
 
@skiwi Dual boot
@skiwi Not sure, I don't think it is quite working yet on my copy which I installed this past weekend
But yse, definitely dual boot
 
I'd rather stay on Windows... for now
 
I have two SSDs, one for windows, one for unix
 
10:27 AM
I have on SSD, and it's too small
 
There's no such thing as "too small" for unix
My unix ssd is 120GB but I haven't even used 1/4 of that
 
It is if you want to put stuff on it :D
 
my windows one, on the other hand... 500GB
used up 1/4 of it just on .NET framework and a couple of games
 
I only dread reinstalling since there's so much stuff on this PC
 
the windows 10 updater lets you keep your stuff, for the most part
 
10:29 AM
My dad's PC got wrecked pretty hard by that, it still runs and over the last months it has stabilized but I should really do a clean install after upgrade
For some reason the Windows Store is still totally missing on his PC
 
lol
it's not that useful anyway frankly
The only thing I've gotten from it is the nowtv addon which is quite good for GoT
Also, this website is glorious
3
 
The calculator app is gone though if you mess it up
29
Q: C++ weird expressions are compiled just fine

DeanWhy are the following valid C++ expressions? These aren't lambdas []{}(); {}[]{}; Can someone explain them to me?

wat
 
@skiwi C++
 
    #[test]
    fn test_set() {
        let mut byte = 0b01010101;

        u8::set(&mut byte, 3, true);
        assert_eq!(byte, 0b01011101);
    }
It works :D
 
please
don't mix
int literal and binary literal like that
use 0b01010111; :(
 
10:36 AM
It's what you to when working with bit vectors :)
 
I see lots of one stars. does that mean @Zak is here?
 
Zak
@DanPantry I can neither confirm, nor deny, that those stars are, in fact, mine.
3
How do one one-box tweets?
 
just paste the link
 
don't you just post the link?
 
Zak
Data Scientist (n.): Person who is better at statistics than any software engineer and better at software engineering than any statistician.
 
10:39 AM
Just paste the link
 
Zak
Ah, I had an extra bit on the end of the link.
 
Am I still sleepy or is that sentence hard to parse?
 
@skiwi a bit of both
 
@skiwi that's the idea
 
@Zak I like how this allows to completely remove all but one person from the respective categories
1 message moved from The Nth Monitor
 
10:50 AM
1 message moved from The Fiery Pits of Hell
6
 
@Quill lol
very good
 
unrelated... wtf did the person writing those assignments think??
use a 3-bit address-decoder and a basic logic gate to make the function \$f(x_1, x_2, x_3) = \Sigma m(0,1,4,6,7)\$
 
wat
 
basically return true if the input is any of the numbers in parens
 
What's a 3-bit address-decoder? Can it represent 2^3 addresses?
 
10:56 AM
you get 3 inputs and 8 (2^3) outputs
the one that's given by the binary number at the input is set to 1, IIUC
and that gets me 4 out of 100 points...
I just cannot take this seriously....
 

« first day (1144 days earlier)      last day (2876 days later) »