« first day (1481 days earlier)      last day (3469 days later) » 

JS has even LESS access to that sort of information. — Marc B 1 hour ago
Does JS have any access at all to that data?
 
He could actually get the number of TCP retransmissions from PHP
But probably XY problem
 
> We are Developing a Web based Application. We have to Give a Warning to user if his internet connection having Packet Loss more than 15%.
 
perhaps "speedtest.net" has an api for this ?
 
is anyone good in deciphering math notation?
can't understand what that means ^^
spent hours reading about math notation xD
 
8:16 PM
left is conditional probability of t given d
 
probability of t over d
 
mmm lemme understand a moment
 
d belongs to D : t belongs to d
 
right is d belongs to set D, t belongs to set d ... I don't understand the :
@AwalGarg :D
 
else?
 
8:17 PM
anyway what does : mean ? ratio ?
 
@rvraghav93 no
 
d set member of D else t set member of d?
 
that is a relational set
 
no that can't be lol
 
oh ... okay :)
 
8:17 PM
@RobertMallow that's conditional probability
@RobertMallow The probability of t happening given d happened is = (The size of all elements in D that are also in d)/(total number of elements)
 
@BenjaminGruenbaum How did you infer that it is the "size"?
owwait
 
@BenjaminGruenbaum woah you're a genius!
 
nvm
 
it's a sort of right-to-left evaluation then..
 
@AwalGarg for a set x doing |x| is generally the cardinality of x, if x is a finite set that's simply its size
@RobertMallow doesn't matter which way you read it - which part did you have a hard time with?
 
8:20 PM
you must be Jewish or Arab :D
 
@RobertMallow let's try to not be racist here kthx.
 
wat
 
@BenjaminGruenbaum it's because right-to-left...
 
(I would not mention that AFAIK, he is from Israel)
 
@BenjaminGruenbaum with the notation similar to "€" and ":"
 
8:21 PM
not racist
 
@FlorianMargaine ah, lol. Sorry :P
 
@BenjaminGruenbaum oh not!! I'm saying that because of the right-to-left thing ;)
sorry for the misunderstanding bro
 
Sorry, misunderstood :P
 
it's ok :)
 
@RobertMallow that 'euro sign' means 'belongs to a set'
 
8:22 PM
5 mins ago, by Awal Garg
d belongs to D : t belongs to d
 
@BenjaminGruenbaum yeah I am reading about it on wikipedia en.wikipedia.org/wiki/List_of_mathematical_symbols
 
a ∈ B is "a is a member of the set B"
 
I don't like probability and set theory and statistics
 
@AwalGarg just for the record how you acted with Tim and balpha today was really uncool.
 
@BenjaminGruenbaum Got it :) more or less what it says on wikipedia
a ∈ S means a is an element of the set S; a ∉ S means a is not an element of S.
 
8:23 PM
@BenjaminGruenbaum this is the second time I am saying this... I stayed completely out of the matter. Link me to the message you are talking off.
 
Not opening this up for debate - just letting you know how I feel about it. Do with that whatever you feel like, wanted to give you feedback.
 
Hey all

Why does typeof("/") === "string"
 
@BenjaminGruenbaum There is also aleph ℵ math notation I see :D
ℵα represents an infinite cardinality (specifically, the α-th one, where α is an ordinal).
 
Surely that would be symbol?
 
I said it in the miaou chat and I didn't want to talk about you without telling it to your face.
@loosebruce First of all, typeof is an operator so doing typeof(x) is like doing -(x), you do -x so you might want to do typeof x. Second of all - what do you mean by symbol?
 
8:25 PM
@loosebruce it's wrapped in double quotes, which makes it a string
 
@RobertMallow it's all very interesting, promise, what are you actually trying to do.
@SterlingArcher :P
 
JavaScript doesn't have objects for special characters or types. It's just a string object
@BenjaminGruenbaum :P
 
@BenjaminGruenbaum unless you tell me what are you talking about, I won't get you, would I?
 
My exact code is this

console.log(typeof(thisChar));

thisChar = /
 
@loosebruce JavaScript doesn't have chars, it's all strings. The optimization of treating a string as a single char is done for you at the engine level - it'll be fast don't worry.
 
!!> var x = /;
 
@SterlingArcher "SyntaxError: unterminated regular expression literal"
 
Error
That's not a legal assignment
 
I need to know if its not a number, and .isNaN is skitty
 
@BenjaminGruenbaum hardening my programming "math" skills by creating a script to find similar text to the one given. aka tf-idf
something like what lucene offers
 
8:28 PM
@RobertMallow oh cool, I actually suggested TF-IDF to someone in SO today! (For the first time here), that's a funny coincidence.
in Low Quality Posts HQ on Meta Stack Exchange Chat, 5 hours ago, by Benjamin Gruenbaum
That is - just put all the words in a giant bag, and then use the TF-IDF metric and learn it with SVM, it's really simple and I'm sure there is a C# library for half of it.
 
@BenjaminGruenbaum woow that's cool :D
I'm working with Lua though :p
 
To be fair, SVM is not that hard to implement.
:P
 
@loosebruce developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/… this has a good explanation of why isNaN is finicky, and it even suggests the ES6 Number.isNaN() function
You could use typeof, but I'm not sure if that's a good practice
 
@BenjaminGruenbaum can you test a little something for me?
 
Well, it's really cool to know all that. ML and NLP in particular are very fun. I work for a company that does NLP - it's really nice to know and work with.
@SecondRikudo sure.
 
8:31 PM
I need to know when I hit a delimiter in my string
 
@SterlingArcher didn't know Number.isNaN
 
Actually I just answered my own question there :D
 
Open a new tab, switch to hebrew layout and try pressing CTRL+W to close it
 
@loosebruce knowing if something is a number is just Number(x) and seeing if it worked.
 
@BenjaminGruenbaum well you're the genius but for me it's not an easy walk... for now :)
NLP is a pain in the ass with Lua if even possible
there is no library for it like you have for Python
 
8:32 PM
@RobertMallow it was not an easy walk for me, ML was one of the hardest things for me to learn because of the math involved, and I have most of a math degree.
@RobertMallow I wrote it myself in Python :P
 
@FlorianMargaine I just learned of it too, I'm intruiged
 
@BenjaminGruenbaum any results?
 
when creating empty variables, is there any difference between these 2 ways of doing it: var text = ""; or var text; ??
 
@user3658794 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@user3658794 Yes
 
8:35 PM
@SecondRikudo I was waiting for further instructions
 
var text = "" is not an empty variable.
 
@SecondRikudo worked just fine, why?
 
@BenjaminGruenbaum Did you manage to close the tab with CTRL+W while on Hebrew layout?
 
Yes, I did
 
You're using Windows, right?
 
8:35 PM
Right
 
!!> var x; var y = ""; x; y;
 
So then it's a bug on Linux
 
@SterlingArcher ""
 
Linux hebrew support isn't well thought out
 
Because I can't.
 
8:35 PM
It's like how SHIFT doesn't work correctly
 
Shift works nicely
It's CAPS LOCK which doesn't work as expected
If you're on Hebrew while CL is on, you still write hebrew.
 
bugs all around :P
 
People actually use CAPS LOCK?
 
@BenjaminGruenbaum I can see that. you'll have to deal with math sooner or later when you enter programming. having a math degree would have made it easier for you than people without it like I do. started hardcore programming like 2 years ago :p
 
@monners I CAN'T HEAR YOU OVER ALL THIS TEXT
 
8:36 PM
wot.. NLP?!
 
@SecondRikudo ...but you read? ;p
 
....Horse grooming?
 
Pro Tip for Mac users: reassign CAPS LOCK to be ctrl. It's soooo handy
 
what is the reason to set variables like this; var text = ""; and what are the reasons to set a variable like this: var text;
 
that's crazy.. I can't think about doing something like that
 
8:37 PM
I'm doing okay without math skills in my job
 
it would take years
 
@user3658794 The second one doesn't actually set the variable
 
@RobertMallow what you're doing, natural language processing.
@RobertMallow it's hard and takes a lot of time and practice, I still struggle with math in ML. Don't fear it - it's incredibly fun, it's just not easy.
Also, you can program most things without math, there are several things that require it though - ML in particular.
 
@BenjaminGruenbaum code.google.com/p/chromium/issues/… opened it anyway.
I'm not sure if this is a Linux or Chromium issue.
I'll open one and if needed open the other one :D
 
> I believe that this is an issue in Window only
You mean "linux"?
 
8:39 PM
@BenjaminGruenbaum I will. only future will tell me how it goes :D
 
Probably
 
BenjaminGruenbaum if you want to have "related articles" functionality for your site I don't think you can escape math :p
 
You can, you can use libraries - but then you don't understand your code and that never ends very well :)
 
Right, that's the point :)
 
user3949359
8:40 PM
Hi everyone! Can anyone tell me why when I scroll down and fix the navbar to the top the logo is driven further apart from my menu buttons?
 
@KendallFrey why would someone use it in that manner? is there any reason for doing that? I have seen it in a for loop. They will say var i; and then in the for loop use it like this : (i =0; ; ; )
 
hey guys, one question. I want two timeout events within a click click function or windowsonload firing off sequentialy. Is that possible?
 
Better to have experience with driving a car than doing 3 months of driving school and ride from the first day.
 
I tried once but the second settimeout doesnt work
onload - settimeout - settimeout end
 
8:43 PM
@user3658794 There's no reason to assign it immediately, if it's always going to be assigned later.
 
@nosille you're not giving any styling to the logo
give it a style and then position it together your buttons
adding a margin of course
give it a li or something
otherwise decrease the padding or width of its parent
 
user3949359
@Robert logo has an # and it's styled.
 
you also have a lot of js errors :p
@nosille where is it?
<ul id="ulist" class="navigation-bar navigation-bar-left" data-lead-id="tabs-nav-id">
<li>
<li>
<li>
<li>
^^ from dev console
 
Number(thisChar) returns NaN

I then tried to evalue like so

if(Number(thisChar) === "NaN")

but it didnt work?
 
did you want isNaN?
 
user3949359
8:49 PM
@Robert #logo{float:left;font:100%/1'Source Sans Pro',Arial,"Helvetica Neue",Helvetica,sans-serif;margin:30px 110px 25px 0;padding:0;z-index: 99;}
#logo{margin:30px 100px 25px 0}#header li{width:80px}. Straight from my CSS. Maybe the logo should be placed together with the ul?
 
!!> isNaN(NaN)
 
@loosebruce first of all, this is "NaN" as a string, second of all, nothing is equal to NaN, use isNaN
 
@KendallFrey true
 
Does cap have ES6 functions?
 
if you wanna just test if a string is made out of numbers (vs accepting things like "0x15" or "1e-9") you can just test against /[0-9]+/
!!> () => "Sure"
 
8:50 PM
@BenjaminGruenbaum "() => \"Sure\""
 
@BenjaminGruenbaum , that gives me "undefined"
 
!!> [1, 2, 3].map(x => x * x);
 
@FlorianMargaine [1,4,9]
 
@loosebruce what gives you undefined?
!!c> [1,2,3].map x -> x**2
 
@BenjaminGruenbaum "ReferenceError: x is not defined"
 
8:51 PM
@BenjaminGruenbaum Number(thisChar).isNaN
 
Nayyyy
 
@loosebruce Number used as a function does type conversion.
 
Number.isNaN(thisChar)
 
You want to use isNaN
 
Wait, how can an object also be a function?
 
8:52 PM
Oh I didnt see the brackets so thought it was a property
 
@SterlingArcher need to convert it to a number first.
@SterlingArcher functions are objects in JavaScript.
!!> Number.isNaN(Number("e"))
 
@BenjaminGruenbaum true
 
!!> Number.isNaN(Number("1e9"))
 
!!> typeof Object
 
@BenjaminGruenbaum false
@AwalGarg "function"
 
8:53 PM
@rlemon Beans.
 
@SomeKittens rlemon is afk: I likely won't be available in the chat for a while. Tweet me or email me if the bot goes down.
 
@nosille something like this?
ul.navigation-bar.navigation-bar-left{position: relative;right: 4.5%;top: 33px;width: 103%;}#logo{float: left;font: 100%/1 "Source Sans Pro",Arial,"Helvetica Neue",Helvetica,sans-serif;margin: 25px 0 25px 96px;padding: 0;z-index: 99;}
 
@BenjaminGruenbaum my brain might be fuzzled. Just a sec
function Derp() {
    console.log("herp");
}
Derp.prototype.herp = function() { console.log("derp"); }
Is that the jist of how the main object is also a function?
 
lol

/ ----> isNan() = false :S
 
!!> typeof Number
 
8:55 PM
@AwalGarg "function"
 
@SterlingArcher ^
 
@SterlingArcher main object?
 
@nosille do you use any browser console for development? if not i suggest you do. it's easier for editing stylesheets
 
@AwalGarg yes I know that
@BenjaminGruenbaum like, Number is the parent object, but it's also a function
 
@SterlingArcher functions are objects
 
user3949359
8:57 PM
@Robert I work on the Chrome element inspector
 
Sorry, I don't know how to word this
I know that functions are objects
 
     foo = function(){};
     foo.x = 15;
     console.log(foo.x); // 15
 
plain objects vs functional objects took me a while to understand.
 
@SterlingArcher Did you just give Caprica herpies?
 
fucking hell, gravity is hard
 
8:58 PM
Most likely
 
@nosille ok. then try my modifications or play with ul.navigation-bar.navigation-bar-left and #logo values
 
@KendallFrey gravity aint the only thing..
 
I knew that was coming
 
user3949359
@RobertMallow Problem is when I try to give it margin (as you suggested) it modifies the default navbar, not just the one that fixes and is given a class on scrolling. I can only tweak the class.
 
@KendallFrey Tell me about it
 
8:59 PM
@KendallFrey phrasing
 
@SterlingArcher You never fail to disappoint
 
I aim to please [you]
And Shrek.
Always gotta do it for Shrek.
 
..... is love
..... is life
 
gravity y u do dis
 
I'm somewhat ashamed to say I don't recognise the form. It's been a few years. Is that some iterative method?
the j+1 gives me that impression
 
9:04 PM
it is
 
newton-raphson? God knows, googling
 
yup
I was hoping I could do this all algebraically, but I guess not
 
You should be able to do, unless it's an N-body problem
 
no, it's 2
one with 0 mass
 
To find what?
Smells like general relativity
 
9:08 PM
I'm trying to simulate a Kepler orbit
no GR involved
 
if one body has zero mass where does the interaction come from?
 
The other one
it's effectively a point gravity source
 
gravitational attraction is a product of two masses, how are you calculating the force between the two bodies?
 
I'm not
I'm just going straight to the acceleration
Or, I was
 
In special cases the mass of the satellite factors out, like geostationary orbit - it's the same altitude for any size of object IIRC
I think that only works when the orbit is circular
 
9:12 PM
But I want to replace it with an osculating orbit
@TomW What specifically? Small mass can be approximated to zero without affecting its orbit
 
Right, I see where that comes in. I'm not talking about quite the same thing, geostationary orbits don't ignore it, rather it literally doesn't have any significance to a result like finding the orbital period because any variation in the gravitational force is balanced by the orbiter's inertia. Special case, probably doesn't work for a Kepler orbit
What are you trying to find in this calculation?
 
First, I just want to render the satellite to the screen, so all I need is x and y given t
(2D, so the orbit is a bit simplified)
 
x = Math.cos(radians), y = Math.sin(radians) ?
 
@monners if only it were that simple
 
9:20 PM
Are you allowed to arbitrarily choose E and M from that identity?
 
@KendallFrey That took me years to understand :P
 
@TomW Uh, well, that's what the equation I posted above is for
 
> periastron
<3
Ah, I see. Hm, that page is really not actually as good as I initially thought in explaining wtf it's talking about
Giving x and y in terms of parameters it doesn't explain how to find is no help at all
 
M is known as one of the orbital parameters, and I need to find ν (true anomaly), and apparently that usually done by calculating E first
 
If I'm gonna do physics here I'm gonna need beer
 
9:25 PM
lol
I wish I worked at Squad, then I could just check how KSP does it.
 
I have finally caught up
on the plus side I think your identity there isn't too hard to solve
 
which one?
 
the iterative approximation for E
 
I imagine so
 
Hm, what's little e?
 
9:33 PM
It just disgusts me
@TomW eccentricity, most likely
 
dynamics in general is hard. It's kind of ok for two bodies. Three or more bodies goes all chaos theory
no satisfactory method exists except for special cases
 
Ugh, and there there's e >= 1 orbits
especially e = 1, when shit breaks down
 
portal 2 glass has no texture right? Just some plain color with low opacity?
 
@towc I don't remember, but that sounds wrong
 
google images didn't help much
never played portal :(
 
9:36 PM
I think there's more than one type of glass
 
@KendallFrey I saw that there was the plain glass I was talking about (can anyone confirm?) and a refracting one, but they where just playing with light rules, not actual textures
 
I had lectures with a professor who's a world expert in certain types of amorphous materials. He could tell you about so many types of glass.
 
@TomW talking specifically about portal glasses
 
Yeah, I saw
 
this is the refracting one
 
9:38 PM
 
smile every time
 
couldn't find any other type of glass on google...
 
far left, that glass is textured I think
 
@KendallFrey it's the refracting one
I think
 
google 'google glass' glass
legless lego legolas
sorry
 
9:47 PM
I've typed "accessibility" a thousand times today, and we aren't even catering to the blind and deaf.
 
Could this be the most useless diagram featured in any commercial publication?
Some thing, which we will call a 'thing', has some kind of relationship to some other thing, which for clarity we will call a 'relationship'
 
Maybe there are other models
 
What it's actually doing is explaining all the modelling languages it uses before it uses them to describe its models, but really that one tells me absolutely nothing
doesn't assume that you can read a Harel state chart, for example
 
10:12 PM
If anyone wonders why MD5 shouldn't be used at all anymore, this is why ^
 
Still good for normal files or hashing something irreversibly
 
The gist I get from that is that it's possible to subtly twiddle the bits on an image in a way that's imperceptible to human eyes but just so happen to collide
you can't do the same thing with text files or executable binaries, at least not easily
as it points out though, it made it possible to forge an ssl certificate
 
The image is not changed, some block is appended that makes the md5s the same
The same can be done to binaries
 
so there are useful applications that it's still ok for, BUT I suppose the problem is that if it's used anywhere at all, inexperienced developers or people who aren't thinking will sometimes go "Hmm I need a hash function, the first one I can remember is md5"
"I'll use that"
 
Better tell them not to do crypto at all
 
10:21 PM
Yeah, fsckin noobs
ruin everything
 
10:55 PM
anyone knows what's the hash algorithm that changes the least given a similar input?
or least secure hashing algorithm
integrity is not important
I'm not going to decode it
nevermind.. i don't need that
 
Identity
 
for a "related articles" functionality should you compare the title or body?
idk how SO does it
 
Good question
 
i mean if SO compares title or body
:p
 
I'd guess body
 
11:03 PM
@copy I'd guess that too.. but when I put text inside the title input SO already finds similarities
maybe I'm mistaken
 
compare both!
 
for example.. write this in the title input
how to find cosine
SO gives you this
    Cosine Similarity 2

    taylor series for finding cosine 1

    Finding Inverse Cosine in Radians 1

    some questions on cosine similarity 1

    cosine similarity problem 1
 
@RobertMallow The answer to that is yor uncels house
 
@KendallFrey :D
Kendall, I would compare both too, but my gut tells me this puts a lot more computational power under stress
i mean given a limit of 150 chars for the title
vs 2000 for the body
or more
the time it takes for 1 time body comparison 10 title comparison would take the same time... also the title seems enough meaningful already
that's my guess though
otherwise I'd be curious on what SO actually does
think I found something
4
A: Stackoverflow Related questions algorithm

workmad3The related questions sidebar will be building on the tags for each question (probably by ranking them based on tag overlap, so 5 tags in common > 4 tags in common etc). The rest will be building on heuristics and algorithms suitable for natural language processing. These aren't normally very g...

seems they take tags into account too
 
@RobertMallow parsing the body and isolating key terms, sticking them in some index, isn't unreasonable I guess
 
11:24 PM
I'm writing an extremely simple Javascript/HTML word count thing, but it does all the functions and computations on the entire text every single time a character is typed (onkeyup). I'm using it on a laptop, and it's just less than 20KB of text, but should I worry about efficiency? Like, should I put in more complex code so that it computes less often?
 
@RobertMallow Like Tom said, indexing. It's really the only scalable way to do this, and when you use indexes, it has the advantage of being just as fast for large bodies of text
 
@raindrop Yes
Although rather make a benchmark with the worst case
Slow computer and 1MB of text or so
 
11:49 PM
@TomW @KendallFrey thank you I'll look into this :-)
 
woo stars
 

« first day (1481 days earlier)      last day (3469 days later) »