The 2nd Monitor

General discussion about codereview.stackexchange.com - Welcom...
May 23, 2017 10:17
@Peilonrayz I might've spam you with some upvotes at some answers I liked. Hope you don't mind :)
Jan 23, 2017 16:45
Thanks @Peilonrayz. Never thought zip() would help so much in this situation
Jan 23, 2017 16:34
Monking
Jan 23, 2017 16:30
@Peilonrayz it looks nice and it works as far as I tested. But I can think of a problem with that. I also need to access the x and i in that main for loop
Jan 23, 2017 16:24
so I should return 58 4 times, then from the second country, 57 seven times(as there are 7 cities)
Jan 23, 2017 16:23
so in the first country there are 4 cities with that code
Jan 23, 2017 16:23
if you saw the json file on that SO Question, you'll see next to code the value: 58
Jan 23, 2017 16:21
@Peilonrayz that's returning the same value all the times
Jan 23, 2017 16:16
you can pseudo-write it like that
Jan 23, 2017 16:16
yea
Jan 23, 2017 16:15
@Peilonrayz no. What I really like is that first for loop to also be changed at each iteration
Jan 23, 2017 16:13
@Peilonrayz did you understand my problem ?
Jan 23, 2017 15:59
If somebody gets bored, I'd really appreciate some help on my SO Question x_X
Jan 23, 2017 15:58
Monking !
Aug 17, 2016 08:03
monking people. Does anyone have a bit of time to give me some ides regarding this ?
Jun 7, 2016 14:19
@Mast well, then what ? I though RAM is being used when doing I/O processing. What should I be concerned about ?
Jun 7, 2016 14:14
I'll post this here now that is working. I'll have to run it in an environment which does not have to much RAM and maybe the guys have some improvements when it comes to RAM usage
Jun 7, 2016 14:12
^^
Jun 7, 2016 14:12
I'm coming from python
Jun 7, 2016 14:12
there's no problem... I'm also at work and trying to learn C
Jun 7, 2016 14:12
thanks a lot
Jun 7, 2016 14:11
yay
Jun 7, 2016 14:11
I got it working now
Jun 7, 2016 14:09
Jun 7, 2016 14:08
sure
Jun 7, 2016 14:07
^^
Jun 7, 2016 14:07
well, it didn't print all the lines ...
Jun 7, 2016 14:06
nope
Jun 7, 2016 14:06
@syb0rg now it just prints the first line from file1
Jun 7, 2016 14:00
I'm confused. I don't know what to modify anymore :))
Jun 7, 2016 13:58
@syb0rg you mean something like this? dpaste.de/bhhR
Jun 7, 2016 13:55
Like this ? dpaste.de/qYcg still the same. If in the last if I put if(!match) I don't get anything
Jun 7, 2016 13:51
well, it's still printing all the content of the first file
Jun 7, 2016 13:50
right, silly me
Jun 7, 2016 13:49
oh, got it. something like this: dpaste.de/ujpr
Jun 7, 2016 13:44
Jun 7, 2016 13:43
yes, I understood this. I don't know what you meant by that if condition
Jun 7, 2016 13:41
the strcmp ?
Jun 7, 2016 13:41
@syb0rg I'm sorry but I don't get what you mean by: if(!match in both files)
Jun 7, 2016 13:37
"bool should be at top of method, yes" -> what method ?
Jun 7, 2016 13:36
that Boolean should be declared before the second while() loop, right ? And the rest of your pseudocode would go inside my if(), right ? ^^
Jun 7, 2016 13:32
@syb0rg I tried but I guess I did it wrong because I wasn't able to have the correct output
Jun 7, 2016 13:30
yes
Jun 7, 2016 13:30
take line1/file1 and loop through all the lines of file2 to check if there's no matching line. If there's no line, print line1 from file1 and go to the next one
Jun 7, 2016 13:28
the flow as I see it is:
Jun 7, 2016 13:28
just not multiplied like it's right now
Jun 7, 2016 13:28
well, I know how to break it, and if I do, the output will be all the content of file1
Jun 7, 2016 13:26
well, that should happen
Jun 7, 2016 13:26
yes, that's what it happens
Jun 7, 2016 13:25
well, yes