@Mathematics bartek is a respected member of this community, he comes here rarely know, but he knows his stuff. He has the right to ask questions like that, we all love him #nohomo
Assume, for the sake of this question, that I want to be able to create a function in Javascript that appends all of the elements of one array to another array. One way to achieve this, if you have access to the destination array, is to say:
var destination = [1,2,3];
var source = [4,5];
Array.p...
I have a requirement to check all the input fields are filled or not. If the input field is disabled then I have to ignore. So for this my function is as follows
@SpringLearner 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
You could handle it in another way: only hide or only disable inputs. Don't mix and match, or if you do, disable inputs when you hide them so you need only search for inputs that are not disabled
@Cerbrus I didn't intend on asking for permission to write to jstrash. :p
I found myself there and it was hard to distinguish from this room on mobile
Oh maaaaan, with JavaScript now, when you want to start a new personnal project, you spend so much time to look at "what build system to use", "React or Angular ?", "handlebars? Jade?", "sass? stylus? less?" that you get fed up with your project before creating the freaking project directory.
need help. what's wrong with this. appreciate any advise
function func1(name, profession, prof1, prof2) {
console.log('My name is ' + this.name + ' and my profession is ' + this.profession + ' he is ' + prof1 + prof2);
};
var person1 = {
name: 'johnny',
profession: 'policeman'
};
Last time I checked (it was a long time ago, I must say), bluebird was aiming to be 100% compatible with the official Promise definition, when Q was not
which would be the correct word to describe the process of r.js (require.js) when creating from many modules a single file. Hope my Q is understandable ;) It isn´t compiling or?
var myWebServiceCall = (function () {
var cache = null;
return function (callback) {
if (cache === null) {
request(...).done(function (data) {
cache = data;
callback(cache);
});
} else {
callback(cache);
}
};
}());
// in module one
myWebServiceCall(function (data) {
// do whatever with the data
});
// in module two
myWebServiceCall(function (data) {
// do whatever with the data
});
I am already using promises, I am not sure if for example let say 2 requests call same method, they both going to have there own promises - which is fine... but I don't want to make 2 web requests
Hey everybody, can anyone recommend some opensource projects built with react + alt.js? Trying to figure out a good project structure and there's nothing better than looking at other people's projects.
@GlebKost Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
I searched over 2 weeks and found this:
https://github.com/balderdashy/sails/issues/2326
You don't have to install skipper and require('skipper') => Sails comes automatically with skipper! Also don't use it as a policy, it won't work ( didn't for me).
What you have to pay attention to for a mul...
@SuperUberDuper a malicious script takes control of your Web page and sends access information that it finds to an anonymous and temporary email address
hey @Bartek, you seem to be the architecture expert, any guidline for improving asnychronus code, me messing around with all kinds of promises and callbacks and everything went bad :[
@JacekGzel Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
@BartekBanachewicz oh well, i probably worded non-optimal, my bad. do you have any guide, tutorial, book or something to recommend on asynch coding? that was what i was basically wanted to ask, nothing specific :)
I want to update my canvas on every ajax request if new user is found or there is new
connection of existing users.
I have users and connections between them:
var data=[
{
"Id": 38,
"Connections":[39,40],
"Name":"ABc"
},
...
@BartekBanachewicz the cool part of node's event loop is, it will prefault all the memory involved with I/O events and it will never let a page fault cause it to block