« first day (856 days earlier)      last day (3154 days later) » 

1:02 PM
S'up! I posted a follow up question.
0
Q: Better Floating Point equality in Java

ambigram_makerThis is a follow up post for this question. There aren't a lot of changes. The changes (all of them major) are: I've decided to ditch my previous approach using Math.ulp() and adopt Tim Leek's suggestion: comparing ratios. In my updated code, I calculate both ratios and ensure that their diffe...

Take a look.
 
-1
Q: Public/private method locations in C#

eurotrashI seem to have read that, when structuring a class, public methods should be at the top (the top of wherever you start writing the methods) so they're immediately visible, and private methods below. So that's what I've been doing. Equally, methods should read top down, e.g. private methods you c...

1
Q: Better Floating Point equality in Java

ambigram_makerThis is a follow up post for this question. There aren't a lot of changes. The changes (all of them major) are: I've decided to ditch my previous approach using Math.ulp() and adopt Tim Leek's suggestion: comparing ratios. In my updated code, I calculate both ratios and ensure that their diffe...

 
Well, your question looks good
 
Zak
Chat's slowed right down. I guess because lunchtime?
 
Well, its 6:40 pm in India. :-)
 
1:10 PM
2:10pm UTC here
 
It's also Labor Day here in the states.
 
Zak
ah, that would explain it
 
Monking all
 
Zak
@RubberDuck I've solved the speed problem for my file-matching
 
Greetings dude
 
1:22 PM
Nice @Zak!
 
@CaptainObvious Closed
 
Zak
@RubberDuck went from 70 minutes to <1 second :)
2
@RubberDuck Also, you can probably expect some more VBA upvotes this evening :)
 
@Zak Are you saying you managed a > 420,000% speed increase?
 
Eh. Thanks, but I never expect upvotes. I don't do it for the rep. I do it because most VBA code written is an awful terrible mess and I want to help any VBA dev out there who takes it seriously enough to want a review to make their code better.
 
Zak
@SuperBiasedMan Yes, yes I am
@SuperBiasedMan admittedly, not for the whole macro
@SuperBiasedMan but for one of 2 major parts of it.
 
1:31 PM
70 minutes to 1 second is pretty damn good.
I've never had to deal with stuff on that scale.
And all the slow stuff I do involves bottlenecks because of other systems anyway.
 
Zak
And I managed it with a collection of all things :)
 
So, @SimonForsberg (or @200_success if he happens to be lurking), is there a particular reason for how your answers have split up the printing of characters per line?
 
Zak
Though from what I understand, a Dictionary may have offered a similar magnitude of change.
 
Why does H and e have their own line in 200's answer and are llo together. I'd say H and e could've shared a line as well.
Simon does it in a slightly different style, but similar.
 
Zak
It literally takes longer to save this workbook than to match 200,000 filenames against a different list of 1,000,000 names.
 
1:38 PM
@Mast I have made a new line whenever I switch cell, I believe
 
@SimonForsberg Yes. I assume there's some unwritten rule saying that's idiomatic while printing?
 
Zak
 
@Mast not that I know of. Some prefer to do one print per line.
 
Zak
15 seconds to prep, 1 second to execute
 
Ah, you did it everywhere and 200 did it as well, except he put all the shifts in his loop at the right side and all shifts when printing on the left side.
But it's good practice to split every time you shift, I see.
 
Zak
1:44 PM
Alright, time to test opening these 50,000 files :)
It is as I feared. Simply opening and closing all these matching files is a huge bottleneck.
 
@Zak Do you need to open the same file multiple times?
 
Zak
@Mast oh no, that I could deal with.
I have several million corporate tax filings. And a list of 1 million targeted companies. I need to open up every filing that matches a company in my list, determine Cash, Assets and Profits and, if they meet set filtering criteria, copy the details back to the main workbook.
I can match between the lists in seconds
opening the files and determining values: not so much.
And I have no idea how to parse XML files
 
Would parsing solve the file opening problem?
 
Zak
it would almost certainly be an order of magnitude faster
 
Seems worth it.
Would it be a small re-write (assuming by the time you start you know what you're doing) or would it mean major rework?
 
Zak
1:55 PM
The only thing is. In its current state. I could probably filter all these files in a week at current speed.
Whereas I have no idea how long it would take me to figure out how to parse XML properly
 
@Zak Less.
 
Zak
Very well, I shall figure it out :)
 
0
Q: Beautiful Soup Open all the URL with pid in it

Dhrubo NaskarI am trying to open all the links through pid in it but there two situations: Where it opens all the url ( I mean even the junk urls) def get_links(self): links = [] host = urlparse( self.url ).hostname scheme = urlparse( self.url ).scheme domain_link = scheme+...

 
42
Q: How to parse XML using vba

Devdatta TengsheI work in VBA, and want to parse a string eg <PointN xsi:type='typens:PointN' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema'> <X>24.365</X> <Y>78.63</Y> </PointN> and get the X & Y values into two separate integer variables. I'm a...

 
Zak
Bookmarked. I'll take a look tomorrow when my brain isn't burnt out
I've been awake for about 24 hours now
 
2:10 PM
@CaptainObvious Not yet working.
 
1
Q: Create composition instead of inheritance

Anatoly[DataContract(Name = "jobDateTimeFilterRequest", Namespace = Constants.ManagementNamespace)] public class JobDateTimeFilterRequest : TimeFrame { [DataMember(Name = "jobType")] public BackgroundJobType JobType { get; set; } } [DataContract(Name = "timeFrame", Namespace = Constants.Managem...

 
New guy wrote an answer which IMHO isn't an answer. Anyone want to jump on it, trying to save him?
0
A: Parsing PHP-style nested query string parameters

CHiPJamal! It's awesome, I modified your code for more. (I'm using this/my code with Tomcat.) private static final Pattern PATTERN = Pattern.compile("([^\\[\\]\\.]+)"); public static DataMap parseParameters(Map<String, String[]> pairs) { final DataMap result = new DataMap(); if (pairs == nu...

No? Was I wrong or is everybody having late lunch ^^
 
2:27 PM
Not an answer because of no explanation?
 
It might be worth a downvote but not worth a not-an-answer flag.
Also, any Americans having lunch are having a quite early one...
But more importantly, today is a holiday.
 
I know, I'm not too surprised at the low amount of activity at the moment.
 
Monking!
 
Monking @Mat'sMug
 
Zak
hey
 
2:38 PM
I think I'm hitting 40k today :-)
2
 
Zak
grats
 
I see they finally awarded you Socratic last night (CET)
 
Monkinh
 
Yup, at 10pm (local) - looks like it runs at the same time as tag score recalc
 
Monking
 
2:43 PM
1
Q: Creating number pattern (triangle numbers) in c++ with minimum loops

Tim KrulWe were asked to make a triangular no. pattern in c++ with min. loops. The triangle pattern is as follows: ____1_____ ___2__3____ __4__5__6__ 7__8__9__10 My code: #include <iostream> using namespace std; int main() { int n=0, r=0, i=0; cout << "No. of rows: "; cin >> r; for(...

0
Q: Kernel density regression in julia

VincentHere is a naive implementation of a kernel density regression algorithm in julia. The code works, there is quite a bit of room for improvement though. First, there is not a optimal bandwidth selection implemented and second, it's really slow. Nevertheless it took me a while to implement and I a...

 
If the code currently works (even if too slow) ask codereview.stackexhange.com — Trengot 13 secs ago
 
BOO YA, site-analytics is LIVE!
 
@Duga. I think someone gets it.
 
From the page on that privilege: "Since this is a restricted privilege, we'd prefer you not share the raw data."
Does anyone know Is that just to keep it as a useful privilege or are there practical reasons to keep the data from being too public?
 
2:51 PM
it's google analytics stuff... have you seen the screenshots?
 
There was a MSE about it a while back.
At first I thought it was the same like the stats page from tools, but it's site referral data instead of in-site stats
@SuperBiasedMan The data you may be looking for is here:
 
No I can't see because I'm still low rep. Got another 3k+ before they'll let me open those links.
 
@Mast I've never heard of this "tools" page.
 
@SirPython then you should check it out
it's a very nice helper when you want to do site-moderation tasks
gets you an overview of strange questions and answers, as well as deleted, closed and migrated posts
additionally there is a cool overview for suggested edits
 
@Vogel612 It should have a button in the top bar.
 
2:56 PM
make that a feature-request...
I also want a more convenient way to access post timelines.
then again most of this is "poweruser" stuff
 
@Vogel612 That will probably be the response when I make it a feature request.
 
2
Q: Python for loop to map conversation

user1806417I have a method in Python that is extremely slow: def patternRecognition(self): patRecStartTime = time.time() plotPatAr = [] patFound = 0 for eachPattern in self.patternAr: sim1 = 100.00 - abs(self.percentChange(eachPattern[0], self.patForRec[0])) if sim1 > 50:...

 
@CaptainObvious Good question from a new user, code follows anti-pattern.
 
40k!
6
Thanks Santa!
 
Congrats at 40k @Mat'sMug !
6
 
3:10 PM
Is it just me or are my questions damn good at becoming zombies?
I though my question was simple, but there's no answer after 17 hours...
 
@Vogel612 17 hours is a fairly youg zombie though
 
true, but it's ages for an allegedly simple zombie
 
I think that the answers I got are rather hurried and need more organisation. (It seems they didn't get the idea that I'm trying to build a library).
0
A: Better Floating Point equality in Java

toto2Two minor points: It's confusing that you keep the same name for areEqual(double...) and areEqual(double, double). It's not clear which method is actually called if you pass two doubles. I guess it is the former, but I would have to check in the Java specification. It's probably simpler if y...

 
@ambigram_maker then comment on the answer maybe?
 
I did
 
3:15 PM
Morning
 
@Vogel612 Not tags I want to touch:
 
I didn't expect you to answer anyways :D
 
If you ever write a Python zombie we'll talk.
4
 
hmm. may happen sooner than you think
 
Talking about Python zombies, I still got one in the pipeline...
 
3:17 PM
The 3rd point of this answer ;P let me miss seriousness. C'mon, I think developers like a bit of humour. Am I right?
 
How the heck did that get starred, did I accidentally make a pun or something?
@ambigram_maker If I found enough of such, I'd edit it out.
It's considered non-SE compliant fluff.
143
Q: Should I remove 'fluff' when editing questions?

CeciliaWhen I edit questions I typically focus on style, grammar, and spelling. However, in the process I often also remove 'fluff' like: This may be simple but, ... or Can you help me with this? I do so when I think it will make the question more direct and readable, but I also wonder if pr...

 
@Mast bananas. code is not subject to fluff-removal
 
@Vogel612 Is it code? It's a smiley.
 
in a comment. SE guidelines don't interfere with my comments, will they?
 
@Mast I put it in my code (in the question) and the answerer objects.
 
3:21 PM
Ah, there's a ;) in the OP's comments.
Meh, that's perfecly allright.
I misconstrued it as the answerers attempt at a joke I missed.
 
You don't think its out of context, do you?
 
@ambigram_maker The answerer is entitled to object at pretty much anything.
 
Aug 5 at 19:50, by Mast
@IsmaelMiguel Code Review is not about what you need. It's about what you get.
You will not choose what portions they can and can't critique. You'll post code and they'll say what they think about it.
Sometimes, we even review comments.
 
got it
 
3:25 PM
56
A: Derpifying Images

nhgrifThis script is a total of 99 lines. Of that, 49 lines are insulting, annoying, and ironic self-congratulating comments. In general, comments are good. They help any future maintainer (including yourself when it's been 6 months since the last time you looked at the script) to understand what ...

 
Whoah!
Do I sound insulting like that?
 
No, just stating the most extreme case of commenting review I could think of.
Just remember people will read your comments. Think about what you want them to see there and write that.
 
If this is working code that you think could be improved, consider asking on codereview.stackexchange.com instead. — jonrsharpe 45 secs ago
 
Comments should have a purpose. If they fulfil their purpose, it's a good comment. If they don't, it's a bad comment. How they do that is mostly up to you.
And some say there shouldn't be much comments at all (except JavaDoc and the likes)
After you've made it self documenting, there is not much need for comments.
Unless you write some crazy language like , which can't be self documenting
 
I think my code is like that
(readable)
You should take a look for yourself.
 
3:35 PM
@Mast hence, uncommented BF can't be good code ;-)
Assuming good code == readable code
@Santa just FYI, I'm 8 points short of 200 today :-)
 
@Mat'sMug In that case, can Lisp code be good code?
 
@Mat'sMug Done. Enjoy. ;-)
 
@Santa - I am just 190 points short of 200 today ;-). .... ;-)
5
@Mat'sMug - came here to report a mini-situation requiring some moderation monitoring:
 
What's up?
 
But the OP answerer has self-deleted, so no more problem.
 
Zak
3:39 PM
Such a productive afternoon...
 
Add an exclamation mark to the beginning of any images you want to post where the URL does not end in .jpg, png, or .gif.
Sorry, not add, but prepend.
 
@rolfl thanks for the rollback
 
> You've earned the "access to site analytics" privilege! Learn more about it in the help center.
 
The new 30k priv I guess?
 
yup, at 5K for beta.
 
3:43 PM
> "My code is compiling"
4
 
See new feature at 5K rep: Site analytics
14
 
@rolfl Don't your posts auto-generate reputation by now? You got quite a few around.
 
It was a joke, (though true).
 
3:46 PM
As it happens, though, no.
It's funny how my instincts are always to find patterns in the data.....
Seems the analytics are incremented in approximate intervals of 205.5 units/visits.
So, 206, 411, 617, 822, (1028), 1234, 1439, 1645, ....
 
@EthanBierlein I'd love to see the stats on my 2 questions which hit HNQ, but I 'll need to write more questions hitting HNQ to have the required rep :-)
 
@Mast Since I stopped visitng the site as often as I used to, no, I don't get as much attention to my posts.....
 
@Mast I'm not sure if the site analytics can do that... But I'll see.
 
@EthanBierlein If not, make it a feature request.
 
Heh funny, I have just 5K rep
 
3:51 PM
Posts get tweeted. Let them at least pull some stats from that.
@rolfl Ah well, you'll probably hit 100k network wide before the end of the year one way or another.
 
Look, I am no longer in the game for 'the rep'. The rep is great, but I am more in it for the help I can give people.
It irritates me a bit when I put a lot of work in to an answer, and get nothing, but that's life.
 
You're not here for the imaginary internet numbers?
 
0
A: Find largest block in matrix

rolflThere is a neat trick in many computer algorithms called memoization - the remembering of critical aspects of one computation, to reuse them in another. Memoization can help a lot in this problem. To explain this, consider the basic algorithm you have... start at the top-left of the matrix scan...

That ^^^ frustrates me.... but, meh, whatever.
It's also proof that I don't just "get rep".
That answer probably improves the performance by 10X or more....
but was probably also too complicated?
 
@rolfl That's difficult, not under/over-estimating the OP
And I guess it comes natural to no longer care about the rep once you hit a certain threshold.
 
I also find it's easy to just start an answer expecting to be quite brief and then spend a long time on it, only after realising it's super long because of all the stuff you've found on the way.
4
 
4:00 PM
Things are relative. There was a time I was keen to be at position #1 on the rep table. That time has gone, and with it, I can focus more on the things that interest me ;-)
 
@SuperBiasedMan If they're decently structured they usually make for good answers.
 
@horchler My code does work without error, it is simply slow. I shall delete and re-post this question on the Code Review board instead of SO. — AnnaSchumann 40 secs ago
 
Last time I checked my reputation tab on my profile was more than 2K reputation ago.
I don't follow it very carefully at all.
 
@Mast For sure, but they can still look pretty daunting
 
@Heslacher I undeleted and edited it.
 
4:06 PM
@Hosch250 answer given
 
@Heslacher Answer received. Thanks.
Hey, I deleted those methods.
 
Didn't check it ;-) will update
updated
 
@Heslacher That is status-by-design.
 
So if it is either null or has Arguments it should not do anything ????
 
We are checking for attributes like [Obsolete()] or [Flags()] and removing the empty () set because it isn't required.
@Heslacher Exactly.
 
4:12 PM
Monking
 
@ARedHerring Monking.
 
So, I had someone contact me today to ask if I'd do some javascript stuff for ~$500. few days work, I could use the cash, np. He gives me a TS url.
I hop on their TS
<16:49:55> Our Super Bad Ass Viking Gang Hangout
<16:49:55> Connected to Server: "Super Viking Gang"
good start.
 
So basically, I want it to not be null (the () must be there), and it must be empty.
@ARedHerring Interesting.
 
sorry I just don't get it.
 
> <span data-bind="text: new Date(new Date(TimeByDay).setDate(new Date(TimeByDay).getDate() + 1))"></span>
italian food around!
 
4:14 PM
@Quill ew, logic in HTML
 
2
Q: Adding 1 to JavaScript Date while binding using knockoutjs

Jesper Lund StocholmI am using knockoutjs to bind some values in an array. For each entry in the array I have a date value TimeByDay that I bind like this: <span data-bind="foreach: entries"> <span data-bind="text: new Date(TimeByDay)"></span> </span> But I would also like to transform the date on a different l...

yeah
 
@Heslacher Basically, we are turning this code:
    [Obsolete()]
    void Method(string input)
    {
    }
 
I've never used knockout but I'm sure there has to be an easier way to do that.
 
Into this:
    [Obsolete]
    void Method(string input)
    {
    }
 
Isn't the ()... obsolete...? giggle
 
4:16 PM
@ARedHerring Only if is an empty, existing list.
So, I can provide arguments like this:
 
@ARedHerring the new Date thing is normal JavaScript, so you could probably assign them ids and do it in a script
 
What in your example is attributeExpression.ArgumentList.Arguments.Any() reffering to ?
 
    [Obsolete("Hi, I'm Obsolete", true)]
    void Method(string input)
    {
    }
2
 
ok
 
@Quill I know, Just no clue how Knockout functions WRT model binding. Let's continue this discussion in Javascript libraries
 
4:17 PM
And in that case, I can't remove the argument list because it isn't empty.
 
I just realized I'm still relatively fresh here
 
for some values of fresh...
5
 
0
Q: C++ (foreign) thread pool

Thomas SparberI created a class which is some Kind of thread pool. The difference is that it hold foreign threads. This means that the threads are created somewhere else and are then hold by calling holdThread. Then another thread can call executeOne ord executeAll to execute a specific function. At the end th...

0
Q: Can this code be more Pythonic?

Lance DaceyI am reading a bunch of daily files and using glob to concatenate them all together into separate dataframes.I eventually join them together and basically create a single large file which I use to connect to a dashboard. I am not too familiar with Python but I used pandas and sklearn often. As ...

0
Q: Simple stream cipher encryption/decryption function

ZenohmWhen I was still programming regularly on a TI-84 (Plus Silver Edition) I became interested in cryptography for reasons of curiosity. Long story short, I used and improved one of the encryption functions displayed on the TI-Basic wikidot cryptography page and then ported the code over to Python ...

 
Woah, slow down Captain...
 
4:32 PM
@Quill There aren't much sites I got Yearling on.
 
This is interesting. Check out the votes vs traffic during winterbash last year. codereview.stackexchange.com/site-analytics
 
Using the two-part convention, which binding was missing? Also note, that with the two-part convention, you would have bound every IExport twice. For the the first convention you should have excluded all IExports. I'd suggest you create a new question in regards on how to form the question. Maybe another SE platform like codereview or programmers would be better. Suggestion: Why not have a convention for all types ending in Service, and specifically bind all the rest? Furthermore, if there's more specific bindings they can be put into NinjectModules in the specific assemblies. — BatteryBackupUnit 10 secs ago
 
@Mast I only have it on SO
 
I just got Steward (it hasn't shown up yet).
 
Got it twice on SO
Yearling
 
@Hosch250 Nice work!
 
Now @Mat'sMug needs to get 100 Nice Answers.
And 30 Enlightened.
 
4:56 PM
Wow, and we thought we got trash.
Programmers is terrible.
 
SO is worst
 
I'm out of flags on Programmers already.
 
http://www.commitstrip.com/en/2015/09/07/when-i-forget-to-turn-off-debug-mode/
CommitStrip - Blog relating the daily life of web agencies developers
When I forget to turn off debug mode
CommitStrip
1441644730
3
 
0
Q: Is it possible to have FixedUpdate execute once every n frames?

Ethan BierleinI'm currently building a small game, and I've created this simple character controller using FixedUpdate, which executes every frame. using UnityEngine; public class PlayerMovement : MonoBehaviour { /// <summary> /// Check for a key press, and if that key is pressed, /// move in a s...

 
the first thing that comes to mind is a static counter variable inside the function
 
5:05 PM
Hmm.
That's actually not a bad idea.
 
There's probably a way that's more suited to Unity's style, though
 
Other than the fact that your password will be stored in plaintext in the config file, it looks ok for a basic login. In the future, I would recommend posting code review-type questions like this in Code Review. — Brian KH 18 secs ago
 
@EthanBierlein Why do you want to do that?
@Quill Probably
 
@Mast My player moves too fast with a movement increment of 1, but I can't change it because it would break other things.
 
@EthanBierlein Coupling that to frames would likely introduce other flaws.
 
5:19 PM
hey
privileges got upped?
 
No, but there's a new one in town
 
any info on that? :D 5k -> site analytics
8
Q: Can mod analytics use the nice new UI used in /site-analytics?

fredleySo site analytics is live, and it looks awesome! It looks all the more awesome compared to the mod-dashboard analytics. Can the mod analytics page get some love and be updated to use the new design/layout?

ah-ha
 
Apparently Google crawls the site more often, but Bing refers more people here.
Unless I'm reading the data wrong.
 
I really need to get more sleep:
0
A: Is it possible to have FixedUpdate execute once every n frames?

Ethan BierleinWell, it seems like this was an easy solution. Thanks to a suggestion by @Quill, I added this to the top of my class: public int timeStepIncrement = 1; public int timeStepDivisor = 5; private int timeStepCounter; I then changed FixedUpdate to look something like this: public void FixedUpdate(...

That was too easy of a solution.
 
@EthanBierlein Usually helps when stuck.
 
5:26 PM
@CommitStrip LOL!
 
81
Q: Help us identify micro-privileges for top users

Jon EricsonAre you familiar with tapas? These are little appetizers invented in Spain that people enjoy while talking and drinking in the cool of the evening. What makes them so great is that you get a wide variety of tastes without getting fed up. Not long ago, I asked for suggestions of a new 30k...

 
@Mat'sMug You didn't ever do that, did you?
 
1
Q: Sieve32Fast - A very fast, memory efficient, multi-threaded Sieve of Eratosthenes

Rick DavinThe classical solutions for the Sieve of Eratosthenes fall into 2 camps: one uses a bool[], which is fast but very memory bloated; the other uses a BitArray, which is more sluggish but uses far less memory. Refusing to accept that those are the only 2 possibilities, I’ve created a multi-threaded...

 
5:46 PM
Is it a good idea to add strictfp to my class. Or will it create more problems than solving them?
5
Q: Better Floating Point equality in Java

ambigram_makerThis is a follow up post for this question. There aren't a lot of changes. The changes (all of them major) are: I've decided to ditch my previous approach using Math.ulp() and adopt Tim Leek's suggestion: comparing ratios. In my updated code, I calculate both ratios and ensure that their diffe...

 
5:57 PM
Its been quiet for ages....
 

« first day (856 days earlier)      last day (3154 days later) »