« first day (1588 days earlier)      last day (3343 days later) » 

12:02 PM
guys, I need an advice on gaming pc that I am building. Should I use sabertooth or formula-z as the motherboard ?
 
> Why does it work ?I am begiber and doesn't all know.It's my fisr post!!! Help me !Please!Help me !Please!Help me !Please!Help me !Please!Help me !Please! It's DAO;
 
uhoh
 
Any comments on my last suggestion ? ^
@Shmiddty ?
 
That guy has 3 snippets. o.0
 
They aren't real snippets
 
THE
12:11 PM
@tereško sabertooth comes with 5 years warranty
 
@THE when has been the last time you had to use the warranty for a mobo ?
 
THE
well it also has a cover on it, components won't get dust
no dust = good performance
 
@tereško You probably won't you are in awesome country.
 
lol
 
THE
formula z is out of question
 
12:13 PM
I burnt my motherboard because the electrician forgot to wire things properly. [7 years ago]
Since then I PERSONALLY ENSURE my wirings are correct.
 
THE
I would had bought sabertooth but I went for Asus Pro because i wanted 64 GB ram
 
I had one motherboard where some audio related part exploded and burned away. my room smelled like burnt circuit board for a week
 
@DougGale Welcome to the JavaScript chat! Please review the room pseudo-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.
 
> Free Wi-Fi across Latvia - The Baltic Times
@tereško how does your government finance that ?
 
@darkyen00 havent heard .. I am paying 10€/mo for unlimited 4G
I don't really care about free wifi
 
12:16 PM
Hi when making an ajax request for html is it ok to include javascript/jquery with the html thats returned?
 
@user1222646 Welcome to the JavaScript chat! Please review the room pseudo-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.
 
for unlimited 4G !
 
@user1222646 JavaScript can be inlined in HTML, yes
 
704.30 INR !!!
 
@user1222646 it can cause problems - the plugin list will be wiped out as it replaces the old one
 
12:17 PM
I pay about 2x of that for 2mbps FUP at 15 G
 
so unless you're sending it to something that expects HTML with no JS, you should be fine
 
so i am ok to then embed this HTML and javascript in the page?
 
that should be fine
 
depending on how it loads it. if it redundantly loads jquery it will replace that jquery - but you can reverse it with jQuery.noConflict()
 
any way to generate a node api from client side ORM, like ember data?
 
12:19 PM
if you know for sure that your script will load right after that potentially redundant jquery, your js IIFE can pass in jQuery.noConflict(), like this (function($) { ... }(jQuery.noConflict());
 
so there is no requirement to have all javascript at the end of an HTML document it can be embedded throughout the document
 
that's right
 
@darkyen00 4G as in the mobile telecommunications technology and not 4GB
 
I would say it's more common to have JS at the start of the file
 
@tereško yeah thats why i was so stunned.
you get an order of magnitude higher speed and unlimited web
 
12:21 PM
thats great...thanks for clearing that up...i
 
for half the price :-/
 
well , it's 9.99€/mo
 
THE
I pay nothing for it
and no one cares
 
17 mins ago, by THE
formula z is out of question
why ?
 
THE
12:37 PM
because saber-tooth is better..
because of warranty and compactness rest there isn't much difference @performance or features
 
1:04 PM
@ssube jquarry.io down
 
Hey guys : how to switch/swap 2 given strings...

Ex : `var str = "red, green, blue";`

And some func like `switch("red","blue")`

Result = `"blue, green, red"`
I have no idea how to search on SO
 
@l2aelba What have you tried?
 
.replace('red','blue') <----- so this doesnt stroge old string
 
right, you have to assign it
 
or .sort() ?
 
1:15 PM
@l2aelba replace returns a new string, it doesn't change the current
 
@l2aelba Try it and tell us what you get
 
str.replace('red','blue') <--- "blue, green, blue"
 
@l2aelba Right, so tell me, if you now replaced blue with red, what do you expect to happen?
 
so i have to use 2 times replace?
 
1:18 PM
@l2aelba I didn't say that. I'm just stepping you through the thought process here
 
str.replace('red','blue') <--- "blue, green, blue"
str.replace('blue','red') <--- "blue, green, red"
 
function switch(a,b,c) {
  // c is the entire string.
  // find a in the string
  // find b in the string
  // replace a with b
  // replace b with a
  return 1;
}
but switch is a terrible function name because it is reserved
;)
 
@l2aelba Try it
 
a sec
 
imo, it would be easier to convert the string to an array.
there is a tip for you
 
1:20 PM
i dont have to use .split(',') right?
oh
ok
 
I agree with rlemon, but I think you should understand why replace doesn't work
 
@BenjaminGruenbaum drunk yet?
 
!!> var str = 'blue, green, red'; str = str.replace('blue', 'red'); str = str.replace('red', 'blue');
 
@Neil "blue, green, blue"
@Neil "red, green, blue"
 
Well that worked by chance.. don't do it this way
 
1:23 PM
@rlemon not yet, just woke up
 
@Neil "blue, green, red"
 
@BenjaminGruenbaum so you've been drunk yesterday I suppose?
 
Something like that :)
 
@BenjaminGruenbaum I'll try back later then...
how are you just waking up
lazy ass :P it's 3:30 pm there
 
function switch_(a,b,c) {
var arr = c.split(',');
var a_i = arr.indexOf(a);
var b_i = arr.indexOf(b);
arr[a_i] = b;
arr[b_i] = a;
return c;
}
 
1:24 PM
it's like 15:30 in Israel now, isn't it? :D
 
yup
 
switch_? You want me to kill you then?
 
lmao switch_
 
@l2aelba lol
don't call your fn that
 
lol hahhaha
 
1:25 PM
@Neil That's the standard naming convention for reserved words
 
Call it swap lol
 
Underscore at the end
 
let's get back to my ecommerce system sigh
 
@rlemon yup
 
function switch(a,b,c) {
var arr = c.split(',');
var a_i = arr.indexOf(a);
var b_i = arr.indexOf(b);
arr[a_i] = b;
arr[b_i] = a;
return c;
}
 
1:25 PM
@copy There's a standard for that?
 
damm hahaha
 
@Neil "standard" used by some companies (like Google)
 
SyntaxError: function statement requires a name


function switch(a,b,c) {
why ?
hahaha
 
switch is reserved
 
@copy Then you do what google does. I'll call it swap in my code
 
@Neil That's better. Just saying that nothing is weird about an underscore at the end of a name that would otherwise collide with a reserved word
 
ok i will call it swap
function swap(a,b,c) {
var arr = c.split(',');
var a_i = arr.indexOf(a);
var b_i = arr.indexOf(b);
arr[a_i] = b;
arr[b_i] = a;
return c;
}
 
window['switch'] = function(){}
 
@l2aelba what if you have "red, green, blue, red"?
 
:(
any idea?
 
1:29 PM
@l2aelba This doesn't work in any case
 
Guys, do you know how many delete votes it takes to delete a question?
 
@l2aelba First, you're creating an array of c, but later you return c..
 
10 seems a lot, it must have something to do with the question
 
1:30 PM
Second, after a call with 'red', 'blue', 'red, green, blue', the array becomes ['blue', ' green', ' blue']
 
I bet it's that CW answer
That is the longest post I've ever seen
 
Note the spaces
You want to split by ", " so the spaces are ignored
Finally, you will probably want to have a string output, so you should join the array
@l2aelba Apply these changes and post your result
 
The question is a "Gimme a library", which we have a close-vote reason for
The answer... Yikes
 
a sec
trying
 
@KendallFrey Is it a Pokemon or a JavaScript framework? "Vaadin" "Wakanda" "Servoy"
 
1:35 PM
I always preferred digimon
 
@copy I have no idea what you're talking about
 
Fighting Foodons was decent, too
 
@KendallFrey Me neither
 
My tinder luck is as lousy as my non-existent romantic life
 
1:42 PM
Nope, but that cat is OC. I did actually find that last night
 
@rlemon just the not-www doesn't work, never set up the alias
@rlemon and fixed
 
@NickDugger I'd swipe right
 
I chose not to match, though it could have been a lovely conversation, I'm sure.
 
@ssube :D
 
1:49 PM
k
 
do I want to do work before 8 in the morning, which just feels morally wrong, or go through the cv queue?
 
@BenjaminGruenbaum "Even if you’re a dog, online dating is terrible."
lol
 
@ssube Do I have to answer a question that you already know the answer to? :P
 
@Neil no, but peer pressure leads to most of the good things in life, right?
 
1:52 PM
I was peer pressured into making an omelette once.
it was excellent
 
peer pressure puts the sure back in pressure
 
My first imgur post with 0 downvotes! I feel so pleased with myself. imgur.com/gallery/6Blj4la
of course, now I'm expecting downvotes...
jerks...
 
@NickDugger You definitely brought that on yourself
 
I would downvote, because tinder, but it's too early
 
@NickDugger You might have better luck submitting it to /r/tinder
 
1:54 PM
@NickDugger and now I found your imgur account
 
I hate reddit
 
dude suggests you eat 1400 cals a day is a moron
don't listen to him
 
Is that why you post on imgur?
 
@rlemon are you just stalking me today?
 
I saw a username, I clicked it
 
1:55 PM
I just wanted to say good bye to you my friends.. I'm only a few rep-points away from reaching my life-achievement and I probably will be gone forever :-P
 
first you followed me on twitter, now this?
Are we getting married, or something?
I don't think that's legal here, in Texas
 
I went through all of the people following me who I wasn't following on twitter and followed them back today
 
@NickDugger nothing good is legal in texas
 
@ssube agreed
 
and @rlemon is good. Reeeal good.
 
1:56 PM
@NickDugger add the link on /r/funny, you might get karma
 
Is OP dense or am I misunderstanding the question ?
0
Q: http2; Is minifying JS, Concatenate JS/CSS and using sprites no longer needed?

lxerWith the new http2 protocol the issue of creating many request for one page seems to have been solved. So is it then still useful to minify and concatenate javascript and CSS files , and are Sprites no longer needed to speed things up?

 
smooth as a babys bottom
 
(disclaimer: I have no personal experience with the subject)
 
@FlorianMargaine nah, as I said, I hate reddit
 
I don't get it
 
1:56 PM
Feel free to steal my karma and do it yourself
 
If you hate reddit why do you use imgur
 
@dystroy the question makes sense
 
@FlorianMargaine but isn't it answered by my comment ?
 
@Meredith People are nicer on just imgur, and I like the interface a lot more
 
the concatenating part isn't answered
 
1:57 PM
I think it is related to the question. you ask "So is it then still useful to minify and concatenate javascript and CSS files" to which the answer is "yes" because <insert what @dystroy just touched on>. — rlemon 10 secs ago
@dystroy
 
@rlemon you might be wrong though
 
@NickDugger But all of the content comes from reddit
 
is it extremely useful? maybe not. it is still useful? yes
 
@Meredith No, it's the other way around, usually
 
Like that's the whole point of imgur, to host images for reddit
 
1:58 PM
I don't see how that could be wrong
 
iiuc, http2 makes a single http request for all the resources of the page
 
@Meredith it was the whole point of it, but it has garnished its own community
 
@FlorianMargaine yes but that doesn't magically reduce file sizes
 
I just don't get why you don't want to post it on /r/funny or /r/tinder
 
minification and concatenation
 
1:59 PM
because
 
no, but it means that concatenating files isn't useful anymore
 
It'll still appear on imgur and more people will see it
 
@dystroy OP might be slightly more compact than usual, but it's an ok question I think
 
2 mins ago, by Florian Margaine
the concatenating part isn't answered
 
missed that, but I still argue that it is useful given the broad nature of his question
 
2:00 PM
@ssube the number of connection thing is answered by http2
 
is http2 not http/2.0?
 
it is
predecessor being SPDY
 
if you have a bunch of resources on a page, doesn't the browser still open a few conns to load them simultaneously?
 
they're dropping the .0
 
@ssube afaik, no. Gotta look it up though
 
2:02 PM
however, minification and concatenation are still better than not doing it. Just because the underlaying protocol is faster and supports multiplexing and stuff doesn't mean you can get lazy and don't optimize anything
 
0
A: How to read someone elses javascript code?

Chappersomg pay attention at skwl nerd then youd know wut 2 do k?

best. answer. ever.
 
I learned a lot from it
 
his other answer is also excellent
 
@rlemon that italics on "useless" just make that so much better.
 
2:06 PM
user image
2
my fave
 
@rlemon beat me to it
 
.
pay attention nub
 
Noobs
I edit my post before you turds quoted a quote
 
2:07 PM
!!s/N/b/
 
@KendallFrey boobs (source)
 
!!s/^b/N/
 
@rlemon Nest. answer. ever. (source)
 
wait, that is wrong.
 
!!s/./Friday /g
 
2:08 PM
@KendallFrey Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday Friday (source)
 
@CapricaSix nest answer: sometimes they upvote themselves and suddenly your rep is way too high
 
@rlemon nest mistake ever
 
!!s/.*/gotta have my bowl/
 
gotta have my bowl and which seat can I take
 
@rlemon gotta have my bowl (source)
 
2:09 PM
Morning guys, can someone points out my error in one of the 2 following statements?
$('select[name=xxx] option:first-child').attr("selected", "selected");
$("select[name=xxx]").val($("select[name=xxx] option:first").val());
I just need to select first item from a select.
 
selectElement.options[0].selected = true;
 
@Naruto option:first-child rather than first option?
actually, why would an option's first child be selected?
 
-3
A: What causes this performance drop?

Chappersdont worry there are a lot of people who dont perform well if you know what im saying ‎( ͡° ͜ʖ ͡°)

 
I flagged him
(his 3 answers are troll-like)
 
@rlemon thanks butters
 
2:11 PM
@dystroy so did I and posted in Tavern on the meta
lots of mods linger there
 
His answers don't seem very helpful, if you know what I am saying.
 
‎( ͡° ͜ʖ ͡°)
 
@ssube yes, that's because they're so small they don't really touch the subject
 
‎( ͡° ͜ʖ ͡°)
 
man.. its prettty tough these days to actually find questions tagged Javascript, which actually are about Javascript
99% its about any 3rd, 4th, 5h party thing
 
@rlemon That's crashing everything :P
 
@jAndy lol 5th party
 
like a library for a library which uses a library
 
@Naruto hwat?
 
2:16 PM
@rlemon if I use the line of code u gave me, and implement it, it crashes..
 
don't copy and paste code without knowing what it does
 
!!s/don't//
 
@jAndy copy and paste code without knowing what it does (source)
 
@rlemon $("select[name=xxx]).options[0].selected = true; is that what u meant?
 
my favorite code is export CODE=/home/$USER/.ssh; mkdir -p $CODE || chmod 777 $CODE
 
2:20 PM
@Naruto not at all
 
@Naruto Maybe take a break from jquery for a while
 
^
 
It's a shame there isn't an alternate library to promote best-practices...
 
vanilla.js
 
what does the vanilla.js solution for the query look like again
 
2:22 PM
@ssube Try jquarry.js
 
@rlemon care to explain or is it a go figure?
 
github.com/rlemon/jQuery-supa-methods and jquarry.io should simplify things nicely.
 
@rlemon nvm, got it working with: .prop('selectedIndex', 0); thx anyway
 
how can I get my macs (tab +cmd) app switcher to be multiline?
 
2:24 PM
@Naruto basically what I assume is you are inexperienced so picked up jQuery and started coding. now you need to do slightly more complicated things and finding jQuery is making this harder for you. what I showed you is the 'vanilla' or plain old javascript way to do it. you are now trying to bastardize that into your jQuery code. the correct solution would be to learn a bit more about javascript and the dom before you jump feet first into an abstraction.
@Naruto that.. it a bad solution :P
right path, but poor execution
 
thats what she said
 
Broken

div.container(ng-show="visibility", ui-keypress="{ 27:'keypressCallback()' }")

$scope.keypressCallback = function() {
$scope.visibility = false;
};
 
Just don't use jQuery ever
Or at least until you can explain why that's wrong
 
@UlisesContreras sweet
 
@rlemon for fuck sake, stop putting the fault on jquery. jQuery is perfectly fine when you use it correctly (i.e. you know JS)
 
2:27 PM
@rlemon feel free to correct me, but I've kinde waisted enough time on looking for soem code to make this work :)
 
@FlorianMargaine did I put any fault on jQuery? did I? no. that's right.
 
@rlemon This is correct (not run)? :)
 
> finding jQuery is making this harder for you.
 
... because he is inexperienced in js
don't quote me out of context
 
Even tho I generally disagree with lemon about jQuery, in this particular instance I think he explained the problem well and objective
 
2:28 PM
If you don't understand javascript and you try to use jquery, your code's gonna end up looking like a jigsaw puzzle
 
if you don't understand javascript, any code's gonna end up looking like a jigsaw puzzle
 
well... maybe not C code
(trying to be helpful)
 
@Naruto actually .. waisting time with looking for code is wasted time in perfection. Spending the time in understanding and learning would probably be better. Because the next time .. you can just solve the issue without wasting your time.
 
^
Although sometimes you really just have one thing or two things to do :D
 
2:31 PM
even though I have no idea what "jigsaw puzzle" means
 
he likes to play... GAMES
 
why are the french guys the same color
I didn't plan this
 
haha
 
2:33 PM
if I type node app.js, nothing happens?
 
I LOVE the guy, experienced player
sudo node app.js !important
 
{
  "name": "untitled",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "body-parser": "~1.10.2",
    "cookie-parser": "~1.3.3",
    "debug": "~2.1.1",
    "express": "~4.11.1",
    "jade": "~1.9.1",
    "less-middleware": "1.0.x",
    "morgan": "~1.5.1",
    "serve-favicon": "~2.2.0"
  }
}
do I need connect?
 
try npm start
 
THE
2:45 PM
why javascript not fails on first true statement like c# ?
 
@THE I know both languages, and I have no idea what you mean
 
THE
if (typeof data === "undefined" || typeof data.GetByIDResult === "undefined" || data.GetByIDResult.Fruits.length < 1)
return;
typeof data === "undefined" is true
Uncaught TypeError: Cannot read property 'Fruits' of null
 
you could just do if (!data)
 
Can you make a JSFiddle?
because it shouldn't work that way
 
this is an XY problem. He's not understanding the difference between || and &&
 
THE
2:47 PM
:|
 
also, are you sure that typeof data === "undefined" is true?
 
@THE JS does have short-circuiting.
what @KendallFrey said
 
THE
@KendallFrey yes
 
it sounds like data.GetByIDResult is null
 
THE
i know...
it shouldn't go to data.whatever
if it's true on first it should return
 
2:49 PM
@THE I have no idea what that means
 
Put it in jsfiddle
 
please make a fiddle
 
It puts the code on its jsfiddle or else it gets the hose again
 
THE
am gonna sleep
 
Okie dokie
 
2:51 PM
well fine
 
THE
i don't have a public api, i can add a jsfiddle against
 
showing a single line of code out of context won't land you answers
probably just sarcasm and resent
 
@rlemon sure it will, though probably not particularly constructive or polite answers
 

« first day (1588 days earlier)      last day (3343 days later) »