« first day (2942 days earlier)      last day (2228 days later) » 

user8871181
00:21
@JBis You asked how I was going to achieve documents:

http://hntr.atwebpages.com/spiderOS/prestart/index.html
Hi guys, does anyone know if it's possible to run the same code multiple times at the same time? Let's say I have 10 people and I need to do the same function at the same time for each one. See the image, for example:

https://i.sstatic.net/l1905.jpg
@viniciussvl 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.
Is it possible to do that? If yes, what technologies / programming languages should I use?
I do not know if you could understand, but what I want is to execute the X function 10 times only at the same time / parallel...
00:39
@demonhunter24 Shit its really coming along!
@demonhunter24 Only suggestion would be to have the events onmousedown.
@demonhunter24 But overall very cool. Have you put on GitHub yet?
 
4 hours later…
05:06
Hi, best wishes with everyone
I am suffering from an issue for several days and no one has answered my question on stack. Please someone help there. I am just tired. stackoverflow.com/questions/52643951/…
Thank you in Advance,
 
2 hours later…
06:46
I am setting up the Android device simulator using expo. I followed this guideline from the beginning to the end, but I get the error message:
```
Couldn't start project on Android: adb E 24204 36764865 usb_osx.cpp:138] Unable to create an interface plug-in (e00002be)
error: could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
```

Does anyone have any idea what I can do about this?
07:23
@sflow Seeing how this has nothing to do with javascript, I'm afraid I can't help you
yeah, it's react native though
now I get different messages...
```
Couldn't start project on Android: Error running adb: Error running app. Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=exp://172.200.1.114:19000 flg=0x10000000 }
```
believe it or not, that's just as vague to you as it is to me
maybe it's having trouble loading android.intent.action.VIEW enumerator?
@Neil how can i diagnose that? any idea how i can fix it?
@sflow Search on google for "Activity not started, unable to resolve Intent"
seems like the most meaningful part of your error
if anyone's had that problem, it'll show up
Why I am getting this error in server.js file ?
code:
Conversation.findOneAndUpdate(
              { user1 : 'X', user2: 'Y' },
              { conversations : { $push : { author, message, date },
              { upsert : true}
            );
Typeerror -> Property assignment expected.
07:33
@funjoker { conversations : { $push : { author, message, date },
yeah, I googled before I ask here, and I've tried some, but I still have no clue wht the problem is.
like this one:
https://github.com/react-community/create-react-native-app/issues/112
Missing a bracket or two..
hmm...
@sflow Maybe you should read more carefully
in your own link, I saw:
> Do you see the Expo app installed on your simulator @xingjianpan?
Then:
@neil Oh ok got it thank you
07:35
> @jesseruder Ah, I see! No, I don't have Expo App installed on my simulator.
@sflow maybe you're missing the expo app?
This from someone who has no idea about the technologies you're using.. just going by hunch
i do have expo
well did you verify?
did you verify that it is setup properly?
You understand the alternative is to assume there is a bug with Expo, which let me tell you right now is very improbable
good call
yeah i agree
i think there is something wrong with the config
good, now you're heading in the right direction :)
Why I cannot access variables inisde other functions in javascript ?
code:
socket.on('GET_USER', function (data) {
        console.log(data);
        var user1 = data.user2;
      });

      socket.on('LOGGEDIN_USER', function(data) {
        console.log(data);
        var user2 = data.user1;
      });

      socket.on('SEND_MESSAGE', function(data){

        let author = data.author;
        let message = data.message;
        let date = data.date;

        // Check for name and message
        if(author !== '' || message !== '' || date !== ''){
            // Insert message
Why I am getting error at this line -> { user1 : user1, user2: user2 }, <--- Why cannot I access user1 and user2 I have used var
07:51
@funjoker they're under different scopes
user1 and user2 are created in their own internal scope which ends
you need to assign user1 and user2 to variables existing outside that scope if anything
!!> var a=5; { a = 10; var b = 15; }; console.log(a, b);
@Neil "undefined" Logged: 10,15
oh that's a bad example :P
ignore that..
b was supposed to be undefined there
07:58
variables declared in an inner scope can't get used in the outer scope
not unless they're already declared in the outer scope prior to being run declared
uhn... b isn't undefined there because you used var
!!> var a=5; { a = 10; var b = 15; }; console.log(a + b);
@KarelG "undefined" Logged: 25
that is why let got introduced
@KarelG then his example should work?
no. because of the function scope.
08:10
so function scope works differently than block scope?
!!> var a=5; (function(){ a = 10; var b = 15; })(); console.log(a, b);
@Neil "SyntaxError: missing ( before formal parameters"
@Neil "ReferenceError: b is not defined"
apparently so
that's how I thought it would work
!!> let a=5; { a = 10; let b = 15; }; console.log(a, b);
@Neil "ReferenceError: b is not defined"
@Neil How did you think it would work?
@MadaraUchiha I thought it would work as it worked for function scope
08:15
Hi
I'm not sure if this is off-topic.
Does anyone know how to publish a jQuery plugin?
By publishing I meant to list in a public directory where all can access.
@musafar006 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.
@musafar006 you'd publish it to npm
@CapricaSix thanks
thanks
and yes, I already published in npm. But I am not sure whether others can find it, bcos there are no views/downloads.
Put it on github and write blog posts about it
Although to be fair there isn't any jQuery hype in the last 3-5 years
jQuery is a bit "old" :/
look at the first character of each word
08:21
@BenjaminGruenbaum ok thanks.. is npm jquery-plugin still active?
it depends of what your plugin does
@KarelG "acausal retrograde domains" wtf
are these like all buzzwords just so that he could write TARDIS acronym?
@KarelG ok thanks
or do they hold some meaning?
kinda "fitting" to the scope but it is to fit the tardis thing yes
that pdf can be read for free here: arxiv.org/pdf/1310.7985.pdf
08:27
Scalable Kernal Y2K Realtime Imaging Multiprocessor (snicker)
08:42
How to populate mongodb documents in collection using nodejs ?
Can someone please help here -> stackoverflow.com/questions/53150727/…
is there a way in pure CSS to make text go vertically in narrow elements?
or even not vertically but rotated 90 degrees
hi guys i have a question
I don't understand what id "pan" in pan and zoom operation in chart^
go stand in line like the rest of us
@BartekBanachewicz just rotate it?
or do you mean
T
E
X
T
?
@Doflamingo19 you need to add more clarification on that. If you are referencing to which values used, you can look into the docs (which charts are you talking about btw?) or trying out itself
@funjoker your second parameter is wrong
please check the docs
09:01
@KarelG either really
well hmm I guess that vertical text can be achieved by wrapping by letter somehow
i.e. breaking words by letters
I just need it to be readable on vertical elements
word-wrap: break-word exists :P
that name got changed tho. overflow wrap or something.
dunno, word-wrap worked
@KarelG Why second parameter is wrong ? I want to $push and not $set in mongo collection
09:05
@KarelGi I want know what pan opertaion done
zoom increase the view
ah well. Officially seen it is overflow-wrap. But that is a rename from the word-wrap that got used in the past: w3.org/TR/css-text-3/#overflow-wrap-property
well it sort of worked
but p an what is?
I only really need it readable, not beautiful I guess
09:06
@funjoker $push is for insert. Not update. You are using findOneAndUpdate
ok so for more funny things
can I parametrize CSS classes
@KarelG ok wait let me describe my problem in detail
@BartekBanachewicz uhm... Not sure what you meant :)
@funjoker according to the docs, $push could be used only on db.collection.update(), db.collection.findAndModify()
09:09
I wonder if I pass e.g. --len=5 I can then do prop: var(--len)em;
oh that. Not so supported AFAIK
caniuse claims otherwise
also I don't care about anything else than newest Chrome
go ahead then :P
09:10
yeah again so can I change the unit on a CSS variable?
Or like apply a unit to a unitless one
@KarelG See this structure below:
{
	"user1": "XYZ",
	"user2": "PQR",
	"conversations": [
	{
		"author": "XYZ",
    		"message": "Hello from PQR",
    		"date": 1541347781881
	},
	{
		"author": "XYZ",
    		"message": "What are you doing",
    		"date": 1541347781884
	}
	]
},
{
	"user1": "ABC",
	"user2": "PQR",
	"conversations": [
	{
		"author": "ABC",
    		"message": "Hello from PQR",
    		"date": 1541347781881
	},
	{
		"author": "ABC",
    		"message": "What are you doing",
    		"date": 1541347781886
	}
	]
}
Now between user XYZ and user PQR if new message is added I want to push that message in conversation array
@BartekBanachewicz why don't you pass the unit? those variables are string anyways
@KarelG I'd kinda like to separate the markup values, which are abstract, from presentation units
Now let's say user ABC and user UVW has never messaged each other so in that case a new object should be created and the messages should be added in conversation array.
calc(var(--len) * 1em) should work tho
09:13
@KarelG Did you got it what I am trying to do ?
yes. You need findAndModify
Ok so in that case I will be able to push the messages inside conversation array am I right ?
(be aware that it returns the document before it gets modified. If you want to get a modified document (thus after updating it), you need to add a flag... forgot which one
If the conversation doesn't exist between the any 2 users then in that case it should create a new document so for that I should use upsert: true is it correct ?
yes
all those info are in the docs btw
:)
09:18
But my doubt is can I use just .update() with $push ? And inside update I will add upsert:true Will it work ?
@BartekBanachewicz css is capable to handle it :P
calc(10px + 1em) works without problems
css tranforms relative units to absolute and does calcs with it.
@funjoker no. that is the difference between update and findAndModify. Both does an update but the first one does not create. The second does create if you pass that flag
I am not a fan of that findAndModify though. Makes debugging hard and is prone for errors if the db is not set correctly (ie not having unique index)
just get a document first with select. If exist, do update otherwise do insert.
I know that it adds an extra db connection call, but is much safer to use and much easier to maintain.
09:40
hi guys someone use ng2-chart? this wrapper for chart.js ?
@Doflamingo19 missed your previous ping. Pan is usually moving the displaying view.
like "panning" google maps means that you are moving the map
see that as "drag" (synonym)
ah ok
thanks
10:05
8
Q: How do I cache bust imported modules in es6?

spinnersES6 modules allows us to create a single point of entry like so: // main.js import foo from 'foo'; foo() <script src="scripts/main.js" type="module"></script> foo.js will be stored in the browser cache. This is desirable until I push a new version of foo.js to production. It ...

is there seriously no solution for this lol
are esm modules a meme
10:17
use the old version trick
¯\_(ツ)_/¯
really, the type attribute just tells the browser that the file is a module.
fetching its content is same as usual.
10:31
old version trick is fine but the point is having modules
so stuff imported in the versioned module would need a version too
it's not as usual imo
there's some hidden cache
that doesn't exist when just getting normal scripts
anyway, I "solved" it with iframes lol
guess the cache is per window object
you only need a version at the source
no
wha
it doesn't work, inner modules don't get fetched
been doing like this and did not have experienced problems with module dependencies
10:33
I just did
I'm such a factorio geek. You mention modules and the first thing I think of is factorio
heh
it's pretty glorious with iframes
using the shiniest js tech with iframe hacks
ironic af
I need to check that
if i have time. Silly issue atm
there's a new feature on codesandbox.io
to use actual vscode in the browser
but it doesn't seem to work
11:05
guys if anyone uses ng2-chart
0
Q: How to implement zoom and move in my ng2-chart

Doflamingo19Suppose there are one chart and two buttons. The buttons do this: active zoom move chart This is my hmtl code: <div> <div style="display: block"> <canvas baseChart [datasets]="barChartData" [labels]="barChartLabels" [options]="barChartOptions" ...

@Doflamingo19 is the problem not just this:
zoom: {
    // Boolean to enable zooming
    enabled: false
just enable it and allow the user to zoom it themselves. No need to write a function to handle it
@KarelG It is thinked in this way. At the start the chart is loaded and the user can be see it, but when the use want do zoom operation, he must click on button that activates the zoom
11:20
why that hassle?
just provide it or not. Don't provide a half-baked approach.
what if you don't want to zoom into the center.. what if you want to zoom in the center and to the left?
a button just says "yes" to zooming. It doesn't say how much to pan, how much to zoom, if you wanted to zoom out rather than zooming in..
to replace what is otherwise an intuitive interface, you'd have to add a lot of buttons, and that's still not necessarily better
@KarelG it was thinked in this way !
@Doflamingo19 propose an alternative solution then
We're the programmers here. We're guides in the land of computation technology. If we see someone about to fall off a cliff, we warn them at least
Can we travel to the bottom of the chasm and then back up? Sure.. it'll be expensive and very time-consuming.. but we can do it.. should we take the bridge instead? Yes, it is recommended..
11:48
https://jsfiddle.net/zv1w6j9u/1/#run

Hi guys I have a very BASIC question -
Have some complex code but Im wondering on the best way to get the funcs to call eachother!?
@ChrisCullen 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.
@ChrisCullen that's not BASIC
it's actually javascript/HTML
@Neoares ok Yea I mean function scope is sort of a basic concept but this isnt an easy question
jokes apart...
!!tell ChrisCullen mcve
@ChrisCullen If you would like assistance, please create a Minimal, Complete, and Verifiable Example
user6718998
11:52
hello fellow programmers. Can somebody explain to me what is getState() ? (no, not redux)
https://jsfiddle.net/zv1w6j9u/3/
this function now does something and has inputs
12:18
@KarelG What does find() return ? Can I do ` conversation.find({ $and :[{user1: user1}, {user2: user2}] })` and after that if it exists then just push new message and if doesn't exist create new document
12:44
uhm ... is that not straightforward?
12:59
@KarelG I followed the simple way that you mentioned earlier. So instead of using findoneandModify or findoneandUpdate() I am using update and insert only.But now I am not able to get the ddata on client side why so ? I am able to store the data in database successfully but doesn't display it on client it shows empty array in browser console
@Neoares hehe I thought the same
@Thewise getState() is an expression of a call to a "getState" variable with no arguments
"a getstate variable"?
@KarelG Why does find() return empty array ?
so the getter for a getState variable would technically be getGetState
give me time to check your code lol.
13:10
Oh ok sorry
@funjoker with absolutely no context in this conversation, I'm going to have to say it's because you're not finding anything :P
@Neil No, get getState if anything
get getGetState
@Neil But what's wrong in this -> conversation.find($and : [{user1: user1}, {user2: user2}] ).sort({_id: 1}).toArray(function (err, res) {
get getGetGetState.. universe implodes
@funjoker Hard to say.. maybe nothing
In other words, maybe for the parameters passed, it's correct that it's not finding anything
13:14
@Neil funny question: Seeing how JS views anything with a .then() as a promise (sort of), what should this code do?
class DuckYouPromise {
  get then() {
    if (Math.random() > .5) { throw new Error('duck you'); }
    return function(fn) { Promise.resolve(fn()) }
  }
}
Accessing .then() will sometimes return a function that works properly (i.e. delegates to the real Promise object), and sometimes throw on access.
More specifically, how would you expect to be able to handle this error?
Pretty sure bad things happen when promises are based around functions which aren't pure
In a Promise context, you expect your errors to be asynchronous (and handle them with .catch()), but this error throws on the access to .then()
@funjoker do you know Promises?
@Neil The impure part is not important here. I could have written it so that it always throws, and you'd have the same question.
you are using it incorrectly.
13:19
By providing a then function, you're overriding the "promise" aspect of it
console.log that res argument
@KarelG Yes I know .then and .catch()
It would perhaps treat it as a promise when it isn't one
@KarelG well, "getState" is an expression as well
@Neil It would definitely treat it as a promise, when it isn't one :)
13:19
guys another question
again, bad things happen :)
@BartekBanachewicz if you would name a variable with that name, I would pick my plastic axe and go to your desk.
I don't honestly know what would happen. I generally make it my business to avoid situations like this
@KarelG why plastic?
If i used a real one, then I am a convicted person
I want that if the user goes on link
it shows him a graphic
13:22
@KarelG well if you write function x() { } in JS, then x is a variable as well
@KarelG well then don't forget the strawberry jam
that is correct. I would say "variable with name getstate" though
They'll wonder what all the red stuff is afterwards
heh, for the halloween night, I wandered around as Death. Yet, I used a real scythe because I could not find my replica one.
There was an old guy, 65-70 ish who noticed me and said "hey, that is a real scythe" near me. I only heard that sentence, rotated to the source and waved with my hand without making sounds. His face was suddenly "white".
"See you next week"
13:27
I said something differently. In my attempt to relieve him, I said "don't worry, you are not for today". Now when thinking back at it, I should have said something else keh.
facepalmed at the moment of realization
Well it was halloween. I doubt if he genuinely thought you were Death
Though it might have crossed his mind just the same
"The good news is that in heaven they play a game every week." "And the bad news?" "Well, the bad news is that you're pitching on Tuesday."
I don't get it
wait, i'll find the joke
I have this annoying habit of giving the punchlines to jokes before the jokes themselves
> Two old men had been best friends for years, and they both live to their early 90’s, when one of them suddenly falls deathly ill. His friend comes to visit him on his deathbed, and they’re reminiscing about their long friendship. The friend says, “Listen, when you die, do me a favor. I want to know if there’s baseball in heaven.”



The dying man responds, “We’ve been friends for a lifetime, so yes, I’ll do this for you.” And then he dies.

A few days later, the surviving friend is sleeping, when he hears his friend’s voice.
13:39
I'll give one more before I'm kicked
> A couple in their nineties are both having problems remembering things. During a checkup, the doctor tells them that they're physically okay, but they might want to start writing things down to help them remember.

Later that night, while watching TV, the old man gets up from his chair. "Want anything while I'm in the kitchen?" he asks.

"Will you get me a bowl of ice cream?"

"Sure.."

"Don't you think you should write it down so you can remember it?" she asks.

"No, I can remember it."

"Well, I'd like some strawberries on top, too. Maybe you should write it down, so as not to forget it?"
if there was actually "heaven"
like real heaven
why would you be afraid of dying
well, plenty of christians who believe in heaven that are afraid of dying
but they fear hell, not life after death I think
@Neil yeah well those aren't the true believers then are they
@Neil I don't think that anyone realistically thinks they're going to hell
I think you can believe and still think you're going to hell
deep inside every one of them is like "I'm actually a good person"
13:42
well generally this is true...
or at least I am
@Neil I'd think this would be an extreme minority
Well some sins are considered mortal sins and can't be forgiven
at least according to the Catholic church
But then it's also true that Jesus said all sins are forgiven, so there's sort of this conflicting thing
I figure if I'm going to be judged on my actions in life, let me be judged for the way I am, not the way I was pretending to be so that I could sneak past the pearly gates
I am not scared of the death. If it happens, well, you won't see me complaining.
I do not believe in that "life after life" thing
Nobody who's dead complains about being dead
I think the thought of there not being life after death is terrifying.. and people want to reject that possibility for that reason
Though I'll admit that there's no proof one way or the other
@Neil you just don't listen
you could argue people in horrid conditions don't complain because they don't have internet
13:55
@towc That's true, I don't like waffles with extra syrup
well if by complaining, I mean, moving your mouth to speak words that suggest your distaste of things and your well-being in general, no, dead people don't complain because they don't have mouths
or depending on what you mean, they do, but they don't move them
there are a lot of neat little single-purpose sites like htat
unless you're going to provide a complete list that we can always have at hand, it's still nice to receive random ones from time to time
this one is fairly old, but it made me giggle anyway
14:04
@Neil ok, a nsfw tag is approprite here
*appropriate
@KarelG ah true, sorry
14:23
14:55
Complex numbers are all fun and games until someone loses an i. That's when things get real.
15:15
@Neil Math puns are a sine of a serious problem.
What did i say to pi? Be rational. What did pi say to i? Get real.
user1596138
@Neil Holy glitch
user1596138
Man my eyes hurt
user1596138
Oh probably because I opened it over RDP
Three statisticians are hunting a deer. The first one sees a deer and shoots, but misses high. The second one sees the same deer but misses low, and the third one yells "we got him!"
15:27
One day a farmer called up an engineer, a physicist, and a mathematician and asked them to fence in the largest possible area with the least amount of fence. The engineer made the fence in a circle and proclaimed that he had the most efficient design. The physicist made a long, straight line and proclaimed “We can assume the length is infinite…” and pointed out that fencing off half of the Earth was certainly a more efficient way to do it.
The mathematician just laughed at them. He built a tiny fence around himself and said, “I declare myself to be on the outside.”
@Neil Know of the goat grazing problem? That joke reminds me of it.
15:46
hmm I am in need of a new smartphone. But where should I start my research for a new one.
user1596138
I just bought a new LG V20
user1596138
$200. It's getting the next Android. Awesome camera and expandable storage/batteries. It flunks if you want waterproof tho
user1596138
I paid $950 for my first one... Cannot believe the depreciation on smartphones in <2 years
I am thinking at oneplus 6
user1596138
Idk if I'll ever go back to getting the latest flagships... Just isn't worth it to me personally.
user1596138
15:48
@KarelG Oh are you not in the USA? I'd go OnePlus if I was anywhere else
user1596138
That 6T I think it is that I keep seeing looks awesome.
nah, 6T does not have an audio jack
user1596138
Ohh.... Fuck that
my focus is on good camera and audio jack.
user1596138
V20 has a 32bit DAC
user1596138
15:49
And a crazy camera with full manual mode :P
Karel the oneplus desperately need wireless charging
for how I use my phone
otherwise I would already own one
my Nexus 5 has wireless charging and finally the pixel
user1596138
I've never used wireless charging. What makes it convenient for you?
user1596138
You can't exactly use your phone while it charges that way haha
@LuckyKleinschmidt there are battyr packs on amazon
that have wireless charging
I tape it to my phone
well velcrow it
the battery lasts literally days
so yes I can use it while wireless charging
sometimes you have to buy the iphone model to use with android but it work
works
user1596138
Hmm... That's a waste tho
15:52
what is a waste?
it works
user1596138
You're wasting so much power from that battery pack through induction
I couldn't care less
user1596138
When your phone dies you'll want more juice tho
user1596138
You literally just described why you DO care
user1596138
;P
user1596138
15:53
I carry a spare battery.
I dn't care about wasting power
spare battery lol
user1596138
You don't get the power
with what phone
user1596138
LG V20
user1596138
7 mins ago, by Lucky Kleinschmidt
$200. It's getting the next Android. Awesome camera and expandable storage/batteries. It flunks if you want waterproof tho
15:53
my solution is sort of easier
I find it easier
for me anyways
user1596138
You make your phone 4X as large by velcroing a battery pack to it tho
user1596138
Hey man if it works for you
no it isn't that large
user1596138
I want wireless charging and then a car dock
user1596138
15:54
So I can set my phone in the cradle/dock in my car without extra cords and it charges
it might double thu size of the phone but not 4x
user1596138
@WilliamA Whenever I have used those they just plug into the bottom port
I know that is why I picked that one specifically
its qi charging not
a port
there are just too many options nowadays :|
maybe I can drop that audio jack. Camera is important because I like to take landscape pictures when going out/cycling
with qi charging I can drop the audio port
with out either I am screwed
I actually still have an iPhone 6 for that reason
karel I like the Motorola z force
but I like crazy battery life
the samsung active was nice but effectively discontinued
it might come back who knows

« first day (2942 days earlier)      last day (2228 days later) »