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:
@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.
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/…
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?
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 } ```
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
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
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.
@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
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.
(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 ?
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.
ES6 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 ...
Suppose 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"
...
@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
@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..
@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.
@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
@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
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".
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.
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.
> 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?"
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
@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
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!"
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.”