« first day (2832 days earlier)      last day (2121 days later) » 

12:08 AM
Sure, why not?
 
was not sure if it was possable
 
12:24 AM
@rick some servers namely php will get confused if you name a directory with an extension which the only way to do that their with out a rederict
 
So In my ~/ I have a few files that I can't understand where they came from
they were all made on the same day (Jul 12) and all have the output that looks like
```
SSUUMMMMAARRYY OOFF LLEESSSS CCOOMMMMAANNDDSS

Commands marked with * may be preceded by a number, _N.
Notes in parentheses indicate the behavior if _N is given.
A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.

h H Display this help.
q :q Q :Q ZZ Exit.
---------------------------------------------------------------------------

MMOOVVIINNGG

e ^E j ^N CR * Forward one line (or _N lines).
y ^Y k ^K ^P * Backward one line (or _N lines).
Any idea where they may have come from
The files are weirdly named as
```total
drwxr-xr-x 2 oboecat oboecat 4096 Jun 18 12:36 Desktop
drwxr-xr-x 3 oboecat oboecat 4096 Jul 14 22:06 Documents
drwxr-xr-x 3 oboecat oboecat 4096 Jul 17 18:23 Downloads
-rw-r--r-- 1 oboecat oboecat 23850 Jul 12 12:29 es Me
drwxr-xr-x 4 oboecat oboecat 4096 Jun 28 13:16 examples
drwxr-xr-x 5 oboecat oboecat 4096 Jun 18 18:49 hypertrie
-rw-r--r-- 1 oboecat oboecat 6395 Jul 12 12:29 ign up
drwxr-xr-x 2 oboecat oboecat 4096 Jun 18 12:36 Music
-rw-r--r-- 1 oboecat oboecat 11925 Jul 12 12:29 only).
Its Shrek on Oboecat's account btw
 
so any suggestions :D ?
 
12:41 AM
those look like Linux read-write flags
 
the names :P
ub_command.js
My guess is that she probably had these files generated by some type of help but not sure what
the docs point to less but i am not sure how to validate htat
I didn't run less or less help recently -oboecat
 
So i am not sure whats going on 😃
also they are all -rw-r--r--
so I don't know why they'd be that way
 
morn
 
1:04 AM
why
 
what in tarnation is this weather format
2018060100550455
YYYYMMDDHHMM????
what the hell goes from
2018063019592359 (2359) to
2018063020000000
 
1:19 AM
works fine for me
 
1:31 AM
is there a way to parse an int when it's not the first char in the string?
hopefully something easy
 
@Rick extract it first with /\d+/
 
@KendallFrey you are clearly a Regex master :)
 
2:01 AM
if you use generators to iterate forward and backward within your array would that still be considered a linked list? or is this distinction sorta of pointless?
 
linked list relates to how it's stored, not how it's used
 
are not arrays in javascript just objects with indexes?
 
roughly speaking yes
They also have things like .length and the Array prototype
All arrays are objects with indices, but not all objects with indices are arrays
 
so technically use can use an array as a linked list. since all arrays are inherently objects
 
In what sense?
For one example, linked lists can have cycles. Arrays can't have cycles.
 
2:14 AM
So technically lisp isn't a linked list learned something nee
new
 
That's a good point but cant you just connect the end of the array with the beginning?
 
Mmm... no?
how would you do that?
 
you reach the end of the array reset the count
 
But that's something the caller has to do
 
@Rick you need to meet Zirak
not saying kendall's regexp skills arent god level :
 
2:17 AM
@ShrekOverflow I'm better than he is :)
 
:O
when did that happen
 
I'm better than anyone in the whole wide world
 
also @oboecat is already better than me at RegExp so I suck at it way too much
 
well maybe
Mostly .NET's regex, since I've been digging into it so much
 
I just want to code more again, which I will be very soon, I am so happy about that 😃
Also do you guys have some beginner project suggestions for @oboecat ? She wrote a x-platform wallpaper switcher daemon as a learning project. So she is looking for new challenges :P
 
2:19 AM
@ShrekOverflow I hate regex I would rather find a clever way of something than use a Regex
 
@Rick Write a parser ?
My recommendation was to write a few games
 
no, I'll reverse or walk the string depending on where the number is, or whatever I'm targeting. I'll use XOR, anything but regex
I am just trying to solve some algorithmic challenges. So I can't really recommend any projects. Maybe build a service that scans twitter tags
Do something where you use async to traverse a file system. I did that already. Was fun.
or use ssh npm to ssh into different file systems and update files on a vm which does not allow for rsync. That was fun too.
 
It was hard initially. But it got a lot more easy with time.
But it sucks learning API's, but if you stay low level it's fun to see the patterns for grabbing files in both the ordered and in the unordered fashion using async. I am what you call a sharpener/ optimizer.
 
2:35 AM
mom
 
hello
 
2:49 AM
I have a general question for all of you. How do you know that what you're coding is optimized and is a good solution? In my case I learned javascript by reading JS books and reading documentation, but since I have no one to look over my projects or supervise my learning... I have no idea if im following best practices and writing efficient code. Maybe share your exp?
I think i have a strong feeling of the impostor syndrome... since I have not had any professional training in JS.
 
@KendallFrey I was born with PTSD
 
@ex080 i don't worry about it unless it's a problem
 
@ex080 make mistakes, try to understand where things might not be working as expected. Time the execution time of your functions. Stay up to date on the latestes trends etc..
@ex080 watch programming lectures from MIT open courseware. I found those helped a lot too.
 
 
1 hour later…
4:10 AM
i have spent half hour on this html-javascript, not sure why background is not showing green
<html lang="EN">
<head>
	<meta charset="UTF-8">
	<title>A test page</title>
	<style type="text/css">
		div {
			width: 100px;
			height: 100px;
		};

		.green {
			background-color: #F00;
		};
	</style>

	<script type="text/javascript">
		window.onload = function() {
			var left = document.getElementById("left");
			left.setAttribute("class", "green");
		}
	</script>
</head>
<body>
	<div id="left"></div>
	<div id="middle"></div>
	<div id="right"></div>
</body>
</html>
I mean not showing red i guess
 
@jeea You've got semicolons after the closing }s in your css. That's what's breaking it
 
5:00 AM
@david thanks a lot, this was dumb, I got confused by object syntax of javascript
 
@jeea no worries, css can be hard to debug because it doesn't throw errors at you
 
5:13 AM
Mornin!
 
 
1 hour later…
6:27 AM
morning
@jeea fyi using .setAttribute is kinda frowned upon
if you want to manipulate classes, use Element.classList
 
user6086034
7:03 AM
can anyone help me with this please?
 
user6086034
0
Q: Get data on clicking next in pagination while using external library

booI'm using this for displaying table of data with pagination: https://github.com/samu/angular-table The table I have has a column that shows images. I don't want to get all the images at the same time along with other data for the table. I want to get the images for respective columns on clicking...

 
@LadyBird let's say you will get validation errors if you throw a svg file into a xml validator.
 
Morning
 
 
3 hours later…
USM
9:44 AM
0
Q: hell reCAPTCHA asks too many confirmations

Oleksandr KhavdiyRecently I noticed some website asking for confitm with reCAPTCHA from google. But I have to go through different checks several times even 10 times, like select pictures with cars 3 times, then with street signs, then bus, storefront and at last confirmed. WTF is that?

:-)
 
10:08 AM
> 40 / ∞ = 0 or 40 / ∞ doesn't equal anything because it's a meaningless statement so saying that 40 / ∞ ≈ 0 is just mathematically wrong
@KendallFrey fresh from reddit ^
 
40 / ∞ ≈ 0 sounds right
 
you can't really use infinity in calculations
otherwise 40 / ∞ = 0 / ∞ and 40 = 0
it breaks the math
 
10:24 AM
just means "Is pretty darn close to", right?
 
So reddit person is wrong
 
I don't think you can even say one is pretty darn close to another
Otherwise 10^100 is pretty darn close to 0
 
Infinity is a huge number, so if we assume 99999999999 is the highest number. Then when we do 40/99999999999 = 000400040004..... . Which is almost 0 but not 0
So 40 / ∞ ≈ 0 is right
 
@Cerbrus "approximately equal"
let's say a ≈ b, then it means that a is approximately equals to b
 
10:27 AM
@FlyingGambit Again, the point was that ∞ can't just be considered like a really high number
it's not technically a number
 
Then what is Infinity ?
 
Rob
@FlyingGambit That'd be the limit of 40/x as x => Infinity
 
a concept
 
^
 
Rob
But.. that doesn't let you just say 40/infinity equals or even approximately equals 0
 
10:28 AM
true
 
I will comeback when I get hold of a Mathematician
 
you do that :)
I look forward to counterarguments
zero is a very weird too
it's a number, but it has a lot of very weird properties
 
there is still a discussion whenether 0 is a natural number or not
I recall that somehow they concluded that it is a matter of user's preference
 
reeeeeeeeeee
 
that does not fit in maths imo
 
10:31 AM
also 0 is a concept when you think about it
it's a symbol representative of absolutely nothing
it's both an imaginary number as well as a negative number
seems a lot of sets run through 0
well, not sure being a negative number actually.. probably not
 
I use a -0 for that
if I had to work with negative numbers and a sum part of the sequence made that part 0, so I wrote down "-0" so that I am aware that I work in a < 0 condition
> The European Union hit Alphabet Inc.’s Google with a record antitrust fine of €4.34 billion ($5.06 billion) source
 
I think at least from an engineering standpoint, it's convenient to consider -0 a negative number
 
that is what I studied :P
I am not sure how mathematicians handle it
probably the same way or just 0
 
10:46 AM
'The mathematician and philosopher Alex Bellos suggested in 2014 that a candidate for the lowest boring number would be 247 because it was, at the time, "the lowest number not to have its own page on Wikipedia"'
Ironic that the number 247 should then get its own wikipedia page as a consequence.
247 (two hundred [and] forty-seven) is the natural number following 246 and preceding 248. == In mathematics == 247 is: a semiprime. a brilliant number (the product of two primes with the same number of digits). a pentagonal number. palindromic in bases 18 (DD18) and 246 (11246). a Harshad number in bases 10, 14, 19, 20, 27, 39, 40, 58, 77, 79, 115, 118, 229 and 235. the smallest number which can be expressed as the difference between two integers that contain together all digits 0-9. i.e. 247 = 50123 - 49876.The mathematician and philosopher Alex Bellos suggested in 2014 that a candidate for...
 
10:58 AM
I would write a wiki about 80085
 
> Wikipedia does not have an article with this exact name.
Damn, that's a missed chance, internet.
 
using 58008 did result on a page tho
but that is explainable once you see the page :P
 
11:15 AM
Does anyone here use Cheerio? Attempting to create a web scraper for Facebook and I'm unsure if it will be suitable for the job.
 
11:41 AM
What happened to Ricky Martin
 
@nicarpe depending on what you're scraping, prepare to get rate limited.
 
To circumvent that, would I just be able to use a timer?
I'm wanting to scrape the posts in a group on Facebook every 5 minutes.
 
If you're rate-limiting yourself, are you truly circumventing the server's rate limit?
 
That's a good answer.
 
(Yea, that should help)
 
11:50 AM
Great! I'm thinking of using the Node module Puppeteer and just scraping it with that
 
I still find it ironic: there is a rate limit if you scrape facebook but there is none if they scrape your user data outside facebook owned applications
 
It's not scraping if they already have the data stored in a database.
 
edited my post :P
I am referring to their trailing cookies
EU does not allow it
 
Yay EU!
(I don't often get a chance to say that)
 
12:06 PM
!!giphy Return of the prince
 
12:46 PM
Q: var = menu_row_1 = "someString" doesn't work?!?... Then this answer is getting upvoted...
goddamnit
 
wut
 
Typo question by someone that really doesn't seem to understand basic variable declaration...
Should be closed and deleted, but now the crappy answer has 2 upvotes.
 
odd that people says that it is a typo issue yet some of them probably did not flag it
 
I saw a bad question yesterday, it had a few downvotes, and 1 answer from someone with 50k rep
If that isn't conflicting information I don't know what is
 
@Cereal: Guess how that user got 50k?
 
12:50 PM
=D
 
I could've had 100 by now.
 
high rep usually lands on receiving votes easily IMO
I often see multiple answers on a post. The post from a high rep user got the most vote but is weaker compared to other answers.
then that usually get marked as answer.
 
It's the gold badges. Eyes are attracted to shiny things.
 
Well. it is a pet peeve but I just go on
that too
 
Meanwhile, that typo question is still open :-/
 
12:53 PM
already voted on it
 
lol yeah, that is the other problem. Guys with 1-15 rep asking questions and then never marking answer...
 
oh I', stupid, I fixed it but now I'm getting the following error: missing ) after argument list here: $('.menu_container[data-link='starters']').append(menu_row_1‌​); — Peter Dickngale 19 secs ago
 
That's not what I mean, @New_2_Code.
 
the best answer is that he should check the javascript basics
 
@Cerbrus That's a big problem in the App Script area
But then again most of the questions are "How to breathe air with mouth"
 
12:55 PM
A: Don't.
 
Does App Script have it's own channel?
Hahaha
Hmm seems not, guess you lot will have to do for now. :D
 
@Cerbrus this explains the shitty state SO has become now since they went aboard with their "needs to be friendly" meme .
 
If that question got 1 more downvote, we could delete-vote it.
Great, just 2 more delete-votes :D
And gone :D
 
god, china
> China just built a 250-acre solar farm shaped like a giant panda source
 
1:12 PM
Hello
 
@CodeLover Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
-1
Q: Axios GET request not working on ReactJS

CodeLoverI am new developer ReactJS, I develop a table with ReactJS on the FrontEnd, NodeJS on BackEnd and MySQL about the database. I want when I click on the view button on Action column as below It will be redirected to another page, which display a list containing the result of the Select query. T...

 
@KarelG Someone's been playing Factorio again
 
Hah
 
that made me chuckle
 
1:14 PM
Can you help me ?
 
1:31 PM
lol @Kendall
 
2:03 PM
1 message moved to Trash
 
2:55 PM
 
hey guys whats up
 
Hi
I'm depress
 
return Promise.all(urls.map(url => fetch(url, {mode: 'cors'})))
.then(resp => Promise.all(resp.map(status)))
.then(resp => Promise.all(resp.map(arrayBuilder)))
.catch(function(error) {
  console.log('Fetch Error :-SSSS ', error);
})
i've done my fetch statement in this map so it can take an array of url's
when i proceed through the promise chain i am having a little bit of an issue of when i should and should not use map for chained promise work through functions
the last .then statement i have that maps arrayBuilder... i am looking to create an array of url's for the final promise of the stream
otherwise i just get an array of response objects.
 
Is there any tool that can automatically add static typing (eg typescript or flow) to JS from runtime type information? (Python has tools for doing this ex. github.com/Instagram/MonkeyType)
 
3:25 PM
the room is quiet today
 
@noɥʇʎԀʎzɐɹƆ TypeWiz
 
@MadaraUchiha cool, thanks
 
3:38 PM
@KendallFrey if in the same function, I walk a string from right to left to find the index of a char using lastIndexOf('C') O(S), and then use the subString(I+1) to grab the string at a particular interval O(I), and then I use parseInt (num) to convert that string to an integer O(N)(not sure about runtime complexity of parseInt), and then I use that int to look up a value in a hash O(1). Will my runtime complexity be O(C+S+I+N+1) which refactors to O(N) ?
 
You completely confused me
 
ok let me reword it. one sec
 
sample input and output would be helpful
 
working on it one sec
ill ping you once i have
 
3:56 PM
@KendallFrey                                                                                                       // intputs are a hash table and a string
function decode(hash, s) {
    s = s.split('/')  // O(S)
    const len = s.length    // O(L) I am not sure what the run time complexity is for finding the length of a string so I am assuming it is linear
    const int = parseInt(s[len - 1]) // O(P) I am not sure what the run time complexity for parseInt but I am goingt to assume its linear
    return hash[int]   // lookup in a hash table O(1)
 
so you're just converting "some/thing/1" into hash[1]?
 
user7858150
Is there a better way to halt execution than return or return false? I feel like I'm calling it recursively, climbing up a tree, rather than being able to halt execution immediately on finding an unacceptable condition.
 
extracting from a hash or hash lookup
 
@ScarySpice i mean... you could use if statements or switches, depending on the scenario
 
but yes it was inserted into a hash in another function
 
3:59 PM
Well, that's probably either O(N) or O(1) average depending on the distribution of inputs
Assuming you use lastIndexOf and not split
parsing will be of the same complexity as extracting the number
hash lookup should be O(1)
And I can pretty confidently say it will be O(N) worst case and O(1) best case
 
user7858150
@KevinB I'm not sure what you mean. I already have an if statement wrapping a call to another method which is my sanity check, but that method calls a third for some functionality. Ideally, I'd want to halt execution within that third method, rather than returning false, returning false, and finally returning false.
 
(N is the length of the input string)
 
user1596138
@KarelG Just use one with an SVG preset. Is is XML, it just doesn't start with <?xml
 
new challenge: can you accomplish the same thing without using useless code in exponential time
 
@ScarySpice the only way to stop execution of a function is to return. You can only avoid the return by not needing it.
 
4:02 PM
@ScarySpice If appropriate, throwing an error will do that
 
.attr('d', 'M695.764, 55.027L726.367, 55.027');
 
oh, yeah, and throwing errors
 
user7858150
@Kendall
 
Can somebody break this path down for me?
 
user7858150
that ffels dirty
 
4:02 PM
how would you break down the space complexity?
 
user7858150
but I might give it a try
 
@SterlingArcher a line from 695.764, 55.027 to 726.367, 55.027
 
but that's a long line
 
@Rick space complexity will be the same as time complexity I'd think
 
It doesn't show as over 600px
 
4:03 PM
no it's not
it's like 30 pixels
or whatever the unit is
 
px yes, but I'm not sure I understand what is making it horizontal
 
because it's not moving at all in the y axis
55.027 = 55.027
 
Right, I was adjusting those but I couldn't get close to a nice vertical
 
wut
if you want a vertical line the x coords need to match
you may find it more convenient to use relative coords (lowercase letters)
 
@KendallFrey just to be sure, the space complexity is the same because the inputs match the outputs?
 
4:07 PM
No, that doesn't make sense
 
That makes absolute sense
 
the space complexity is the same because the time is spent searching and parsing the numeric string
 
What kendall said
about the x coords
 
I take it geometry wasn't your strong subject
 
nope
@KendallFrey I understand it now, and it works 😀 thanks bud
now I can change the color and make this breaker switch map really shine
 
4:10 PM
@KendallFrey so what would I need to put into my function to change the space complexity without changing the time complexity?
 
I really don't understand the process of thought that led to this question
 
@Rick This smells like XY
what are you trying to accomplish
 
i mean, it's clearly X/Y,
but i don't think that is relevant
 
in this case, space complexity = time complexity, and you can't increase space complexity without increasing time complexity, and you can't decrease either, so...
 
I trying to understand how space relates to time in the current function and how space can be linear with respect to the time.
 
4:12 PM
"with respect to"?
 
it's not XY if it's for the sake of learning more about how these things work
 
space complexity is measured like time complexity: relative to the input
 
Neil DeFrey Kendall
 
so for context, what would be an example where they might diverge?
 
4:14 PM
finding the largest number in a list
it's O(n) time, O(1) space
you only need one variable to store the largest so far as you iterate through
 
cool that makes sense :) so the amount of space being used during the life of the iteration
 
Howdy
 
@KendallFrey this one is a little bit out of curiosity. I have an array =[] and I grow its length N^2 throughout the iteration without actually adding anything to the array. Is that considered O(N^2) space complexity or O(N). because the array itself does not have values in it. And it won't iterate over empty indexes?
 
What do you mean you grow its length?
 
let array =[], array.length = n^2
 
4:29 PM
that's just changing the length, that shouldn't iterate anything
and presumably the engine doesn't expand the array
so just O(1)
 
coolio nice. :)
 
4:45 PM
Hi all, I have the following JSON data :

``` {
"Shiva": [
{
"allocations":{
"week1":1,
"week2":1,
"week3":1
},
"humanResourceId":"1"
},
{
"resourceName":"Shiva",
"allocations":{
"week1":0.5,
"week2":0.5,
"week3":0.5
},
"humanResourceId":"1"
}
],
"Deepesh": [
{
"allocations":{
"week1":0.74,
"week2":1,
"week3":0.74
},
"humanResourceId":"2"
},
{
"allocations":{
"week1":1,
"week2":1,
"week3":1
},
"humanResourceId":"2"
}
]
} ```

How to sum the `allocation` key of above JSON object to get this new JSON data:
 
@GeekSambhu Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 

« first day (2832 days earlier)      last day (2121 days later) »