« first day (691 days earlier)      last day (3332 days later) » 

6:06 AM
Might be on topic on code review ... — Erwin Brandstetter 1 min ago
 
6:44 AM
@200_success for your point: I think that you can get the job done just as effectively if you cut out the private sector. am actually not fan of public-private partnership. My code says, that am bad at recursive programming.
Can we improvise on same approach for delete() and insert() operation similar to length() here?
oops, i think you answered it.
 
7:02 AM
Sometimes I add a bit of humour to my answers to make them more memorable.
 
7:22 AM
I'm voting to close this question as off-topic because it relates to optimisation of working code. It could go on codereview.stackexchange.com for example. — David Wallace 2 mins ago
 
7:38 AM
@DavidWallace This question would be off-topic on Code Review, because it contains broken code. It would also be a poor Code Review question because it lacks context — we would want to understand what else is being validated so that we can give appropriate advice. — 200_success 1 min ago
please post questions like this at codereview.stackexchange.comRafael Osipov 1 min ago
I'm voting to close this question as off-topic because it is a request for a code review. — dasblinkenlight 50 secs ago
@dasblinkenlight Where does it say code reviews are off-topic? — immibis 1 min ago
@immibis It´s written in the last part of what topics can i ask here If your question is not specifically on-topic for Stack Overflow, it may be on topic for another Stack Exchange site.. This leads to the conclusion that it´s not specifically on topic, while [codereview.stackexchange.com](codereview.stackexchange.com) would be a better place — Kevin Esche 9 secs ago
I don't know the data structures you use at all. And I don't have any good guess. But doing a code review of the corresponding run-time library might reveal some pending issues or some weak points in your code. See github.com/v8/v8/blob/master/src/typedarray.js and github.com/v8/v8/search?q=Int8Array and also the Int8Array unit tests might contain some hints — xmojmr 1 min ago
@immibis that´s true and i doubt that a tiny example like this would be off topic in any case, while more complex reviews might be fitting a lot better to codereview — Kevin Esche 1 min ago
I didn't know about the code review site, just had SO recommended to me. My apologies if I've offended anyone. — caZ 1 min ago
 
8:13 AM
-1
Q: average, maximum and minimum values

Takudzwa ChumaWrite a python code to read in all the marks for an exam as integers and each must be on a new line and print out the average mark, the highest mark and the lowest mark for any class size. A negative integer will be the last number input. If there are no marks entered (just a negative) then avera...

 
Yes, there's certainly a bug in the code. But the question isn't about the bug. It's about whether there's a shorter way to do a "between" comparison. And that's a codereview.SE question, not a SO question. — David Wallace 1 min ago
 
9:00 AM
0
Q: Union of intervals in java

sc_rayI am trying to solve for the problem where given a bunch of intervals as follows: (1,2),(2,5),(4,7),(9,11) I find their union, which in the above given case would be: (1,7),(9,11) It will be great to get some feedback on whether I am on the right track and also how I can improve upon what I...

 
9:16 AM
I'm voting to close this question as off-topic because it is a request for a code review. — Raedwald 1 min ago
 
9:51 AM
1
Q: Revision 2. Evaluating an expression with integers, +, and *, as well as -, /

Maksim DmitrievThe question came from this web site, and the first round of code review is here. The calculator which only supports the signs + and *. public class Main { // http://www.careercup.com/question?id=4911380140392448 public static void main(String[] args) { String equation = "1*5*4...

 
Monking
 
10:06 AM
"What's wrong with my Dijkstra code?" - the question. Are you asking for a code review? Are you trying to alter the output of the application? Is the application crashing? Does the program return something different than expected? Does "what's wrong" mean something different than all these questions? — utnapistim 1 min ago
 
10:30 AM
Cool effect. Yeah, given this very unique use case I can see this being the easiest way. The only other way I can see it would be to have the new view as part of the recyclerview and then letting the views above and below redraw themselves with a dimmer background. Either way is going to lead to some code that's a bit complex. If I saw this in a code review for this reason I wouldn't be in love with it, but I'd be ok with it. Definitely want it commented. — Gabe Sechan 1 min ago
 
@Duga has been busy over night.
 
@DavidWallace Code with bugs in it is going to be closed as off-topic on Code Review, no matter the user's question--so don't recommend questions with bugs to Code Review. Moreover, just so you understand, a question where the user's only question is how to make their already short code "shorter" is likely to be extraordinarily poorly received on Code Review. A question that starts off so small and asks for a fewer-character solution will probably be closed on Code Review as a Code Golf request. — nhgrif 1 min ago
I'm voting to close this question as off-topic because it's more suitable for codereview.stackexchange.comAndy 1 min ago
@KevinEsche meta.stackoverflow.com/questions/287400/… Moreover, while a question that is not specifically on topic for Stack Overflow may be on topic for another Stack Exchange, where does it say that a question that is not specifically on topic for Stack Overflow is therefore off topic for Stack Overflow? With that said, I think this would be a suitable question for Code Review. — nhgrif 1 min ago
 
10:47 AM
At first it looks like an SO moderator suggesting using the custom close reason for migration questions, but actually...
It appears to be an SO moderator suggesting the obvious (use custom close reason for bad questions that shouldn't be open anywhere) and use the flag option for questions which should be migrated.
Nevermind, it's not a mod, but nonetheless.
 
o/ morning all
 
@Andy Being more suitable for another site, such as Code Review, doesn't make a question necessarily off-topic at Stack Overflow. If you think this should be moved to Code Review, then flag it for moderator attention to migrate--don't vote to close unless it's a bad question that needs to be closed. — nhgrif 1 min ago
@KevinEsche I didn't say this question was on-topic. If this question is off-topic for some reason, vote to close it for that reason (keeping in mind that being on topic somewhere else, like Code Review, isn't something that qualifies an Stack Overflow question as off-topic necessarily). If you think the question would be better suited for another Stack Exchange site and it's not in the list of migration options, the appropriate action is to flag the question for moderator attention and specify that you think it should be migrated. — nhgrif 49 secs ago
 
11:34 AM
If the code works, then post it on codereview and not here! — Bhargav Rao 1 min ago
 
0
Q: jQuery morphing button concept

GeorgeI have written some code which makes a button morph into a container. I have written it using prototypes. I am fairly new to jQuery/JS so was looking for advice on whether this was a bad/good way to write the script? I was just thinking, would it have been more appropriate to have just had the c...

0
Q: Bot clean written on C++

rel1xFirst string includes 4 integers: N, M, A, B (1 ≤ N, M ≤ 300, A, B ≤ 1000). Each next line include M-symbols. Symbol . is a clean cell, * and ** are dirty. I need to find the sum for cleaning if A its sum of ** cell, B is sum of *. What I can do better? #include <iostream> #include <string> #i...

 
11:58 AM
I figure that is C#. On the other hand If this code is working correctly, you might want to take a look at Code Review. People over there are specialized on giving constructive feedback on how to improve your code. Please read through the site rules before posting over there. Additionally you may want to check our guide on how to askVogel612 1 min ago
 
@nhgrif I like the answer to the question that it was marked as a duplicate of better
or, to make the above less confusing, this:
19
A: Flagging migration should include more options

Martijn PietersThe off-topic migration targets are based on migration statistics; both the number of migrations and the success rate of those migrations. There were only 4 migrations to Gamedev in the past 90 days, one of which was rejected, vs 307 to DBA and 178 to Super User. It doesn't even feature in the t...

 
0
Q: Ring datatype in Python

justinfayI wanted to write something that would be useful for the indices of a grid where if one walked off the edge of the grid they would re enter on the opposite side. This could in theory help with checking for special cases when checking for neighbours to a certain position on the grid. For example t...

0
Q: how to rewrite this to be more dynamic?

Al SalvadorI have this code block, where I search for the value of Ordnungsbegriff. I have to search through a tree of my CurrentDocument. How can i rewrite it, so it is more dynamic, because i don't know at which level i find my value. Language is C# string xy = ""; ...

 
codereview.stackexchange.com might be more appropriate. — Paul Rooney 2 mins ago
 
12:17 PM
@CaptainObvious The code or the title?
 
monking
also, please don't tell us to "ignore" bits of the code. We review any and all code submitted under the assumption that it is production-ready code (and that any code in there will not be redundant), and that a developer could happen across it in an open-source project for example. As such, if you have redundant console.logs in there, you should either remove them before submitting for review or let us go to town on them :-) — Dan Pantry 36 secs ago
I hope this is a fair comment ^
 
0
Q: Extracting a Decimal from a string

StingervzI have the following method which extracts an decimal value from a string. using System; using System.Linq; using System.Text; namespace Foo.Bar.Common.Converters { public static class DecimalConverter { public static Decimal ExtractDecimalFromString(string str) { ...

0
Q: Guessing a file type based on its content

RobHIn a project I'm working on, I need a component that is able to make a best guess about file's type based on its contents (a Stream). It doesn't need to do a particularly great job - basically just need to guess a file extension (which will later be mapped to a mime type). I can't trust any metad...

 
@DanPantry I think so.
 
^ Ditto.
 
@George please include the working code here. You can edit the new working code into your question. To clarify Dan's comment, you can ask us to ignore things, but reviewers are under no obligation to do so. Any and all facets of the code are up for review. — RubberDuck 34 secs ago
 
12:33 PM
lol, sarcasm overload today: buzzfeed.com/maggyvaneijk/…
 
-1
Q: Python - Sort a file, highest to lowest and alphabetically

BigNawfsIn python, I have created an arithmetic quiz which askes the user 10 maths questions. It then saves the users score and name to a file. I wanted to know how to, alphabetically order each of the students names with their score, the highest score to the lowest score and average score from high to ...

 
@skiwi Legato.Bucketlist.Add(new Site("Netherlands");
Love the 'too flat' one.
The night picture is great. I think the only one that sort of dissuades me is the house one.
One of those places catches fire, it'll be a disaster.
Though, it's better that they're more concrete based, or seem like it.
So, you're from the Netherlands? @skiwi
 
@Legato Yes
 
Beautiful place.
Hmm...I want to make a "Where is everybody from?" post...is that appropriate for meta?
 
@DanPantry About that comment... there's a meta discussion about that:
16
Q: Can we ask reviewers to *not* focus on something?

Simon André ForsbergOur Help Center says: Do I want feedback about any or all facets of the code? However, sometimes we might have some code that we are aware has flaws in it, or we would just for one reason or another want reviewers to not comment about something. When asking a question on Code Review, can w...

Although of course it would be preferred if it was removed before being posted here. Going through your code and removing such things isn't that difficult, really.
 
1:10 PM
@SimonAndréForsberg thanks!
3
Q: Simple morphing button concept

GeorgeI have been making a jQuery morphing button type thing. jsFiddle $(document).ready(function() { var morphObject = { button: $('button.morphButton'), container: $('div.morphContainer'), overlay: $('div.overlay'), content: $('h1, p'), init: function(...

Is a duplicate of another question that was asked by the same OP and answered but didn't have an answer accepted? really OP? :(
 
New user.
Gets them my BoD anyway.
 
Guys is there a guideline for what is enough of a difference between two samples of code to justify a second code review?
Looking at the above question, the old question that OP asked wrote was, essentially, functionally the same, and the only difference is the new question uses function constructor and prototype rather than an object. Otherwise the question is exactly the same.
 
1:27 PM
@DanPantry No, there isn't.
And I don't think it is possible to make one either.
 
Hm.
These two questions are almost identical aside from the manner in which they approach the question, tehy are functionally the same, and OP has asked that the main thing he is asking is whether or not apples are better than oranges
I am unsure about the way he has asked this question is in a suitable form for code review
most recent question : http://codereview.stackexchange.com/questions/85048/jquery-morphing-button-concept#comment153085_85048

duplicate of : http://codereview.stackexchange.com/questions/84618/simple-morphing-button-concept/84635
Obviously, they ARE two samples of code but I think they are too similar to qualify two questions. And again, the question is essentially apples vs oranges
 
1:42 PM
Greetings, Programs.
 
If your code works, but you want to make it more efficient, try making a post on Code Review. — Kevin 59 secs ago
 
1:58 PM
0
Q: Ruby singleton class

AnthonyI currently have a logging setup that looks like this: require 'active_support' require 'singleton' class Worker def initialize(logger) @logger = logger end def perform @logger.with_context(["tag1"], "Started work") Provider.say_hello end end class Vlogger include Singlet...

0
Q: Array returned from function being modified by printing newline?

user68981I am trying to write a simple linspace function in C similar to Numpy's np.linspace, but am getting strange behaviour I don't understand. The linspace function takes in a starting number, a stopping number, and the number of elements in the array. E.g.linspace(0,5,5) produces an array that looks...

 
2:28 PM
0
Q: .NET - LINQ: Using abbreviations

JuniorCoderWhen using LINQ. What is your approach to abbreviations? Is it OK to use abbreviations when you write LINQ? Alot of Microsoft's samples uses abbreviations but my personal experience tells me that when the queries gets complex the abbreviations tend to make the query confusing compared to using ...

 
Not a duplicate of the suggested question from what I can tell. (I ran it through a diff tool), but until the working code is edited into the question, I am forced to vote to close this. — RubberDuck 16 secs ago
 
@RubberDuck running ti through a diff tool doesnt really help because while the syntax is slightly different, the functionality and semantics are almost identical
 
@DanPantry Then the code has changed, and it is not a duplicate.
 
the only difference between those two bits of code is that one of them uses objects a la foo: { bar: true } and another uses prototypes a la function foo() { this.bar = true }
 
My problem is even after nudging, he didn't put the working code into the question.
 
2:37 PM
I agree, except OP mentions in his comments he wants to know which approach is better, prototypes vs objects
 
Well, that's a different problem entirely. I admit I didn't read through the wall of comments.
 
Whilst I agree the code has changed (slightly) I don't think the code has changed enough to justify a separate question with an almost identical title
The comments can be summarized as "I don't think this is different enough from X, this is why" and his response as "I just want help, I shouldn't need to get it spot on"
(Which I agree with, he shouldn't)
 
wow
 
2
Q: Are WordPress articles/blogs supposed to onebox in chat?

Mat's MugI could have sworn I've seen WP posts oneboxed in chat (or maybe not?)... but every time I post a WordPress URL it's not oneboxing. Seeing that pasting https://some-url didn't work, I tried editing to http://.. didn't work either. Is it supposed to work? If so, what am I doing wrong? It not, .....

 
a 5 year old question that I answered almost 2 years ago was just awarded a check mark on SO, I stole it from another answer! --> stackoverflow.com/a/15092811/1214743
3
 
2:47 PM
This question is similar to the previous iteration but, for the moment at least, is a reasonable follow on. I have voted to leave-open based on it not being a clear duplicate. If the code has other technical (not working) issues, please let me know., — rolfl ♦ 3 mins ago
 
3:18 PM
Since this post is about making existing code better, I think it would be better suited for codereview.stackexchange.commu 無 10 secs ago
 
3:28 PM
I think that still falls into scope for CodeReview @SukkoPera, if someone thinks that you should be doing it differently they will say so. but you have working code here (right?) and you want it to be better, and that is what CR is all about. — Malachi 22 secs ago
 
3:43 PM
0
Q: Efficient Ring Buffer (FIFO) in Python

SukkoPeraI need to implement a Ring Buffer/FIFO for data coming fom a TCP socket. It must support the following operations: Append a the recv()'ed chunk of bytes. Allow me to peek at the beginning of the buffer, since i get differently-sized packets, and I must decode a small fixed-size header to know ...

 
0
Q: Appending text files in a loop on array only prints 1 letter of first file

PhrancisI have a folder C:\test\ that has multiple .txt files which I need to append to one output text file. Using FSO and TextStream I can write the files explicitly with no problem in this manner: Public Sub test() Dim FSO As Object Set FSO = CreateObject("Scripting.FileSystemObject") Co...

Anyone interested who knows some VBA ^^
 
4:02 PM
@AvinashRaj: I voted to close this as too broad; the question is too thin to be a Code Review post however, as that requires real working code, not hypothetical questions. — Martijn Pieters 37 secs ago
 
@Phrancis Why don't you just use Java to do it?
 
Because I can't, writing this for work and VBA is all I have Access to
 
My thoughts are this is more of a Code Review question. — Adam Houldsworth 1 min ago
 
Oh.
 
It's for combining hundreds of data log files for batch loading into an Access DB
 
4:10 PM
Well, I hope you solve it.
 
Thank you.
 
What is the equality operator in VBA?
Is it ==. or =?
Do Until InputFileName = vbNullString
If it isn't =, that line may be wrong.
@Phrancis You here?
Darn you, YouTube, like I didn't know that I just spent some 40 minutes uploading a video.
I don't need you spamming my inbox.
 
@Duga was this not a good question for migration? why was my flag declined @Duga?
I see, because the user did it himself it means my flag wasn't valid....
 
@Hosch250 Yep
 
I looked it up, it is the = operator.
Sorry for bugging you.
 
4:19 PM
There is no == in VBA, everything is just =
No worries
 
Why do you never use text?
You read the entire file into it, but you never use it AFAICT.
 
Ah. Forgot to clean up, good catch. Leftover from when I was trying to solve a different bug
 
Why don't you just write text to the new file - it is already all loaded up.
 
@Phrancis Isn't that the worst damn idea ever?
 
@RubberDuck I agree.
 
4:25 PM
"but it's easier for beginners to understand!"
 
@Mat'sMug No it isn't.
I'm a beginner in VBA, and it is confusing.
I already have programming experience, though, so...
 
I know.. there are so many things VB tries to think in your place...
you know what BASIC stands for?
 
@Hosch250 No it isn't is right.
 
BASIC?
Simple?
 
VB is Visual Basic
 
4:26 PM
Beginner something or other.
 
"Basic" is an acronym.
 
Beginners All-Purpose Something Instructional Code
 
Beginner's All-purpose Symbolic Instruction Code
 
Or some such nonsense.
 
it's Beginner's All.. ^^ that
VB does lots of things to "make beginners' life easier". Like Option Base 1
 
4:28 PM
Whatever that stands for.
 
it makes arrays 1-based by default.
 
What?
 
Option Base 1 would have been entirely unnecessary if collections weren't 1 based.
 
Please say that again.
(JK)
 
You heard right
 
4:28 PM
21 secs ago, by Mat's Mug
it makes arrays 1-based by default.
 
25 secs ago, by Mat's Mug
it makes arrays 1-based by default.
26 secs ago, by RubberDuck
Option Base 1 would have been entirely unnecessary if collections weren't 1 based.
 
36 secs ago, by Mat's Mug
it makes arrays 1-based by default.
 
lol
4
Instant triple-star!
 
Today is Thursday, all day, and Monking everyone
 
monking!
 
4:29 PM
Well, it can be Friday any damn time now.
 
I don't know whether to laugh or cry.
 
> BASIC (an acronym for Beginner's All-purpose Symbolic Instruction Code)
 
better laugh than cry
3
 
So VBA: Visual Beginner's All-purpose Symbolic Instruction Code for Applications...? lol
 
Rubberduck has an inspection for Option Base 1 that says "Potentially confusing implicit array base" or something like that.
@Phrancis ....yeah
 
4:31 PM
Turns out the "Beginner" part appears to be the most difficult one
 
The problem isn't finding beginners, the problem is keeping them as beginners.
5
 
@rolfl Not exactly. The problem is getting them past being beginners.
Ever look at the VBA tag on SO?
 
Why would I do that?
 
It contributes a good bit to my eternal bad mood.
Exactly.
 
@RubberDuck maybe we should shut off that ticker in the VBA chatroom then.. lol
 
4:34 PM
lol
I've thought about it, but it's pretty easy to ignore.
Say, serious programming question here though.
What is SQL's server's bool type?
 
CHAR(1)
 
Could have just googled it....
 
I'll make a copy of my sub and try to change the Array to a Collection and see if that works any better
 
@RubberDuck bit
 
@rolfl LOL.
 
4:35 PM
@Phrancis Why not just directly loop through the dir?
 
You can do that...?
 
Keep it simple.
@Phrancis You already do.
Do Until InputFileName = vbNullString
    ReDim Preserve FileArray(0 To i)
    FileArray(i) = InputFileName
    InputFileName = Dir$
    i = i + 1
Loop
Instead of looping once to put it into the array, and again to get it out. Just do it once.
 
@Phrancis I was not joking.....
 
@rolfl huh?
 
As far as I know, boolean types in SQL are not standard, CHAR(1) with, say, 'Y' or 'N' is.
 
4:37 PM
Y/N
 
CHAR(1) could be any char
 
what about bit then?
 
BIT is a real boolean
 
T/F
That stuff makes me shiver.
Because what happens when some jerk puts Q in there?
 
What about tinyint? 0/1 ?
 
4:38 PM
@Mat'sMug may be available in your RDBMS, but, is it part of SQL? Will it work on any RDBMS
 
I always use bit for Boolean stuff
SQL Server...
3 mins ago, by RubberDuck
What is SQL's server's bool type?
 
@SimonAndréForsberg good way to end up with a 42 somewhere
 
@Mat'sMug I'd rather have a 42 than a 'Q'
 
@RubberDuck $h!t hits the fan
 
4:40 PM
@RubberDuck So... Could I just move the IO stuff in that first loop and discard the array altogether?
 
OMG... why does ADODB have a bool type if SQL doesn't? msdn.microsoft.com/en-us/library/windows/desktop/…
@Phrancis yup
 
OMG, you better hurry up and post that answer on SO if you want an accept!
 
SQL standard 2011 defines a "Boolean" data type with values true and false: (page 14) jtc1sc32.org/doc/N2151-2200/…
 
@RubberDuck ADODB is a wrapper...
 
^^ about time? I think ducky is working with 2008 though?
 
4:42 PM
That's the SQL standard, not the SQLServer version
 
I'm sometimes surprised that people used integers instead of boolean types for that long.
 
Oh.
 
@Mat'sMug Apparently I read "SQL's Server" as "SQL's", and you read it as "SQL Server".
 
@Phrancis huh? Did I just fix it somehow?
 
oh wow
 
4:43 PM
If we're lucky, a future version of C will make #undef bool ill-formed.
 
Well, I still need to change it, but if this works I think you would deserve the credit. Up to you, if not I'll just selfie
 
0
Q: Python with Tkinter - Memory Word Game

coderproI have tried to make a memory game where words pop up on the screen and then one disappears. The user then has to guess which word disappeared. I was wondering whether someone could help me make this code efficient as I have tried but failed. import tkinter from tkinter import * import time impo...

 
IF @fresh = 1 --false is zero; true is 1
	BEGIN
		SET @commandFilePath = N'CyceItemActivity.cmd'
	END
ELSE
	SET @commandFilePath = N'Fresh.cmd'
whiskey tango foxtrot...
ugh
 
@RubberDuck But why is 0 false? :o
 
4:49 PM
66
Q: Why is 0 false?

MorwennThis question may sound dumb, but why does 0 evaluates to false and any other [integer] value to true is most of programming languages? String comparison Since the question seems a little bit too simple, I will explain myself a little bit more: first of all, it may seem evident to any programme...

 
Or, ya know. Because it's a bit.
 
That was a private joke with myself actually.
3
 
Can you review this code? — Orient 1 min ago
 
My only famous question on the network *-*
 
Oh! You asked that one!
 
4:52 PM
Well, yeah.
With the best intro ever: « This question may sound dumb [...] ».
 
@Morwenn Edit it with /s/dumb/smart/
 
evening
I just made probably the worst line in python history
 
monking!
@paul23 well... we're all curious now ;)
 
for dim,shape_i in list(enumerate(shape[::-1]))[::-1]: double negating sequence order?
(shape is just a tuple)
And I want to iterate over that tuple, but at the same time "dim" has to go from high to 0. (where high = len(shape)-1)
 
> Professor: double negatives make a positive. there is no language in which a double positive makes a negative.
Student: yeah, right.
2
 
5:02 PM
@Mat'sMug kind of old joke :P
 
IKR
 
I got a result of 74 out of 100 points today on a report of mine, with as explanation "This report looks really bad".
Gotta love detailed feedback
 
0
Q: Submitting callable tasks to a variable number of Threads in a ThreadPool

SklogWI am getting into multithreading and I was wondering if the code below is good practice or not. This is one of my first tries at multithreading. Is there a better way of getting the values from the Future<Integer> rather than saving them in a list and summing them up afterwards? // Counting th...

0
Q: Sequential thread execution to print 1A 2B 3C 4D

AlbinI have implemented two threads, one to print integers and other one to print English alphabets. The threads are supposed to work in tandem. I use a synchronized block and only one thread will hold the lock at a time. But somehow, the AtomicInteger is not working as expected. The changes to count...

 
@Jamal Yes, there is:
-1
Q: Lo Shu Magic Squares

thrwbck77Is there a way that would be more efficient to write this same code? The program runs and works the way I want it to, but there is a lot of code and I was wondering if there was a more efficient way I could have written it? def main(): square1 = [[8, 1, 6], [3, 5, 7], [4, 9, 2]] square2 ...

 
5:08 PM
I love the migration note: "This question came from our site for professional and enthusiast programmers." - "Now it is no longer at a site with professional or enthusiast"
 
Thanks!
 
Also, FYI, I tagged that with
 
Aren't those two the same (performance and optimization)?
2
 
They are, now.
 
When did that happen? That's good news.
 
5:09 PM
Better split would be "time-performance" vs "memory-performance"
As those actually need different algorithms
 
@rolfl it says , not - we have the right master tag?
 
has, for the longest time, had the tag wiki: DO NOT USE
2
 
-1
Q: i am getting SIGABRT error when submitting my code on spoj judge

aVIRAhe code below works fine both on my PC and ideone, but when I submit it to SPOJ, it returns runtime error(SIGABRT). What could be the possible reason for this?here is link to problem- http://www.spoj.com/problems/PALIN/ and i am getting correct answers as expected. //try to keep it short and sim...

 
Partially implemented. We now have performance, memory-optimization, and embedded. — 200_success ♦ 21 hours ago
 
why is 1/3rd of the post about "0X" or "0x" for hexadecimal numbers..
 
5:20 PM
@paul23 Because it's a legitimate concern, I think?
 
0
Q: Java helper function to round a number to the specified number of decimal places

DavidThe function I need: Rounds a double to the specified number of decimal places I figured this would be a part of java.lang.math, but inexplicably it doesn't have a round function that returns a double. Thus, my proposed solution is to add my own round function in a MathEx class. /** * Hol...

 
5:31 PM
I want to post a cuda code for review.
 
@JaDogg Then you should post it ;)
 
I might be able to help a bit with that (unless it's really complex).
 
I'm afraid we don't have many CUDA experts though
 
I'm not an expert on it as I've just taken one class that covered it.
 
0
Q: Onion Run Festival (or the unexpected anagram for Union of Intervals)

h.j.k.Original question: Union of intervals In the original code, the Interval model class implements Comparable so that an input of List<Interval> objects can and must be sorted first for the logic to apply. I have decided to stick with the same approach, but applied a stream reduction operation to g...

 
5:39 PM
@Jamal It's pretty simple.
It just convert a bmp to grayscale
only calculation it does is R+G+B/3
 
I can take a look at it, then.
 
Should I ping you when I do so ?
 
Heh for a friend's master thesis he got some very interesting problem that should be solvable by the graphical card (that's what cuda does right)?
 
@paul23 It let you run about 100 million threads(software level)
 
@JaDogg I can just check the front page.
 
5:43 PM
K
 
He's writing a system for a swarm of robots that need to 'path find' themself. This is then done by making a continous "collision" height map (goal is very low, collisions are very high). Then through advanced mathematics he can reduce the map so that all local minima become sadle points in 2d.
and then he can just solve it numerically/generic..
But solving the whole height map, and reducing it so that the minimums are done can be done on a cell-by-cell, so the map doesn't have to check other cells and it could be done in parallel
 
[OverrideAuthentication]
[HostAuthentication(DefaultAuthenticationTypes.ExternalCookie)]
[AllowAnonymous]
[HttpGet]
[Route("externallogin")]
[ResponseType(typeof(void))]
public async Task<IHttpActionResult> GetExternalLogin(string provider, string error = null)
Need. More. Attributes.
 
@paul23 hmm, nice
 
Note: he's doing a thesis purely on the mathematical correctness of it. And the mechanical engineering applications.. Not on computer science (he's a mechanical engineer in system and control)
So I never really done anything with cudo
 
cuda
not cudo
0
Q: Convert a 24bit Bitmap to GrayScale

JaDoggI wrote this so I can learn Cuda, This is coded to work on my laptop's Nvidia GeForce GT 540M. Main points I need reviewed: Cuda programming conventions. Performance, Any way to improve kernel speed is appreciated. C programming conventions. Pre Processor and Macro conventions. It's not DRY,...

 
6:04 PM
If your code is working, this question is more appropriate at codereview.stackexchange.com (after you paste the code in the question) — Uri Agassi 1 min ago
I'm voting to close this question as off-topic because it should be posted on codereview.stackexchange.com (given that the code actually works) — Uri Agassi 52 secs ago
 
@Duga @SimonAndréForsberg
 
@Mat'sMug forget the help vampire. For your own sanity.
 
0
Q: Convert a 24bit Bitmap to GrayScale

JaDoggI wrote this so I can learn Cuda, This is coded to work on my laptop's Nvidia GeForce GT 540M. Main points I need reviewed: Cuda programming conventions. Performance, Any way to improve kernel speed is appreciated. C programming conventions. Pre Processor and Macro conventions. It's not DRY,...

 
Is 6GB/s fast enough ? considering it's running in a laptop
 
@RubberDuck I feel like giving him a link to that blog post...
 
6:15 PM
@Mat'sMug which one?
 
and/or kick-ban the poor guy
 
Maybe we should point him to the What's a MCVE blog?
 
@Jamal /ignore
 
oh now I'm left wondering: shall I make list-of-lists rectangular and THEN insert them into an ndarray (numpy). Or shall I insert them directly and catch the errors that pop up?
 
@JaDogg I'll take a look at it later, unless someone gets to it first.
 
6:23 PM
Haha ok.
 
@JeroenVannevel Maybe you can add in a few more
 
@skiwi suggestions?
 
@JeroenVannevel [No]
 
6:39 PM
[Obsolete]
public User GetSkiwi() {}
 
@nhgrif Nice title. Will read in a bit.
 
I'll read it in a bit, but that'll actually be a byte
 
@JeroenVannevel Noooo
 
0
Q: Tidying up code using for loops

Aashir KhanUsing Netbeans to program java code, I completed a tutorial on how to create a matching game in Java which my teacher requested me to carry out. After successfully completing the tutorial and getting a working program, I was told to make some modifications to the program. The modifications are: ...

 
@CaptainObvious 1 Word: Data Structures
 
6:54 PM
0
Q: Solution to UPenn Homework 3: Improvements for code style, criticisms, efficiency

hasnoobI've started learning Haskell by following along the CIS 194 Course from UPenn. In the first lessons there is talk about wholemeal programming and certain ways idiomatic Haskell code looks like. Now, I think that my style is still far away from being idiomatic and I don't think I've grasped what ...

 
almost 20k views on my Programmers question; 93rd most voted question on Programmers!
I'm going for 1st
 
@JeroenVannevel running for president?
 
I do deserve it!
 
A president that can program... the horror
 
in VBA, 18 mins ago, by It's been a pleasure
just wanted to say thanks for the happy days and wish you luck in the future
@all That's @vba4all ^^
 
7:06 PM
:'(
 
lol my was removed
 
°/ evening @all :)
 
yellow
 
red
 
@nhgrif nice blog introduction, I was not aware that a bool took the entire byte :/ good to know
is this the case for all major programming languages?
 
7:16 PM
yes
 
@DJanssens I think so
Usin ga single bit for a bool would cause alignment issues
Packing multiple ones together doesn't cause those issues, as you are still operating on chunks of data, bytes for example
 
Why wouldn't they incorporate a system like bit-masking under the hood.
 
How do you mean?
 
a compiler should be capable to have some traceability between a bool and it's memory location
can't be that hard to store multiple bools in a byte then?
 
I'm not sure if it's worth the hassle, as you generally don't want to reorder code and add a new risk factor
A single boolean taking a byte isn't an issue, it only becomes an issue when dealing with multiples
 
7:19 PM
@DJanssens SQL Server does that (with the bit type)
 
When you knowingly deal with multiples then you can use bit masks
And most programming languages offer higher-level support for storing multiple bits
 
To be honest I never went deep into bit-operations :p
I did however always expected a bool taking only 1 bit, so good that I read the blog :D
 
0
Q: Regex to search and replace text in a large file

ChinmayI am searching for a multiline pattern in a huge file and if found need to replace the contents. I want to accomplish this in a memory efficient way. My current implementation reads text from file in chunks and applies regex search/replace on them. Note that am storing the output in a StringBuffe...

 
@Mat'sMug cool, didn't know. I guess in the case of databases, saving space is even more important
 
Can I get a link to the blog
 
7:21 PM
In Java there's a way, but I can't remember the class name right now and my Google skills are letting me down
@DJanssens You don't need to do it yourself, the provided class will handle it
Aaah
BitSet
 
I believe it uses a long[] underneath in Java
 
Does any of you use some kind of RSS reader app on their android device? I want to keep getting updates from the blog, but tbh never used RSS before
 
usually it's down to grabbing the feed URL and pasting it into the reader ..and then waiting
 
I guessed so, but any advice on a good reader :D Or is RSS a bit prehistoric nowadays?
 
7:27 PM
I'll go with B)
although it's useful or getting oneboxing WordPress updates into your SE chatroom :)
 
it's named 'B)', google ain't helping me :/
 
A) any advice on a good reader
B) is RSS a bit prehistoric nowadays
lol
 
I use feeder.co
 
wow @Mat'sMug that brought quite some confusion over here ;)
 
@nhgrif nice blog
 
7:33 PM
Is it just me then that the last paragraph seems cut off?
If you're .... what?
 
that's the puzzle!
 
@JeroenVannevel I don't like feeders... they make it so hard to win...
 
1
Q: Evaluating an expression with integers, +, and *, as well as -, / - revision 3

Maksim DmitrievThe original question came from this web site. Revision 1 Revision 2 And this is the third revision. I delete spaces and validate an equation before computing. public class Main { private static final String EQUATION_REGEX = "^-?\\d+((\\/|\\*|\\+|-)\\d+)*$"; // http://www.careercup....

 
Or too easy so it isn't even a challenge anymore... but I admit that's more fun :)
 
@LFHernandez You should edit your question to ask that then. Otherwise it won't be clear to any potential answerers. Right now It looks as though you just want a code review and can risk flagging. — Jake 1 min ago
 
7:47 PM
' DO NOT CHANGE ANYTHING BELOW THIS LINE is usually better written as ' HERE BE DRAGONS ;) — Mat's Mug 1 min ago
 
2
Q: Text files: Copy, Rename, Append/Merge together

PhrancisI wrote 3 subroutines related to batch data processing, they will be used together. A bit of background, I wrote this for my admin colleagues who do not write code. An application dumps daily .ack files onto a shared drive which contain data processing messages (success, errors, etc.). I wrote ...

 
Feeling good cause someone forked my repo
5
 
nice!
'grats!
 

« first day (691 days earlier)      last day (3332 days later) »