« first day (2755 days earlier)      last day (2210 days later) » 

7:00 PM
the manual is HUUUUGE it's just a giant book
greater than 100 pages
 
Man, that MIDI music
 
sorry I need to calm down, those games get me excited.
with updated graphics though, and a streamlined UI it would do so well
basically all about setting up and maintaining an eco system, you can create your own creatures/plants, modify so many variables
 
Sooo, Monday before I start the new job, the VP of the recruiting company wants to have breakfast 45 minutes before before I'm supposed to report in...with construction on the way, lol.
 
bribary of some sort?
 
No?
 
7:02 PM
You finally got a new job?
 
I'm employed by the recruiting company on a contract to hire basis.
 
why does the recruiting company want to talk to you?
 
@ndugger Yea
 
oh
 
hey I just realise something: if the session cookie is html only, how can the client/frontend SPA know that a user is logged in? - Especially when "session isn't invalidated on closing page".
 
7:02 PM
@Trasiva ooooh
 
Finally
 
yeah that makes sense then
The recruiter that hired me to my current job, only time I used one, met me my first day as well
 
@ndugger Hey man, I didn't realize how hard this place was going to fuck me when I agreed to work here.;
 
i have to drive for 4 hours tonght after work
 
but mine was a direct hire/perm pay
 
7:03 PM
@paul23 frontend doesn't know. It assumes that the state hasn't changed since the last time the backend told it about it
 
I store a token in localStorage that I validate through an endpoint
I assume that's what you're asking
 
@Loktar Well, the guys who interviewed me wanted to do a FTE hire, but the guys upstairs were a little leery, so they got me the contract to hire option.
 
@Cereal Wouldn't that beat the point of htmlonly cookies anyway then?
 
I don't use cookies at all in this project =p
 
@Trasiva nice, yeah I mean it makes sense to meet with the recruitment company before though
you "technically" work for them
 
7:04 PM
No right, I get that part.
 
It assumes you're not logged in when you open the page, reads the token out of storage, hits the api, then logs you in if you should be logged in, otherwise nothing changes
Towc, go away
 
But meeting for breakfast 45 minutes before I'm supposed to show up when it's a 15 minute drive before taking construction into consideration is what I'm concerned about @Loktar.
 
"Hey there's been a ton of drama in chat recently. Let's bring up the fucking holocaust"
 
@towc not now, let's not go further
 
sure
 
7:05 PM
Hmm so basically a "dummy" call to ask "in what state did we part ways last time I used the website".
 
btw, we're using jira/bitbucket for workflow
I guess I'll finally get to learn what the fuss about jira's UI is about
 
We're supposed to be adopting jira here sometime this year
 
@towc Prepare not to learn it
 
Still no git though, despite my best efforts
 
what alternative to git are you using?
 
7:07 PM
@Cereal jira without bitbucket?
 
bitbucket supports other cvs s
 
Dan
SVN?
 
SSN
 
923-233-2232
 
Dan
lol
 
7:10 PM
@towc it supports two SCM s. Git and Mercurial. But not CVS
 
0118-999-881-999-119-7253
3
 
@Luggage oh right, that's the term
thanks
 
@Zirak yyyyyyyyyyyup
 
@Zirak is that from the IT Crowd?
 
@corvid For when you've had a bit of a tumble
 
For some reason as soon as I read it, I read it in the jingle from the show, especially the 3
 
threeeeeeeeeeeeeeeeeeeeeeeeee
 
user1596138
> First browser with native SVG support was Konqueror in 2004;
 
user1596138
Ohh Konqueror.
 
is that the one that turned into webkit?
 
7:31 PM
I turned into webkit
 
user1596138
Idk it was basically all of KDE
 
user1596138
THe file browser, web browser, torrent downloader, email client etc
 
yea, the KHTML engine it used is what apple took and named webkit
 
...
 
then google named blink
 
7:32 PM
@Luggage yeah. KHTML was the basis for Konqueror, Apple forked it into webkit
 
Is it recommended to use TypeScript for Node backend?
 
If you want
Some people do, others don't
Try it for yourself and decide
 
Sockets didn't kill me lol
It wasn't nearly as bad as I thought. You can dynamically assign rooms with sockets.io and I didn't even have to use mongoose like I thought.
!!urban socket
 
@DavidKamer Socket Uptempo beat that resets every 8 or 16 bars
 
Btw, that's what I was definitely reffering to
 
7:44 PM
i am having a brain fart in this script where would i put the word / number i want to replace stackoverflow.com/questions/16662393/… its an answer question just brain fart on where i choose what to find and replace
 
user1596138
@DavidKamer Socket.io is nice. THe first time I did anything without it I realized just how bare sockets are lol
 
1 message moved to Trash can
@FredMcgiff Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
srry
 
user1596138
@Loktar Omfg
 
atchText(document.body, new RegExp("(?:(?:\\+|0{0,2})91(\\s*[\\- ]\\s*)?|[0 ]?)?[789]\\d{9}|(\\d[ -]?){10}\\d", "g"), function(node, match, offset) {
    var newAnchor = document.createElement("a");
    newAnchor.className = "search-term";
    //newAnchor.textContent = match;
    newAnchor.href = "tel:" + match.replace( /(\s|-)/g, "");
    newAnchor.innerHTML = '<img src =' + chrome.extension.getURL("call_icon_10x10.png")+'> ' + match;
    return newAnchor;
});
like that
 
user1596138
7:46 PM
Do you have it @Loktar does it run good? That's worth $8 to me any day
 
user1596138
I have my original in the case and everything
 
@Jhawins I started with the ws npm library. At first, everytime I refreshed the browser, I crashed node.. I got it to work, but what else could go wrong in the wild lol.
 
anyone know where i would if i wanted to replace text on page and only text on page to where it would need to be enter
is it after match;
on in search term
or is this replacing links
 
user1596138
@DavidKamer I've only used Socket.io or nothing, my most recent project only passes info from server to client never back up, and it's always a 1to1 session
 
user1596138
So idk
 
7:49 PM
@FredMcgiff that looks like malware lol jk
 
@Jhawins I bought it, didn't install it yet though
 
@DavidKamer not malware man its make editing and removing text easier to scrap for printing
 
@Jhawins that's my least favorite part of node: it can crash. I've never really heard of Apache crashing but then again I've never done sockets with it. I doubt it would the same way though.
 
@DavidKamer apache just serves web pages and hands the application logic off to node, or php, or whatever.
 
Hi Guys
 
7:52 PM
So you don't compare node to apache, they both do different jobs
 
for example i need to create pdf for project but the place has the wrong zip on every page so instead of me editing in the view source i can run this and find and replace so when i hit print save to pdf its completer
 
I recommend having node behind apache or nginx or some other 'real' web server.
 
is there anyway in node.js go through a url and check what fonts are used on the page ?
 
i just confused on where would if i just wanted to find and replace only zip code with another zip code where do i need to put that
 
@FredMcgiff That makes sense. I was joking anyway because it uses a chrome extension and I had flash backs to the crypto mining malware a few weeks ago found in the chrome store.
 
user1596138
7:53 PM
@DavidKamer Ever heard of a 500 error?
 
something like ::- stackoverflow.com/a/8793011/4381665 .... but in node
 
but everyone saying this one i linked to working great . no bugs .. its gonna run as devoloper addon .. '
 
@Jhawins is that the one you get after the first 499?
 
@AlexanderSolonik you want node to fetch a page, no browser involved?
 
user1596138
@AlexanderSolonik the short answer is no that's an XY. The long answer is google PhantomJS
 
7:55 PM
i found this http://blog.alexanderdickson.com/javascript-replacing-text but this one works with extension

this is the one i working on i using th elast pit
last post
 
github.com/jsdom/jsdom will give you a browser-like environment. you can fetch a page, let it execute it's script, then use the code form that link you pasted.
 
just having brain fart on what to take out and where to put the zip for find and replace
14
Q: Replace text in website with Chrome content script extension

javanut13I would like to create Google Chrome extension. Its job is to replace a word with another on all websites. I have the following manifest.json file: { "name": "My extension", "version": "1.0", "background_page": "background.html", "permissions": [ "tabs", "http://*/*" ], "content...

check out that all ready to go seems like the Pankaj Vavadiya spent some time on it
 
user1596138
@FredMcgiff would you mind making a jsfiddle or something? I don't quite get your question
 
@Luggage I know, but my comparison was based on how server side routing works by default. Apache separates code execution and file serving whereas node does not. So if you use node as an api service or even to serve files, one screw up could kill the server whereas Apache is entirely indifferent to the code being executed even though it still provides it's own scripting language
 
well im almost there just confused like not much info n what truly he has to find and replace
like is it in

 var newAnchor = document.createElement("a");
newAnchor.className = "search-term";
//newAnchor.textContent = match;
newAnchor.href = "tel:" + match.replace( /(\s|-)/g, "");
this suggesting that it is looking for links right
 
user1596138
7:58 PM
That is creating a link.
 
@DavidKamer There is no default. You can route in apache, or pass through anmd let node route or a combination. For example, I have Apache serve all images and all contenst and ONLY defer to node when it's an /api/... url.
Well, I use nginx, but it's the same as apache (in this case)
 
srry
sryy forgort crl k
 
1 message moved to Trash can
@FredMcgiff Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
SO this is looking for links and replacing it with icon


matchText(document.body, new RegExp("(?:(?:\\+|0{0,2})91(\\s*[\\- ]\\s*)?|[0 ]?)?[789]\\d{9}|(\\d[ -]?){10}\\d", "g"), function(node, match, offset) {
var newAnchor = document.createElement("a");
newAnchor.className = "search-term";
//newAnchor.textContent = match;
newAnchor.href = "tel:" + match.replace( /(\s|-)/g, "");
newAnchor.innerHTML = '<img src =' + chrome.extension.getURL("call_icon_10x10.png")+'> ' + match;
return newAnchor;
});
 
oh no Fred
 
7:59 PM
is that what i am reading correclty
 
user1596138
If you can make an MVCE I'd be happy to help you but I'm not getting any closer to understanding what you're asking.
 
user1596138
Maybe someone else will get it
 
and i could remove alot if i am just looking to find and replace the incorrect zip . adn only a string of numbers 5 digits or the exact number
 
@Luggage I plan on doing something similar for pictures, but I think node's performance is awesome because of how it handles requests, but that has a trade-off if you don't know what you are doing and don't handle errors correctly. Maybe it could be considered a false choice between node and php, but many people think it's a choice they have to make and php doesn't crash your server when it fails.
 
8:02 PM
neither does node
 
I just only have experience with Apache as far as php
 
but also, you can handle crashes. multiple instances, restart on crash, etc
 
@Luggage I don't know if my socket situation would have been solved by that lol, but I am still relatively new to node
 
@overexchange ok but i first need to understand what is being replaced and found and if i simple what and 5 digit zip code number found and replace what do i need to do
 
@Luggage yes i guess .. i beleive JSDOM can do that
@Jhawins thanks .. lemme check that
 
user1596138
8:09 PM
If I were to make a page wide find/highlight thing Idk how I'd even do that
 
user1596138
Probably with XPaths
 
user1596138
The other options are go through innerHTML(bad) or iterate every single element on the page manually (also bad)
 
like this one works but it replaces all there words so the guy worked on it but i can;t understand what to take out .. because this would replace everything
var elements = document.getElementsByTagName('*');

for (var i = 0; i < elements.length; i++) {
    var element = elements[i];

    for (var j = 0; j < element.childNodes.length; j++) {
        var node = element.childNodes[j];

        if (node.nodeType === 3) {
            var text = node.nodeValue;
            var replacedText = text.replace(/[word or phrase to replace here]/gi, '[new word or phrase]');

            if (replacedText !== text) {
                element.replaceChild(document.createTextNode(replacedText), node);
 
@FredMcgiff Look at NodeIterator
 
so the other code i sent before does not have the word of phase to replace here lol
this one does
 
8:14 PM
my PC fan is going all crazy. Like bad SVG crazy :)
 
bad SVG? ghostscript_tiger.svg?
 
i here cause everything working on the other one i just having trouble where i would enter word of number need to be for numbers _ this exampe gives you the area to to enter you text .. confused on the other posted which is the one ineed to use
 
Hey everybody
 
so hard to find what is using CPU in windows since every process is always using a few percent.
hello
 
@Luggage Do you use the "resource monitor"?
 
8:17 PM
sometimes
taskmgr, process explorer, or resource monitor
 
htop spoils me
 
so for if (node.nodeType === 3) {
var text = node.nodeValue;
var replacedText = text.replace(/[word or phrase to replace here]/gi, '[new word or phrase]');
where do you think that would be in the code above
   if (node.nodeType === 3) {
        var text = node.nodeValue;
        var replacedText = text.replace(/[word or phrase to replace here]/gi, '[new word or phrase]');
WORKING code that need to be use but cant seem to put the number to be found and replace ..

matchText(document.body, new RegExp("(?:(?:\\+|0{0,2})91(\\s*[\\- ]\\s*)?|[0 ]?)?[789]\\d{9}|(\\d[ -]?){10}\\d", "g"), function(node, match, offset) {
var newAnchor = document.createElement("a");
newAnchor.className = "search-term";
//newAnchor.textContent = match;
newAnchor.href = "tel:" + match.replace( /(\s|-)/g, "");
newAnchor.innerHTML = '<img src =' + chrome.extension.getURL("call_icon_10x10.png")+'> ' + match;
 
@FredMcgiff If you need a support session I'd suggest codementor.io
 
10 mins ago, by Zirak
@FredMcgiff Look at NodeIterator
 
so know one knows what i would remove here to make it find a nd replace just a zip code. i understand if busy and can't replay
ok i will i do appreciate the feedback
@Zirak thanks
@copy thanks also
thats coodementor nice
 
user1596138
8:28 PM
function findHighlight(searchTerm = 'Jhawins', replaceStr = '<span style="color: red">$1</span>', nodeType = 'div') {
    const allMatches = document.evaluate(`//${nodeType}[contains(., '${searchTerm}')]`, document);
    const nodesMatched = [];

    let match = allMatches.iterateNext();
    while (match) {
      nodesMatched.push(match);
      match = allMatches.iterateNext();
    }

    nodesMatched.forEach(node => node.innerHTML = node.innerHTML.replace(new RegExp(`(${searchTerm})`), replaceStr));
 
user1596138
Lmfao
 
user1596138
I just wanted to do it with xpath or something that queries by content
 
user1596138
Flame on
 
ok so i would
 
user1596138
DOn't use this @FredMcgiff I'm playing.
 
user1596138
8:29 PM
Use an existing library. There's plenty available.
 
find the xpath and the edit the xpath and put it where for xpath could( _____ )
area
 
user1596138
Yea don't even think about XPath.
 
user1596138
Use an existing library. All you want to do is highlight text :P
 
cause it is the same xpath on each page that need to be replace so i think this work just fine even better
 
user1596138
Welp I told him plain and simple I am just having a laugh. If you wanna do that it's on you, doubt it will work for ya anyway
 
user1596138
8:31 PM
!!afk need a snack
 
oh but it the same exact location on the page corner right top and bottom .. if i view source find xpath then need to replace the xpath that contains the correct zip so when i print to pdf 100 pages are fixed
 
user1596138
That's not what my code did, but yea if you know where it is use a document.querySelector
 
doing i am dieing here and they are shutting the lights off on me .. coould if you got a spare minute highlight the area that would need to put the documentaor selector and what would i jsut replace it with span class or number to display
 
user1596138
If you made an MVCE that's what I was gonna do
 
user1596138
Currently there's no code to mess with. Try codementor
 
8:41 PM
ok i will ..i went threw each one of the ones posted for this question and they all point to the last one just having hard trouble reading where i put the search term and the replace term
https://stackoverflow.com/questions/16662393/insert-html-into-text-node-with-javascript

https://stackoverflow.com/questions/37562475/replacing-a-lot-of-text-in-browsers-addon/37566073#37566073

https://stackoverflow.com/questions/16662393/insert-html-into-text-node-with-javascript
for a zip code
for example a simple one might work but how to get it to work for numbers and  matchText(document.getElementsByTagName("article")[0], new RegExp("\\b" + searchTerm + "\\b", "g"), function(node, match, offset) {
    var span = document.createElement("span");
    span.className = "search-term";
    span.textContent = match;
    return span;
});
would i use this mabye

// replace the text node with the new nodes
var textNode = document.createTextNode(part1);
parentNode.replaceChild(textNode, node);

ckiudl i usse it for numbers
here is alot of people submiting code to solve this
https://stackoverflow.com/questions/16662393/insert-html-into-text-node-with-javascript
 
i used to have a jquery plugin for that
unfortunately that isn't much help (the no longer existing plugin)
oh, hmm, it's probably still in one of my answers
 
what's the simplest way to use filter/map to use id's to remove items on a list?
for example: idList contains an array of id's to be used to remove the objects with the matching id's
 
i mean, filter, if id is in list, return false, ?
 
filter --> if id is in list --> .splice
 
8:56 PM
...
like, call splice each time you find one you want to remove?
in a map or filter?
 
yea
si
 
that's... overkill
 
:/
 
i guess it depends. do you want a new array, or alter the existing.
 
Had anybody come across idea of excess property check? in TypeScript
 
8:58 PM
alter existing
 
then yeah, use your method, but use forEach
no point in using filter or map if you're not filtering or mapping
 
user1596138
@overexchange Is your question a duplicate of stackoverflow.com/questions/33614328/…
 
@Traitor thanks for taking a look
 
user1596138
I don't quite understand it
 
@FredMcgiff what?
 
9:02 PM
i do have a plugin i jus loaded its the chrome extension template one and it works fine .. but for example this code
for (var i = 0; i < elements.length; i++) {
var element = elements[i];

for (var j = 0; j < element.childNodes.length; j++) {
var node = element.childNodes[j];

if (node.nodeType === 3) {
var text = node.nodeValue;
var replacedText = text.replace(/[word or phrase to replace here]/gi, '[new word or phrase]');

if (replacedText !== text) {
element.replaceChild(document.createTextNode(replacedText), node); replaces every word on page and with bracket [
it better its a mess but the last one on this page in question
stackoverflow.com/questions/16662393/… kinda explains wat i need to do
npt sire wjere tp [it t and what number
3
 
in a comparison method, how do i say 'if none of what's in list A matches anything in list B' --> do code?
 
not sure where ot put or change to find string of numbers and where exactly do i put that
 
user1596138
@FredMcgiff if you'd debug your code you'd have the answer by now. Repeating yourself forever won't help, spend the time debugging
 
user1596138
Or make an MVCE. But stop pasting the same thing into the chat.
 
for reference he's been posting it to the python room too :|
 
user1596138
9:08 PM
@AndrasDeak PHP? Or Python on top of that
 
user1596138
Yeah he's posting to #PHP, #Python and here
 
Hmm?
Oh, I see. Yeah.
I checked when he started, it was only JS and python then
 
i mean, at least it belongs here
 
yup
I just wanted to note that you don't have to be excessively understanding
 
user1596138
Well I wanted to help the person but the person just keeps saying the same thing lol
 
9:18 PM
is it me or JS is incredibly unproductive unless you know what you are doing?
i feel like c# let's you get away with more
 
I definitely disagree
 
js is the language you want to use if you have no clue what you're doing
also python
 
JS you just need a text editor, a browser and a dream. Sprinkle some vars, ifs, fors and you can have something working in no time
add in jQuery and the possibilities are endless
 
but when i use c# it lets me know if im making a casting error before hand and in JS i have to keep debugging and the problem is the casting
so i spend more time looking for casting issues than in c#
 
that's a counter to your point
c# isn't letting you get away with anything then and JS is :p
 
9:21 PM
if i knew what i was doing, i wouldnt waste time looking for casting issues
did you not read where i said that c# lets me know if im making a casting error?
 
I also read this which started the discussion.
2 mins ago, by Traitor
i feel like c# let's you get away with more
 
anyways
 
there's a "I need safeguards" kind of not-knowing-what-you-re-doing, and a "I'm a monkey" kind
 
what if im both?
 
js is good for the "I'm a monkey" kind
monkeys don't need safeguards
 
user1596138
9:24 PM
73
A: How can I install Linux and Windows 7 to run side by side, not requiring reboot

Sir AdelaideThere are two additional ways of running Windows and Linux side by side that you haven't mentioned in your question: You could install Windows Subsystem for Linux if you are running 64-bit Windows 10. This will let you run some Linux software natively on Windows. You could run both operating sy...

 
user1596138
THis answer lmao
 
well, maybe they do, but I've never been told by a monkey that they wanted safeguards
 
@FredMcgiff If it is Node and Elements, then refresh the concepts here and revisit your code.
Series webtunings is exhaustive on any concept of JS
I found it very interesting some years back. That is the good reference for any problem in JS code in real time
 
@Traitor I'm not sure about the culture of this room but I would advise that you refrain from posting questionable content, especially in lieu of the most recent post on meta
 
@Traitor I feel like I don't need to explain why I kicked you, but if I do, see me in my office.
 
user1596138
9:27 PM
Why so quick to kick? Bin and warn baby
 
You got an office?!
 
yea that's why i remove dit, my bad guys
 
user1596138
Nobody bins anymore
 
I flagged it.
It's counter to our culture here. @hat @cᴏʟᴅsᴘᴇᴇᴅ said is correct.
 
user1596138
Haha
 
9:27 PM
We're cracking down on post-and-deletes as well
 
There are 60 series, if you really need to learn JS, that covers very structurally. This is where I learnt JS
 
user1596138
@SterlingArcher my point was even the mods have a progression. It's Bin, Kick, get mods/flags
 
see.. that's why i dislike the flag... that's not offensive or rude.. but it doesn't belong, we don't have a way of deleting it, just moving it. sigh
 
i may have just double kicked
 
you did
lol
 
9:28 PM
but yeah now is not the time for that
 
Liu Kang kick
 
@Jhawins I don't even know what to do anymore so I'm just going to kick everybody lol
 
missed the first kick :/
 
user1596138
Well we used to not have kicks period and we did... Decent
 
user1596138
9:29 PM
Just funny how they're the goto now
 
we also had a lot less traffic
back then
 
user1596138
If it's about the content a kick doesn't help, tho. I was still staring at the message waiting for someone to move it ;P
 
@Jhawins remember that a kick is a warning. If it's not their first kick.. well then it's a problem user
 
@Jhawins Yes i mentioned the same point in query, and further asking why excess check?
 
So, if we see rooms where:
Offensive stuff that violates our CoC isn't flagged
Offensive stuff that violates our CoC isn't just allowed (however tacitly, through nobody flagging it), it's encouraged
People are berated, kicked or otherwise harassed for holding a room's culture to our code of conduct
^ from the meta post/response to chat.
 
9:30 PM
Also that ^
If we're caught letting things slide, the whole room can go down
 
user1596138
Yea that post implies BIN IT
 
user1596138
Lmao get rid of it.
 
user1596138
You let it go by not binning it. He came back and did your job
 
We can't assume implications, it says flag? We'll flag it
 
user1596138
Problem content is diff from problem user that was all. But shits all crazy here anyway
 
9:31 PM
Post and delete is just as bad
Shit is crazy, we're just doing what the mods and CM want us to do
 
user1596138
You want me to flag everything I see or let you guys moderate through bins?
 
@Jhawins lets not escalate a situation that doesn't need to be.
 
user1596138
One way or another. The messages need removed possibly also the user
 
It's come down to shape up or get out
 
Apr 29 at 0:40, by Loktar
Past, present, and new users, we have a repo for issues related to room culture, if you have issues with the room please post there we welcome the discussion!
 
user1596138
9:32 PM
You aren't getting it lol. Problem content isn't removed by a kick... It's removed by bin or flag. He posted problem content
 
The flag is for "spam/offensive" posts. If you disagree those posts are offensive, perhaps you need to re-evaluate your definition of "offensive".
 
user1596138
Bah whatever haha talking to a wall
 
"Post and delete" needs a name. Like paddle
> Did you see him paddle that crazy link fam?
 
how would you get a rooms length of a server structured like this:
		Server.prototype.startSockets = function()
		{
			this.socket = io.listen(this.server);

			this.socket.on('connection', function(user)
			{
				console.log(roomCount, 'test');
			})
		}

		function roomCount(room)
		{
			const roomCount = ?

			return roomCount.length;
		}
ive litrally tried everything
everything comes back either undefined or crashes
 
What do you expect it to be?
 
9:38 PM
in the code above, 0
or in my actual code, 1
 
So your rooms are socket.io namespaces?
 
im not sure what that means
ive been doing user.join to join a room
 
I've read up and, no, they are not. Rooms are a subsection of a namespace
 
does that mean im going about it the wrong way
 
How about io.nsps["/"].rooms.length?
Or something along those lines
 
9:42 PM
i think i tried io.nsps["/"].rooms[room].length before
ill tell u what error it gives me
 
hmm. why would a (singular) room have a length
 
Well, if you want the number of rooms, you should not index into the rooms
 
no sorry i want the number of clients in a room
and io.nsps["/"].rooms.length gives the error, cant read "/" of undefined
 
Maybe just dump out the entire io.nsps["/"].rooms and see what structure it has
 
that would give the same cant read '/' of undefined
 
9:45 PM
What version of socket.io is this?
 
I googled io nsps out of curiosity and found this: stackoverflow.com/questions/9352549/… which talks about the number of users in a room
is that relevant?
I know literally no JS so I can't be sure
 
thats the one i was one, none of them worked
and im on v 5.8.0
 
@RachelDockter The latest is 2.1.0
5.8.0 is probably your npm version
 
there's a newer answer too stackoverflow.com/a/46959513/5067311
 
ok yeh i looked in my package.json im on 2.1.0
think that was npm
i see an answer i havnt tried 1 sec
 
9:48 PM
hoi
 
nm that didnt work either
 
In your case it might just be this.socket.nsps
 
@overexchange thanks for youtube link i been watching it
 
this.socket is undefined apparently
 
But that's where you stored the reference in the code snippet you pasted
 
9:56 PM
yeh it makes no sense
i must be doing something wrong
 
can i return an array without the filter of an id array?
'idarray' used to filter out id's in main array?
 
can you phrase that another way?
 

« first day (2755 days earlier)      last day (2210 days later) »