« first day (762 days earlier)      last day (3270 days later) » 

7:00 PM
I can implement these, but that's not really what I'm trying to accomplish right now.
 
You seem to be re-defining operators. Why?
 
Where am I redefining operators? There is no operator-> for struct ListIterator yet.
If that's not clear: Our task is to implement our own data structure. A rebuild of the STL list if you will. We have a blank slate.
 
Darn.
Is there a reason you picked the ->?
 
I didn't.
 
0
Q: handling variables in pyqt - globals vs signals vs container object vs?

mmensingWhile coding a medium to large scale program for the first time I tried different ways of handling a lot of variables. As I find that examples on this are quite rare on the interwebs I will try to give some mini-examples on things that work quite well. What I use: Ubuntu 14.04, Python 3.4, PyQt5...

 
7:05 PM
Task 5.4: Implement operator*, operator->, operator++, operator++(int) and so on.
And then there is piece of code with the signatures. Such as:
reference operator*() const {} // not implemented yet
pointer operator->() const {} // not implemented yet
 
Oof. I'm afraid I can't help you with that.
Re-defining such operators violates my safeties.
I simply can't parse their behaviour if you re-define them.
 
Alright, thanks for trying anyway.
 
No problem. I'm sorry I couldn't be of further assistance.
 
I just got a mail. operator-> should return a pointer to m_value of the list node.
That sounds like return std::addressof(m_node->m_value); should be correct, no?
 
44 mins ago, by Mast
@kleinfreund point -> getValue() = (*point).getValue()
Usually.
Since you're changing operators, I'm no longer sure what m_node->m_value does.
 
7:12 PM
m_node is a member of ListNode. I have not redefined -> there.
I can access the element stored in the ListNode with m_node->m_value.
For example:
reference operator*() const {
return m_node->m_value;
}
This works.
I can do *list.begin() which gives me the value of the first node of my list object.
 
@kleinfreund As intended.
 
Yes.
 
Have you read this?
4
A: error: request for member '..' in '..' which is of non-class type

mHurleyAdding to the knowledge base, I got the same error for if(class_iter->num == *int_iter) Even though the IDE gave me the correct members for class_iter. Obviously, the problem is that "anything"::iterator doesn't have a member called num so I need to dereference it. Which doesn't work like thi...

 
@Mast I found something that might be the issue.
When the list is empty, it has no list nodes. m_first and m_last both are nullptr. Now when I try to call end() it tries to point to m_last->m_next, which does not exist.
 
@kleinfreund Haha, awesome.
Yea, that's default linked list behaviour. If the list is empty, there's no .begin and no .end
 
7:26 PM
Hah, that's funny, because later we're given the task to test begin and end on an empty list. begin and end should be equal in the test case.
 
@kleinfreund Well, begin and end are equal. They're both NULL
At least they should be.
Or well, previous of the first and next of end should point to NULL
 
Is NULL the same as nullptr?
 
nullptr points to NULL
 
Jesus.
Well, where do I start. When the list is empty there is no node. With no node, there is no next or prev.
 
0
Q: Monoalphabetic Substitution Cipher

Alex LIn light of this months Community Challenge, I've taken a stab at building something related. Keep in mind, this isn't a submission for the challenge, just a utility to help in the later process of completing the challenge. What we have here is your simple encryption and decryption (with a given...

 
7:29 PM
Now begin just returns an iterator pointing to the address of first.
But end should be pointing to last->next.
 
@kleinfreund If there is only an empty list, everything should point at NULL since there is nothing yet.
And yes, .end should always be pointing at last->next, but in an empty list that's still NULL afaik.
 
So I don't do something like if (last) return { last->next }; else return { last }.
 
Context?
Code without context is like, yea, uhm, what's code without context?
I should make that a meta.
Not good.
 
Not do:
iterator end() {
    if (m_last)
        return { m_last->m_next };
    return { m_last };
}
Do:
iterator end() {
    return { m_last->m_next };
}
So it may be that I'm constructing my list wrong.
What do you think about this:
List() :
m_size{ 0 },
m_first{ nullptr },
m_last{ nullptr } {}
This is my default constructor for my list (later, we are supposed to implement other constructors as well)
 
Why would m_last warrant a special case? If it's circled, the next on .end should point to .begin
If it's not, well, it should just point to NULL since there's nothing after it.
 
7:36 PM
The latter then.
 
The default for linked lists is that the last node has it's next pointer to NULL
 
I see.
 
As said, it's confusing. You really need to have your objectives and dataflow straight. If you have, it's not that difficult. If you don't, you'll get lost easily.
As I just demonstrated ^^
 
So now I have this feeling that I'm default constructing my stoff wrong.
Anyway, I'm still running in circles.
When testing end(), I get a segmentation signal violation.
auto end_it = list.end();  // this errors out
Only on an empty list, though. I wonder whether that's to be expected.
 
7:58 PM
@Mast @Lyle'sMug et al., Why was this question off-topic?
-3
Q: Breaking out of nested loop, 4 nested loops and other messiness

user35202Can you comment/review/suggest on this? Maybe it should be broken into two methods? friends is a list of strings of T or F characters representing a friendship relation. For example for 3 people we could have friends = ['FTF','TFT','FTF'] This means that person 0 is friends with person 1 (si...

 
I was thinking that it wasn't clear what the code was supposed to be doing, or what it was doing.
 
@200_success The moment I cast my close vote, it missed essential parts.
Missed context at least.
 
If you have 100 of them, you're doing something wrong cuz. Long story short, unless you want to get into some nasty meta-programming (you probably don't), you have to access them just the way you think you would. If you have code that works (it has to accomplish it's task already), you might want to bring your entire code to Code Review SE. I think you have an XY problem here. — RubberDuck 33 secs ago
You might want to ask this question on codereview.stackexchange.comBrent Washburne just now
 
@200_success Does that answer your question?
 
Cool, thanks. I think the question is better now, thanks to your comments.
 
8:07 PM
@200_success That's what comments are for. Lyle, glampert and Ethan saved another day.
Reverted my downvote.
 
0
Q: Show a quiz from JSON in iOS

sasquatchI have to create a quiz of showing questions from a JSON and post back the answers. Here's the structure of JSON. { "pp": [ { "profile_property": { "circle_value": 4, "created_at": null, "id": 1, "name": "THIS IS THE QUESTION TO DISPLA...

 
It seems to me you're really looking for high-level advice on algorithms rather than a low-level code review. — David K 42 secs ago
Posts at codereview.stackexchange.com are expected to be correctly running programs. Don't post just code fragments there. — R Sahu 29 secs ago
 
8:41 PM
@JeroenVannevel Is the bad weather gone yet?
 
that sounds like an Afrikaan version of Windows
 
Belgium doesn't have extreme weather like The Netherlands
 
@QPaysTaxes "Windows" is "Windows" in every language ;)
:p
 
°/ Hi all
@JeroenVannevel survived the storm? :D
 
The storm was welcome
The heat wasn't
I walked home from the bus stop and my neck + arms are burnt
 
8:53 PM
@JeroenVannevel Now they got wet?
Hot first, wet after.
 
One might think that. However, I am lucky enough to have a house with a roof
 
@JeroenVannevel A roof? Where did you get one of those?
 
-1
Q: How can i find all unique substrings of a string using map along with their occurance?

kakuHow can i find unique substrings of given string along with their number of occurances ? For example in xyx unqiue strings are x = 2 xy = 1 xyx = 1 y = 1 yx = 1

 
TTGTB, not sober enough to stick around
@QPaysTaxes We already got one.
@QPaysTaxes Nah. We can't cover every situation explicitly.
@QPaysTaxes Can't see your close flag in the queue, so it's either been handled or it has exluced me since I've already flagged it.
@QPaysTaxes Buggy code has the 'broken code' flag.
@CaptainObvious Removed.
@QPaysTaxes No, we do need a flag reason for that. Broken code is OT per definition, it's one of the most used flags we have.
There's a meta about it somewhere.
@QPaysTaxes We only have so many slots.
I know.
14
Q: How should we revise the standard off-topic reasons, if we can have up to five?

200_success Note: For chat-like discussions of this subject, let's use this Discuss Close Reasons chat room Code Review currently has three standard off-topic reasons: Questions containing broken code or asking for advice about code not yet written are off-topic, as the code is not ready for review. A...

I got this thing called memory.
Even works when no longer sober.
Reminds me, I was logging off a while ago.
Got plenty of that
/wave
 
9:09 PM
monking ?
i was spendin whole day strugglin to find out what makes me the troll here
 
well... this and that
also don't listen to Q ... he's a socially acceptable troll..
but still a troll ;)
just a little
well.. hating monkeys makes you the troll...
 
I hate it when people continue to understand
 
i understant purpose of this website , but i culdnt understand what make me an exception
 
aaaaand no
 
among all these members who dont make "reviewing" interventions
what makes me flagged personally
my question , i think , wasnt bad
 
9:15 PM
-1
Q: I am trying to find the occurances of unique substrings of given string but am not able to see why this is not working ?

kaku public Map<String, Integer> findOccurences(String str) { Map<String, Integer> map = new HashMap<String, Integer>(); int counter = 0; String sub; int stringLen = str.length(); for (int i = 0; i < stringLen ; i++) { for(j=i;j<stringLen;j++) { sub = s...

 
soo.. wait just to get this right:
this is about a ?
 
i deleted my posts
 
could I get a link for context please?
 
@QPaysTaxes
and that still does make me a troll
i dont beg for upvotes n i did never do that
i just dont nderstand the way people downvote you without any explanation
or critics
just emotionally triggered
or if they see dominant downvotes
PTSD ?
ok
 
Let's not get into political correctness territory
otherwise I can't make any jew jokes anymore
and that would be unacceptable
 
9:20 PM
come on you're not even German...
 
jew ?
now this place started to be racist
 
Brown as the Taverners would say.
@Agawa001 the word you're looking for is "Antisemitist"
 
jew joke is racist thing
 
Personally I identify as an antifulltist
 
nvm
 
9:23 PM
damn you German, don't interfere
 
Woah woah. Wtf is going on in here guys?
 
political correctness explanations as well as do's and don'ts
I'm kinda used to being the scapegoat.
 
just notice that any flag happens isnt from my part
 
Ok. Just making sure it isn't time for everyone to go outside. =)
Nom!
 
does it make u code better ?
faster ?
:S
 
9:26 PM
maybe harder?
stronger?
 
Yes! Nutella gives me super human code reviewing powers.
 
@QPaysTaxes That's quite possibly a false assumption
@RubberDuck it's called a sugar-overdose
and it's really just you thinking that..
sorry to break the news...
 
i cant review codes , icant understand how people s brains work like
 
D'oh!
 
the only code i ever reviewed is mine
 
9:27 PM
What about beer @Vogel612? That seems to work too.
 
up unti the third it does, after that the effects are detrimental.
you can counter it with harder alcohol and caffeine though
 
@Agawa001 you should give it a shot. You may be suprised at how much you understand and learn.
 
@RubberDuck if ever it s about syntax
i can do something about it
 
wait stahp.. what's the depressant?
 
I've written some of my best worst code while drinking bourbon.
 
9:29 PM
hmm... okay...
 
We must have different reactions to alcohol
Besides, who on earth drinks coffee after a night with beer
 
Bah. I lived through plenty of Jäger bombs in college.
 
> Code drunk, debug sober - rlemon
3
 
Ummm... Me @JeroenVannevel.
 
@JeroenVannevel no definitely not after a night with beer only
 
9:30 PM
Lol. No it won't @QPaysTaxes!
 
would u make dozen pages code that is executed within a seconde ? or two lines script which takes minutes to end ?
i prefer first
 
but after a night with harder things, or even better: In the night of harder alcoholic beverages
 
After a night of beer, all you need is a bottle of water and some fat food like a hamburger
though the hamburger should really be eaten before the beer
 
Coffee at 2 AM? sure anytime ;)
 
9:31 PM
1
Q: Do they have the POWER?

bazolaI'm working on a city building simulation game, and I have reached the point where I need to check whether tiles are connected to a power source. I decided on a flood fill for this, since it seemed simple enough to implement. For reference, I used this flood fill algorithm, and I also found thi...

 
bazola questions are always well illustrated
 
Blog post or new diagnostic.. The eternal struggle
 
Beer. Beer is the answer.
@Mat'sMug is going to regret my poor decision making skills. =)
2
 
Because it's overrated and normal chocolate is better
 
^^ that
I'm like... totally sticky...
 
9:40 PM
0
Q: Load an OpenGL buffer from file

orostThe function's job is to load a vertex attribute buffer or an element buffer from a specified path, and upload it to OpenGL. Also, optionally, return the number of vertices/indices loaded through an output parameter. Signature: GLuint loadBufferFromFile(std::string const& bufferPath, unsigned...

 
10:18 PM
@janos nice answer, lots of good points!
 
fuuuu... Mothrakk's in my room
and reading revenge classroom doesn't calm my nerves...
 
10:32 PM
0
Q: Checking if a number fits in a primitive type

Vicente BermúdezI made a program that asks for a specified amount of numbers and checks if the input number is in the primitive type range. If it is, it "fits" on the primitive type. Each input number, it checks if the number is in the range of each primitive type MIN and MAX range. If it is between the range,...

 
@Lyle'sMug Thank for the accept :) I saw someone was cleaning up the the other day, was that you?
(MONKING)
 
Happy Birthday @skiwi!!
 
10:48 PM
0
Q: Traversing binary trees through and through

janosGiven a binary tree, it's quite common to perform some operation on all nodes while traversing pre-order, in-order, post-order or level-order, depending on the task at hand. For example you might want to extract sorted elements from a binary search tree, for which in-order traversal is handy. Or ...

 
@Phrancis Quill.
Another shot at a JS zombie:
0
A: Tic-Tac-Toe game with HTML5 canvas

Hosch250Dead Code else{ //undefined data object } This isn't doing anything, so just delete it. Enums Right here, you are using a string literal to specify the player who needs to move: this.player = "x"; Typically, you would use a player enum to specify the player. Spacing If you p...

If I don't get any downvotes, I just need to post 2 more JS answers to get a badge.
Yeah, the unanswered tab.
A zombie is an unanswered question or a question with no upvoted answers.
 
11:09 PM
1
Q: Palindrome Checker Java

adam19325Here is my code: import java.util.Scanner; /** * Created by Adam on 6/5/2015. */ public class Reversal { public static void main(String args[]) { String word = ""; String reversed = ""; Scanner in = new Scanner(System.in); ...

 
0
A: Create random way from one point to another in map

nhgrifThis method is way to big and there's way, way too much nesting going on. You have a massive if-else structure a big switch statement two big if statements all inside a while(true) loop... which is so big it's impossible to find the break statements within, so the readability really, really ...

 
11:29 PM
@RubberDuck uh, lol..? How so?
 
11:45 PM
Beer and coffee?? ..........
 
11:59 PM
RELOAD!
 

« first day (762 days earlier)      last day (3270 days later) »