« first day (3836 days earlier)      last day (1097 days later) » 
00:00 - 22:0022:00 - 00:00

10:08 PM
schools see a chromebook with 4gb of ram and some crap processor and be like: iLl TakE youR Whole StocK
 
Yep
Mine's 32 bit quad core 4gb
I've maxed it out and it still can't handle google meet and google docs together
Maybe that was because I registered 1000 service workers in a for loop for fun
nah, it was slow before that too
When will I learn that JS has limits xd
 
ours are dual core i think
idk
they blocked crosh too after my buddy and i accessed it a few to many times
 
same
I found an ssh/terminal extension
Now they double blocked it xd
 
hey bro
 
?
 
10:16 PM
after a for loop
would js still execute code after it?
 
if the for loop completes without an exception or return, yes
 
unless it's a function and you return in the for loop or throw an error (or one occures)
hey @JBis, how come sometimes errors don't stop code
 
if an error occurs
 
in what situation does an error not stop code?
 
like in a requestAnimationFrame loop?
 
10:17 PM
but the for loop keeps going
will it execute the code after?
 
@Reality can you give an example?
 
Only until the for loop stops
Maybe it's only a console.error thrown error
IDK an example exactly, but I've had code continue to run even after an error is thrown
 
yeah same
 
requestAnimationFrame is different because of how it interacts with the event loop
 
should i send my code here?
 
10:19 PM
ah
 
|| formatting Jimmy
 
sure
 
@Jimmy Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
 
I gtg soon tho
 
Runtime errors don't completely stop js depending how they occur
 
10:20 PM
ah
that's why
ctrl+k?
oooh, cool!
 
oopsy
forgot to scrub my ip
 
xd
 
function onLocationFound(e) {
  console.log(e);
  L.marker([e.latitude, e.longitude], { icon: home_marker }).bindPopup("You are here!").addTo(m);
  $.get('vac_sites.csv', function (csvString) {

    let data = Papa.parse(csvString, { header: true, dynamicTyping: true }).data;
    console.log(data)
    let distances = [];
    for (let i = 0; i < data.length; i++) {
      let row = data[i];
      var myRoute = L.Routing.osrmv1({
        serviceUrl: 'https://xxx.xxx.xxx:443/route/v1'
      });
      var self_loc = new L.Routing.Waypoint;
 
@Jimmy Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
be careful other next time it might happen with your password
 
10:21 PM
well its not my ip
 
ah, ok
 
its the google cloud compute instance im running a backend on
 
is data.length defined?
or
nvm
It *should* stop.

It depends on how long your data is, though. The longer it is, the longer time it may take
 
err
how do i
make it not stop
 
HAMMERTIME!
 
10:22 PM
? @JamesBot
 
whats the issue @Jimmy?
 
@JBis what is "hammertime"?
 
so it iterates through my json array
to find the distance between you and all of them
and now I wanna find the closest one
but an error kills the code
 
Ah, ok. nvm
 
10:24 PM
the for loop runs perfectly fine regardless of the error
 
what is the error?
 
it reads the first line of the csv which are headers
LatLng.js:32 Uncaught Error: Invalid LatLng object: (undefined, undefined)
    at new D (LatLng.js:32)
    at j (LatLng.js:123)
    at initialize (Marker.js:102)
    at new i (Class.js:22)
    at Object.t.marker (Marker.js:385)
    at Object.success (script.js:123)
    at c (jquery-3.5.1.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-3.5.1.min.js:2)
    at l (jquery-3.5.1.min.js:2)
    at XMLHttpRequest.<anonymous> (jquery-3.5.1.min.js:2)
and gives me this
 
it looks like the callback you are passing data to received data with "undefined"
anyways, I gtg man
I would recommend asking someone else, I'm only ~1 year into JS anyways
 
alright cya
@Jbis any clue as to why it doesnt execute the rest?
 
@Jimmy XMLHttpRequest, my guess is that error is async which is why it isn't stopping execution
 
10:29 PM
ah
but would that stop it from executing code after the for loop?
 
||> console.log("A");
Promise.reject();
console.log("B");
 
@JBis undefined Logged: "A", "B" Took: 58ms
 
@Jimmy put a log statement at the end of the for loop, is it running to completion for the amount of times it should?
 
uhh
lemme see
hmm
no its missing one
and its not the header
@JBis is there any way i could ignore that error and keep going?
 
|| try catch
 
Ah never mind its doing it right
forgot programming starts a 0
 
11:00 PM
@JBis tried it but it still doesn't work
 
00:00 - 22:0022:00 - 00:00

« first day (3836 days earlier)      last day (1097 days later) »