« first day (1941 days earlier)      last day (3005 days later) » 

2:00 PM
For example: {type: "ADD_ITEM", id: 42, text: "foo bar baz"}
Something needs to generate that ID
So you normally have something like this:
 
@DomagojSabolic I removed jquery code and updated the css
I think it is working now
check it once
 
@Mr_Green
 
const generateAddAction = (() => {
  let id = 1;
  return text => ({type: "ADD_ITEM", id: id++, text});
})();
 
yes?
 
@Mr_Green It's still like dis/appearing
 
2:02 PM
what exactly it should happen then?
 
sorry i accidentaly clicked enter while taging you xD
 
crl
ok ^, id lives in the context of that function
 
jsfiddle.net/pvju0wt1/8 @DomagojSabolic
ok np
 
user3119231
easy peazy solution. I like it.
 
@Mr_Green Its good now thanks!
 
2:03 PM
hmm
16 mins ago, by Mr_Green
and use transition + opacity to handle the fadein and fadeout
I said this before only :D
 
sorry i don't know what does transition means :/
Ik
its my fault
 
hmm ok np
 
crl
transitions ftw
 
transitions + animations ftw again
 
hahaha
 
2:06 PM
transition + animations + SMIL Beyond Godlike!!
but smil is removing soon
 
I am trying to swap out line breaks in a JSON object in Javascript. When I view the network request I get, I see something like this "2/5/2016: blah blah blah. ↵ ↵2/5/2016: blah blah blah. ↵ ↵2/5/2016.." however when in my Javascript it automatically replaces the ↵ symbol with an actual new line, so I can't catch /r/n or /n to swap out with a <br/> tag.
Any ideas how I can catch this in Jquery/Javascript/Angular?
 
I think to know redux I must first know reactjs
 
crl
yes
 
@Mr_Green No, you don't.
 
@KendallFrey so how do you operate a drill for more than like 30 seconds without that shit overheating? I have the drill mounted on a large radiator panel and that has two fins off of it
still heats up like 1% a second or faster
 
2:12 PM
Redux was built for ReactJS, that is true. But there's no dependency between the two.
@Mr_Green watch the video series I sent, and if you have questions, ask them here.
 
ok sure thanks
 
@rlemon hmm, I don't know how that works anymore, I think they changed it
 
it seems I cannot bleed the heat away fast enough
 
@rlemon KSP?
 
You say the drill is connected directly to a radiator?
 
2:14 PM
I'll test more tonight, but last night after finally landing a rover on minmus I got bored drilling
had to drill 30 seconds, not drill 3 seconds, repeat
thought about setting up a macro, ended up watching the original Matrix instead
 
mmm seems that I can't change icon background of browser with javascript?
I can create the animation only on title page
everyone know how to flashing/blinking/highlist the icon browser and not the tab
 
> Since version 1.0.1 the Drill-O-Matic will not produce overheating anymore.
 
the favicon?
 
You are running latest KSP right?
 
@KendallFrey 1.0.5
 
2:18 PM
> This part needs 100kW of cooling, or it will overheat and go into auto-shutdown mode.
You've got that much?
 
when it "over heats" it just stops mining anything.
 
no favicon... I mean the flashing on icon browser (Firefox or chrome [last browser] )
 
I thought I did? I'll double check
 
@towc Because it's usually true.
 
@KendallFrey @rlemon you nerds are making me want to try it
 
2:19 PM
what is an " icon browser "??
 
@Mosho ikr
 
the browser's taskbar button @rlemon
 
the tray icon?
 
that would be "browser icon"
 
@DavidPostill respectfully I disagree. It's never not constructive in my eyes to want to know what you've done wrong with the intention of learning. If that's not constructive, I don't know what is. — Sterling Archer 8 secs ago
 
2:21 PM
 
Do you guys think a "Could the downvoter please explain why so I can learn/correct etc" comment is not constructive?
 
see image
I want flashing browser icon
 
lol
 
@MirkoCianfarani there is a .ico file installed where the browser is installed
change that
 
Not sure if you can animate it though.
 
2:24 PM
Redux: completely going from top of my head
 
@BenFortune or do it with js
maybe if it is a node app
 
yeah but I can change with Javascript??? I know that I can create event for notification, but only for popup window notification or popup
 
possibly with an extension, but not sure now that there is no NAPI
@MirkoCianfarani it is a system file, no
 
ok
thx for helpin
 
@SterlingArcher How many downvoters do you think will come back and read your comment? You seem to be missing the whole point, which is voting is anonymous. Nobody is required to comment. You should consider it a bonus if someone does leave a comment (and even then you cannot tell if the same person also voted). Asking for comments is just noise. — DavidPostill 47 secs ago
-_-
 
2:29 PM
So, is bookshelf js worth it, or just use knex?
 
Asking for clarification is the point of comments. If the answer / question gets downvotes asking why (which is in a sense asking for more clarification) is pretty much on point. You can flag them all you like, you're just making noise in the flag queue. — rlemon just now
gotchubro
 
Bro <3
 
he may not like the comments, but flagging them is just putting the noise elsewhere
kinda defeats the purpose.
 
@FlorianMargaine : At debian, i have a server core. I access it remotely (cable). But is there a way for adding light weight GUI than the standard one ? Or a way to copy/paste to the console ?
 
Not worth chasing a meta argument I guess. He thinks what he thinks
 
2:34 PM
:( I hate this two wire crap. I hate having to wait for my previous response before I issue a new command.
 
Context?
 
rs323
 
9 pin?
 
i don't downvote
 
I downvote on the daily
 
2:37 PM
he is not lying
@KarelG has 0 downvotes
and only 84 upvotes
I have 1121 up and 2199 down.
 
1:2? :p
i should be more supportive, but i prefer words than waving with my flags
 
hi all. has anyone here used NG 2.0 yet? i'm new to Angular and wondering which version to start with. i have experience with Backbone from a few years ago. never used TypeScript.
 
hey guy
 
2:40 PM
how can i automatically change the value of my input field
 
@JonasDulay Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
But I have 3200 reviews in the queue :D
 
im sorry
function myFunction5() {
var x = myFunction2() * myFunction() + +myFunction3();
document.getElementById("demo").value =  + x;
}
is that okay?
 
no
 
oh sorrrrrrrrry
im newbie here
i pressed ctrl + k
 
2:41 PM
unary + to convert things to numbers is silly
I mean, it works. but it isn't the best (most readable) way to do things
 
its not the problem
 
Number() or parseInt() is more readable
 
and your method naming can be questioned.
 
@KarelG ?
 
@JonasDulay readability is always a problem
when it isn't readable..
 
2:42 PM
okay
i already change it
tw
btw
 
document.getElementById("demo").value = newValue;
 
how can I call this function automatically
 
should work, assuming the element with the id demo is an input
 
Is there a way i can change opacity of only background color ad not the text in it(that color and text is part of the <li> element)
 
@JonasDulay use an IIFE
 
2:43 PM
@JonasDulay what do you mean "automatically"
ohh
that way
 
(function() {
    var x = myFunction2() * myFunction() + +myFunction3();
    document.getElementById("demo").value =  + x;
})();
 
I wouldn't bother with the iife, I'd just call the function
 
<input type="text" id="demo" onchange="myFunction5()">
 
@JonasDulay look up element.addEventListener on MDN
inline event handling is another one of those ugly things
 
2:44 PM
JavaScript: Come with an Issue, Leave with 7 More
 
@FlorianMargaine rephrase: laptop ---> BBB (Beagle board black device) connected through USB. BBB has a debian server core install (no GUI). I want to install a software, but the commands are sometimes long lines. I thought to do copy/pasta but it's not possible, unless i install a GUI
 
well, you can ignore any of the 'advice' I suppose. but I have to call the code as I see it
 
That's why I think SouceUndead has clean code <3
 
@SterlingArcher now, lets get back to this.
 
2:45 PM
Well... I could abstract the routing modules from the routing functionality I guess..
 
why would you benefit from this? do you understand the downside you just introduced?
 
Aside from removing the namespace of the function?
 
that function is never able to be called from outside of the IIFE now
and he (we assume) named it for a reason the first time
 
Yeah just realized that lol
 
I don't like using IIFE just to call a method, it introduces new scoping concerns.
 
2:46 PM
Since it needs to be called on change IIFE is not the way to go
 
function foo() {
.....
}
foo();
notin wrong wit dat
 
Doesn't it just create it's own scope?
 
(function foo() {
  console.log('oops');
}());
foo(); // ref error
 
<button onclick="myFunction5()">Calculate</button>
im using that
 
But that's for if you need a recursive IIFE, right?
 
2:47 PM
don't
4 mins ago, by rlemon
@JonasDulay look up element.addEventListener on MDN
 
but what i need is automatically call the function
 
One that can conditionally call itself
 
@SterlingArcher Right
 
@KarelG can't you install ssh on the BBB and connect to it from your laptop?
 
@JonasDulay when the page loads, call the function. It's simple
 
2:48 PM
But that name is not available outside IIRC
 
no
its not the way i want
 
@JonasDulay try to fully formulate the question.
 
Im calculating
the price
of a certain item
 
@FlorianMargaine didn't have thought of that ... thanks
 
2:49 PM
so addEventListener on change/blur on inputs and when they are all satisfied calculate the price
 
@JonasDulay take a step back, and please formulate your question into 1 cohesive post. You're all over the place
 
and for the love of god don't use unary + to cast numbers and don't use inline listeners
 
@MadaraUchiha while you're here, may I pick your brain on a promise issue?
 
@SterlingArcher Sure
 
is there a way to post all the codes ?
 
2:50 PM
@KendallFrey ok, if there was a thing such as skewscaling through matrices (scaling the x in terms of the y and viceversa, just like you add to the x in terms of the y in skewing) it would be possible to do it with perspective... but you can't. How would you do it without perspective tho?
 
@JonasDulay Paste, CTRL+K, Enter
 
and I don't think using a middle-canvas would help
 
@MadaraUchiha So, node-redis methods are asynchronous, so I can't res.send an object I form via 2 redis calls. So I promisified the methods, but I don't think I'm doing it the right way.
let keysAsync = Promise.promisify(client.keys, {context: client});
let smembersAsync = Promise.promisify(client.smembers, {context: client});
keysAsync("*game*").then(reply => {
	reply.map(game => {
		smembersAsync(game).then(players => {
			response[game] = players.length;
			console.log("iteration");
		});
		console.log("after game");
	});
}).then(() => {
	console.log("keys then");
	res.send(response);
});
tl;dr - I'm iterating the keys of redis, and grabbing the number of "players" (length of array of player ids), and returning this object so that I can make a droplist of open lobbies
 
2 messages moved to JS trash
 
But of course, response is returning before redis is done compiling the object
 
2:52 PM
oooooh wait @KendallFrey: we can draw an image in an svg, rotate it in 3d using svg stuff and then drawing the svg as an image.... but that's completely cheating, right? Might as well do 3d maths in svg for everything and then draw the svg...
 
@JonasDulay sorry, too much code for this interface. please post to jsfiddle.net and leave us a link
 
@SterlingArcher keys() gets a glob and return a list of keys? values?
 
easier to read there
 
And I know nesting "thens" is bad, this is where I left off last night lol
@MadaraUchiha keys just iterates the redis DB
 
2:53 PM
client.sadd("game-1", [1,2,3,4]);
client.sadd("game-2", [1,2,3,4,5,6,7,8]);
client.sadd("game-3", [9,0,8,4,3]);
client.sadd("game-4", [1,5,3,2,2,2,3,4,5,5]);
client.sadd("game-5", [1,2,3,4,5,6,7,8,90,10]);
So I'm just iterating each "game", and getting the length of it's set
 
I want to calculate it automatically not clicking the calculate button
 
I'm just trying to return an object like..
 
@towc No idea what you're talking about, but skewing is an affine transform and doesn't need perspective
 
{
    "game-1": 4,
    "game-2": 8,
    ...
}
 
@KarelG my pleasure
 
2:55 PM
I hoe that makes sense
 
ok ok, but my point was that you can scale the x only in terms of the x using transformation matrices, and the y only in terms of the y. But you can add the x * another value to the y to obtain a skewing effect. If it were the case to be able to multiply the y by the x * another value probably perspective would be achievable
 
guys ?
 
yes girl?
 
@SterlingArcher ? did you see it ?
 
@JonasDulay okay, now we have a real question. But I'm afraid I can't help past recommending you read up on the MDN page about change/blur events. Past that, your code is not very nice to read. inline event handling (the onchange/onclick crap) is terrible and your function names make me feel ill.
if when an input is changed, you check to see if all other inputs have values, you can probably determine when you need to run the calculation.
 
2:58 PM
@towc Oh, that way? Yeah, that's how perspective works
 
@JonasDulay I have nothing to add that @rlemon hasn't covered, sorry.
 
okay guys tnx btw
 
im just a totally newbie
 
Just before I forget about that
 
2:59 PM
@KendallFrey and since the image's z position would be changing for every pixel we can't do this using a 3x3 matrix, right?
 
@SterlingArcher 404
 
I think you need to be invited -- it's a private repo
 

« first day (1941 days earlier)      last day (3005 days later) »