« first day (1524 days earlier)      last day (2578 days later) » 

A K
12:27 AM
function getObject(obj) {

function F() {}
F.prototype.say = function(){
console.log("Hello", this.name);
};
let output = Object.create(F.prototype);
return Object.assign(output, obj)

return obj;
}

var r = getObject({ name: "James"});
 
1 message moved from JavaScript
 
A K
function getObject(obj) {

function F() {}
F.prototype.say = function(){
console.log("Hello", this.name);
};
let output = Object.create(F.prototype);
return Object.assign(output, obj)

return obj;
}

var r = getObject({ name: "James"});
 
1 message moved from JavaScript
 
A K
function getObject(obj) {

function F() {}
F.prototype.say = function(){
console.log("Hello", this.name);
};
let output = Object.create(F.prototype);
return Object.assign(output, obj)

return obj;
}

var r = getObject({ name: "James"});
 
1 message moved from JavaScript
 
@Queen I'm not convinced by that dupe target; it doesn't have adding a column. Really it's a cartesian join.
 
 
1 hour later…
 
2 hours later…
2 messages moved from [Java and Android era ](chat.stackoverflow.com/rooms/19132/java-and-android-era)
 
6:01 AM
!!monster
 
@TheLittleNaruto That didn't make much sense. Use the !!/help command to learn more.
 
!!learn monster "<> Don't blame me that I didn't warn you. Click Here: i.stack.imgur.com/R9mVj.jpg "
 
@TheLittleNaruto Command monster learned
 
!!monster
 
@TheLittleNaruto Input not matching /http:\/\/i.stack.imgur.com\/R9mVj.jpg"/. Help: User-taught command: rel="nofollow <> Don't blame me that I didn't warn you. <a href=
 
6:03 AM
!!forget monster
 
@TheLittleNaruto Command monster forgotten.
@TheLittleNaruto Command monster learned
 
!!monster
 
Don't blame me that I didn't warn you. Click Here: i.stack.imgur.com/R9mVj.jpg
 
11 messages moved from [Java and Android era ](chat.stackoverflow.com/rooms/19132/java-and-android-era)
 
 
1 hour later…
7:13 AM
8 messages moved from GMTs
 
 
2 hours later…
C4u
8:43 AM
for(i = 1; i <= 100; i++) {
const mid = Math.floor((Math.random() * 100) + 1);
var x = 200/(Math.pow((i-mid), 2)+4);

if(x >= 0 || x <= 100) {
console.log(mid);
values.push({ Position: i, value: x });
}
}
 
1 message moved from JavaScript
 
@Queen k
 
My life is a complete trash can.
 
@Natty tp
 
@Queen k
 
@Queen k
 
@Queen k
 
 
1 hour later…
11:56 AM
$(document).ready(function() {

var togglevideo = false;
$('#play-video').on('click', function(ev) {

togglevideo = !togglevideo;

if (togglevideo == true) {
$("#watch-video")[0].src += "&autoplay=1";
} else {
$("#watch-video")[0].src += "&autoplay=0";
}

ev.preventDefault();
});

});
 
1 message moved from JavaScript
 
user6820627
@zeddex Do like the bot said.
 
user6820627
@zeddex what's the problem?
 
11 messages moved from GMTs
 
12:26 PM
this :
$(".dial").each(function (){
this.knob({
'bgColor':'yellow'
});
});

gives: TypeError: this.knob is not a function
 
1 message moved from JavaScript
 
user6820627
@Procode Do like the bot said.
 
@LearnHowToBeTransparent
this :
$(".dial").each(function (){
this.knob({
'bgColor':'yellow'
});
});

gives: TypeError: this.knob is not a function
 
1 message moved from JavaScript
 
 
2 hours later…
2:47 PM
How would this function look like:

if(window.addEventListener) {
window.addEventListener('load', function () { ... }, false);

this way :
(function() {
...
})();
 
1 message moved from JavaScript
1 message moved from JavaScript
 
do you prefer wrting bracers this:

function
{
....
}

or this way:

function() {
...
}
 
1 message moved from JavaScript
 
 
1 hour later…
4:17 PM
@Alex one of the most useless questions is asked yet again
 
Sorry
Cleaned it up
 
5 messages moved from HTML / CSS / WebDesign
 
5:00 PM
fsolve(@(x)x.^3 + x.^2 + 1, [-100 100]) claims there is no solution found
 
5:16 PM
1 message moved from CHATLAB and Talktave
 
 
2 hours later…
6:47 PM
 
A K
function getObject(obj) {
// Code inside function only
// Can not use ES5/ES6 methods
// Can not use Object.create or Object.assign
// Can not make copies
// Simply add a prototype method say to the object being passed in
function F() {}
F.prototype.say = function(){
console.log("Hello", this.name);
};
}

var r = getObject({ name: "James"});

console.log(r); // { name: "James" }
console.log(r.name); // "James"
console.log(r.say()); // "Hello James"
 
1 message moved from JavaScript
 
A K
function getObject(obj) {
// Code inside function only
// Can not use ES5/ES6 methods
// Can not use Object.create or Object.assign
// Can not make copies
// Simply add a prototype method say to the object being passed in
function F() {}
F.prototype.say = function(){
console.log("Hello", this.name);
};
}

var r = getObject({ name: "James"});

console.log(r); // { name: "James" }
console.log(r.name); // "James"
console.log(r.say()); // "Hello James"
 
1 message moved from JavaScript
 
7:02 PM
1 message moved from WPF
 
 
2 hours later…
9:57 PM
 
1 message moved from C#
 

« first day (1524 days earlier)      last day (2578 days later) »