« first day (1154 days earlier)      last day (2855 days later) » 

5:02 AM
lol
 
lol @arda
fantastic
 
@arda I don't get the joke.
 
Hm, this is just annoying me... given a set [1,2,3, ... 10] I want to remove redundant divisors, in other words keep only [7,8,9,10]
@Hosch250 npm means "Node Package Manager", not "Neckbeard Party Materials" :)
 
@Hosch250 NPM probably doesn't actually mean "Neckbeard Party Materials"
 
5:07 AM
Oh.
 
Can confirm. I have no neckbeard.
only a regular headbeard.
 
@Phrancis What happened to 6? What is that redundant to?
 
@Phrancis C# right?
 
@Mat'sMug yeah, it means node package manager
 
divisors.Except(redundantDivisors) if you know the redundant ones
 
 
@Hosch250 3, 6, 9 are redundant, I think
 
> Nacho Printing Machine
 
> Nobody's Perfect, Man
 
@DanPantry In practice yes, but I was trying to find a more general "math" way of doing it
 
> Node Pizza Maker
 
5:10 AM
@Phrancis Well, can you calculate the redundant ones?
 
woah there's a dan of the pantry
3
 
Unless you can find a way to do it in one fell swoop then doing it in two stages for now will work, then you can always "optmiise" it later
hello @Quill
 
0
Q: Parametric HOAS and graph reification

nicolasI am not quite sure how to reify the graph of lambda terms expressed as parametric HOAS. Is it not possible ? data PLambda a where Var ∷ a → PLambda a Lam ∷ (a → PLambda a) → PLambda a App ∷ PLambda a → PLambda a → PLambda a newtype Lambda = Hide { reveal ∷ ∀ a. PLambda a} d...

 
@DanPantry Um, I suppose I could start at 2 and just Pow it up until the max/limit, and keep the maximum result
I'm not so sure about how to tell it when to stop doing that though...
 
¯\_(ツ)_/¯
 
5:12 AM
Math is hard.
 
The lover's version: Now Pheeling Mushy.
 
alright.. off to work (at 6am, RIP)
talk to you guys in a bit
 
Wait, couldn't I just remove all the numbers below the highest prime number?
Not sure if that would work or not
Maybe I'll just brute-force it for right now and see if I can improve it then, after I have the correct answer
 
Now, Party Man!
 
Newts Party More
 
5:17 AM
just sent a pr lol
 
@Mat'sMug Yes much better
Maybe in a later release you can implement a fixed version of Code Prettify's broken VBA formatter
 
Questions about improving working code belong on codereview.stackexchange.com. Your code looks fine to me. — 4castle 27 secs ago
 
Those single-quote line comments are a real pain
And also a really bad idea
VB team couldn't be bothered to just use // or # line comments like everyone else does/did
 
# is already taken, for conditional compilation statements
-- cough
 
I didn't say SQL was better ;)
 
5:24 AM
SQL is awesome.
 
Actually, just plain old /* ... */ would have been fine I suppose
 
C# is more awesome.
VB (and all friends and relations), not so awesome (to say the least).
Night, fellas.
 
Later, @Hosch250
 
Night, @Hosch250
 
@Hosch250 night
I should sleep sometime too. 8:30am
 
5:31 AM
0
Q: AVL Tree Implementation in Haskell

castle-bravoI'd like to get some feedback on my AVL tree implementation. I appreciate any comments related to style and performance, particularly if something can be written in a more concise or idiomatic way. If you see a way to refactor delete into something shorter and with less repetition, please let me ...

 
@Phrancis you still bitchin' about dat single quote? try REM this is a comment!
 
@Mat'sMug I'll bitch about single-quote line comments until Microsoft comes up with a better comment syntax for VBA ;P
 
''' <Summary>
''' how about VB.NET xml-doc? Yes! **3** single quotes!
''' </Summary>
gosh that's painful
 
Someone needs to go and delete VB.NET
 
lol
 
5:38 AM
int numberOfFactorsThatNumeratorIsDivisibleBy = 0;
I actually wrote that. Ouch. @JeroenVannevel would probably be proud of that naming style though, I think.
 
int numeratorFactors = 0;
if it's a factor of X, then X is divisible by that factor, by definition...
 
Oh, nice, I don't English very good right now
 
actually.. a plural name suggests an enumerable
int numeratorFactorCount = 0;
better
 
internal int FindLowestCommonNumerator(IEnumerable<int> divisors)
{
    int lowestCommonNumerator = 0;
    bool foundAnswer = false;
    int numeratorFactorCount = 0;
    while (lowestCommonNumerator == 0 && numeratorFactorCount < this.maxDivisor)
    {
        foreach (int div in divisors)
        {
            if (lowestCommonNumerator % div == 0)
            {
                numeratorFactorCount++;
            }
        }
    }
    return lowestCommonNumerator;
}
Not quite working yet, and ugly too
Getting there though, I think
divisors is in reverse order, e.g., [10,9,8, ..., 2]
 
5:45 AM
recurwhat?
I'm trying to brute-force right now, I'll improve it afterwards
@Mat'sMug Oh, I see what you did there ಠ_ಠ
 
static int GetGreatestCommonDenominator(int numerator, int denominator)
{
    int remainder;

    while (denominator != 0)
    {
        remainder = numerator % denominator;
        numerator = denominator;
        denominator = remainder;
    }

    return numerator;
}
nevermind, there's no recursion here
 
lol
Also, I need the lowest numerator, not greatest denominator (that is already known)
 
and it's actually the total opposite, yeah
back to my screenshots
 
OK, thx, I can probably use something a lot more efficient than this, eventually
I could imagine this would take a very long time for non-trivial numbers
 
I did a REPL design a few weeks ago for one of the ppcg esolang projects: schas002.github.io/Unipants-Golfing-Language
VBA code quality online would be pretty cool
 
6:05 AM
1
Q: Python: Optimizing simple image scraping code

Lachy VassI'm fairly new to python. I wrote this code over the last few days. I learned a lot, and it works how I expect, however I suspect it's woefully inefficient: import requests, bs4, os os.chdir('../../Desktop') wallpaperFolder = os.makedirs('Wallpapers', exist_ok=True) pageCount = 1 GalleryUrl = ...

 
github.com/ardaozkal/SO-ChatBot/blob/master/source/plugins/… :( reading and porting this code will not be easy
 
oh my word
redditors are idiots
"Javascript is insecure so I disable it in my browser!" "Why? it is only insecure against XSS and CSRF both of which can be protected against" "links article about JavaScript executing through Windows Script Host"
what. Executing JS through the WSH would require downloading the JS and then running the file. I could do the same with an exe.
 
6:20 AM
@DanPantry Would it make more sense to say "All things are insecure, because most people don't care enough about security to be bothered about it"?
 
@Phrancis not really, because his argument doesn't even make sense
disabling JS in your browser won't even begin to stop that attack
 
@DanPantry OK, makes sense. Disabling Flash probably does a lot more for security than disabling JS eh?
 
(sorry for the incidentally but overly Canadian sounding "eh?")
 
Just read this thread
@Phrancis Well.. you are canadian
But yes, disabling Flash and Java will do leaps and bounds more than JS because AFAIK Flash/Java are not sandboxed in your browser
 
6:26 AM
eh
 
@DanPantry Yeah but I'm not "English Canadian", in other words, French Canadians never really say "eh?" or "aboot"
Only the annoying people from Ontario up to the west coast of British Columbia say "eh", "aboot", and all that
 
(my origin is my upstream, I am pushing to the original repo, on a different branch which is merge into master after code review). I understand your suggestion is - git checkout master; git pull origin master; git checkout featureBranch; git rebase master;, fix bugs, git push origin newBranch? — Darshan Chaudhary 20 secs ago
 
@Phrancis what's on the back of a car? aboot
:^)
 
o.o
 
aboot -> a boot
 
6:30 AM
What part of a car is a "boot"?
 
...the boot
uh.... the trunk? i think americans call it
 
TTGTB
 
Yeah ok. It's a bit less funny once you find out that "aboot" is actually pronounced like "a boat" (minus the space)
 
@Phrancis ....oh :(
 
@DanPantry You thought you got us Canadians all figured out, we're full of mysteries (well, not really, just a few mysteries)
 
6:36 AM
0
Q: disable key and bullet trajectory

Bruno BattagliaFirst of all, I want to shoot a plane with a cannon, but I have two problems: 1- I've setted this Timeline for the trajectory, but I don't see the bullet on my Scene. It's very likely that my trajectory's code isn't correct. I tried to look on the internet about formula's ecc, but I understand n...

 
@CaptainObvious Clearly broken code
 
6:50 AM
ahem
IT'S FRIDAY
3
 
@DanPantry not really
it will be in 9 minutes (all aaround the world I mean)
 
@arda The west coast of america doesn't count
 
OHAI @JNat
Monking btw.
 
I love it when colleagues break features that break my features and then fail them in QA
 
Mornin'
 
7:14 AM
0
Q: SI1145 Adafruit UV Sensor Library porting from Ardunio to Python SMBUS

Davies-BarnardFirst post here. I originally asked this question on the Raspberry Pi Exchange because of its specific nature but it was suggested it would be better seen here so here goes. I have spent the day trying to port the Adafruit UV Sensor Library (Link) from Arduino to Python and SMBUS for the Raspbe...

 
7:52 AM
0
Q: Python. Guess the Number

Ilia_MochalovI have been using Python 3 to learn programming, this is very basic task, but I want to gain good programming patterns/habits at the very beginning. The program will first randomly generate a number unknown to the user. The user needs to guess what that number is. Program interacts with the user...

0
Q: better coding style for this javascript

GoozoI have a set of images with class = tt like so <img src="images/arc_unselected.png" title="Arc" class="tt" /> and I have written this code to change the images after clicking $(".tt").click(function(event) { var title = event.target.getAttribute("title") ...

 
Monking!
 
monking
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Function to combine arrays of associative arrays
 
This question suits better for code review forum. codereview.stackexchange.comJeetendra Choudhary 37 secs ago
 
8:16 AM
Monking all
@CaptainObvious Second thoughts on this one? I can't decided between 'broken' and asking what the code does.
 
0
Q: php - strpos vs preg_match - memory and resource differences

TomThere have been questions asking which is faster strpos or preg_match, but I'm interested which in knowing which uses the least memory and CPU resources. I want to check a line for one of 5 matches: if (strpos($key, 'matchA') !== false || strpos($key, 'matchB') !== false || strpos($key, 'matchC...

 
I have an idea for a medium post. A terrible and a very controversial one... "Why you shouldn’t force your kid to code." and I'm going to write it. Helping them learn is good but forcing will backfire (and it did. I've organized 3 hour of codes, and I'll write this considering what I've seen).
 
A better title might be "Why not everyone should learn to code"
 
8:32 AM
@DanPantry yeah
I'm extremely sleep-drunk. (aka. I'm kinda high of sleep, can't think straight)
 
Monking
 
\o/ My PocketCHIP arrived!
 
@Quill pretty cool
 
@Quill \o/
Congrats!
 
TypeError: Impossibile recuperare la proprietà 'RecId' di un riferimento nullo o non definito
 
8:37 AM
The really cool part for me is that it has a terminal app, so I can do all the dev stuff on the go
 
italian error???/
 
And now sorry, busy TNBing in the Nineteenth Byte.
 
@Quill they need to do something like a blackberry that I can code on.
 
it's like an RPi with a touchscreen and keyboard builtin
 
sounds pretty cool
 
Zak
8:48 AM
@Quill "#2 HB Pencil Stand Port" Lol
 
@Quill did you see my gist? if so, I hope that helps with your project <:
 
Zak
I just got permission to go a and completely re-structure our file system :D
 
> re-structure
ZAK SMASH
3
 
@DanPantry ZMASH
 
9:05 AM
@DanPantry Redux is confusing so I didn't add it to the project
 
@Quill What are you using as a state container?
oh you aren't, nvm ^^
 
Why would I need a state container?
 
a state container becomes very useful in larger react applications
as opposed to passing everything through deep prop chains
 
1
Q: Python comparing a string or list of strings to a string or list

vivasI'm using a selfmade python program for learning new words in new languages. Originally I made this program for a university course but now I'm just trying to imrove it and make the code "prettier" and perhaps some small functionality improving. :) The basic principle is that the program reads f...

 
If your code is working, you may get better feedback on codereview. — Aaron 35 secs ago
 
9:18 AM
@Vogel612 you here?
Or any other german?
 
Yea I'm around-ish. How can I help you?
 
Does that make sense to you?
 
0
Q: Mini school database with JS revealing module pattern

topleftI tried the module pattern for the first time, with this exercise as a problem to solve: http://exercism.io/exercises/javascript/grade-school/readme It's a small exercise requiring simple tasks : Add a student's name to the roster for a grade "Add Jim to grade 2." "OK." ...

 
@JeroenVannevel well.... depends a little on the context...
I'd have expected "Tickets kaufen" like... "buy tickets"
and not "find tickets"
 
So the English is "Find Tickets" as of now
I think we have an ABTest running that changes that with something else but I forgot what
 
9:26 AM
View Tickets
 
ah yes
Looks like @DanPantry is in the control group
 
I'm always in control
 
But apparently "Find Tickets" was doing bad in German so we figured it might be a translation issue
 
it is... the issue is after all not finding the tickets
the point is viewing or "searching through available" tickets
 
So it's the essence of the message
but, given the message, it's proper German?
 
9:28 AM
I'd agree
 
Consider "Tickets ansehen" and "Tickets durchsuchen"
 
Find Tickets seems weird in English, too
 
Yeah, we had "Ansehen" before
 
the message itself is proper German, but the message it gives isn't right
just like in English it's missing the point of the button
 
UX.SE may be useful here too
 
9:30 AM
it is a naming / translation issue
 
I agree for what it's worth
 
the problem is, the English already is clunky, the literal German translation is even clunkier
 
But so many weird things have had positive results that it's hard to make assumptions based on what you might feel
 
true that
 
I put a small "Selling fast" badge on some listings
Result?
 
9:31 AM
Find Tickets, to me, indicates that I haev to go through another search engine
 
3.5% more transactions
 
View Tickets to me indicates that they're already there
@JeroenVannevel THat makes sense, it increases competition
 
We removed a step from the buy pipeline because people had to enter the same info twice
 
sidenote: you could also check with "Tickets aussuchen"
 
result?
-5%
 
Literally half of the job I'm doing is psychology
 
oh well. Time to finish the test that adds a FB/Twitter share button
See how much that gains
 
imo change the button to "Buy this shit", np
I think it's cool you have a/b tests, though
 
It's changed entirely how I view UIs. It's honestly a serious revelation
If you have the proper analysis in place, it's invaluable. I can deploy an experiment and look at graphs how it's affecting people in all kinds of different ways
 
9:34 AM
I think the cooler thing is that you're in a position to play around like that.
and get measurable results
 
0
Q: php mysqli code for login form

Mohamed AhmedCan you check my code if I write like a professionally? 1: connection page. 2: form sign page. 3: plan page. 4: log out page. first I create database and table, second I create connection file, Thirdly I create form sign in page, Fourthly plan page, Fifth I create log out page Database educate(...

0
Q: Find maximum value of Point represented by an Array of values for each coordinate

user1657206Suppose there is an Array[] = {3,2,5}, then points for this array correspond to indexes (a,b) where a<=b = {(0,0), (0,1), (0,2), (1,1), (1,2), (2,2)}. Program to return max(sum) such that sum = a + b + (indexOf(b) - indexOf(a)) For the above array, a point (0,1) will have sum = (3 + 2) + (1 - 0)...

 
remember
we're hiring
 
ouch
I randomly went ms fanboy to someone on twitter... 22.5k followers inc EFF
 
@CaptainObvious wat... dat algo description could really use some explanation
 
Monking!
 
Zak
9:48 AM
This is not a backup
 
Monking
 
possible answer invalidation by Mat on question by Mohamed Ahmed: codereview.stackexchange.com/posts/133582/revisions
 
@Duga looks good
 
@JeroenVannevel Maybe people like seeing the cheap price twice and by entering it they memorize it better
I wouldn't extend it to five times entering the price though :P
 
10:07 AM
0
Q: A String.prototype.diff() implementation (text diff)

ReduI just had the idea to develop an algorithm to calculate and highlight the difference between two strings. I know that there are already some libraries to do the job but i just tried to make my own. I really don't know whether this one is similar to the existing ones but it seems to work fine. As...

 
@Zak lol.
 
This seriously look like an XY problem. If you have a problem with Jackson, then ask a question about Jackson, showing a test case using Jackson, explaining what you expect it to do and what it does instead. Also, don't use raw types. That said, creating anonymous inner subclasses of HashMap is disgusting, and nobody should do that. Usin an annotation doesn't seem like the good tool to prevent that. Instructions to the developers and code reviews would be a better tool. — JB Nizet 42 secs ago
 
oh I totally forgot this effect of not sleeping
I see everything - I focus on random stuff - very distractive
 
@arda Try staying up longer. You will start to hallucinate
 
@N3buchadnezzar oh I only remembered that effec
I don't hallucinate directly tho
I only feel like there is something right on the corner of my eye
 
10:26 AM
Yeah, just wait half a day to a day
 
currently at uugh 20 hours
 
Puny human
 
@arda get some sleep dude
 
@DanPantry we'll drive to another city for vacation in ~3.5 hours and no way I can wake in 3.5 hours if I sleep now
(thankfully I'll not drive)
 
@arda why on earth did you stay up so late??
 
@arda That's not very smart. And I'm quit ea gamer myself
 
idk man
I stayed until 3am to eat
then I bought this
next thing I see, it is 1pm
 
not smart
at all
lol
just get some sleep in the car
 
@DanPantry can't either
 
10:38 AM
your body will knock you out if you are awake too long. rather that be in a car than when you're on holiday.
 
I already get sick by hitting only 4.5 hours sleep instead of minimum 6 hours
 
yeah i need 6 hours to not be on a murderous rampage
i'll still be mad but at least i won't be ax-swinging mad
 
0
Q: Matching text is one set of <li> to another set of <li> using jQuery

Strontium_99I'm trying to match the text in one block of li tags against another block of li tags, and although this works, there must be a better way of doing it without nested loops. <ul> <li>New Ford <ul class="offersNew"> <li><a href="abc">Ford B-MAX</a></li> <li><a href="abc">Ford C-MAX<

0
Q: Single endpoint for ingoing mail with multiple purposes

RepoxThe following code is not one of my proud moments. In its initial state, I had only a single purpose, but know I'm up to three purposes and I don't know if it would stop there. I'm using mailin.io to forward mails to my endpoint as JSON data. There are three main purposes, I've tried to descri...

 
> The following code is not one of my proud moments.
> php
checks out
 
@DanPantry That makes sense. When you get old you need more sleep
 
10:42 AM
Those 6 hours also include being allowed to sleep in a 30 minute bus ride to university and a 45 minute bus ride to home
 
@N3buchadnezzar who are you calling old you whippersnapper. get off my lawn. /shakes cane
4
i'm still up with the kids
 
Yeah my bus ride towards university was shorter than the bus ride home. /deal with it
 
@DanPantry I am also hip and hop
 
Wow... let me translate this message to English, though leaving Dutch for reference
> echter moet ik aangeven dat op MBO niveau de ICT opleiding teleurstellend is.
je krijgt boeken van Server 2003 en windows XP.... Als argument geven ze dan aan dat de IT sector niet bij te houden is en dat daarom de boeken niet vernieuwd worden.
It boils down that on the simplest IT education in our country you get books of Server 2003 and Windows XP with as reasoning that the IT sector moves so fast that they can't keep up anyway
 
10:48 AM
I'm voting to close this question as off-topic because and probably belongs on codereview.stackexchange.comRiggsFolly 40 secs ago
 
@skiwi LOL.
 
That education turns out to be pretty worthless, which is a shame for people that cannot get along with higher education (at the level of a college/university in other countries)
 
0
Q: WPF - Run an async Task with DispatcherTimer

zwanI have a small application that checks some system status and display it details. I have the following code which is working. But I want to make sure it's optimal: public partial class MainWindow : Window { // Dictionary to hold info Dictionary<string, int> dataHolder = new Dictionary<s...

 
Also, if you want your code to be reviewed, then the best place is: codereview.stackexchange.com — BatCoder 20 secs ago
 
Zak
11:08 AM
@skiwi Heh, they should check out the ECDL which does, at least, actually go through the basic things that people might actually want to do with a computer.
 
11:19 AM
I'm voting to close this question as off-topic because it is a code review and should be posted in codereview.stackexchange.com1615903 32 secs ago
@1615903 ah fair enough, I didn't know the codereview forum existed ! — Dominus 12 secs ago
 
0
Q: Continuously execute runnables on the UI thread [android]

icemanI need to run a sequence of runnables on the main (ui) thread with a given delay between them indefinitely until signalled to stop. Code: public class UiLoop { private Handler h; private AtomicBoolean breakLoop; @UiThread public UiLoop() { if (Looper.myLooper() != Loop...

 
@Zak That's odd, where I live we don't drive in computers
 
11:34 AM
@Quill flowtype now works on windows :D
@skiwi |:
 
@DanPantry now there's no reason to use TypeScript :)
 
/* @flow */
import type {Element} from 'react';

type ProgressTrackerProps = {
  currentStep: number,
  numberOfSteps: number
};
const ProgressTracker = ({ currentStep, numberOfSteps }: ProgressTrackerProps) => null;

type StepProps = any;
type Step = Element<StepProps>;
type WorkflowContainerProps = {
  currentStep: number,
  steps: Step[]
};
const WorkflowContainer = ({ currentStep, steps }: WorkflowContainerProps) => {
  return <div>
    <ProgressTracker
      currentStep={currentStep}
      numberOfSteps={steps.length}
it's so nice....
 
0
Q: need to remove last comma in java

user110347This is my code jsonUIResponse.append("["); String finalStr1 = null; String finalStr2 = null; Iterator itr_1 = skus.iterator(); while (itr_1.hasNext()){ jsonUIResponse.append("{"); //System.out.println("SKU1 in loop :::::: " + itr_1.next()...

 
Doesn't look much like JS anymore though
 
/* @flow */
const ProgressTracker = ({ currentStep, numberOfSteps }) => null;

const WorkflowContainer = ({ currentStep, steps }) => {
  return React.createElement('div', {}, [
    React.createElement(ProgressTracker, { currentStep, numberOfSteps: steps.length })
  ])
};
that's without the type checking and JSX.
 
11:39 AM
Screw this word: internationalization
 
I HATE i18n so much
also it has an s
you're not an american luddite
internationalisation
 
Whatever, I can't see the s and z anyway because there are so many damn letters in that word already >.>
 
try
antidisestablishmentarianism
that's one word.
llanfairpwllgwynllantsyliogogogoch i believe is how you spell the largest place namei n wales
Oh, sorry, no, I missed half of it.
llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch.
 
Pseudopseudohypoparathyroidism
@DanPantry That's Wales
 
I'm voting to close this question as off-topic because it is a code review and should be posted in codereview.stackexchange.com1615903 27 secs ago
 
11:42 AM
Can you actually speak and understand Wales? :D
 
Welsh *
I only understand a few words
This is my favourite English word: hippopotomonstrosesquipedaliophobia. It's the fear of long words.
The person who coined that word was such a troll
3
 
lol
Why does C# have generics in interfaces and then proceeds not to use it? ;_;
 
it... does?
Older code may not have it though
 
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 
That's probably an old one.
Also, not using generics is useful for converting objects where you don't know the types at compile time
 
11:48 AM
28
A: Switch + Enum = Not all code paths return a value

Jon SkeetNo, you can use any int value converted to Tile. Try this: Tile t = (Tile) 5; string s = TileToString(t); An enum is a set of names for numbers, effectively... but neither the compiler nor the CLR enforces that a value of the enum type has a name. It's a pain, but there it is... I would sugge...

A rare interaction between two legends (in the comments there)
I'm at this point starting to believe that the only reason WPF is this verbose is to keep C# WPF developers employed for a longer time
Happy Friday @SimonForsberg!
 
0
Q: Finding median of 3 elements in array, and sorting them

DlittleThe method medianOfThree returns the median of the first, center and last element in array sorts the first, center, and last element of the array, so they are in order EXCEPT places the center in the second to last position. Examples: INPUT: 1,2,3 RETURN:2 EFFECT:1,2,3 INPUT: 3,2,1 RETURN:...

 

« first day (1154 days earlier)      last day (2855 days later) »