« first day (2495 days earlier)      last day (2451 days later) » 

12:11 AM
@monners All of that, plus they're women.
 
12:28 AM
hi i have a question
I am trying to filter an array object
where I am scanning through looking for a property length
what can I use that will tell me none of those properties have that length
therefor truthy
 
!!>['lenthaa','lengthaaa',lengthaaaa','lengtahaaaaa'].filter(x=> x.length >10)
 
@Arrow "SyntaxError: missing ] after element list"
 
!!>['lenthaa','lengthaaa','lengthaaaa','lengtahaaaaa'].filter(x=> x.length >10)
 
@Arrow ["lengtahaaaaa"]
 
@ChristianMatthew does that help
 
12:42 AM
ahhhh
let me see
 
is there a way to have a private function in a js class?
 
yes
duck typing
 
ok
thanks
 
want an example
 
ok @arr
 
12:47 AM
no, I got it :)
 
@Arrow here is the issue
I have done that already but I am dealing with an array of objects
 
so what are you trying to filter
 
so that parmeter is met each time for each object... in this particular case 4 time
 
show me your objects
show me what you got
 
ok
tester brinnger back 2 = (2) [MdOption, MdOption]
tester brinnger back 2 = []
tester brinnger back 2 = []
tester brinnger back 2 = []
 
12:48 AM
that does not look like an object
 
sorry clipboard is stuck
 
{IamA:Object}
no worries
 
MdOption
active
:
(...)
disabled
:
(...)
id
:
(...)
multiple
:
true
onSelectionChange
:
EventEmitter {_isScalar: false, observers: Array(1), closed: false, isStopped: false, hasError: false, …}
selected
:
true
value
:
"EO"
viewValue
:
(...)
_active
:
false
_disabled
:
false
_element
:
ElementRef {nativeElement: md-option#md-option-10.mat-option.mat-option-multiple.mat-selected}
_id
:
"md-option-10"
_isCompatibilityMode
:
null
_selected
:
true
__proto__
:
Object
 
I still don't know what that is lol
 
the objects are tags
 
12:51 AM
maybe you should open a js fiddle
 
there are 4 sets of them
shen the tags are gone the array.length is 0
great...
but i need to know when all of them are gone for each object set of tags
 
That seems like a window object, are you trying to filter the windows object?
 
@KendallFrey youtu.be/gO8N3L_aERg this should work.
 
are dealing with data, can you show me the data you are working with ?
 
12:53 AM
@Abhi jesus christ are you gonna keep showing me that for the rest of my life?
 
Because proto is a method on the prototype, you might be miss interpreting the data for a method
 
This is the last time.. their official channel just uploaded the one I first told you about. I'm going to stop now..
 
lol that is funny
firedrill
 
Are you going to watch it..
 
i did
@Arrow are you there
 
12:59 AM
ya right here
 
Christian do you watch The Office
 
ok so in the truthy sense it works
if it finds something that is greater than 1 it returns a value
the issue is I need to do a check if something comes back as true
or a length > 0
any of the objects in the array
does that make more sense
 
well it's actually evaluating it, but you are right truthy falsy etc
yes so if you filter empty ,, are automatically removed, but not spaces
, , this will evaluate to true and will not be removed
 
let's see
 
what do you mean by true, false has a context, in a filter that context is undefined
 
1:06 AM
ok I have an array of objects
each object has a property selected which is another array of objects...
those objects are tags
 
ok so you can do this
 
when I add tags the array fills up with objects
so the main array selected.length > 0 will tell me if there are tags or now
not*
but the issue is I need to know effectively when there are NO tags selected in any of the 4 objects via the array
 
[{tag:'word'},{tag:'word1'},,{tag:'word22'},{tag:'word333'}].filter(x=> x.tag.length> someamount || x)
 
ahhhh
let me see
what does that or statement do
 
you mentioned missing values so it will remove [,,] undefined in the array. you might not need it, but I don't know the data you are with, looks like
 
1:13 AM
but my issue is the same... I am trying to confrim / truthy that all objects are empty... collectiviely... together
 
you probably don't need it and it unnecessary over kill on my part.
ya but the filter will get it anyway so you should be fine
 
but I can't get it
because the filter just reports back everything
let dester = newArraySlice.filter((arrayObject: any) => {
 
I don't think you are working with an array. I think you are working with object keys
 
if (arrayObject.selected.length > 0 || arrayObject) {
i'm 100% sure it is an array
tester brinnger back 2 = [MdOption]0: MdOption {_element: ElementRef, _isCompatibilityMode: null, _selected: false, _active: false, _disabled: false, …}length: 1__proto__: Array(0)
tester brinnger back 2 = []
tester brinnger back 2 = []
tester brinnger back 2 = []
each on of those, i.e 4 are array's... in the array is an object.. MdOption
this statement
if (arrayObject.selected.length > 0) {
is perfect... except I can't do the opposite of it... because it allways triggers
 
And you are targeting _selected?
 
1:18 AM
so imagine this... I have tags in one field... then that condition gets triggered
and so does the opposite because lets say I don't have tags selected in the other 3 fields
targeting selected?
MdOption
active
:
(...)
disabled
:
(...)
id
:
(...)
multiple
:
true
onSelectionChange
:
EventEmitter {_isScalar: false, observers: Array(1), closed: false, isStopped: false, hasError: false, …}
selected
:
false
what will that do?
 
const noTags = !theArray.some(item => item.selected.length > 0);
 
LMAO
hahahaha @Luggage thank You jesus
I was going nutz
 
ok, but an array has two brackets an opening bracket [ and a closing bracket ]
 
lol i promise you it's an array
i made it
 
with me own two hands
 
1:22 AM
and it has that
 
// could have just said this. :)
const sampleData = [
    {
        selected: [ { tag: 'one' }, { tag: 'two' } ]
    },
    {
        selected: [ ... ]
    }
};
 
Jesus I'm so full
 
perogies?
 
Oh yes
 
did you eat everything in that picture?
except the knives, counter, etc (Just in case Kendall is around to get pedantic)
the food.
 
1:25 AM
lol @lugg
@Luggage I will take note of that
 
God no lol even 2 full plates for me and the roomie there's so much leftovers
 
ahh, ok.
 
in es5 how do I export a Class so I can use it with new Class()? nothing I do works. this project is tiny and I can't be bothered to set up babel and use es6
 
@Luggage I read that as pre-orgies, which makes sense. Need that fuel for stamina!
 
1:30 AM
oh, I needed module.exports not just exports
 
@Luggage I am getting a not a function error
 
browser?
 
well, which one?
 
ERROR TypeError: arrayObject.some is not a function
 
1:32 AM
nevermind, they all have .some()
 
@monners can't unread
 
arrayObject is the outer array, not the object like in your example above, right?
did it come from JSON.parse(), by chance?
 
no
the arrayObject is the filtered array set
 
show me your code. format it. use CTRL-K
 
ducks and covers
 
1:37 AM
ya i still don't see the array here [MdOption]0: MdOption {_element: ElementRef, _isCompatibilityMode: null, _selected: false, _active: false, _disabled: false, …}length: 1__proto__: Array(0)
tester brinnger back 2 = []
tester brinnger back 2 = []
tester brinnger back 2 = []
 
good morning lovelies
 
good morning Tavo
Luggage you use ngnix ?
 
not if you need help with it :)
 
god dam it!! why must you hurt me sooooo
anyway, I am having an hard time understanding the resolver
with respect to docker
bless me with your wisdom
 
i don't really use docker, but did you have a question?
quickly before i go to sleep
 
1:45 AM
ok i fixed it
@lu
 
ok give me one sec so i don't sound like a idiot typeing it out
 
@Luggage i had to put it in a function... typescript
 
1 message moved to Trash can
@ChristianMatthew Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
i really appreciate you
 
my example is also valid TS.
 
1:46 AM
what is contrl k
it was giving me an error
 
might needed to add () and :any
 
I have two docker containers, one is nginix and the other is a react express node app they are both in sperate docker containers
 
const noTags = !theArray.some((item: any) => item.selected.length > 0);
 
1 message moved to Trash can
@ChristianMatthew Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
let wow = (element: any) => {
            return element.selected.length > 0;
        }

        let newSomething = !newArraySlice.some(wow);
oh yes that works @Luggage
however, now I can set my damned variable. lmao
 
1:48 AM
that wouldn't have been a TS error anyway, unless you have "no implicit any" on
 
my composure config resolver won't resolve the host of the react docker. but it works just fine if I use to sperate Nginx docker containers
 
i know nginx, but not docker.
i just saw my first docker compose file today.
never used more than one container
also, my nginx is not inside docker.
 
yes that was what the error was
i love / hate ts
but I am used to it now
 
Ooooo
that might be my problem
 
If you turn on options like "no implicit any", then you should know how to add :any without making a whole separate function.
 
1:50 AM
that is true
 
thanks luggage I'll put my code and git and show it to you later. :)
 
are you leaving now @Luggage
 
I already left.
 
left where?
 
I was never here.
 
1:53 AM
Then who are we talking to?
 
my keyboard sux, I need a new one.
 
I just signed-off an email with "Yours coscerely × tancerely". I fear I may have become a parody of myself.
That's funny
 
function EntityApi(type) {
    this.collection = db.database.getCollection(type)
}

EntityApi.prototype._getOne = function (id) {
    return this.collection.get(parseInt(id + '', 10))
}

EntityApi.prototype.get = function (req, res) {
    let found = this._getOne(req.params.id);
    res.status(found ? 200 : 404);
    res.send(found);
}

module.exports = EntityApi
when I call var a = new EntityApi('item'); a.get(1) I find that this in my class is not the class, but something else
so this._getOne is undefined
 
you're not calling that
because you need to call .get with req and res
paste your actual code
 
1:59 AM
sorry, express does the calling
app.get('/api/item/:id', api.item.get)
 
there's your problem, you're losing the reference to this
 
I can get into get(req, res) fine
 
either wrap it in a function, or do api.item.get.bind(api.item)
 
ah of course
this whole this business keeps tripping me up. I'll get it eventually
coming from C#, this is always this
thanks
 
@Luggage i have one more issue but not really sure what it is
 
2:12 AM
lol am i trash
 
Can I take you out?
 
smooth
or did you mean murder?
 
hi
 
user5738123
2:51 AM
SUP
 
3:02 AM
These days there are heavy JS-centric apps (Angular, React) all around, but if I'm trying to refer to old-style applications, such a Java-based web (JSP) application that contains JavaScript, would there be a term for that?
"Legacy App"?
 
user5738123
anyone okay with talking about the charlottesville news?
 
you'll probably be told to go to a private room again lol
 
user5738123
lol
 
@DemCodeLines progressive enhancement maybe?
 
user5738123
in JS can i update the array value by assigning it with '=' ? for example,
 
3:07 AM
yep
 
as in myArray[0] = 'newvalue'?
 
myArray[index] = 'new value'
 
user5738123
var testArray = []; testArray.push([[1],[2]])
 
lol, snap
 
user5738123
testArray[0][1] = 3;
 
user5738123
3:07 AM
ok thxx
 
yep
 
@monners Uncaught ReferenceError: index is not defined
 
user5738123
am i vamping?
 
Except global scope and script order dependency is really confusing
 
yes
that's the sort of thing you could test in 3 seconds in the browser console
 
3:08 AM
@eBay I mean, you could have googled that, but you gave an example, and it's not like you're asking us to write an app
 
you don't even need to google
 
Maybe he just wants to talk to you.
 
windows 10 complaining my battery is low when i'm plugged into the AC. Its a good OS if you like CRAP
 
@david Oh but I do!
 
user5738123
hmm browser console? i usually create a new project just to test it
 
3:09 AM
I use quokka in VSCode
 
@CoderCat mine says I have 50% battery and then shuts down with no juice
 
mine just shut off now
 
user5738123
for Monday's
 
It's not Monday here
 
3:12 AM
my laptop is older though. it ran fine in windows 8, so I assume it's some sort of hardware incompatibility. my work laptop was 'made' for windows 10 and is fine
 
user5738123
 
if your laptop is older then at least your hardware should be supported by older good windows OS's
I never liked windows ever since vista
 
user5738123
guess what the best windows ever created
 
user5738123
win xp - win 10
 
3:13 AM
windows 7 was good imo, but yeah XP was the best i used
 
Id say windows XP because ive used it every day since 2001 and Ive never seen many bugs, it is also super fast on modern hardware if it supports it
also the GUI makes more sense
 
user5738123
the first XP requiring 256MB RAM is the best ever made
 
user5738123
so light, fast, reliable
 
@eBay I want to have a chat to that rapper dude. is he happy with his life?
 
user5738123
japan still uses XP
 
3:15 AM
yeah. that was actually only a reccomendation, ive ran it on 8mb of ram before. it freezes with 7 though
 
user5738123
@hsimah wut?
 
@eBay in Friday, towards the end some dude comes on and raps
have you not ever listened to the whole thing
 
@eBay you mean china
 
user5738123
ah, he probably is happy because he made a lot of money off of Friday'
 
true
 
user5738123
3:19 AM
i feel like installing xp 256mb but theres no modern game/graphics card support :/
 
user5738123
im using win 10 but it's meh
 
thats the problem and why I cant install it
im trying to find a new, but old model laptop but its like finding a needle in a haystack
 
user5738123
why?
 
well win 7 and 10 have both almost deleted a crap load of work due to some stupid glitch
 
user5738123
you can install xp in any computer lol
 
user5738123
3:22 AM
buy whatever laptop and dualboot win 10 and xp
 
you cannot install it on most modern hardware
 
user5738123
yes you can lol
 
theres no driver support
 
user5738123
for what drivers?
 
I need a laptop btw
 
user5738123
3:22 AM
gaming drivers?
 
I dont know what gaming driver means
 
what's a gaming driver?
 
video drivers, network card drivers etc
 
user5738123
video card drivers
 
sound drivers
 
user5738123
3:23 AM
oh right
 
user5738123
damn...
 
I tried to install XP on my older computer, but it didn't boot. Driver issues.
 
user5738123
well... you could go advanced and trim win 10 into an XP variant
 
I just wanted to play some older games on it
 
if I custom made a desktop with compatible parts then it would work but I prefer a laptop for university
 
3:24 AM
the VMs I created had really poor framerate
 
nah windows 10 just isnt xp even if it looks like it a little bit
 
I wish I had kept my old hardware, but I used to give it away
 
the closest thing is to use a VM.
but as a main OS , forget it
 
user5738123
theres a secret OS
 
user5738123
it's an 8.1 variant that's for thin clients and it performs like a mofo
 
3:26 AM
hmm
 
user5738123
it's a super stripped 8.1 that supports modern drivers
 
user5738123
hard to get tho, and i forgot name
 
Ive stripped XP before, and it still seldom shows bugs too
it took up around 258 mb of disk space, I could have went even further but couldnt get the VM working when copying it to a different PC
 
yeha I used nlite to nuke most of XP and Windows 7
Vista had 8GB of printer and other device drivers
 
4:22 AM
morning room
 
aloha
 
I'd just like everyone to know that's I always believed waterguy12 would return and save us.
my faith never faltered
 
who is that
 
its a reddit thing then
 
4:43 AM
whatever happened to the leranings.org site?
there used to be a site dedicated to corporate buzzwords
i uhh...need it for somethign
close enough
http://www.bullshitbingo.net/cards/bullshit/
 
sigh chrome has stopped breaking in my js code
just as I have created a bug that requires it
 
user5738123
T_T
 
that sounds...good?
 
sounds horrible
 
5:01 AM
if you're blaming something on chrome 99% of the time it's your fault
 
chrome dev tools is love
 
user5738123
yea but that does not help him
 
it probably does
once you learn how to actually find and read error messages
 
user5738123
no because you are saying obvious things
 
your abilities skyrocket
 
user5738123
5:03 AM
that have nothing to do with solving his problem
 
they have a huge amount to do with solving his problem
his problem is currently that he is blaming the browser for misinterpreting his code, rather than his code for being misinterpret-able
he needs to see the browser as a tool for executing, debugging and ultimately fixing his code; rather than an adversary that is trying to make his life hard
 
lol
it was chrome, I restarted it and my breakpoints halted the code
there weren't any errors or anything. not sure what was up. it didnt update either.
 
 
2 hours later…
6:46 AM
@BenjaminGruenbaum oh, nice!
thanks
so much lisp.
 
Hi all, I have 3 div containers each using the same class and ID. Using js/jquery, how would I go about selecting only the third element? I'm trying to toggle its visibility. So far I have tried
$(document).ready(function(){
     $("#title-wrapper:nth-child(3)").css("visible: false");
)}
where the element is:
`<div class="col-sm-12" id="title-wrapper"></div>`
 
your problem lies not in your js skills, but in thy css
 
i have to Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays.here is the code which i feel to be correct logically but it don't it returns else part .
function diffArray(arr1, arr2) {
  var newArr = [];
 //   return newArr;
 for(var i=0;i<arr1.length;i++){

    for(var j=0;j<arr2.length;j++){

      if(arr1[i]!==arr2[j] ){

       return  newArr.push(arr1[i]);

      }
      else if(arr2[j]!==arr1[i] ){

      return  newArr.push(arr2[j]);
      }
      else{
        return 'not found';
      }
   }
 }

}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
 
@towc, after you mentioned the css I changed to this:
 
@amarghodke use console.log to see what's actually going on
 
7:01 AM
$("#title-wrapper:nth-child(3)").css("visibility: false");
 
@Daruchini closer, but not close enough
 
damn
what am I missing :p
 
@Daruchini That is invalid
There can only be one of any given ID in the entire document.
 
What if there are multiple divs using the same id?
 
<div id="foo"></div>
<div id="foo"></div> <!-- INVALID -->
@Daruchini You're gonna have a Bad Time™️
Most browser APIs assume there's only one of a given ID, and will simply ignore the rest.
Some will behave in totally unexpected ways.
 
7:04 AM
Fair enough, I guess i'm abusing what ID's are used for
Its because I was using bootstraps grid system. I can change that
Thanks :)
 
IDs are used to unambiguously identify an element on the page, doesn't really work well if there's more than one of the same :D
 
I'm with you. Thanks :)
am I a pathetic mortal? :/
 
Don't feel bad, you're all pathetic mortals to me.
 
You're too kind
 
well....
oh wait, that's a real book. The PDF is just images
I am so clueless
the text is clickbaity and targets 13yos
the content is probably actually interesting, but as my conscious is seeking adultness and stability, I feel repelled by it
 
7:15 AM
Do you use VueJS in your work?
 
> I used to think real men
subclassed everything. That was until
I learned the power of extension
at runtime, rather than at compile
time. Now look at me!
 
What do you think of it?
 
vue should be used a lot more
 
I think React is way better.
 
many companies have their good reasons for not using it, but if you're starting something from scratch and are considering either react or angular, it may be that vue is actually what you're after
 
7:21 AM
@towc ew
 
I'm really wtfed by it
 
Is that really a blond women selling a design patterns book?
If she was a known programmer that'd be fine, but selling programmer books with sex is disgusting
 
that's a real O'Reilly book
 
Unless Elisabeth Freeman looks way different today :D
 
I don't think there's any sex connotation tho.
 
7:28 AM
So, "Design Patterns" is "DP" as well
 
@towc : now i am getting this array [1,1,1,1,2,2,2,2,3,3,3,3,5,5,5,5] what is still mistake ?
 
@amarghodke use console.log in a more sensible way :)
like logging the relevant parts of each array, and seeing what if clause is taken
it's 2017, book authors now write tests for books
 
7:46 AM
@towc Amazing
That's how most of my test suites look as well though
 
I liked the idea, didn't check the actual code :P
 
I expect nothing less from you, M4 maybe... :P
 

« first day (2495 days earlier)      last day (2451 days later) »