« first day (2904 days earlier)      last day (2267 days later) » 

00:15
@demonhunter24 Any chance you put on GitHub yet?
00:51
Comparing to itself is potentially pointless
lol Math.random() !== Math.random() react, duh
random is terrible.
@rlemon Just a quick note Rob. The issue was that I was waiting for DOMContentLoaded and not readystatechange "complete". Thus, getBoundingClientRect() did not work as expected.
Thanks for offering to help.
@paul23 but what isn't terrible?
user8871181
01:09
@david 2D collision detection (developer.mozilla.org/en-US/docs/Games/Techniques/…) does solve my problem - but my rectangles are not explicitly positioned! D:
user8871181
@JBis ..no not yet
@demonhunter24 what exactly are you trying to do? are you trying to drag and drop the rectangle?
user8871181
@DavidKamer I am trying to detect if the userBox (desktop rectangle that is created when you click and drag) is highlighting a desktop Program Icon - if it is, I need to change the Program Icons bg color
user8871181
Similar behaviour to Windows desktop
look at what I added into youre destroy function and open your console
just compare positions using x and y cords with height and width across your drawn rect and the retrieved location and height/width and then you'll get an answer on whether a is within b
user8871181
01:20
@DavidKamer +1
@demonhunter24 Maybe I'm missing something but this should be pretty simple what about this....
user8871181
If you are about to post code - I am not going to look at it :D
why?
user8871181
I want to try to work it out for myself. Thanks anyway, though ;)
Thats why my first comment was "I only want a hint - not an entire solution"
@demonhunter24 Ok fair enough I can point you in the right direction. How about that?
user8871181
01:31
ok :D
you can add the positions up if you get a position that isn't absolute in the context of the window (hopefully that makes sense)
user8871181
with the help of 'element.getBoundingClientRect();' right?
yeah. I'm not sure what it's actually returning in term of it's place on the page. There may even be a better method to use tbh
Take a look at this
Its just some minor changes
And me being an idiot here
in Java, Sep 24 at 19:09, by JBis
How do you know if pair of coordinates is in a square?
Those two things may help
user8871181
I DIT IT!!!!!!
user8871181
01:46
Thanks @everyone
Yay
Congrats
user8871181
:D :D :D
Can I see jsfiddle?
user8871181
Oh.. haven't put it in one yet... I'll do that now.
Thanks. Want to know just incase I need to ever to it :)
user8729657
02:09
Has anyone used Parsley for field validation or are there other api's?
@OvieAdese I have never used a validation api. Validation is pretty standard and by the looks of it Parsley doesn't seem to simplify it much.
user8871181
Im back..
user8871181
@JBis ..and here is the fiddle:
https://jsfiddle.net/w95y4qog/1/
user8871181
..I should probably neaten that code
user8871181
02:24
@JBis @DavidKamer and @david I will be sure to credit you in the credits.txt on spiderOS's desktop :D
@demonhunter24 lol did I even help?
@demonhunter24 Hmm. Doesn't seem to work if the box is very thin.
user8871181
@JBis hmm.. your right
Math?
user8871181
My code may cause some problems, actually. All that conditioning was for just one icon! There's about 5 desktop icons so far..
I feel like this is being over engineered. Theres gotta be a simpler way to do this.
user8871181
02:40
Thats what I'm thinking. But hey, I learnt about getBoundingClientRect() and a heap of other things!
Hi
I'm stuck on a stupid thing
can someone help me?
user8871181
!!dontask
in C#, Jul 3 at 19:41, by Kendall Frey
Don't ask if you're allowed to ask a question. Don't ask if anyone's available or knows how to use what you're using. Don't say you're going to post a question. Just ask your question.
@Natarr If I can read your mind and know your exact problem, then you should be able to read the answer from my mind too.
:)
Cool
So i'm gettin "Unexpected identifier" when i execute node on my app
On the following line
module.exports = {
async register (req, res) {
It puts ^^^^^^ below "register"
02:44
!!mvce
@JBis That didn't make much sense. Use the !!/help command to learn more.
darn it
@jbis
THanks for your help
@Natarr Can we have a MVCE→https://stackoverflow.com/help/mcve?
I didn't know about that, here i go
02:46
1 message moved to Trash can
@Natarr Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
module.exports = {
  async register (req, res) {
    try {
      console.log("Hello")
    } catch (err) {
      console.log("Hellon't")
    }
  }
}
Sorry
@JBis
That's my example, i get the error of "Unexpected identifier" on register
user8871181
03:30
@JBis It may be over-engineered but at least it works:
https://jsfiddle.net/p5d0rhyt/
..for as many icons as I add
its blank >: {
user8871181
cbf adding everything.. just shoved in the JS
user8871181
Thats because one of the arrays is empty (filled in onLoadup - which isnt in Fiddle) but it will all work in the next release of spiderOS
var ele = data;
var z = elem;
When you copy and paste and dont want to change all the variables ;)
@demonhunter24 Yippee.
user8871181
I guess this goes to show that JavaScript was not intended to be used to build an OS (..try and stop me..)
03:38
Made with Electron
user8871181
I think I'm going to scrap this:
jsfiddle.net/p5d0rhyt
..just seems to be too much for whats really necesarry - and it has spiked my power consumption levels which doesnt surprise me since I've got a `for loop` with a heap of conditional tests - that executes onmousemove
Have you considered moving everything over to a canvas?
user8871181
I haven't bothered learning about the Canvas, yet. But I will look into it.
0
Q: Deepstream 1 - n relation

user2015I'm trying to build a user notification using Deepstream.io. I'm using deepstream.io-storage-mongodb for storage. My data structure: User ================= id - email - others Notication ================= userId - notification I'm try to implement 1-n modelling deepsteam tutorial. But I can'...

@user2015 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.
03:43
@demonhunter24 Hahahah "This is Windows 95, running in an Electron app. Yes, it's the full thing. I'm sorry."
user8871181
@JBis lol
One of the issues "I suggest adding a new feature that will actually slow that thing down, in order to simulate a real-life windows system"
I gtg do some work now
user8871181
:( ok
@demonhunter24 Good luck with your spiderOS!
user8871181
ty
I wil put it up on GitHub as soon as I can :D
03:46
yay
Oh one last thing. May I suggest doing similar to what Google does? They dont check on mouse move they check onmouseup. Much less checks.
I just realized this functionality exists in Google Drawings.
user8871181
omouseup is when the 'userBox' is destroyed. What you said would work, but it'd behave different to how the user expects - in the sense that the desktop items wont be highlighted until they release the mouse
06:25
@demonhunter24 No, you mark when the mouse is down, and then you routinely check the position of the mouse and redraw accordingly
Rather than check every single mouse move event
In a way, you just update like once every 100 ms and just pretend they're real mousemove events
10 times per second is far better than 50 or 100 times per second
06:53
o/ @Neil
Do you know the Battle of Hastings? Well, it did not occur in Hastings, but in Battle.
07:09
@BenjaminGruenbaum what happens behind the scenes if you do it twice? Another optimization?
@KarelG Ba dum tss?
I jest not. It is a truth
A duck walks into a pub and orders a pint of beer and a ham sandwich.

The bartender looks at him and says, "Hang on! You're a duck."

"I see your eyes are working," replies the duck.

"And you can talk!" exclaims the bartender.

"I see your ears are working, too," says the duck. "Now if you don't mind, can I have my beer and my sandwich please?"

"Certainly, sorry about that" says the bartender as he pours the duck a pint. "It's just we don't get many ducks in this pub. What are you doing around this way?"
lol
-2
Q: Why My Regex makes Browser Hang when some special characters?

CrackIti tried to edit this soo much times but unable to do so. Please help me.

some of the best jokes I know involve ducks and bars
07:20
do you know what happens if a woman accompanies the bartender behind the bar?
no, what? ._.
he becomes a chick tender?
he's getting ducked.
is that an idiom that I'm not familiar with?
probably
check urban
whoops a VM server just crashed.
!!afk fixing VM server with a virtual screwdriver
07:43
Impressive!
@Neil TL;DR. Is it funny?
@geisterfurz007 It's english type humor I suppose.. so a little off-balance humor if you like that sort of thing
08:25
🚀
09:24
Wotd: Trosseau - the personal possessions of a bride usually including clothes, accessories, and household linens and wares.
Hi guys someone use tomcat?
I'm sure there must be someone out there who does
Hey If anyone is into typescript stuff I'd be happy about any answer
10:13
Typical.. they call call me up because why write me when the matter is urgent, and then when I ask them to give me all the (16+ long) numbers in an e-mail, crickets..
crickets? :o
crickets!
10:48
wow I don't know how to use this website regexr.com/40ak3 should I require to sign in and @Neil
@KarelG
@CommonMan Just write the regex and the text you want to test on below
no need to sign in
If you save the regex, the URL changes. if you pass that URL to someone here, we can see what you see
wow my understanding was totally wrong... about the website. i thought if i write the text it would generate the regular expression
i figured out how to use it with the help of link sent by @Neil
thank you guys
there is a fire drill mockup
nooooooo way
for any text, there are a million and one regular expressions that would fit it
it's not exactly a one-to-one mapping
11:05
@Neil he said something about that yesterday
22 hours ago, by Common Man
in PHP we would match this pattern using regular expression,

preg_match('/^number-text-number/')
I was a bit confused because that is not correct.
or they added it (although it is less likely because it does not fit with the language syntax)
Hello 🖖
user6718998
11:24
Hi there
user6718998
why I cannot set the state ? It will reach infinite
1 message moved to Trash can
@Thewise Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
user6718998
I pass it like: onChange={this.handleSelectedItemChange(item)}
user6718998
@Neil ?
11:37
@Thewise Because setting the state selected trigggers selectedItemChange
I assume anyway
user6718998
12:02
I used another attribute in function head like (item) => (value) =>
user6718998
and now it works
user6718998
but value doesn't change..
@Neil another fact about ducks on reddit , Not sure if it is a truth.
go figure if my proxy lets me visit reddit
12:46
Hello, does anyone know how to check if an array of objects is an array? All the solutions return object or false to me
what are "all the solutions"?
there's one named Array.isArray(), that is pretty obvious, so...
Array.isArray / typeof / Object.prototype.toString.call(temp[key]) == '[object Array]
they all doesn't work
array of objects is the property of an object maybe that's why
FIX ALL THE THINGS!
maybe you don't have an array then
Well I do, I can see where it's defined and it outputs members into the console
12:50
Now the question of the year: If you're sure it's an array, why do you need to check if it is an array?
I loop through objects' properties not all of them are arrays and if it's array it has to do something else
So what makes you think the Array.isArray doesn't work?
can we see a bit of code?
console.log(Array.isArray(object[key])) always returns false
ok, well show us the object
it's massive
12:55
hmm, can you make a small version of your object that will still show the same results?
1 message moved to Trash can
@Žilvinas Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
use ctrl+k for code formatting please
costs: {
labourCost: {
type: 'calculated',
units: '£ / h',
label: 'Labour',
value: 0,
},
materials: {
type: 'calculated',
units: '£ / h',
label: 'Materials',
value: 0,
},
wastePounds: {
type: 'calculated',
units: '£ / h',
label: 'Waste',
value: 0,
},
},
consumables: [{
title: 'test',
value: 5,
unit: '',
}],
energy: [{
title: 'test',
value: 5,
unit: '',
}],
that's a few properties of the object, costs is object, consumables is array
how are you going through that object?
I'm dumb, thanks, I was going through wrong object
solved it now
13:08
@Žilvinas :)
14:08
Is there a reliable way to monkey-patch modules?
for nodejs framework (in other words, can I make sure that in my application all imports of the original module load my patched versions of the code)?
@paul23 ouch
I suppose you could keep a copy together with your source and load that instead
Well sails has it's own way of loading modules, (and I wish to extend some "controller" in sails so that I can have a basecontroller that is shared between all our projects and extend it in the specific projects)
14:28
user1596138
14:38
Does anyone use linkedin api
user1596138
Well I know someone does. But yea
user1596138
Nobody in our org seems to have our login credentials haha...
user1596138
Just wondering if it's locked down by domain, since I have the same code running on 2 domains but IN.User.Authorize is undefined on one page.
user1596138
14:58
LinkedIn docs are doing a 302 loop for me. So I will probably just not be fixing this today haha
user1596138
15:11
It's Getting started with LinkedIn authorization API. Not getting started with Javascript. Tackling an API implies you already know the basics of the language, which, no offense, you evidently don't. — Jeremy Thille Mar 2 '15 at 9:18
user1596138
What a douche
user1596138
He was wrong and the OP was using proper code bahaha I'm dead over here
lmao
15:24
.length does not work with latest java scripts. — Amit Kumar Aug 16 '17 at 13:17
user1596138
wat
user1596138
@amit_kumar yes it does. — Kevin B Aug 16 '17 at 13:44
user1596138
Why does Chrome re-name my bookmarks when I update it
user1596138
"facebook" became "3 notifications" this morning. Even tho I have none haha
never experienced that
user1596138
15:27
I've seen it happen only 2-3 times in the last year
user1596138
Each time was right after an update tho.
user1596138
Guess I'm on beta channel so I can't really complain
user1596138
16:11
Dead rom is dead today
wow people are arguing that they "can't make homework when we have no smartphone"... Since when does one need a smartphone to do math.
why no smartphones?
user1596138
16:31
Just pulled out a 11 year old tube of Arctic Silver haha. Waste not want not
16:46
@BenjaminGruenbaum imagine what a discussion would look like if someone tried to push express into node core. one could make a good argument about http not being usable by itself for any apps built with node. then an argument would ensure about the defaults of such a framework in core etc
thats how this promise thing feels to me
like there's obviously a problem, but the solution doesn't belong in node itself
@snek I disagree with the notion. Most mainstream languages with HTTP capabilities have a low level HTTP primitive that's at about the same abstraction level as Node's HTTP module.
@MadaraUchiha i use http more than i use express
i'm just making an example
 
1 hour later…
18:00
Got asked to implement DOMStore, store that has .get() .set() and .has() with the key being DOMNode
class DOMStore extends WeakMap {} // great success
:ok_hand:
😆
#not_the_answer_they_were_looking_for
any of you using Docker?
18:25
I use it
Not great with it, though
@snek On the same context, got asked to implement a function to deep flatten an array
const deepFlat = arr => arr.flat(Infinity); // great success #2
18:42
const deepFlat = arr => arr.height = 0; // great success #3
:D
@rlemon 😮
I know right? I make interviewers weep tears of joy.
.flat(Infinity) totally gave her a "mind = blown"
But the WeakMap was just perfect. They also wanted the exact same API and everything
it's a shame I'm holding on to old sexy chrome, array.flat doesn't work for me
:shrugs:
19:06
@rlemon I think I have the extension working with no errors in firefox...
it was literally two lines of code if I'm right
cool
like I said, it probably wasn't going to be hard
I just don't know FF at all
don't ever use it
@rlemon not many people do. There may be a few more issues with the preferences page, but I'm going to need to test in chrome to make sure I'm not misunderstanding. Is it supposed to automatically have the dark theme enabled and is that first checkbox supposed to disable it? I'll test it out so don't worry about explaining it.
user1596138
user1596138
Yum
user1596138
jfc
user1596138
19:17
Idk what that is but it has had a very hot life.
Anyone know what that zig zag trace is for?
user1596138
Or a very cool one by not having to absorb heat off both the GPU and CPU :thinking:
Not sure why you would increase your resistance/impedance on purpose.
Found it. It's so it's the same length as another trace in the bus.
user1596138
Oh in my pic?
user1596138
Yea, latency
19:20
Yeah.
user1596138
?
user1596138
They were just bored
user1596138
I'm just happy to be able to open programs on the GPU without throttling/crashing in <2mins haha
user1596138
This thing was a damn hot plate
Also that chip is DRAM.
19:53
@rlemon What file does the youtube link stuff?
Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘youtube.com’) does not match the recipient window’s origin (‘developer.mozilla.org’).
debugger isn't getting me a file name, I don't know gulp and I can't find where the youtube url module is at
wait, I might have found it. wow I'm blind lol
lol
20:36
@rlemon Does the ISC license mean I can't use the MIT license? I know some licenses are retrictive
just PR to a new branch?
FF branch
bam son
idk about lics. I think that was just chosen because that's what git defaulted to
I wasn't really concerned
alright, I'm doing MIT for ease. The code is still ISC but the extension will technically be MIT if I understand this correctly.
don't think that works that way
the code is the extension
ok, lol. Idk, but I published under MIT. I don't think it will matter unless you really care. ISC wasn't a default option and I don't want to waste time with approval.
files lawsuit
20:42
lol, I'll just do apache 2.0 if that's the case jk
Let me know if you want me to put any credits or info on this. I can even hand over control to you if you want. It's entirely up to you
ofc I want credits
@rlemon What link do you want in the description?
to the github repo
Sounds good
Who uses Firefox?
20:46
also, I don't think you can change the lic, ISC seems pretty restrictive on that
I admit ISC wasn't the best choice, I didn't think about lics at the time
@rlemon It doesn't explicitly disallow it. I'll check if it can change. I think that the most restrictive would still apply as the license file is till in the source code for ISC.
Also do you want your personal site in the description?
I don't know much about how to go about changing lics. I have no problem moving over to MIT if that's as easy as just changing it
I think that the MIT license would only apply to the modified portions that I changed if it applies at all. I don't think it would change the original code because I left the ISC as is required but licensed the firefox extension port parts under mit
I've updated to make it more clear.
It's ISC now
with your name on it lol
@rlemon do you want an email address as "a contributor" added to the page?
I don't feel it's right to go track down all the contributor's emails and put them on there w/o consent and github doesn't really have a reliable method to contact individuals privately...
Does anyone here go to Javascript meetups. There's some in my city, not sure if its worth going
@chevybow 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.
20:54
i do not
@chevybow I've heard it is worth it but I've never been as I live in the country
@DavidKamer linking back to the repo is enough, also I encourage you to PR the FF additions to the repo and not have them live in separate places
it is still one project.
any changes to the chrome styles should be reflected on the FF styles.
right now you fragmented them
we can work FF into the build, or create a proper build script
@rlemon ok, can you send me a tutorial on how to do this? I know very little about git when it comes to stuff this high level
we can do it monday, but basically clone the repo, make a new branch, commit your shit, send a PR to me with that new code
I think.
then I can merge them into a single branch with a build that will target both FF and Chrome
then all additions made by contributors get updated on both browsers
anyways, have a nice weekend
I'm out
@rlemon yeah let's do it monday. I have to get some other stuff done tonight. Have a good weekend!
21:07
hi
having an issue with my jest specs...one is failing on a component where I import images using require in react-native.
Is that a correct understanding that it's trying to transform an @ symbol in the require?
```
SyntaxError: Unexpected token ILLEGAL

at transformAndBuildScript (node_modules/jest-runtime/build/transform.js:316:10)
at Object.<anonymous> (src/components/DeckSwiperComponent.js:12:7)
at Object.<anonymous> (src/modules/squareOffset/SquareOffsetView.js:13:26)
```
which causes the illegal token
Does someone knows if its possible to tell webpack "dont add shit to my bundle, just export an iife"?
21:33
wut
21:50
@KevinB Something like mergely.com/F4Ex2ozW
NH.
NH.
22:35
Haven't gotten much attention on my difficult Selenium question...
Unfortunately, it seems the nature of all the bugs I encounter these days is un-debuggable (right now I have one of those errors when displaying an error page, I'm hoping this will go away with the next scheduled build though)..
NH.
NH.
22:59
hmmm... noone here?
23:48
@NH. On friday evening? Not much of a chance, I'm afraid.

« first day (2904 days earlier)      last day (2267 days later) »