« first day (1136 days earlier)      last day (2881 days later) » 

6:03 PM
0
Q: Primitive Extensions - Replaces static primitive methods

Michael Brandon MorrisI got annoyed having to do things like string.IsNullOrEmpty(myString) when it seemed as if myString.IsNullOrEmpty() would perfectly suffice. Therefore, I wrote a small, simple library to wrap the static methods of primitives in extension methods. I don't suppose there is much to critique about t...

 
lol, SSMS lets you rename databases as emoji
now I can start my scripts with use [💩]
9
 
@DanLyons Is that poop?
 
hahahaaha totally
 
@N3buchadnezzar Chocolate ice cream is the politically correct term.
 
the official name on unicode.org is "pile of poo"
 
6:07 PM
I feel like that euphemism might have some unfortunate unintended consequences for childhood dietary habits among those too young to grok "politically correct"
 
@MichaelBrandonMorris I have been fooled before, you can not fool me again!
 
@N3buchadnezzar The description of Project Euler problem 134 says "Find ∑ S for every pair of consecutive primes..." (my emphasis) but your code finds ∑ S for every pair of twin primes.
The example at the beginning is "Consider the consecutive primes p1 = 19 and p2 = 23". This should make it clear what is meant (19 and 23 are consecutive primes but not twin primes).
 
@GarethRees DOH
Where is the cup of shame I can hide in?
 
@Mat'sMug TIL
 
lol
 
6:22 PM
http://www.commitstrip.com/en/2016/06/13/the-end-of-an-expensive-era/
CommitStrip
The end of an expensive era
CommitStrip
1465841605
 
@CommitStrip 10/10
 
@CommitStrip Mwuahaha
Screw licensing corporations.
 
0
Q: Random iteration over an array using divide and conquer

DexterI have created a utility class which allows random iteration over an array. The idea is pretty much a divide and conquer approach. public static final class RandomIterator<T> implements Iterator<T> { //recursion stack private final LinkedList<int[]> offsets = new LinkedList<>(); pr...

 
Questions about improving working code should rather go to SE Code Review, — πάντα ῥεῖ 42 secs ago
 
Still wrong i give up life
 
6:25 PM
Woah, there's a commmitstrip bot? haha.
 
feed :)
 
OK, I think it's better to ask it in codereview. Thanks anyway. — Abolfazl 22 secs ago
 
While at it
I host both cloudflare and non-cf websites on same host
lets encrypt tries to get SSL for all, but can't get for CF ones so fails.
What can I do?
(thinking of it- I might move the apache configs of CF ones for a short while)
 
that could be a valid question on WebMasters.SE ...I think.
 
6:32 PM
@Mat'sMug will ask soon, thanks
 
@Legato Although I might be wrong, that should be the fastest solution
 
@ardaozkal make sure you check their "help/on-topic" page first, there might be another site that's better for that question
 
@ardaozkal Figure out why that one fails. What makes that one stand out.
 
@Mat'sMug yeah
I always do that
 
0
Q: Implementing the Barabási–Albert model

AbolfazlI am writing a code for Barabási–Albert(BA) model with specific node and edges. The algorithm is almost like [1] as follows: 1.Add m<N nodes to G. 2.Connect nodes in G randomly until you get a connected graph. 3.Create a new node i. 4.Pick a node j uniformly at random from the graph G. S...

 
6:37 PM
I kinda see what causes it
 
@CaptainObvious I've seen that question on SO.
Looks like he removed it there though, can't find it anymore.
 
6:54 PM
So my culture interview is wednesday 7.30pm :)
 
0
Q: Validation extensions

t3chb0tI've been working on another timesaver because I really really don't like to type all those validation ifs and exceptions over an over again. What I came up with this time is a set of validation extensions that make use of expression trees even if very simple ones. There are three classes. Th...

0
Q: Correct syntax for writing php array with a long html value in it?

yahargaHow would I properly indent this code in PHP (I'm using WordPress)? I'm mostly concerned about how the <button> comes into this equation @ items_wrap. <?php if (has_nav_menu('primary_navigation')) : wp_nav_menu( array( 'theme_location' => 'primary_navigation', 'container' ...

 
@CommitStrip does letsencrypt include subdomains?
i gave it a [very] brief look earlier, not quite sure how it works, but free https certs sounds like a good ide ato me
 
> Used to be, SEDE would always only link to the query for the site you actually last ran it on in history. That was often useful, but there was also a fair use case for just running it on the currently selected site, since usually that's what you'd end up doing anyway.

Recently, SEDE seems to have switched over to favor only the latter case. I'd like to go back to the earlier behavior, or, if possible, add an additional link (parenthesized or otherwise deemphasized?) with the original site.
 
@Duga Wait... what?
 
@Duga That's not a bad idea.
 
7:03 PM
Duga reporting GH to here?
 
@DanPantry Hooky hooky
 
@Mast do the hooky cokey and you turn around
You put your api key in,
Your api key out:
In, out, in, out.
You shake it all about.
You do the hooky cokey,
And you `git fetch` around.
That's what it's all about!
 
For music recommendations I'll have to refer you to Off the record.
 
0
Q: Algorithm to draw the shortest path in grid

NikolaTECHI want to find the shortest path between two points in the grid, and than mark the path with '+' sign. I found the shortest path using BFS algorithm, but now I'm not sure how can I mark it using better algorithm. So, this is an example: 5 5 1.... .#.#. .##2. .#... ..... should be marked as: ...

 
@DanLyons Why would anyone, ever, want to rename his DB to an emoji?
That's a maintainability nightmare.
 
7:08 PM
Rust is still interesting... even types can go out of scope
 
Wow, Octave is actually quite nice
 
@skiwi Deppends on the use but yeah =)
 
7:26 PM
I just remembered the time I accidentally created the tag
4
 
@syb0rg i bet that was a brain fart
must have been a tag full of crap
 
No I was thinking about creating a tag, deleted two characters and pressed enter
4
 
Thanks, now there's muesli on my keyboard.
5
And yes, Octave is quite nice. Been a while since I played with it though, I haven't had to design filters lately.
 
@Mast This ML course is using it, I'm surprised at how similar it is to MATLAB
 
Rust is so safe it will not even compile my code anymore, I guess I'm... unsafe
4
 
7:40 PM
or just rusty
 
@syb0rg Aren't they the same exact thing except that Octave allows for a different syntax?
 
@SirPython MATLAB is made by MathWorks, Octave is made by GNU
Octave is free, MATLAB costs $$$
 
I know; I took that ML course too (or one that also used Octave)
I was asking/confirming if Octave implemented the same functionality as Matlab.
 
Syntax wise, they are very similar. I haven't found any differences between them yet, but I also haven't used Octave that much
 
I have two methods, ProcessHeader and ProcessDetails. ProcessDetails does not need to run if certain conditions are met inside ProcessHeader (e.g. header was deleted, no need to even look at details for that header). I made ProcessHeader return a bool and then I have a call site doing if (ProcessHeader(context.Set<PurchaseOrderHeader>(), header)) and it just doesn't feel right. Suggestions?
 
7:55 PM
@syb0rg Yup, that's how I first started using it, we learned it as a free alternative to MATLAB during my bachelor.
@syb0rg MATLAB is more complete and has a GUI. That's about it.
 
@Mast Octave has a GUI
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Modifying the affine transform origin in graphics2D
 
@CaptainObvious Question asks about indentation only. Off-topic?
 
@200_success As it stands, it's based on opinion
 
@syb0rg Not counting the resulting windows?
 
8:03 PM
@Mast You're talking about the editor, right?
 
@200_success Does PHP have a style guide?
Probably not...
@syb0rg I didn't know it had an editor...
 
What version were you using? I'm using 4.0.2
 
2.x or 3.x, been a while.
Looking back at their release log I don't know either, their numbers appear quite odd.
 
Octave will be the way that I can answer all these MATLAB questions now
 
0
Q: Vim command parser

hoosierEEI have a parser which consumes an ordered list of tokens (based on Vim's command grammar) and returns either: an error object, or an object that can be directly eval-ed by a separate function (not shown) The code that calls parse handles both of these cases. I am looking for help with the st...

0
Q: Mapping Address to unique number

user1950349What is the best way to make a unique number from the IP Address and store it in short data type? String ipAddress = "10.87.145.103"; short hash = hash(asInt(ipAddress.getBytes(StandardCharsets.UTF_8))); private static int asInt(byte[] addr) { return (addr[0] & 0xFF) | ((addr[1] & 0xFF) <<...

 
8:22 PM
I'm sure it can. This is better suited for codereview.stackechange.com — Suever 23 secs ago
 
8:32 PM
0
Q: Non-Sieve Prime Number generator

Neeraj Mula#include <iostream> #include <vector> #include <cmath> using namespace std; int main() { int l=0; bool isprime; vector<int>primes; primes.push_back(2); for (int nur = 3;true;nur+=2) { isprime=true; double ilimit= sqrt(nur); for (int primecount=0 ;primes[primecount]<=ilimit;primecou...

 
@Vogel612 @Mat'sMug @RubberDuck and all other @Duga fans, I have discovered the weird thing about @Vogel612's repository having an extra backslash. I know how to fix it but not why it happens. Enjoy the head-scratching:
0
Q: Inconsistent behavior with extra backslash in chat markdown

Simon ForsbergFor a while I have a Stack Exchange chat bot that does many things, one of the things is to post messages like this \[[**retailcoder/Rubberduck**](https://github.com/retailcoder/Rubberduck)\] 19 commits. 745 additions. 451 deletions. Which is shown in chat as: [retailcoder/Rubberduck] 19 co...

 
0
Q: How to reduce the for loop?

shreyas kamathI am working on a fingerprint matching technique and it takes a lot of computation time to obtain the result. I would like to know if there is any method available to reduce the for loop for the code given below: [Tdrow,Tdcol]=size(Td); matchingscore=zeros(Tdrow,Idrow); rv = bsxfun(@minus,Td(:,3...

 
@SimonForsberg I think the /history chat links aren't going to be visible for most viewers
 
@Mat'sMug I thought so too but I tested on two friends who were not even signed in to any Stack Exchange account. It works.
 
First time I heard about them.
 
8:46 PM
huh, interesting. so Room Owner privs to see post history are BS then? o.O
 
The current version of the message is visible to all. I think only room owners and moderators see the previous versions of a message and deleted messages.
Let's try it and again.
@Mast @Mat'sMug How does this look for you? chat.stackexchange.com/messages/30335584/history
 
chat.stackexchange.com/messages/30335595/history <-- who can see this and what do you see?
 
I can see the 3 previous versions on your first link, but second link is "page not found"
 
8:49 PM
@SimonForsberg I can't see that
 
@SimonForsberg I can
 
deleted messages are not visible, but edited ones are=
 
I can see some Star Trek guys, but I don't think that's what you're looking for :)
 
@ardaozkal Huh, the bad sides of being a moderator: You completely forget what ordinary users can and cannot see.
 
@ardaozkal well that's pretty interesting
@SimonForsberg I really think that page is meant to be visible for moderators and room owners...
 
8:51 PM
@Mat'sMug shhh it is fine this way :P
 
only moderators and room owners have a "view post history" button in chat. I think. gosh I've had these options for too long.
lol
 
I can see deleted message history in Cardshifter TCG, and I'm a room mod there.
 
@Mat'sMug Well, I guess it makes sense that everyone sees the history.
 
everyone has the button on edited ones
 
8:52 PM
2 mins ago, by Simon Forsberg
@ardaozkal Huh, the bad sides of being a moderator: You completely forget what ordinary users can and cannot see.
 
^^
well, that, and I've been RO in the 2nd monitor for longer than I can remember
 
I remember @rolfl asked us a few times when he was a moderator "Can you see this page? What do you see?"
I totally understand why he did that.
 
can't you just make socks?
 
@Mat'sMug Ha, I still remember when you actually was a room owner :)
 
@SimonForsberg could login as @Duga
I don't have socks
 
8:53 PM
@ardaozkal I don't make socks, I make bots.
@Mat'sMug Then your feet must be cold.
 
@SimonForsberg try to view from them?
 
@ardaozkal And spoil the surprise of seeing how many pings I have? No way!
 
@SimonForsberg what is the bots name?
 
Wait, I can see my own deleted message here anyway.
 
I think it comes with 10k
can you see
 
8:56 PM
No, but I'm not a room owner here.
 
@Duga has more pings than @SimonForsberg will ever have.
 
yup ^^
 
ah, you made @Duga?
 
8:58 PM
do you remember how many pings it was last WinterBash?
you only go and check during WinterBash, right?
(to get the hats on)
 
@Mat'sMug Around 5000. And I didn't reset it that time.
@Mat'sMug Yup.
I tried finding the chat message, but I couldn't find it
 
TTQW
 
Did someone say hat on?
 
sort of
 
^ StackExchange during winterbash
 
9:13 PM
lol
 
lol
 
9:30 PM
0
Q: Is it possible to return part of a struct by reference?

skiwiConsider the following two structs: pub struct BitVector<S: BitStorage> { data: Vec<S>, capacity: usize, storage_size: usize } pub struct BitSlice<'a, S: BitStorage> { data: &'a [S], storage_size: usize } Where BitStorage is practically a type that is restricted to all uns...

Next Rust question on SO :/
I must say it is pretty difficult to find answers for queries you might have :\
 
0
Q: Data analysis pipeline

user2117258I'm reading in files in the following format: SN971:Xap108:1:1101:10.00:1067.90:0:1 MOUSE_chr1 95333658 95333666 + MOUSE_chr1 95302516 95375494 GENE:Hdlbp ACC:NM_133808 - CCCTCCCACCACGCCCGGCG BC:CCCTCCCACCAC UMI:GCCCGGCG FEAT:CODI...

0
Q: integer adding program

user108891I'm currently a beginner C++ programmer, and I am trying to write a program that will calculate the sum of consecutive integers, based on user input. For example, if the user types in 5, then the program will return the sum of 1+2+3+4+5. My class requires me to write a while loop solve this probl...

 
^ can someone help?
 
9:50 PM
TTQW
oh wow, Captain
 
0
Q: Loading and updating data from system A to system B

Mat's MugI need to transfer purchase order (PO) information from SQL Server into Sage 300 ERP, so using my Linq-to-Sage implementation, I wrote a little console application that connects to a SQL Server database to fetch PO header information, including some metadata telling me whether a purchase order......

 
10:27 PM
Vote to close because question is more suited for CodeReviewtrincot 3 mins ago
 
 
1 hour later…
11:51 PM
0
Q: Reusable guard conditions

Dmitry NoginWhat do you think about the following syntax for some very simple and intensively reusable validations? Does this: string name = (SomeText)"Hm…"; mean for you a none-safe cast to none-empty required text? How does it play with C# syntax? So these two should throw: string name = (SomeText)nu...

 

« first day (1136 days earlier)      last day (2881 days later) »