« first day (729 days earlier)      last day (3290 days later) » 

12:00 AM
There are 1317 unanswered questions
 
@Duga Down some.
@JeroenVannevel Mind if I ask a quick C# question?
 
Very quick, since I'm about to start a movie
 
            int digit = token - 48;
            int digit1 = int.Parse(token.ToString());
Which is better?
 
I know the token is a digit already at this point.
OK, I thought so, but wasn't sure.
Thanks.
 
12:02 AM
The first is sneaky code and should almost always be avoided
 
Yeah.
OK, I couldn't find a good way to read a double from a stream of chars represented by ints, so I went with janos suggestion of going the whole way and building my double from scratch.
Incoming question.
 
Hello
 
Hola.
 
I finally am able to work on a project thanks to the solution you gave me the other night @Hosch250. Turns out the class also had to be internal as well.
 
Hmm, I've never used that keyword.
 
12:14 AM
Oh, well VS2015 added it automagically.
 
I use 2013.
 
Cool
@Hosch250 Here's the project link if you're interested. github.com/ShearOfDoom/EsoBin
 
OK.
Busy writing a new question.
Installing R#. Rejoice, R# fans!
Well, installing dotTrace, trying to get the link for student R#.
OK, I don't need dotTrace - R# Ultimate has it built-in.
So, what does this do?
@EthanBierlein?
@Legato I believe you can reward @JeroenVannevel his bounty now.
Now THIS slowed VS down.
 
12:42 AM
0
Q: Youtube OAuth security

MukiI am working with the Youtube OAuth for the first time and I am not that great when it come to security. I got the following code and would like to hear if you guys can find any security issue: $code = $_GET['code']; $url = 'https://accounts.google.com/o/oauth2/token'; $params = ar...

 
0
Q: Build a double from a stream of chars

Hosch250Back in my calculator post, janos suggested I either find a better way to read a double from a StreamReader or else go the whole way and build a double from scratch. I looked through a few streams, but the only one I found that supported reading a double was the BinaryReader. This, unfortunatel...

See you later, supper time.
 
Later.
 
1
Q: Build a double from a stream of chars

Hosch250Back in my calculator post, janos suggested I either find a better way to read a double from a StreamReader or else go the whole way and build a double from scratch. I looked through a few streams, but the only one I found that supported reading a double was the BinaryReader. This, unfortunatel...

 
8 hours ago, by Ethan Bierlein
@Duga You're slightly annoying sometimes.
@EthanBierlein Not nearly as annoying as having to tell a whole bunch of misguided Stack Overflow users that their impression about what Code Review and Programmers is, is completely ridiculous.
4
@skiwi I hope reading it made you realize how impossible it is to create "the perfect language". There really can be no such thing.
 
This seems to be about debugging and would seem more appropriate on, say, CodeReview. When re-asking this, try to make sure your code isn't displayed double spaced. Point out that this is not java.util.HashTable. State the point of rolling your own when there is java.util.HashMap. Mention the interpretation of the int parameter in the contructor invocation and the expected probability of collisions. Do not make the reader guess what your issue might be, from probably mistyping it's and especially leaving unexplained that trailing it. — greybeard 23 secs ago
 
1:01 AM
@SimonAndréForsberg True, true.
@SimonAndréForsberg Some day, someone will create a close-to"perfect" language. Someday though. Not today.
 
@EthanBierlein All languages are close-to perfect. According to some people. Not all of them is perfect.
 
@@SimonAndréForsberg Okay. But if we could take all the good things from those languages, combine the together somehow, and remove the annoyances, then we could have the perfect language.
 
@MadaraUchiha I noticed @sᴉɔuɐɹɥԀ told you some things about our project in the JS room. I'd like you to know that it is not the whole truth. If you're interested, I know a bit more about the project. (For example: Server is mostly Java really, and Java modding will still be possible)
@EthanBierlein Mission Impossible.
 
@SimonAndréForsberg Let's do this. Maybe. Not today. Or for many years. Or not at all.
 
not at all for me :)
I got way too many things to do already.
 
1:07 AM
0
Q: Better Implementation for Finding Paths Through Matrix

Matthew HogganGiven the problem: You are given a 2-Dimensional array with M rows and N columns. You are initially positioned at (0,0) which is the top-left cell in the array. You are allowed to move either right or downwards. The array is filled with 1's and 0's. A 1 indicates that you can move throu...

 
@EthanBierlein The annoyances are different for each person.
 
@Hosch250 I guess, but there are still major annoyances for everyone.
 
Maybe.
A lot of those are addressed with the new versions of the languages.
From what I've seen, they usually fix a set of problems and add a set of features.
 
I guess, but I still think there needs to be an "ultimate language."
 
I don't, because there can be no ultimate language.
 
1:12 AM
@EthanBierlein xkcd.com/927
 
Maybe we can all agree that each persons language of choice can be their ultimate language.
 
That is what I meant.
 
Okay.
 
If you want to develop your own, you are more than welcome.
 
1:13 AM
What I was trying to say was there could be no single ultimate language that everyone liked.
3
 
@Hosch250 That's my problem. I have absolutely no experience in language design.
 
What I would do is learn a couple languages really good.
Say, C#, C++, Python, and a couple others.
 
I've heard of ANTLR, how easy to pick up is it.
I already know C# fairly well, and python very well.
 
ANTLR? Try @Mat'sMug and @RubberDuck
I have no experience with ANTLR.
OK, well, learn C# better, and become the top expert in Python on SO.
 
@Hosch250 I don't know I think @MartijnPieters already has that title.
 
1:16 AM
Also, I believe there are open-source languages, maybe you could work on Python.
Well, take it away, he probably won't mind.
 
@Hosch250 If you looked at my stackoverflow account and compared it to his, I would probably have little chance of ever catching up to him.
But I will try. Maybe.
Sometime.
 
I don't find imaginary internet points particularly compelling, personally
 
I like the badges, and the moderation abilities.
 
@sᴉɔuɐɹɥԀ It drives me crazy sometimes.
 
OK, anyone with R# in?
@Mat'sMug?
 
1:21 AM
I think that if you know some C# and Python, and make something good with it, it's worth more than Jon Skeet's rep
 
NVM, I guess I will just reinstall.
 
@sᴉɔuɐɹɥԀ Totally, it's just that whenever there's a system of points, and I'm included, i always get this feeling of more, more points, yes, points [evil laughs]
 
@sᴉɔuɐɹɥԀ Just wait - until they start giving stock away based on rep!
 
@Hosch250 I think that would defeat the entire point of rep.
 
Lol.
@EthanBierlein But how?
BBIAS, gotta finish supper.
 
1:25 AM
@Hosch250 Reputation is given for hard work and contributions to the community.
@Hosch250 It would be fun though.
 
@EthanBierlein The stock would be too.
Well, what happened was I installed R# and others.
Then, I created my student account.
And now I need to activate the product, so I downloaded again and am repairing it.
And now, it is whining and complaining about me not using var.
 
@Hosch250 I hate it when stuff like that happens. It annoys the hell out of me.
 
It is a bit annoying, but it was my own fault, after all.
 
monking!
pong! (response to ping!)
 
ping (response to pong!)
 
1:35 AM
lol
 
Ooh, hey @Mat'sMug Do know where I could get a good ANTLR tutorial?
 
Now, I need to see if I have an activated installation of R#.
 
I'd like to get into language design so that I can create a "god language" that everyone else here tells me that I can't. xD
 
And..., I didn't need to reinstall after all.
I just needed to sign in (of course!).
 
@Hosch250 installing R#? your life will never be the same... get ready to get addicted
 
1:37 AM
Odds are, no one will use it.
Chance is, it will be the next Python or Java.
 
I tried to search R# on google but i just gave me r. Is that the same thing?
 
It cannot be a "god language", and a god language will probably be as good as a god object.
 
251
A: antlr: is there a simple example?

Bart KiersYou first create a grammar. Below is a small grammar that you can use to evaluate expressions that are built using the 4 basic math operators: +, -, * and /. You can also group expressions using parenthesis. Note that this grammar is just a very basic one: it does not handle unary operators (the...

 
@EthanBierlein Try Resharper.
 
@Mat'sMug Thanks!
 
1:39 AM
R# is short for ReSharper, by JetBrains
they put the intelli in IntelliSense
and the brains in VS
@EthanBierlein whatever you do, please don't use '=' for both equality checks and assignments.
 
@Mat'sMug That would be dumb.
 
@Mat'sMug I need to turn the invert if statement thing off.
 
that would be VBA
 
I've heard of VBA. It sounds cool. Is it worth trying?
 
@EthanBierlein Try VB.NET instead - VBA is for Office.
But no, I would NOT recommend it.
 
1:43 AM
depends what you want to do.
 
Oh, that works out prefectly, I just downloaded VS2015 about an hour ago.
What is it useful for?
 
for automating Office, it's great. for anything else...
 
It can do pretty much everything C# can, only worse.
I'm talking about VB.
 
@Hosch250 Well then, maybe I'll just skip over VB.
 
@Hosch250 try inline XML in C#
 
1:44 AM
@Mat'sMug No thanks, I'll stick to keeping that in a separate file.
 
This is better suited to codereview.stackexchange.comEric J. 44 secs ago
 
lol good idea
 
@Duga Hurry up.
@SimonAndréForsberg Does @Duga not work when comments are edited? Doesn't she catch "CR" mentions?
Anyway:
@EricJ. Nope, Code Review requires the code to be working as expected. Once the code is fixed, come on over, and we will clean it up so it can go to a beauty and functional pageant. — Hosch250 2 mins ago
 
"CR" is our top-secret escape backdoor to mention CR without triggering @Duga ;)
and I don't think edits are piped to the API
 
OK.
I guess I'll stick with "Code Review" unless I don't want my comments showing up.
In case you didn't see this:
How about we combine Cookie Clicker, Minecraft, and StackEgg into one standalone application and then wave goodbye to life? — Rainbolt yesterday
 
2:07 AM
Anyone interested in a game of TTT-Ultimate?
 
@Hosch250 HELP I DONT KNOW HOW TO PLAY IT
 
Me either, really.
 
@EthanBierlein it's an awesome game.
 
the "math with bad drawings" one is pretty clear IMO
 
2:10 AM
Try the second link to join the game.
 
Ik
This UTTT could be infinitely recursive and more complex forever
@Hosch250 You still there?
 
but 3x3 grids makes it consistent with original TTT: you win the game by winning 3 boards in a "row"
 
@Mat'sMug Yeah, but It would still be cool to have it go 9x9.
 
try winning a 3x3 game first ;)
 
Probably won't happen.
 
2:17 AM
losing one is just as fun
 
Not really.
My internet went down :(
 
0
Q: Ajax JSON table row generator

Dominic SoreI have created my first Javascript plugin. I don't have a lot of javascript experience so my code may not be greatly efficient. I've created a table row generator based from a JSON respone. I originally created it for a personal project. So my worry is that it may not be abstract enough to be us...

0
Q: Finding clusters in a matrix

Alec BryteI got asked at an interview to write a program that, given a NxM matrix with zeros and ones, prints out the list of clusters of 1s. The clusters are defined as patches of 1s connected horizontally, vertically or diagonally. Here's the code I submitted but I'm wondering if there is a better way, ...

 
Back again.
@EthanBierlein
 
Oh, I still have the link bejofo.net/ttt/37380010
 
Yeah, I played.
Thanks for playing.
Want to play again?
 
2:20 AM
Yeh
Yes
Totally
 
Lol.
 
Nooo
Oh well, I'm going to go back to my C# project if that's okay.
 
NP.
You need to watch for allowing me all the squares.
No Problem.
 
I guess UTTT is a learned skill.
 
it's not tic-tac-toe anymore.. it's tictactics
 
2:28 AM
You want to play, @Mat'sMug?
 
I would, but I'm busy with RD
in VBA, 1 min ago, by Duga
[retailcoder/Rubberduck] retailcoder pushed commit f06fcbe0 to refactorings: Fixed in-block ambiguous call resolution
 
Busy doing RD?
Just saw that come in.
Just about 1 more week of school, then I'll quick get this release out and try to really do something.
(My app's release.)
 
Whoops
@Hosch250 What is the app. Are you allowed to tell?
 
Learn OneNote - see my profile.
It is going OS after this release, if you are interested in taking over.
 
@Hosch250 That's pretty cool. I'll see if I could do that. What language(s) is it written in?
 
2:32 AM
C#/XAML.
 
@Hosch250 Seems pretty straightforward. I have about 4 1/2 weeks of school left, so I don't have much time from here to then, I am interested though.
 
OK.
 
@Hosch250 man, you have no idea how much of a relief that commit is
 
@Mat'sMug I don't understand half of the commit, but I'll take your word for it.
 
I have 1 week left, and a release pending, and a bit of refactoring to do to make it as good I can before OS'ing it.
 
2:38 AM
I'm using this code for testing - when I right-click / "find all references" on the ProgressView.Update procedure, it takes me directly to the view.Update instruction in the ProgressIndicator.Update procedure - in other words, I've resolved all the ambiguities and correctly identify the only call to ProgressView.Update in the code :)
 
Dishes time, see you all later.
 
later
 
See ya
 
Hmm, I need to read about making things open source.
 
@EthanBierlein that's something I did in VBA, if you want to see good VBA code ;)
11
Q: A reusable ProgressIndicator

Mat's MugThere was a Tweet from @ExcelEasy earlier this week, that linked to this article, to which I replied with a little challenge: @ExcelEasy well done! #Challenge: make a more #OOP one without using the form's default/global instance! #becausewhynot Of course I wouldn't just leave it at that, s...

 
2:39 AM
The app is available for download from my account at the Windows Store now, and I'd like to keep it that way.
I also want to allow others to edit it completely separate from me, but I also want my work to remain marked as my work (I know there is a license for this bit).
But, how are these others to publish it?
From their accounts? They will have to use a different name.
 
no idea
 
I've never had a job, so I really kind of need to keep my work available separately.
 
I distribute RD myself
 
I could do that, but I basically want to completely leave the project, but keep the credit to help me get a job.
I think I will rename it to show it isn't being updated anymore, and I could just give it to Ethan, and he can do what he pleases.
Anyone interested in buying it? JK
Discuss this later, see you.
 
3:09 AM
Just a side note, Code Review SE is probably more appropriate for this question. — Sinan Bolel 24 secs ago
 
4:09 AM
So is there a problem? If you are just looking for people to review your code, you should post on Code Review instead. — AJ Richardson 7 secs ago
 
4:23 AM
-3
Q: I have written the following code in C ...In test case 3 and 4 its written " terminated due to time out " ...?

Sheena#include<stdio.h> int main() { int t,a,b,temp; long long int n,sum; scanf("%d",&t); while(t--) { a=1; b=2; sum=0; scanf("%lld",&n); for(;b<=n;) { if(b%2==0) sum=sum+b; temp=a; a=b; b=b+temp; } printf("%lld\n",sum); } return 0; }

1
Q: Python wrapper for Windows pipes

williambellwisdoThis is done in the style of a single class, that should work like any other io-based object in Python. Help is much appreciated with anything regarding performance, documentation, or anything else. import io,win32file,win32pipe, win32api import msvcrt as ms # for fd magic class pipe(io.IOBase):...

 
4:37 AM
> If written is your code, reviewed it must be.
    if (code.Written)
   {
        code.Review();
    }
    else
    {
        WhyAreWeHere();
    }
Or, if we want bad code:
    if (code.Written == true)
   {
        code.Review();
    }
    else
    {
        WhyAreWeHere();
    }
Hi, @JS1
 
4:59 AM
// JavaScript version
if (code ============== written) {
    code.review();
}
 
5:10 AM
There are two versions: The backtracking is working correctly with restrictive k-size but inefficient. The dynamic programming version however doesn't take into account the desired k-size of subsets but worse still it only returns the first matching subsets it finds. I am hoping for an efficient solution. The wall of code would have saved me lots of time had I found it as is. Instead I had to collect it from multiple questions to make it work. Thank you for the head up for the Code Review service but my question still stands. Is DP able to get the Next subset repeatedly until all found? ThanQ. — Ali Adams 26 secs ago
 
5:57 AM
0
Q: PHP, PDO foreach query efficiency

zuc0001I am looking for better ways to write this code. At the moment it grabs a list of all navigation items and places them in an array (using PDO). However as you can see, it is using two foreach loops to grab the subnavigation items under each parent. Is there a better way that this code can be wri...

 
6:27 AM
If your code works, I think it would be better to ask this on Code ReviewArun A.S 49 secs ago
 
6:41 AM
0
Q: Towers of Hanoi graphical representation in C

user72761I have code to show Towers of Hanoi graphically, which is hard coded. Can anyone help me to remove this situation/to show it with dynamic values? I want to run this program with dynamic values or user define values. #include <gtk/gtk.h> #include <stdlib.h> int diskisin[5], posinpeg[5], diskco...

 
if anyone has a chance...
we ditched InstallShield, that's a debug/test build made with InnoSetup, should work for both 32-bit and 64-bit office.
 
7:01 AM
Post edited trying to be more clear and specific at what the code does. First of all, sorry if this dont fit in here, i'll check codereview (i'm hard minded and i dont care they tear me). @figs actually the code runs perfectly in my terminal as you see it. — David P. 44 secs ago
 
7:13 AM
0
Q: A javascript newbies attempt at a DnD money optimizer

AdrianLong time C/C++ programmer and trying my hand at javascript I wrote this little page to calculate least weight and or optimum gold amounts for DnD for 4th and 5th editions I think I've managed to refactor it to its best. But I have little experience with javascript so I would like a critical re...

 
7:23 AM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comEdChum 52 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comEdChum 13 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comEdChum 56 secs ago
 
8:23 AM
I suggest that once you get this working, you migrate it to Code Review. There are a lot of minor problems that are not fatal, but will make the proram clearer, shorter and far more maintainable. For example, lenCheck() can be replaced by a single line of code. — kiwiron 34 secs ago
 
8:45 AM
0
Q: If an array exists run a function else create array then run function

TaylorsukThis question is two fold. 1, how can the below code be improved. 2. if this is my current level of coding and method of tacking a problem where should I go next to learn javascript better. Many tutorials are either frustratingly long winded or jump straight into complexities that I don't have ...

 
 
1 hour later…
9:45 AM
@SimonAndréForsberg OK, fair enough.
 
0
Q: Shift elements left by n indices in a list - python

overexchange For the following question, the function • should mutate the original list • should NOT create any new lists • should NOT return anything Functions that do not create new lists are said to be ”in place.” Such functions are often desirable because they do not require extra m...

 
10:43 AM
@Hosch250 It depends on the state of the comment at the time @Duga retrieves it. She does not catch "CR".
 
10:55 AM
Invisible code is a code we can't comment on. You have 2 options: either Post the code in code review, explain your situation and ask for explanations there, or edit your question here to include your attempts and ask for help on the specific problem you encountered. — Zohar Peled 48 secs ago
 
0
Q: Solution for rod cutting problem using Dynamic Programming

Sanchit Handaclass Solution{ public static int price[] = { 0 , 1 , 5 , 8 , 9 , 10 , 17 , 17, 20 }; public static int bestPrice[] = new int[price.length] ; public static void main(String args[]){ if( price.length >= 2 ){ calculateprice(price.length-1) ; System.out.println( "Best p...

 
11:21 AM
0
Q: Trying to build an interface for a dynamic game menu

Elonias StrongarmWhat would be a good way to create a dynamic rotary menu? i.e. tabs that expand outwards from a central circle. I've been searching for this on other sites and as of yet they have been unable to assist me in this matter. Other functions I aspire to integrate would be swappable buttons (possibly r...

 
11:45 AM
Hello, folks. :)
3
 
Hey @kleinfreund!!!
Always nice to see you drop by.
 
Thank you, Simon. How're you doing?
Good to see people constantly being around here.
Also, have a look at this piece of garbage code I just wrote:
if ((pac + pbc + pab) + (std::numeric_limits<double>::epsilon()*1000) >= 2 * M_PI) {
return true;
}
 
I'm hopeful! And full of more life experiences! I hope to get a new job in a month or two, and I've been to Ukraine recently. (Not related)
@kleinfreund extract variables! I'm sure pac + pbc + pab has a good meaning, and std::numeric_limits<double>::epsilon()*1000
 
Ah, things are happening.
 
pac, pbc, pab are horrible variable names by the way... in case you didn't know ;)
 
11:50 AM
Yeah, it's the angles of three triangles. I determine whether a point is inside a triangle. I just slammed the code into the machine the quick and dirty way.
I was just checking whether I could make it to the desired result.
Plus, you know, comparing floating point values.
 
sounds like angleSum then
 
I'll see if C++ has something helpful for that.
 
12:07 PM
Sigh.
3
I thought that was a @Duga bug... but no, that guy actually just copy&pastes that message all over.
 
@nhgrif my thought exactly.
 
@nhgrif lol
 
I'm voting to close this question as off-topic because it doesn't appear to have anything to do with any specific programming problems. You should check out the Computer Science help center and see if your question might be on-topic there. — nhgrif 7 secs ago
 
@nhgrif now that's how that message should look
 
Exactly. ;)
(No one else has cast a close vote on it though...)
But the comment does two things:
1) Establishes the questions as definitely off-topic for SO for SO reasons.
2) Points the user to CompSci's **help center** rather than the page with the "Ask a Question" button on it.
 
12:25 PM
@kleinfreund looks like you need more TAU in your life.
 
12:39 PM
@RubberDuck Tau as in the greek letter?
 
Noonking all
 

« first day (729 days earlier)      last day (3290 days later) »