« first day (833 days earlier)      last day (3482 days later) » 
00:00 - 15:0015:00 - 00:00

00:00
RELOAD!
There are 1451 unanswered questions (94.4568% answered)
0
A: Minimum number of coins problem using dynamic programming - follow up

nhgrifI advised you that it is called main and not everything, and you did a good job of moving code out of main. Now main looks a lot closer to what I'd expect to see. But, we still have functions that are doing too much. Plus, we've made a bad problem worse. We've replaced doing everything in the...

00:47
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — La-comadreja just now
01:00
1
Q: Ruby - Delete method refactoring?

Kyle MellanderI'm new to Ruby and don't know all the methods, so I was thinking there would probably be and easier way to do something like this. I'd love any input on how to refactor this Thanks! define_singleton_method(:delete) do |id| revised_words = [] @@words.each do |word| ...

01:25
Quiet tonight... any lurkers?
0
Q: Nginx rewrite optimization for php execution

moomoochooI've posted an excerpt from my Nginx configuration with the hope that someone can give me advice on anything I've done wrong or could do better. Please note that the below config works, but has been edited for brevity. The area I'd like you to focus on is TEST1 and TEST2. TEST1 is redirecting...

I'm figuring out RoR.
I'm about to yell Eureka
477 tests in VSDiagnostics, 477 passing
Why in the world is it so incredibly hard to create a simple local database with SQL Server?
What's so hard about it?
01:36
Pretty much every part of it, AFAICT... Been trying for an hour and zero progress
you've got SSMS?
So.. Right click on 'databases' and then 'new database'
Just trying to create a local playground DB without having to remote in to employer servers
Are you stuck at a specific step?
01:38
Yeah^ the first one
None of the menus seem to lead anywhere useful either
You're not connected to a db instance
click on 'Connect'
Database Engine
Server name is your LOCALPC\SQLEXPRESS
Windows Authentication
for example for me it's JEROEN-DESKTOP\SQLEXPRESS
You can also connect to (localdb)\v11.0
also Windows auth
The very latest version of SSMS uses a different connection string though so if you can't get it to work with these two instances, let me know
>_<
SQL Server is 2008 (not R2), Win 7 ... meh. Work fantastic from work on their servers
Did you try localdb?
01:47
As server name?
@Phrancis is the server set up for Windows authentication?
(localdb)\v11.0 as servername
I see online that there are multiple tutorials that include command line stuff to create a database and all that jazz
Maybe it's a SS2012 vs 2014 thing?
@JeroenVannevel Hey that worked!
Yay
now right click on 'Databases' and then 'new database'
@Phrancis were you able to set up your linked server at work?
01:56
user image
2
@Mat'sMug Looks like that won't be needed, I can rely on D-SQL sorcery most likely - I was going to tinker with that 3 hours ago lol. Guess now's as good a time as any
@Mat'sMug Read here...
0
Q: Deleting a text file using <ofstream>

user83310I tried deleting a file using a function. Here is the function: http://pastebin.com/p6GBmVVT I get an error on line 10. It tells me that the variable I'm using is not suitable for conversion or something along the lines of that. Am I using the std::remove() function wrong? Any help is appreci...

So, in any case; let's try to break things on my own database :D
02:29
See this post for an excellent discussion on the options for converting a text file to a line array. codereview.stackexchange.com/a/100813/79551Suragch 18 secs ago
See this post for an excellent discussion on the options for converting a text file to a line array. codereview.stackexchange.com/a/100813/79551Suragch 49 secs ago
This post helped me understand error handling when getting a string array from a text file: codereview.stackexchange.com/a/100813/79551Suragch 15 secs ago
02:53
0
Q: Harmless duplicate or are we being taken advantage of?

cimmanonThis question caught my eye because it had accumulated close votes as being a duplicate of another question, which is very rare on CR. The target was a question I reviewed last year by the same user. The new question: Has no indication that it is a follow-up. Makes all of the same mistakes as...

uggghhhhhhhhh
03:51
0
Q: C function to see if word or phrase is a palindrome without using reverse function

JuliaHere is my function code.. I am getting so lost I don't know what to do anymore. { int i, j; int length; for(i=0; string[i] != '\0'; i++) { length++; } while(i<length/2 ) { if(string[i] != string[length-1-i]) { return FALSE; ...

04:02
Found the issue, was missing the elusive use statement. Maybe we should resurrect the SQL Helpline room...
 
2 hours later…
05:42
@StackExchange @cimmanon I'm not even sure the question is on-topic. It's asking for an explanation of code, or at least an explanation of the previous answer.
05:56
If your code works as expected and you want to improve your code, consider posting this in CodeReviewCool Guy 56 secs ago
 
2 hours later…
07:32
Wouldn't that question be better suited to code review site? — Daniel Jour 49 secs ago
0
Q: Calculator with WPF

hexagonestI built a calculator in C# with WPF for the UI. I'm still a beginner at WPF and C# in general, and I'm just looking for some constructive criticism. Here's the XAML And here's the MainWindow.xaml.cs file Hosted on pastebin because they might be a bit long

0
Q: Writing huge 2D vectors to text file too slow, how to decrease writing time?

traggatmotI have 10 large (34 million cell) 2D gridded vectors storing doubles. When written they are over 200 mb in size. I use an ofstream object to write them to a text file (csv format), one element at a time, using two for loops (one for my rows, one for my columns). They take way to long to write. Is...

08:00
0
Q: Distribute an array of numbers equally

user81284The user will input two number (say 19 (starts with 0) and 5). We need to equally divide 19 equally into 5 groups such that each group will have the start index and the end index. Example: Grp 1: 0 1 2 3 Grp 2: 4 5 6 7 Grp 3: 8 9 10 11 Grp 4: 12 13 14 15 Grp 5: 16 17 18...

08:42
If this is all working code, your question might be better placed at SE Code Review site. — πάντα ῥεῖ 40 secs ago
0
Q: ADDREV SPOJ problem another solution

prabinseththis is my first try for the SPOJ ADDREV problem. Please correct me if am wrong. My compiler gives me right answer. But SPOJ doesnt accept it. problem link #include<iostream> #include<string> #include<algorithm> #include<vector> #include<sstream> int main() { int num1,num2; std::stri...

09:17
0
Q: Mengenlehreuhr in Python

mplfAs a morning exercise I have been writing an implementation of Mengenlehreuhr in Python using curses. The source of this is as follows: import curses from datetime import datetime from math import floor class Mengenlehreuhr(): screen = None panel_name = [ 'seconds', 'five_hours...

09:35
The question is better asked at SE Code Review. — DaBrain 43 secs ago
09:45
@CaptainObvious Ah what?
A mixing-something I guess.
Ah, it's a clock.
This question looks like done right, but he doesn't explicitly ask for one. Good guy, needs some upvotes IMHO.
1
Q: What's a good way to combine pagination and non query grouping in Slick 3.0?

thwieganI have the following tables: val postTable = TableQuery[Posts] val postTagTable = TableQuery[PostTags] val tagTable = TableQuery[Tags] One post can have multiple tags and postTagTable just contains the relation. Now I could query the posts and tags like this: val query = for { post <- po...

I just saw Pop's meta and all I can think is "wtf"?
10:01
2
Q: What's a good way to combine pagination and non query grouping in Slick 3.0?

thwieganI have the following tables: val postTable = TableQuery[Posts] val postTagTable = TableQuery[PostTags] val tagTable = TableQuery[Tags] One post can have multiple tags and postTagTable just contains the relation. Now I could query the posts and tags like this: val query = for { post <- po...

Suppose the Beta label is removed. Then what?
10:14
@200_success Then we're one step closer.
It would be better than nothing, right?
We need more community-ads...
But I agree enough with your meta answer to understand why we probably shouldn't go ahead with this.
0
Q: Platform independent leak/cyclic dependency detection of objects

bashrcSometime back I came across a bug where a particular object was leaking but it was very hard to root cause. I knew that it was due to a cyclic dependency (which usually indicates a bug in the design) but couldn't get a clue where the design went wrong. I wrote this small utility class to help me ...

@200_success you're probably right. "Then what" indeed.
Then we wait another year for the rep levels to be raised.
I'd kind of like to know the technical reason that isn't a switch that can be easily flipped.
I mean, if it's somehow hard coded that all beta sites have the same rep levels fine, but I wish SE would just say so.
@Mast Would we really be one step closer? If anything, we'd be settling for semi-permanent limbo.
Because that's what the new post-beta status means.
I don't believe that the reason for delaying the threshold change is technical.
@200_success We're already in semi-permanent limbo.
Technically we're considered graduated since we have elected moderators. Afar from that, we're still beta.
But everyone at least acknowledges that the current state is unsatisfactory and needs progress.
10:29
Definitely.
Accepting the offer means no further progress until we reach the front of the design queue.
Not accepting the offer means the same thing, with slight progress in the mean time.
So we're basically stuck between a rock and a hard place.
From what I have been told, management wants to bundle the threshold increase with the design to ease the pain of the privilege loss that some users would face.
That, to me, is a lame reason to delay the threshold change.
It's a lame reason, but I think I understand why they're doing it.
Which is why I'm pushing for the threshold change to be part of the deal that we get "now".
10:31
Umm. Yeah. Very lame reason.
IIRC CR had a low user count for a long time.
Pulling up the required rep would remove a couple of user from, well, let's call it 'active duty'.
I think they want to prevent fallback.
I'm not saying this is the best way to go, but this could be (part of) their reasoning.
Yeah, but it would also mean a few less users creating worthless tags and in general having privileges that they really shouldn't have anyway.
It's kind of a trade.
The increase has already been approved, and it is going to happen someday. And some users will feel the sting on that day.
Heck, I would feel a sting on that day. Perhaps not as bad as some, but still.
10:34
Yea, I'll be one of those guys. Can't say I care, but it will let me focus on writing questions instead of moderating. Perhaps I should've been doing that all along, but hey.
It would basically give me Marshall for free, since my votes will be flags again.
In fact, since the population is always bottom-heavy, the longer we delay, the greater the absolute number of users who will feel the sting.
Idk. At least we got an update from Pops. It's been kind of quiet since elections.
@200_success That is most definitely true.
You could add it to your answer.
Or I could write one, whichever you prefer.
I will acknowledge that some update is better than no contact.
I don't want my answer to ramble tangentially.
It's been nearly a year now, hasn't it?
10:37
Since election? No, a couple of months.
11 months since announcement.
Announcement: 2014-09-22
31
Q: Tracking Graduation Progress

rolfl Moderator Note: This question has been identified a number of times as being a candidate for migration to Meta.SE - the main meta site. This question is really about tracking Code Review's 'probable' spot in line, and is not a general purpose all-beta-site tracking system, thou...

Basically, it all amounts to nearly nothing. We lose the "Beta" label just for the sake of losing the Beta label. They're calling it design-independent graduation, but the most important component is still entirely dependent on the design.
Basically, span.beta-title { display: none; }. And it has taken 11 months.
So, what do we do?
Lobby for reputation threshold change as soon as practical.
10:53
I'll see if I can write a meta like that, although I'm not sure what a low-rep user like me has to say in all this.
Actually, your voice as a low-rep user may have greater impact than mine.
@Mast if it means anything to you at all, I quite often forget that you're "low rep".
@RubberDuck Thank you, I've heard janos and some others say things along the same line.
I'll get on it.
Very much appreciated!
@200_success quick question about your answer. What did you mean by the 500 points in the migration section there.
> I'd consider a CR-to-SO migration path, but with a 500-point threshold for closure, I'm not sure that that would be a good idea.
10:57
The current requirement to cast close votes is 500 points.
It's one thing to close a question here; that we can fix. Sending it over to Stack Overflow is a bit more serious.
I thought that's what you were getting at. Thanks.
Monking
Maybe this is an awful idea, but just cleaned up the Netbeans cache for 6 GB as my C drive keeps filling up without me installing stuff :|
You would say that it is safe to delete stuff in temp and cache directories
Try moving them before deleting, if you're unsure.
11:48
0
Q: Get string with max length

JakobThis is an extension method to get a string that is no bigger then a maximum length. Any comments? public static class StringExtensions { public static string WithMaxLength(this string value, int maxLength) { if (value == null) { return null; } ...

12:02
0
A: Would you like to test design-independent graduation?

MastFirst I want to thank you for the update. This graduation procedure has been taking so long already that we sometimes feel a little forgotten. I also want to thank you for asking us this question instead of forcing it on us. There are things this community has, needs and doesn't need. What we h...

Please take a good look and see if anything is wrong/missing.
@200_success @RubberDuck @skiwi See above ^^
Sanchit, this is a "do it for me question", which is not really suitable for anywhere on the web, unless you are paying. By all means ask for assistance - and Code Review is certainly better for this - but you need to be willing to do the work yourself. — halfer 23 secs ago
@Mast Diplomatically stated. Well done. Thank you.
Recommend deleting this question and posting it over at codereview.stackexchange.com instead. (This can definitely be significantly shortened.) Be sure to explain why you don't want to use jQuery, and why you think the code shouldn't go into the click function. — T.J. Crowder 21 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comT.J. Crowder 52 secs ago
12:18
0
Q: Directed graph path enumerator in Java

coderoddeI have this iterator class that expects in its constructor two directed graph nodes, source and target, and upon each next() generates another possible directed path from source to target, that was not generated previously. So, tell me anything that comes to mind. net.coderodde.graph.GraphPathE...

@T.J.Crowder The recommendation of Code Review is correct. However, "Because it belongs on CR" is not a valid closure reason by Stack Overflow rules. It's off-topic because there is no specific question, not because it's a better fit on Code Review. — 200_success just now
12:37
Waking up to see the vote counts and the new answers has made me smile and feel very proud to be part of this community.
(not that I wasn't already)
> Privileges should be used to keep the community healthy, not for fun. We have Winterbash for that.
Great answer @Mast.
Thank you, just doing my part.
heh
-3
Q: Gold tag-badge users closing questions as pre-written off-topic duplicates

HeslacherI often see questions which are blatantly off-topic, like, for instance, when this question (can only be viewed with enough rep, as it has been deleted) showed up. The shown c# code had been try { int a; int b; int c=a+b; } catch (exception ex) { //Nothing here } Which is,...

I mean, as a thought experiment, let's say we did that...
Who are the non-moderators with gold tag badges?
@RubberDuck Do you have any gold-tag badges? rolfl probably does.
No @nhgrif. I don't. Honing in on C# and VBA, but not there yet.
And I'm in the top 20 users. There just aren't enough gold badges to make it worthwhile IMO.
Heslacher and svick have C#. But so does Mat'sMug.
Loki Astari has C++, but so does Jamal.
janos, rolfl, and palascint have Java, but so do 200 and Simon.
Gareth Rees and Winston Ewert have Python, but so does 200.
200 success has beginner (and no one else).
konjin has javascript and no one else.
So only one tag has a moderator.
And of the non-moderators on that list, only Heslacher, Loki Astari, janos, rolfl, and Gareth Rees have any sort of presence whatsoever on the meta.
Meanwhile, consider that I'm on of the sites top users as well, and basically the only answerer for , , , and have none of those gold badges.
My closest one is Objective-C, but I need another 30+ answers and 250ish votes for that tag.
and even if we had more gold-tag users, I think there are other problems
The reason gold-tag users get the power for duplicates, particularly on SO, is that they are deemed to be a subject-matter expert and no one would be better at identifying what's a duplicate than them
But they don't get the power for other close reasons... because the gold tag does not make them a site scope expert.
12:54
Make it an answer.
But a gold tag here can make you a scope expert in a sense.
It means you have the ability to tell if the code is broken. Of course, that does nothing for the other reasons.
Either way, that proposal wouldn't be good for the community.
I disagree with that, actually, @RubberDuck
because we have a pretty specific definition of broken
True enough I suppose.
@nhgrif yup. One that even some users with >2K rep and access to moderator tools don't grok
shhhhhh
13:00
... So how can we expect 500 users to grok it? Happily there aren't many of them in the queues.
There are multiple metas on the topic.
0
Q: ReactiveCocoa implementation of async function

Leonardo FaoroI would like a review of the RAC implementation for the function setGist() I've posted the code on gist.github.com for easier reading: https://gist.github.com/lfaoro/18ca4b63ed982574eec2 Any suggestions would be highly appreciated, thanks everyone in advance. enum ConnectionError: ErrorType { ...

ugh
> a new official post-beta limbo status
13:06
Smh... That ^...
Well, I guess that's enough screwing around on the internet this morning. I should go get some things done so I can squish some RD bugs later.
@Mat'sMug are we in a state where I can branch bug fixes from master?
wait...
don't you guys run a develop branch?
You make feature branches off of develop. (features include bug fixes except hot fixes). When features are complete, you merge them into develop.
When you're ready for a release, you merge develop into master...
There are serious issues in the [next] branch, my fork has major structural changes that are not yet in a mergeable state, [master] hasn't changed since 1.4.3 release
Sometimes develop isn't very stable. It's just as effective to branch from master, fix the bug, merge into master and develop.
That's a hot fix.
Do you guys use source tree?
13:12
you should.
0
Q: A good practice to follow with managers?

Peter LenkefiI'm making a game engine and I'm using libraries for different kinds of stuff. For example I use FreeType which needs to be initialized, get the manager and after I don't use it I have to deinitialize it. Of course it can only be initialized once and can only be deinitialized if it has been initi...

So, yeah. That's what I'll do then. It's time I learn how to build the Innoscript installer anyway.
@nhgrif I use VS & GitHub.
Dunno what the others use.
@CaptainObvious Given the title, I thought it was a Workplace post.
3
Performance is a topic more appropriate for Code Review. — IKavanagh 13 secs ago
Would anyone know if this piece of code is valid C#?
-1
Q: Get string with max length

JakobThis is an extension method to get a string that is no bigger than a maximum length. Any comments? public static class StringExtensions { public static string WithMaxLength(this string value, int maxLength) { if (value == null) { return null; } ...

13:15
@EthanBierlein Looks inefficient, but hey, it's C#...
cough
I'm pretty sure that you can't refer to this in a static method.
At least it's readable.
Even if it's just in the signature.
13:16
Am I correct?
@EthanBierlein you can if its an extension method. Let me look.
Yeah. It's an extension method.
Umm... The name of the class says so.
@EthanBierlein need to read up on extension methods? ;-)
@RubberDuck you know some C# 6.0 right?
eh, I'll take the +2 as "you got it right, mug"
13:23
I think I'm going to post an answer about IsNullOrEmpty in case the op still wants to return null in certain cases.
Unless your answer does that already, in which case, I won't.
well my answer only does that, for 6.0
the value?.Substring "?" thingy isn't valid in earlier versions
I guess I'll post it, just in case
@RubberDuck And re: this.... develop should also be relatively stable (obviously less strict than master, but nonetheless). The unstable stuff happens in feature branches, and you shouldn't merge a feature to develop until you're relatively certain it's working and stable.
@EthanBierlein OP is returning null when input is null
@Vogel612 This needs more answers. I'm sure there are people who disagree with some or all of the answers given. This is the moment to speak!
13:34
@nhgrif I know how it's suppose to work, but reality isn't always the same thing.
@Mat'sMug I know a little, but @JeroenVannevel's a better bet. What's up?
There. Anyone with superior C# knowledge, feel free to critique:
0
A: Get string with max length

Ethan BierleinWhile @Mat'sMug has an awesome C# 6.0 solution, if you aren't using C# 6.0, or don't plan to update, you might want to make these changes. First of you're just checking for a null string value. What if the user enters an empty string as well? You have three options here Return null when an emp...

2
A: Get string with max length

Mat's MugIf you're using C# 6.0, I believe you can drop the null-check: public static string WithMaxLength(this string value, int maxLength) { return value?.Substring(0, Math.Min(value.Length, maxLength)); } Other than that, it's like Jeroen said: that's pretty much as good as it gets. The class a...

@Mat'sMug I think that will return null just like OP's code, but wouldn't the ?? operator be more appropriate?
@RubberDuck context?
Wait... Writing an answer. Damn it CR. I've got a RL to take care of.
13:38
null-coalescing (??) is useful when you don't want to return null
return somethingThatMightBeNull ?? thisNonNullThingInstead;
@JeroenVannevel linked post right here ^^^^^
You mean string.IsNullOrEmpty(value), not value.IsNullOrEmpty(). — Jeroen Vannevel 58 secs ago
aye
Yeah just saw it.
but yes, your C#6 answer is correct
Stupid SE, logging me out whenever it wants to.
I need to get VS2015
I don't agree with @EthanBierlein's answer though
13:41
@Mat'sMug that's the point. A string extension should probably return an empty string, not null.
I do.
You would give as input an empty string, call 'WithMaxLength' on it and suddenly receive a null object?
The current implementation is better than each of the alternatives offered
Lol... That's what I get for trying to review short code.
wait, the return value? part will return value if value is null, right?
no, null
so yes
value is null so you return null (value)
crap null it, crap null out
13:45
I'll put up some code for review as well so I can postpone studying
I'm making progress. Yesterday I looked at what chapters I have to study, today I found the book I have to study from
@JeroenVannevel Tomorrow, read the first page?
@EthanBierlein on second thought, "".WithMaxValue(42) returning null doesn't make much sense
2
0
Q: Comparing three O(n^2) search algorithms in C

blainarmstrongThis is my first post here on Code Review. I'm currently taking Harvard's CS50 course via EdEx.org, and we're learning about sorting algorithms. More specifically, we're studying bubble, insertion, selection, and merge sorts. Just for kicks and giggles, I went ahead and decided to write a progra...

lol.. Deleted my answer.
and checkmark
thank you C# 6.0!
13:51
I really need to pick up a book on C#...
@EthanBierlein get Jon Skeet's
it's an awesome read
Yep, it's really, really good
That's what I was thinking
Still haven't made my way through it entirely but it's incredibly informative
me too lol
13:52
Nothing wrong with multiple answers.
6 mins ago, by Mat's Mug
@EthanBierlein on second thought, "".WithMaxValue(42) returning null doesn't make much sense
nothing wrong with removing nonsense either ;-)
True.
Fixing it could be an alternative to deleting.
This post says, "What I came up with (just an example, not "real" code):"
@Mast Except, I don't know how to make it better.
@Mast except the fix is... OP's code
13:54
I really need to get Skeet's book. I'm out of reading material anyway.
@Mat'sMug Must have been bad.
@RubberDuck Say that again and I'll send you some VHDL books ^^
How is your embedded adventure going anyway?
haven't even finished pasting my code yet and it's already 1000 characters over the limit
It's only 4 classes, for crying out loud
@JeroenVannevel welcome to my world
13:55
Haven't had time to work on it. I hope to get an external interrupt working tomorrow.
If reality doesn't match, you should strive to make it. The only projects I've worked in that don't match that are ones in which people aren't trying or don't know how it works.
@JeroenVannevel need a partial class maybe? how's SRP doing?
Thanks a bunch. I'll head over to SE Code Review site. — Matthew Walls 17 secs ago
I don't disagree. We try to, but we're just a couple of guys who know each other from the Internet doing it in our spare time.
@Mat'sMug You be the judge of that in a few minutes
It's probably because of the tests though
That's 450 LoC of pure sexiness
13:58
Then don't include the tests in the post? Link to a gist instead?
Way ahead of you, goose
lol
it's duck, not goose!
0
Q: Putting everything in its place

Jeroen VannevelA new diagnostic has seen the light of day! This one will alert you when you have a string.Format() call where the formatting placeholders in the wrong order. The right order is defined as For each placeholder with index N, its value should be higher or equal to the placeholder at index N-1 ...

Don't be goose-o-phobic!
> No Mav. She hasn't. No. Really. ... I hate it when she does that.
I smell a bug in my code
14:06
3
Q: Putting everything in its place

Jeroen VannevelA new diagnostic has seen the light of day! This one will alert you when you have a string.Format() call where the formatting placeholders are in the wrong order. The right order is defined as: For each placeholder with index N, its value should be higher or equal to the placeholder at index ...

@JeroenVannevel you're going to like my answer I think
Don't I always?
lol
2
0
Q: File of words to a linked-list of words

EliminationI'd like to get a review for the function build_list() which reads a file containing words (separated by spaces) and returns a linked-list of words: #include <stdio.h> #include <assert.h> #include <stdlib.h> typedef struct ListNode { char* word; struct ListNode *next; } ListNode; typed...

Alright, finally found the steps required for this diagnostic to popup unexpectedly
14:22
I'm voting to close this question as off-topic because this is a code review. — BalusC 35 secs ago
Added a small post-mortem bug report
0
A: Putting everything in its place

Jeroen VannevelWhile reading my code for the bazillionth time, I noticed a logical error which would make it possible for very specific exotic scenarios to pop this up expectedly. At the very start of the analyzer there is a check to see whether or not we're dealing with a string.Format() call: // Verify we'r...

It was pretty tricky to find
1
Q: Practical C++ - Am I using seperate files and classes correctly?

Matthew WallsI've completed a program as a learning experience to make sure I've got the concepts down. I found the practice project online and decided to try it out. The program compiles and runs exactly how it should with no problems. The program is a game called Artillery. You have to fire a cannon at one...

@JeroenVannevel You didn't have an answer yet, why didn't you just update the question?
eh, I might return later to add more
It was interesting to figure out what the exact scenario was that triggered the bug
I wouldn't want to keep my readers from that
@Mat'sMug Looks interesting! I'll see how that works out later
I know squat about regexes, @Vogel612 pretty much made it all for me
14:35
I tried integrating it into your existing code but figured I'd spend the rest of the AM doing that, so I dropped it
@Mat'sMug You made the regex even longer. With answers like that, no surprise I don't like C#...
@Mast The regex is as long as the first one and it apparently provides a significant readability increase in my code..
Why would you not like it?
@Mast I merely added ?<index> to one of the existing capture groups
And what has the regex to do with C#?
well named groups aren't supported in Java-regex
I ♥ named groups
14:37
I wrote exactly one project in C#. I couldn't figure out the final bit. Turns out everybody suggests regex for that part. Never touched C# ever since.
It's cursed.
This is the first time I use regexes
ever
If you need a regex in C#, you'll need a regex in another language as well
(that's where the screenshot is from in my answer)
Done. I'll use it when I finally learn regex one day
interestingly I've been using {({{)*(\w+)(,-?\d+)?(:[^}]+)?}(}})* for a pattern to get what you're getting
in VBA that is
no named groups either
Vogel's is better
You were also retrieving placeholders?
Soon we'll have to start sharing a codebase
14:42
29
A: Implementing String.Format() in VB6

Mat's MugI couldn't find one anywhere, so I made my own: Public PADDING_CHAR As String Public Function StringFormat(format_string As String, ParamArray values()) As String 'VB6 implementation of .net String.Format(), slightly customized. 'Tested with Office 2010 VBA (x64) Dim return_value As St...

0
Q: Shell Sort Help (too many loops)

The TurtleI wrote a python sort function that uses shell sort. Here it is: # shell sort # ignore the comments def shell_sort(sequence): # shell sort needs an increment sequence # the increment sequence used here is 1, 2, 4, 8, 21, 56, 149, 404, 1098... # the sequence is defined by the followin...

There's an impressive effort behind that code
Thanks
It was pretty fun to implement
there's a CR post somewhere, asking how I could get rid of the GoTo jumps
...with a selfie answer involving a totally overkill OOP approach
...that performs better
14:58
Hello
00:00 - 15:0015:00 - 00:00

« first day (833 days earlier)      last day (3482 days later) »