« first day (1220 days earlier)      last day (2784 days later) » 
00:00 - 23:0023:00 - 00:00

12:03 AM
0
Q: Simple landing page markup with basic HTML

Luciano InfantiI'm writing the HTML for this website: And this is the HTML I made: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Gustoso</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href...

 
12:20 AM
0
Q: Moving an element in a linked list

LeabiGiven I have a linked list, and I want to move a given node to the end of the list, is there a more elegant way of doing this, than what I've done here: #include <stdio.h> #include <stdlib.h> typedef struct node { int val; struct node *next; } node_t; void insert(node_t **head, int val) { ...

 
 
2 hours later…
2:12 AM
@freakish -- FWIW, it's pretty well documented (at least on Stackoverflow) that joining a list comprehension is slightly faster than joining a generator expression. The real world time difference is very minimal however so I disagree that one way or the other is preferred (e.g. I've never seen it in a style-guide). Personally I usually still use the generator to be consistent with other code that I write, but in a code review, I will let it slide when I wouldn't let something like sum([x for x in ...]) (why waste the memory?)... — mgilson 50 secs ago
 
3:02 AM
0
Q: Need to make sure if my code is giving me the right answer

leoI'm looking to find the length and width of a picture frame. With the length being 1.5 times the width. I was asked to prompt the user to input the length of a wire going around the picture frame (which i've done already) and I just need to be sure I got the part of having the output statement ri...

 
3:13 AM
Honestly, I'm trying to make sense of your existing loops in the first place. In particular the lack of it pertaining to the while (sectioncode != 0) loop and the while (dummyvariable = 0); loop. Regardless, clearly gathering a proper section code, and likewise proper student id, could be isolated to their own functions. Honestly if your code works, it belongs on [codereview.stackoverflow.com])codereview.stackoverflow.com) to field questions like yours. — WhozCraig 22 secs ago
 
3:32 AM
Oh snap
I have so much data from SE
Not sure what to do with it
Hmm.
 
4:08 AM
0
Q: Numeral reversal

LegatoChallenge Given a list of numbers and a positive integer k, reverse the elements of the list, k items at a time. Specifications The first argument is a path to a file. The file contains multiple lines. Each line is a test case represented by a comma separated list of numbers and the number k,...

 
4:19 AM
0
Q: Machine architecture dependent features into the build tree

sandun dhammikaAs we all know for the linux kernel tree this is not a new thing.(that firmware files are already on the source tree and they are highly platform and device dependent, as microcode information for each machine) But this is about a small driver source tree. In my driver we use libboost libraries ...

 
4:47 AM
0
Q: Loop through months (1-12)

Mirror318I currently have this monstrosity: next_period = (((current_month + tax_period_months)-1) % 12) + 1 I want to get the month that is tax_period_months after the current month. E.g. if tax_period_months=3, and current_month=09 then next_period=12 This works, but has that horrible -1 +1 to sto...

 
5:02 AM
Monking
 
5:54 AM
0
Q: Dividing & Multiplying in Java GUI

NickI am trying to build a population calculator with Eclipse. I have added the calculate button with what fields i want the numbers from but I need to divide the growth rate input by 100 and then multiply the current population. I have added the calculate button code I have now below. http://pasteb...

 
Please at least include the relevant data in your actual question, as links can break over time. By the way, this question might fit better on Code Review. — Tim Biegeleisen 8 secs ago
 
6:17 AM
@CaptainObvious no code and better fit at programmers
 
6:37 AM
0
Q: Better way to add ImageIndex to Treeview

QANewAs the title states. I need a different type of icon for the different nodes types. at the moment I have this hacky way of achieving that. for (var x = 0; x <= nodeList.Count - 1; x++) { else if (xNode.Attributes["TYPE"].Value == "server.point.AV") { var...

 
6:53 AM
I'm not sure if you're here guys, but I would like to thank you for giving me a chance to enhance my moderation skills. They turned out to be extremely helpful, since I was guiding a historical sources discussion and I've got high grade for good moderation skills
 
0
Q: I am getting error in the code while adding two double number

Manish Raaz Whenever i run this code i get error due to decimal how to resolve it. plz help. public class Foatadd { public static void main(String[] args) { String s1= "98.09"; String s2 = "67.91"; add(s1, s2); } public static void add(String a, String b) throws NumberFormatEx...

 
 
1 hour later…
8:05 AM
possible answer invalidation by Redu on question by Redu: codereview.stackexchange.com/posts/140484/revisions
 
@Duga its ok
 
0
Q: if condition only work one time

SososoHi everyone i have a if condition but i want to implement only time , i mean if condition success only one time can be work this statements.How can i do this ? My first condition only must be work one time i mean , i dont want to work that in days of second week. if ((date.ToString("ddd", new C...

 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Module to procedurally generate a map of islands
 
8:45 AM
possible answer invalidation by Redu on question by Redu: codereview.stackexchange.com/posts/140484/revisions
 
9:25 AM
@Duga the only answer doesn't target this edit
 
possible answer invalidation by dimid on question by dimid: codereview.stackexchange.com/posts/140494/revisions
 
10:00 AM
possible answer invalidation by Redu on question by Redu: codereview.stackexchange.com/posts/140484/revisions
 
10:31 AM
@Duga This is getting silly, but there's no invalidation.
 
11:14 AM
codereview.stackexchange.com/questions/140378/… Another 10x optimization thanks to an algorithm fix
 
@QuentinPradet: Nice answer, but my main concern with that question, is, what was wrong with scipy.cluster.vq.kmeans?
 
@GarethRees probably should have mentioned it, yeah
I assume OP wanted to learn how it worked by implementing it by himself
 
@QuentinPradet That's possible, but the post should mention that. (Or add the tag.)
 
0
Q: Determine the class hierarchy of a class

Philipp Matthias SchäferSince this class completely finished and tested, I look for everything: Orthography and grammar in comments, code style, missed corner cases and pitfalls. The target version is 1.8. /** The class hierarchy of a class. */ public class ClassHierarchy { private final List<Class<?>> hierarchy; ...

 
11:42 AM
@GarethRees Absolutely nothing. I'm just practicing :-) — Sorrop 5 mins ago
I'd add the relevant tag, but the question already has 5 tags.
 
Added the tag (and removed "machine learning")
 
I'm voting to close this question as off-topic because requests to review working code should go to ( surprise ! ) codereview.stackexchange.com ! — GhostCat 20 secs ago
 
@GarethRees your other k-means answer is awesome, linked to it, thanks
 
Monking!
 
@QuentinPradet Thanks, but I'm not altogether happy with that — it has a loop in it to compute the new positions of the centroids, but if there are fewer dimensions than data points then using scipy.ndimage.measurements.mean would be faster. I might get round to updating it at some point
 
11:52 AM
@GarethRees but then what's wrong with using scipy? :))
 
@QuentinPradet Well, just considered as an exercise, then.
 
@GarethRees Sure. More seriously, I indeed expect dimensions to be much smaller than data points in "most cases"
 
12:27 PM
monking
 
monking
 
what do you guys drink when you're sick?
i think water is just going to make me barf at the moment. and pepsi max is probably not a good idea.
 
@DanPantry What kind of sick sick?
 
If you think water is already a problem, stick to it anyway.
The rest will be worse.
Start slow.
 
as in i was sick at 3am last night and i slept for a handful of hours afterwards
 
12:29 PM
@DanPantry Sprite/7-Up usually seems to help
 
@DanPantry lucozade sport, I always prefer it to water or pepsi max.
 
lucozade is what my mum had when she was sick
lol turns out 2 other people in the office were sick as well
so i guess it's not just me :D
 
Sport drinks could work, yea.
 
Few glasses of vodka perhaps?
(Protip: Don't take my advice)
3
 
you're talking to probably the only teetotal person you know @skiwi :P
in other news riot have emailed me asking me what laptop I want
Apple Macbook Pro (15") - Retina
8GB Ram
Intel 2.2Ghz Quad Core i7
256GB SSD
Intel Iris Pro Graphics
UK Keyboard


Apple Macbook Pro (15") - Retina (Optional Request)
16GB Ram
Intel 2.5Ghz Quad Core i7
480GB SSD
Intel Iris Pro Graphics + AMD Radeon R9 M360
UK Keyboard
And there are others too, but I'm not suer why they put the first one when the second one is much, much better
 
12:32 PM
You can choose between a specific version, and a better version?
 
You can't choose for a non-mac?
Pffft.
 
That 2nd MBP is a heck of a sweet laptop
 
Looks good indeed. You could've done worse.
Perhaps the 2nd one has an older generation CPU?
 
There are non-macs
but I'd probably only go for a mac, so
Yeah, I'm asking for clarification. It doesn't make sense for me to choose a better version instead of a worse version unless there is a catch
that 2nd mbp is likely better than my pc lol
 
Only thing that'd make me lean for a PC over a Mac (for work) would be how much you'll need to use MS Office in day-to-day work
 
12:35 PM
and even then Mac has ms office :P
 
For some values of MS Office... unless that's changed recently, IIRC the Mac version of Office is dumbed down a good bit
 
Perhaps there's multiple versions.
 
I have it on my current work macbook
It's... functional
 
lol
 
Scary stuff, though. I now have no more mondays in my current workplace
 
12:36 PM
Mac do have their own software that replace PP, Excel and Word
 
no more mondays. I HATE MONDAYS.
2
The relocation company comes a week today
(replace sundays with mondays)
 
@Phrancis That's probably my main problem with it. Everything is 'theirs'. Makes you wonder about what rights you have on your own device.
And on a company device, I shudder at the thought what possible damage they could do to companies across the globe in a single day.
 
sometimes i wonder if microsoft will release an april fools update to windows 10 that everyone has to download that replaces their wallpaper with that dancing banana from PEANUT BUTTER JELLY TIME
 
@Mast To be fair, Microsoft is not that much different, or at least, until recently they are finally "opening up" a bit
 
There's more alternatives available on MS devices, but yea.
 
12:54 PM
Is this reasonably Python3-esque?
import os
from typing import List

def get_large_files(root_dir: str, large_file_size_bytes: int) -> List:
    large_files = []
    for subdir, dirs, files in os.walk(root_dir):
        for file in files:
            full_file_path = os.path.join(subdir, file)
            if os.path.getsize(full_file_path) > large_file_size_bytes:
                large_files.append(full_file_path)
    return large_files

if __name__ == '__main__':
    rootdir = 'D:\Downloads\stackexchange\\'
    SIZE_LIMIT = 20000000
 
@Phrancis No, it's far too readable.
3
 
lol
 
rootdir should probably be ROOT_DIR since it appears to be a pseudo-const like SIZE_LIMIT.
 
Sure
Python 3.5 still doesn't have actual const I assume?
 
I'm not familiar with the syntax you use to declare your get_large_files function, that almost looks like Haskell to me.
@Phrancis Would surprise me if it had, but I'm not up to date with 'new' Python.
 
1:03 PM
@Mast Oh the type hints, yeah trying those out. I assure you that the above code works :)
 
Perhaps your inner for can be done in a more idiomatic way, but I guess it's Pythonic enough for a first version.
Wouldn't surprise me if it could be done with a map of sorts, or something else that screams iteration.
 
I'm surprised how fast it is, it's practically instantaneous
 
Good. Stop touching it.
 
Of course doing the actual IO will take much longer
 
@Mast You could, but it wouldn't be as readable, i.e. it'd need two os.path.join.
Other than that, you don't use dirs so you may want to change it to _.
 
1:07 PM
ok
 
Agreed.
 
Once I'm done with this I might need for someone to help "translate" it for Python 2.x
These are going to go into the SE data dump to SQL repo, soon enough
 
1:33 PM
Monking
 
Monking
 
monking
 
Monking
 
2:02 PM
Monking
 
Monking
 
0
Q: Circular buffer using linked list

shijuzaI would want my code to be reviewed. I'm stuck with implementing circular buffer using linked list. For ex- if size of buffer is 6: and elements are: 1-2-3-4-5-6 if new element is added: 7-2-3-4-5-6 if new element is added: 7-8-3-4-5-6 if new element is added: 7-8-9-4-5-6 if an element is del...

 
@CaptainObvious broken
 
Thanks, we also use it locally (it's very useful); but when doing code review online on bitbucket it's less practical. Anyway, +1 for the good advice — arieljannai 57 secs ago
 
Well I just found out I'm going to have to split SO's PostHistory.xml dump into 3597 smaller files for it to be manageable. That's going to take a while
 
2:17 PM
youch
 
0
Q: multi or n-armed bandit reinforcement learning in R

EkaI am learning about reinforcement learning and came across the first and simplest form of reinforcement learning system called multi armed reinforcment learning (also called as n-armed bandit). I have read sutton's book and outlace.com tutorial regarding this learning. Outlace.com have wrote a ni...

 
@Phrancis Why?
 
@Mast My SQL Server DB can't handle XML files larger than <20 MB per row, and SO's PostHistory.xml is about 67 GB large :)
math.ceil(71927132845 / 20000000) -> 3597
 
I've got my compiler broken again. I don't know how, but only my compiler is broken. Every online compiler I tried compiles it without a sweat. Should I still post it?
 
@Phrancis Keeping the entire file in memory isn't easy with things that big either, so, yea, I can understand why you'd split that up.
Crazy amount of files that turns into though, not a fan.
 
2:26 PM
Yeah, I know. Thankfully, most of the other files in the dump are much more reasonable, many of them won't need split up at all
 
@OlzhasZhumabek If you say it works in the online compiler, maybe give a pre-made link, it should be fine.
 
@JoeWallis, yeah, I'm thinking to put links to a bunch of them, since there are different compilers
 
@OlzhasZhumabek IMHO one should be enough. If you want to link more, go for it!
 
0
Q: LINQish command line parser

t3chb0tI needed to parse some command line switches from a string and I tried to do it the easy way so I just wrote this: static class CommandLineParser { public static IEnumerable<string> ParseCommandLine(this string text) { return text.Aggregate(new { lastChar = '\...

 
Don't try this at home.
def make_sql_query_inserts(items_2d: list) -> str:
    sql_query = "INSERT INTO RawDataXml.FilesWithSizes (Path, SizeBytes, NumSplits) VALUES \n"
    for row in items_2d:
        sql_query += "('" + row[0] + "', " + str(row[1]) + ", " + str(row[2]) + "),\n"
    return sql_query
 
2:37 PM
@CaptainObvious One more VTC.
 
Works pretty good though, I can just copy-paste this straight into SQL IDE
INSERT INTO RawDataXml.FilesWithSizes (Path, SizeBytes, NumSplits) VALUES
('D:\Downloads\stackexchange\academia.stackexchange.com\Comments.xml', 37299650, 2),
('D:\Downloads\stackexchange\academia.stackexchange.com\PostHistory.xml', 109254077, 6),
('D:\Downloads\stackexchange\academia.stackexchange.com\Posts.xml', 68160155, 4),
...
 
yuck
 
It's quicker/simpler to write a throwaway query like this than making a DB connector :D
 
2:55 PM
Hey @rolfl I got some Watson questions for you when you have time. I was on a meeting last Friday with four people from IBM about Watson.
@Phrancis But is it better?
 
@SimonForsberg #ItDepends - but in my limited case (i.e. throwaway SQL query) I would say yes =)
 
3:08 PM
0
Q: Static Container for base and derived classes

hg_gitI'm trying to build a [base+derived] class's object container(map to be accurate) which would be a static variable, embedded inside Base class so that every other object either derived from it, or from it's child classes would've only 1 list at most. Also if no object is created, I still would've...

 
LOL
> Film studio Warner Brothers has asked Google to remove its own website from search results, saying it violates copyright laws.
 
Murica.
I suspect it's just the sueing company screwing up though.
They probably send a lot of those take-down requests automated and here the filter made a whoopsie.
> "Unfortunately these kind of errors are very common," said Mr Van der Sar.

"Piracy monitoring firms often use automated systems to find and report copyright infringing websites.
 
@DanPantry I'm a teetotaller too.
 
@JoeWallis, got it compiling now. On every compiler. The problem was that I was defining friend inside of class, so it caused redefinition.
 
@Hosch250 high five
 
3:16 PM
Same to you.
 
@OlzhasZhumabek Yea, that would definitely cause a compiler to get dizzy.
Physics at it's best:
> Standing in a lake, I can make a ripple in the water by moving my hand. But this wave wasn't in the water before I did that, and it certainly wasn't inside my hand either.

So where did the ripple come from?
Thát's how you explain.
 
So... my dentist asked me to go to the hospital and let all wisdom teeth be pulled
Somehow I'm not very keen on that idea
 
@skiwi, sounds really bad. I think you should consult somewhere else too
 
I wasn't given enough explanation, so for sure I will consult others too
First in two weeks appointment with the dentist herself (not an assistant) for a couple of small holes, so can ask there too
 
btw, hi @Hosch250, are you ready for battleships? I completed my assignment so I'm Django Unchained now
 
3:22 PM
@skiwi If it's not being a problem, don't do it.
 
Almost. Just completing a couple essays due tomorrow.
I can probably get the project started and hosted on GitHub today.
 
@skiwi RIP.
 
@skiwi My dentist suggested that. I don't go to that dentist anymore.
Matter of fact, I've only been to the dentist twice in my life, and they were both impressed with my teeth.
 
@Hosch250, I could learn a new language for this project. But the effectiveness will be like firing from a gun without knowing where the barrel is
 
@OlzhasZhumabek I think that's the point.
 
3:24 PM
@Hosch250, ok, so C# then?
 
I thought F#.
 
@Hosch250 I went to the dentist for the first time in about 4 years a few months ago (in fact, I went to a hygenist, not the dentist) and I had to have 8 fillings because apparently I've not been brushing my teeth correctly all this time.
Hooray.
But, of course, because that stuff isn't on the NHS I have to pay for it... so I'm waiting until I move to Dublin where my job provides dental care as a benefit to get that sorted
 
Fillings don't hurt, as far as I remember :P
 
@Hosch250, ok, I'll try to dig at that
 
yeah, but 8 fillings is... a lot
 
3:27 PM
My teeth are supposedly hard as rocks.
 
@DanPantry Yeah it's not that great indeed
 
In my defense a lot of them sprouted up when I had braces (when I was 18)
I still need braces now
:(
 
My teeth gum is bleeding all over the place after the hygienist has done her business though :/
 
I should probably get braces, but I'm not sure...
My upper front teeth can't even touch my lower front teeth because they stick out so far.
 
Yeah, it's the same with me, I had braces but I didn't wear the retainer
 
3:28 PM
I've had braces, it's not that bad in my opinion, though you'd need a good reason to do it I think
 
protip WEAR THE RETAINER
 
@DanPantry It's that thing that they place when the braces go out?
 
yeah braces aren't so bad once you are used to them
@skiwi It's a piece of plastic you stick in your mouth to keep your teeth in place after your braces are removed
 
@DanPantry U mean that thing that's in place for like 10 years already here?
I'm considering getting it removed, but I don't notice it too much
 
Uh... I didn't get that
So, possibly? but not in my case
 
3:30 PM
Why do you recommend so much in favor of it though?
 
this is what I had
If you don't wear the retainer your teeth will move back slowly to where they originally were
Or, at the very least, they will move
 
Never seen that :/
 
which is why I used to have a perfect smile at 18 but now my front two teeth overlap slightly
 
Let me google somethign for you
btw
An ontbijtkoek (literally translated breakfast cookie) or peperkoek (pepper cookie) is a Dutch spiced cake. Rye is its most important ingredient, coloring the cake in light brown. It is often spiced with cloves, cinnamon, ginger, succade and nutmeg. Several parts of the Netherlands have their own local recipe, of which the most famous is "Oudewijvenkoek" (old wives' cake) which is mostly eaten in the northern regions, and is flavored with aniseed. Ontbijtkoek is traditionally served at breakfast with a thick layer of butter on top, as a replacement for bread. However, due to its sweet taste it...
I only ate that once with braces ^^ Never again.
Took me an hour to clean the braces
 
when I got my tongue pierced, immediately after I got soup with jalapenos in (because your tongue swells which makes it hard to chew)
that.... was not my smartest hour
2
 
yeah, i didn't get a fixed retainer
unfortunately
 
That's the kind of thing I got after my braces got removed, both upper- and underside
 
I wish I had, though, but I wasn't given the option
 
I might want to fix that into a link... how?
 
because the NHS are cheap as hell
 
3:35 PM
At least they didn't tell I'm going to die if I don't get my wisdom tooth removed, so I guess it's alright :P
 
@skiwi Having a tooth pulled hurts for weeks.
Dentist adviced me to let them pull one of my wisdom teeth as well. He is no longer my dentist. There's nothing wrong with that tooth.
 
I'm very skeptical, I mean I couldn't even argue because there's no point in arguing at the receptionist and the dentist was already doing something else by then
I like the dentist and hygienist there, but this doesn't feel right :/
 
@JeffOrris please don't use words like dude or douche on SO. Working code questions are usually a better fit for codereview.stackexchange.com/help/on-topicSlai 45 secs ago
 
3:54 PM
Whats wrong with dude, dude? @Duga
 
If this code is working as intended, which based on the title and description should be true, you should've asked this question at Code Reviews. However, you should name your post then to something that describes what the code is trying to solve. — Roman Vottner 8 secs ago
@Slai My apologies, "code review" exchange completely slipped my mind — Jeff Orris 53 secs ago
 
@Duga public class Ex_1158 #NamingThings
 
Upvote ALL THE THINGS.
 
Working code which is to slow is on-topic for Code Reviews — Roman Vottner 50 secs ago
 
4:15 PM
hi, @user2296177, got std::variant compiling on everything now. Though it hits undefined behavior somehow
 
0
Q: Try catch-all inside a routine with several function calls

TurmsI have to read from a file and store the data inside an std::vector container. The procedure of opening the file, reading and writing onto the container are enclosed in a routine: readData. Reading and writing include the use of several std functions that may fail. Instead of putting a try catch...

0
Q: Is it possible to make this code faster?

Fariz MamedovI have made this program for one of the exercises in one of the online judges site. The problem occurs in 8th test with "Time limit exceeded"(time limit is 2 sec). About the program itself. In the input at the first line user have to type N - the number of letters in alphabet, M - the length of...

 
@OlzhasZhumabek Getting a crash?
 
@user2296177, no, just reading outside of programs' stack
oh, everything is working correctly. I thought that y is not char
so for now it has constructor/destructor, assignment and get working. Still pretty far from being perfect
 
Just make sure the few features you have are at least working alright.
 
@CaptainObvious Is it possible to make this title better?
 
4:27 PM
0
Q: Singly Linked List Palindrome [JAVA]

codeRockI am solving a programming question listed here. My program is correct and run without any exception on trival testcases but it throws Exception in thread "main" java.lang.StackOverflowErroron other hidden testcases. Given a singly linked list, determine if its a palindrome. Return 1 or 0 d...

 
Whoa, I just earned 3 Nice Question badges in a row
And someone just went and napalmed 5 questions of mine... wut
 
> My program is correct and run without any exception on trival testcases but it throws Exception in thread "main" java.lang.StackOverflowErroron other hidden testcases.
So it's not correct.
Why do so many people get that twisted.
 
Um.
I think it's fine.
 
In other words, the code is broken for any real case that it's purportedly written to handle?
 
It's 'correct as far as he knows / understands' If it's like 99% pass and some edge case fail, I'd say it's fine.
Of course it's a thin line.
 
4:32 PM
So he knows it's incorrect.
 
Yeah, I'm speaking generally, ignore what I was saying.
I'm thinking of time-limit-exceeded, low-efficiency related failures.
 
Bugs aren't a problem as long as it works at least a good bit and the author has reason to believe it works completely.
 
@user2296177, now getting an exception (I throw it myself, almost legitimate). Type index doesn't change on assignment operator, so bad things are happening. It seems like I have a bug in type search
 
Sure, we all miss an edge cases at times. But knowing there's a problem in your code breaking it, that's a problem.
Especially if it's an exception.
I mean, if 1 out of a 1000 inputs produces a wrong answer, that's different.
 
@Mast, I thought that writing bug free code is impossible
 
4:36 PM
No, that's very possible.
It's just infeasible once the projects become large enough.
 
@Mast, so it's not applicable to CR?
 
I somehow expect airliners to be bug-free.
But that's a completely different grade.
 
Nope, everything's held together by duct tape and twine.
 
@Legato, you're describing VC++ compiler now
 
@Mast I also hope that when I'm in the middle of strong turbulence...
 
4:39 PM
@user2296177 Or during take-off, or during landing, or, you know, any time really.
Say the value for the register setting the motor speed overflows.
 
Yeah, I just hope extra hard when I'm being reminded I might die.
 
That would get messy.
 
0
Q: Can I have a question "series" for a major project?

Chris CireficeI'm about to start my senior computer science project, which involves a web REST API (Rails or Node.js) as well as an Android app. I don't imagine that I'll have a ton of questions, but there could be ~10 over the course of 12 weeks. All questions would be for the same major project, but on diff...

 
@user2296177, have you written a code to search a type in the type list and give it's index? My code is badly flawed for now, and it is the reason why operator= doesn't work
 
4:53 PM
@OlzhasZhumabek You need to find the index of a type?
 
@user2296177, yeah, firstly test if it's there
my indexing is in reverse order and I have no clue how to make it in correct order
 
I'm not sure what you mean by reverse/correct order. I can likely do a simple recursive search for a type in a type list.
 
@user2296177, that's the problem. The index gets reversed since the last is indexed as 0
nevermind. I got what you are thinking about
 
If the last is indexed as 0, then it's like you're searching from the back.
 
@user2296177, yep. Still need to have some sleep to get all of my reasoning abilities back
 
5:02 PM
@SimonForsberg I think that site has been around for a while, I might even already have a profile there.... I will take a look when,i get back to my laptop
 
@Malachi If you mean the same as the last one, then no. This is a new site, it just has the same domain.
Feb 5 '14 at 20:49, by Simon André Forsberg
By the way, just had to add: The private beta for AI.StackExchange has finally opened!
I remember you asking a few questions on the last one, just a day or so before it was closed down, and your questions were not welcomed then. It seems like this new site has a broader scope, not sure how broad.
I'm impressed it even made it to public beta. All the previous ones were shut down in private beta.
 
@user2296177, gonna get my BBQ and other meals from delivery guy.
will be afk for some time
 
Ok, enjoy that bbq
 
@StackExchange I'm surprised that isn't a duplicate as well.
 
5:38 PM
I may be off base here, but I just flaged this as hypothetical codereview.stackexchange.com/questions/140554/…
Based on @Vogel612 statement yesterday, that means Community Challenges are either Zen or Tao.
 
@pacmaninbw If I would be able to vote, I would vote to VTC. But as a moderator, I'm doing nothing for now.
I would however recommend that you focus on why hypothetical code is considered off-topic.
Because otherwise they just think that it doesn't apply to them.
And if you can't figure out the why, then I would recommend to not VTC at all.
 
OK Simon.
 
Just my personal two cents.
 
I'll think about how to comment.
 
5:59 PM
-1
Q: C# all code paths do not return a value

BrandonI am attempting to use the following code but get this error. My skills are very basic and it looks ok to me. Any help is greatly appreciated. private bool CheckIndex(int cIndex, bool a2DCollider) { if (a2DCollider) { if (floatingObjects2D.Count <= cIndex) ...

 
his face's color in the last strip... epic
 
http://www.commitstrip.com/en/2016/09/05/do-we-have-a-back-up-in-the-audience/
CommitStrip
Do we have a back-up in the audience?
CommitStrip
1473098511
8
 
@CommitStrip too slow
 
6:34 PM
@pacmaninbw I'm not quite sure I understand
 
@Vogel612 The path, not the end is important.
 
that's not quite what I said ..
 
Ignore it.
It was partially humor it may not translate well
 
0
Q: Primitive calculator

A.Gautam Problem Introduction You are given a primitive calculator that can perform the following three operations with the current number x: multiply x by 2, multiply x by 3, or add 1 to x. Your goal is given a positive integer n, find the minimum number of operations needed to obtain the n...

0
Q: Unit of Work / Repository with EF & RESTful service

Cam BruceI am looking for best practices around the Unit of Work & Repository patterns. Our team is building a web app that for the first phase will be interacting directly with an EF backed database. For the second phase, this may be completely swapped out for a 3rd party platform that is backed by a RES...

0
Q: Python Internet Speed Testing Working Correctly

Byron FilerI understand there are a few similar tools available for testing speed but that's not what I'm looking for I'm looking at seeing how long it takes to request a sites HTML however I'm getting slightly odd results. The strange results are incredibly slow internet speeds so I'm confused I'm doing so...

 
possible answer invalidation by hg_git on question by hg_git: codereview.stackexchange.com/posts/140554/revisions
 
6:59 PM
@Duga @pacmaninbw can you check that one?
 
 
@SimonForsberg It invalidates the answer, but makes it less hypothetical, I'm working on it. I may remove the answer soon.
 
Okay, thanks. If you change your answer all is fine.
Just trying to avoid making the question become messy.
 
@SimonForsberg The code works, and the question is somewhat better.
 
@SimonForsberg Can you move us to the challenge room?
 
7:13 PM
I feel like I will be teleportated soon
 
@Hosch250 On it
Missed a spot :)
 
Thanks, @SimonForsberg.
 
(Any reason @Hosch250 is not a room owner in here?)
Oh, there's only 4 non-mod room owners? I thought there was more. @Vogel612 @Phrancis @Zak @Malachi
 
not really... basically the same reason Mast isn't a RO
 
Oh well.
 
7:24 PM
@hg_git @SimonForsberg @Jamal @forsvarir @ferada the OP has a valid point about proprietary information. There is a lot of code I can't post here for that reason. I don't like the warning messages that I get when I compile -Wall, but they aren't compiler errors. What would the OP need to do to reopen the question? codereview.stackexchange.com/questions/140554/…
I have removed my answer because of the change to the question
 
@pacmaninbw Argue on Meta or get 5 reopen votes from the community in another way. There is a reason I did not hammer the question like @Jamal did.
 
@Jamal closed it 27 minutes ago
The change has made the question less hypothetical. — pacmaninbw 22 mins ago
The edit itself was 44 minutes ago.
@pacmaninbw The best option might be to replace the A and B and doSomething stuff which something that doesn't look hypothetical, but still doesn't have to be the real thing. If the OP would give it some other meaning to show how the code can be used in another context, that's up to him and that makes it become more of an exampe project than example code (IMO)
Example projects are okay, example code tends to be closed
 
I'd argue it's still too hypothetical.
If he really wants it reviewed, he should fork it into a meaningful hobby project and get that reviewed.
 
@CommitStrip Oh crap
 
7:35 PM
possible answer invalidation by Jamal on question by Eka: codereview.stackexchange.com/posts/140551/revisions
 
@Duga Nah
Jamal usually knows what he's doing. This is no exception.
The code isn't even changed, there's just a quote block put around the code.
 
@SimonForsberg @Mast I just reread it. He was asking a design question, not much point in me pushing this any farther.
I'm going back to playing with my GitHub Mental Blocks.
 
7:54 PM
0
Q: replacing if(s) by functional programming in java

Eko SusiloI have to implement a method by overriding it. This method is part of a framework which is a blackbox which i can't modify. This method is invoked as soon as it receives messages sent from external source, almost everymillisecond in production environment, thus improving performance is very cruci...

 
OMG.. 75% of the galaxy's energy, engulfed in a FIZZBUZZ loop. We're doomed. — Mat's Mug Sep 2 at 15:23
 
@Robert I just broke the file into 30, 500mb, files and I still am not getting anything in my output file. I am going to post this on codereview and see what comes of it. Thank you for help. — Sinux1 51 secs ago
 
1
Q: Basic API wrapper around a Restful service - Refactored

user2859298This is a follow up from my previous post Basic API wrapper around a Restful service I'm writing a basic wrapper around a restful service that returns a list of Stores. Naturally, I want to make it completely testable (that's a major requirement!). I have split out my TopmanClient class so that...

 
This, as presented, would not be a good fit for Code Review. Please read How do I ask a good question? and adapt your question accordingly, if you are planning to post there. — Phrancis 17 secs ago
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: TrieSet with Wildcard Search
 
8:55 PM
wonder if I can find my other questions and maybe try to repost them
 
I still can't get my Makefile build successfully as it cannot find glibconfig.h somehow. Nothing I've found works, either. It worked previously on Fedora, so something has to be changed for Debian.
 
I just went through the Data Dump and couldn't find my name in the XML
I wonder if there is more than one that I was following???
that was opened for private beta and then closed
 
possible answer invalidation by CConard96 on question by CConard96: codereview.stackexchange.com/posts/140513/revisions
 
9:19 PM
@Jamal Are you sure the systems are identical in every other aspect?
I suspect the Fedora searches in places the Debian does not.
 
-1
Q: To count positive numbers and to sum the negative numbers of list of integers

Abdulwrite a function called my_list which will act as follows: When given a list of integers, the program should return a list, where 1) the first element is the count of positive numbers 2) the second element is the sum of negative numbers Need help

 
> Hi

Greeting of the day



Are you looking for a web development and designing services provider who can promise you an excellent website in your budget. Put a full stop to this search by replying this email.
 
@Mast I think so. I know where glibconfig.h is located on Debian. The makefile is giving the "no rule to make target" error, even after installing the appropriate package (and I know where the file is located).
 
OMG this is so cool, my Python script adapted to go through all the folders... it's just working :D
 
9:44 PM
Starting to get into the really big files now... *crosses fingers*
 
F# is really cool.
 
Yeah?
 
Yeah.
 
10:01 PM
@Jamal Could be anything. From a minor difference in spelling to being in the wrong directory to having the user-privileges set-up incorrectly, etc.
It could even be a space in the wrong place.
Old files sticking around from a previous configuration.
 
Oh boy, here come the dreaded stackoverflow files...
 
I suspect a small difference in the environment variables though.
 
10:27 PM
0
Q: working with sys/time.h in visual studio c++

user116816i have a c++ code downloaded from github which apparently was made in linux, with #include . i googled for it, to run sys/time.h in windows, and found nothing but just alternatives like time.h, which is impractical to use because it is almost impossible to edit my huge code to adapt it for it. so...

 
> Path: D:\Downloads\stackexchange\stackoverflow.com\Comments.xml
46306541 total lines, split into 609 files = 76038 lines per input_file.
Execution time: 1:00:40.610937
I have this nagging feeling that I'm not going to have enough space on this partition to finish this process
 
lol
 
I should have written an extra line of code to delete the source XML files after it's done splitting them into small files :\
 
10:52 PM
0
Q: Using a MutationObserver to trigger behaviour

Niet the Dark AbsolI mostly just want to make sure I've understood the specs correctly with this code, but here goes: var observer = new MutationObserver(replaceNumerics); var config = { childList: true, subtree: true }; observer.observe(document.body, config); replaceNumerics(); // initial load function replaceN...

 
00:00 - 23:0023:00 - 00:00

« first day (1220 days earlier)      last day (2784 days later) »