« first day (551 days earlier)      last day (3468 days later) » 
00:00 - 16:0016:00 - 00:00

4:02 PM
@Marc-Andre Most importantly: Practice. Try it. Write some code. For example, I did a simple little one-method implementation of en.wikipedia.org/wiki/Collatz_conjecture using IntStreams.
 
Monking!
 
monKing!
 
Hey @Mat'sMug!
 
Divide and conquer algorithms seem great. Too bad it seems really to come with one.
 
@SimonAndréForsberg tsss.. not brainfuck.
 
4:17 PM
@Mat'sMug And not LOLCODE.
 
@SimonAndréForsberg did you make it join chat.stackexchange.com/rooms/14370/bluecheese-monsters-home
 
@Malachi Never tried making it join there. But it's not listening for chat commands. (If it was, I would have made it come here and star all the "lol"'s)
5
 
@SimonAndréForsberg you can test it out in there if you like. I will try to remember to change the name of the room later when I am at home
 
0
Q: Fuzzy database search - code and logic

Bob StoutI'm writing a Java Servlet application where the users must enter information about a business. I'd like to prevent as many duplicate entries in the MySQL database as possible and I'd appreciate people's comments on the logic of the process. When the user fills out the form and submits it, the ...

 
@Malachi I got no plans on making it recognize commands.
 
4:23 PM
Without optimizations turned on, my Gray codes addition algorithm is 5 times slower than the one one where you convert gray codes to integers, add integers then turn the result back into gray code.
With optimizations, both are equally fast.
 
what is it going to do?
 
Besides, @skiwi wrote most of the bot, I'm just running the code.
 
I have a Laptop that I just use for gaming, it is online 24/7 except for brief reboots. (and it's a linux box {Ubuntu})
 
in TCG Creation, 15 secs ago, by Duga
@Malachi I speak when I am told to, or when there is an event on Github happening
I just managed to solve a bug that I did not understand why it was there. I know how I solved it, but I still don't understand why it was there in the first place.
4
 
@SimonAndréForsberg Bugs at their finest.
 
4:27 PM
I gotta get BTW.Work!
 
@skiwi OpenGL at it's finest.
 
0
Q: Getting the natural log of a factorial

c0derI have this code which calculates the factorial of a number and then gets the natural log of that number, however: the output keeps saying NaN import java.util.Scanner; public class Nov6 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); double num; ...

 
@SimonAndréForsberg I don't know how or why it works; but it works.
2
 
4:48 PM
I hate it when I do something stupid.
5
 
@Donald.McLean happens to all of us
 
@Phrancis I just had one of those yesterday.
Found a bug in the vendor's automation language.
Adding an empty loop before getting a value fixed an error.......
2
 
@SimonAndréForsberg That's the schroedingbug, as opposed to the heisenbug.
2
 
0
Q: Defining metaclass instance methods inside of the metaclass factory instead of the metaclass itself - flawed design?

Rick TeacheyI'm wondering if this is good design, or if the definition of the __init__, __call__, and __repr__ methods should be inside of mesh_class_meta itself instead of inside of the factory, mesh_class. If it is better to for them to be defined (I suppose as a @staticmethod) inside of the metaclass de...

 
@rolfl This code should have worked in the first place though.
 
4:58 PM
But like the cat in the box, it was in a quantum state, of both working, and not working.
 
@rolfl are schroedingquestions on-topic then? or both on-topic and off-topic at the same time?
 
if you know it is both working code, and not working code, simultaneously, then it's obviously on-topic.....
> To the best of my knowledge, does the code work?
Yes!
 
> To the best of my knowledge, is the code broken?
Yes!
 
Exactly!
 
headsplodes
2
 
5:04 PM
soo. the code's broken workingly or does it work brokenly?
3
 
> I know how I solved it, but I still don't understand why it was there in the first place.
the code was working, and it was broken.
At least as far as the perspective of the programmer ;-)
 
naah that's just an information deficit..
 
@rolfl usually it's working from user's perspective, and broken from programmer's perspective.. or vice-versa.
 
5:24 PM
0
Q: Simple Itunes Playlist Export Reformatting

User1996My friend wanted me to send her a list of songs from one of my Itunes playlists, so I exported the playlist within the app itself. It comes as a plain text file, where each field is separated a '\t' and each line is separated by a '\r'. Since there is so much extraneous information, I decided to...

 
5:42 PM
(CR chat has gone to lunch)
 
EAT... ALL THE FOOD
 
McDonald's to the rescue!
 
@skiwi - FYI: reverseocr.tumblr.com
 
@rolfl lol, seems legit!
2
I might be suffering a case of out-of-star-ness
5
 
@skiwi just to rub it in..... =)
 
6:00 PM
0
Q: Could I dispose IDisposable objects that are part of a Thread?

John OdomI have a question about using an IDisposable object in the ThreadStart function. I have a class that derives from ServiceBase: public class ServiceTest: System.ServiceProcess.ServiceBase { private System.ComponentModel.Container components = null; private System.Threading.Thread ...

 
6:11 PM
This may or may not be the best site to ask a question like this. Are you looking for a general code review, or just a specific answer to "Could I dispose IDisposable objects that are part of a Thread?" — Phrancis 14 secs ago
 
0
Q: Using CRTP for loading resources

CalprattWhat I'm Attempting: My idea here is to minimize the amount of resources loaded into my program by using CRTP and static members. (Specifically I'm planning on using this for loading OpenGl shader programs) This is to separate some of the boiler plate setup code (combining shaders into a progra...

 
In case someone hasn't seen this question (and would also like to contribute to it):
0
Q: Should "Are there any bugs in this code?" be migrated to Code Review?

Joshua TaylorI came across once-only lisp macro, yet another implementation today, in which the OP is following up on a previous question whereby OP had improved some code, presumably fixing it. I tried implementing my own macro for the same purpose earlier, but it had a bug, as pointed out at once-only l...

 
6:29 PM
Fun fact: my gray code addition algorithm is more optimized with -O2 than with -O3.
~ 400ms vs. 430~450ms.
 
0
Q: Ruby - How can I speed up this method?

JohnsonGiven an array of numbers and another number k, how can I find the number of 2 elements such as their difference is equal to k. def pairs(n) n.combination(2).select{|x|(x[0]-x[1] == 2) || (x[1]-x[0] == 2)}.count end I ran a test where n was an array of 8000 different 10 digit numbers. Howev...

 
The back-to-int-then-back-to-gray addition however does 65ms with -O2 vs. 10ms with -O3.
 
Which one has the smaller executable? O3 or O2?
 
7:19 PM
@JeroenVannevel if I know almost nothing about MVC will I be able to make heads or tails of this this apress.com/9781430265290
 
yes
That book will teach you everything about the universe
It'll start by teaching how MVC works and how it compares to other architectures
then guiding through some C#, .NET library and Razor features
 
ok, I am pitching to the head of IT that I think I need these books to further my knowledge. then I will have to read them....lol
 
a sample application that you keep adding to
 
0
Q: Toggling buttons that toggle between two "widgets"

Kala JI am trying to set my toggle buttons like radio buttons so that when I click between the buttons, my textview updates. And when I click on the plus or minus button on the sides of my textview, that the buttons update along with the textview. I have a buggy video to show: https://www.dropbox.com...

 
I am also pitching this one. apress.com/9781430242338
 
7:22 PM
and then many different aspects that go really deep into it
I don't know that one, but I have read Skeetmeister's C# in Depth v3 (half)
 
this is what I am going to try and get through before those get here (if they are ordered for me) wrox.com/WileyCDA/WroxTitle/…
 
ASP.NET and ASP.NET MVC are so different though
even the change from MVC 3 to MVC 4 is already pretty big
 
that's why I went with MVC 5 book. I want to be state of the art!
lol
I came up with some other projects to help me learn more ASP.NET and hopefully make some money
I need to read more code books for sure
 
@Phrancis
It was the latter. I didn't want to post on StackOverflow because it is not a "my code don't work what is going on" question, so I thought this was the best place. — John Odom 11 mins ago
sad
 
7:31 PM
@Mat'sMug maybe Programmers?
 
@Malachi I need to finish more of them..
user image
2
2 are finished!
 
@JeroenVannevel lol I know what you mean, I have a bookmark in my C# book from college...
 
6 are in progress..
 
and in a logic and design book
and a PHP learning by creating games book as well
user adding code to someone else's question??
 
@JeroenVannevel I notice how small the book "Javascript: The Good Parts" is.
4
 
7:38 PM
@Phrancis I did still have stars left!
@JeroenVannevel You really got the JLS?!
I'm sorry to say, but it's likely outdated
 
@Phrancis Note that, after all, still 10% of the book is an appendix called "The awful parts"
@skiwi I received a gift card and this was literally the best I could buy with it
 
@JeroenVannevel Better than a PHP book......
2
 
@Malachi It was either the JLS or some stuff about Office for seniors
 
lol
 
Where are the iOS books?
 
7:51 PM
0
Q: Read chunks of data

SajidkhanI'm a complete beginner to intermediate programming. I have tried using PHP and Java to parse a CSV file and process the links stored within it line by line. From my understanding, reading a large file line by line is slower compared to reading the same file in chunks. Currently I'm at a stands...

 
@JeroenVannevel Literally the best book... okay
 
8:19 PM
@anyone is there a way to save the content of an entire github folder to local disk without saving every file one by one?
 
@Phrancis Download zip
 
@Marc-Andre where is that link? See above sreenshot
(could be IE8 issue that I don't see it)
 
You can't download zip a single folder
 
OK
 
You may have a git command to "download" a single folder, but I'm not good enough to do so
 
8:33 PM
OK that should work fine, merci :)
 
I'm putting a bounty on this one. I'm interested in seeing an answer much more meaningful than the one I gave.
3
Q: Immutable Linked List in VBA

ptwalesI made an immutable list class using the head-tail idiom. If I did this correctly, it implements persistent data structures. Unfortunately it doesn't scale well as VBA is not tail recursive. Note: I use a method called seq.Assign to handle assigning objects without using Set. I would like to ...

I wouldn't know a if it bit me.
3
 
0
Q: Concisely handling both arrays and Backbone.Collection as parameter

Sean AndersonI've got a Backbone.Collection which looks like this: define([ 'background/mixin/collectionMultiSelect', 'background/model/searchResult' ], function (CollectionMultiSelect, SearchResult) { 'use strict'; var SearchResults = Backbone.Collection.extend({ model: SearchResult...

 
@Phrancis De rien!
 
0
Q: Markdown to HTML, again

bjb568I made another markdown parser. (origional, this one, on github). Look, I'm not crazy, I just like making markdown parsers… String.prototype.replaceAll = function(find, replace) { if (typeof find == 'string') return this.split(find).join(replace); var t = this, i, j; while (typeof(i ...

 
8:50 PM
Squeezed in a small late review today. Hopefully that'll get me to 19.6k.
 
9:22 PM
@Jamal You took such hard hit once you were at/over 20K?
 
9:33 PM
@skiwi I never reached 20K.
 
@Jamal Then get there!
In all seriousness, I thought you had
 
I'm trying. :-/
 
So, I add an answer to a question, then see a comment after I post, from @mjolka, which basically says exactly what I say in the answer.....
I think it's his fault for answering in the comments, instead of in the answers.
2
 
0
Q: Toggle button to change textview simultaneously and vice versa

Kala JI am trying to set my toggle buttons like radio buttons so that when I click between the buttons, my textview updates. And when I click on the plus or minus button on the sides of my textview, that the buttons update along with the textview. I have a buggy video to show: https://www.dropbox.com...

0
Q: Can This Function To Generate All Valid Dates In Elixir Be Improved?

Onorio CatenacciI've come up with the following code to generate a list of all dates between two given dates: def generate_all_valid_dates_in_range(_start_date, _end_date) do (:calendar.date_to_gregorian_days(_start_date) .. :calendar.date_to_gregorian_days(_end_date)) |> Enum.to_list |> Enum.map (&(:cale...

 
9:51 PM
I will finally be getting IE 10! :D
13
 
@Phrancis If that's not worth pinning, I don't know what is.
@rolfl Sometimes I wish I could flag comments as "Not a comment, it's an answer".
 
@Phrancis Now you get immediate exceptions faster!
 
heya @rolfl sorry about that, didn't think it qualified as an answer. am happy to delete it
 
Leave it ... it's not worth deleting either ;-) And, it is asking for clarification... sort of
 
too late :)
 
10:00 PM
OK, then.
I'll bask in the glory, and no-one will ever know ....
 
there was a similar question yesterday that bugged me where it was just a straightforward implementation of the algorithm described in the question. ran too slow. no indication of what other approaches they'd tried
nice answer btw ;)
oh. both questions were from the same user
 
10:16 PM
6
Q: Why does param object[] array become jagged if you pass an int[] array into it?

johnjk07As I was experimenting with params, I noticed the MS documentation says if you pass an array of int as a method parameter that has a signature of params object[] myParam, it will become a multi-dimensional array. But I noticed if you pass an array of objects[] or strings[] it does not. This seems...

Worth reading!
 
@JeroenVannevel I can't. My code is worth coding.
 
10:39 PM
@rolfl yeaaaaah, about that thing you said with the handholding
Might have asked the number as a String but declares it as a Double which makes it ok and alway use lower case for my class and was not intending to use loop in this particular program and the program run and executed to the way I wanted. — Ayodele Ajayi 12 mins ago
 
Yup. My advice? Just ignore it. No need to respond.
 
10:51 PM
I wouldn't even know if it's a request or a remark
 
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
@AlexM. ^^ ;-)
 
@Phrancis i wished that popped up whenever i try to post a comment
 
Ain't that the truth.
 
maybe also "are you drunk? don't comment when you're drunk"
4
 
@mjolka or sleep deprived
 
10:59 PM
calculates ~5 minute window for commenting remains
 
TTQW
Tonight, we dine in HELL HTML!
 
0
Q: Django computing values on POST

GschneiderI'm having my first go at making an API for a Python app using the Django REST framework. I'd like to take a JSON as input using a POST request, compute some numbers, and then return these numbers using a GET request. I was able to get this working by using the following code. views.py from si...

 
11:35 PM
1
Q: Gray codes addition

MorwennAs some of you know, I have been working with Gray codes and am trying to design a good gray_code class in modern C++. I will end up posting several parts of the implementation, but what I want to be reviewed is mostly the addition function. Anyway, here is the code of the class essentials: temp...

 
^^ Here comes the monster.
 
0
A: How can I replace two strings in a way that one does not end up replacing the other?

Jeroen VannevelYou use an intermediate value (which is not yet present in the sentence). story = story.replace("foo", "lala"); story = story.replace("bar", "foo"); story = story.replace("lala", "bar");

how is this hacky
 
I thought about doing that, but in my actual program, word1 and word2 will be defined by the user. If the user were to enter lala for word1, the same problem would occur. — Pikamander2 55 secs ago
he has a valid point
I believe Boost has a particular function that solves this problem
I'm not sure about the algorithm
 
Obviously "lala" is just an example. In production, you should use "zq515sqdqs5d5sq1dqs4d1q5dqqé"&é&€sdq:d:;)àçàçlala". — Jeroen Vannevel 12 secs ago
 
I can enter that using a keyboard
 
11:43 PM
Sure, but you won't
Hell you can make it 50 randomly generated characters
The only way to break it, is by knowing the source code.
 
you can solve it using recursion
 
And that is a scenario I don't deal with.
 
I'm sorry
if I were the engineer unit testing your algorithm
you'd be sent back to find a proper solution
because it would break on my first test
 
Nah, I think that's losing sight of what matters
 
Yeah, what matters is that it's dinner time
 
11:46 PM
The chances of this being entered are virtually impossible. It is not something a user would ever have occur to him
 
the question also seems to be a duplicate
26
Q: Java Replacing multiple different substring in a string at once (or in the most efficient way)

yossaleI need to replace many different sub-string in a string in the most efficient way. is there another way other then the brute force way of replacing each field using string.replace ?

 
Nah, that's not about switching two values in a string
It's about switching multiple values with one value
 
yeah the one I linked is different, nvm
but the original question is not about switching two values
it's about performing multiple replaces on the same string at once
string.replace({toReplace, replaceWith}, {toReplace, replaceWith}...)
because doing the same things sequentially might modify past changes
 
ehhh
That's not the problem here as far as I can tell
it's just about switching two values with eachother
 
I am going to sleep. Good night! :)
 
11:59 PM
0
A: How can I replace two strings in a way that one does not end up replacing the other?

Alan HayUse the replaceEach() method Apache Commons StringUtils See the last example which would seem to do what you want. http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/StringUtils.html#replaceEach(java.lang.String, java.lang.String[], java.lang.String[])

there we go
 
00:00 - 16:0016:00 - 00:00

« first day (551 days earlier)      last day (3468 days later) »