« first day (2046 days earlier)      last day (2893 days later) » 

12:00 AM
@Sting what team are we talking about?
Here, I'm just a lowly scrub who hacks together shit
 
Wow are we related taco cos thats mee
 
@AndrewL that would be the long route
use diagonal
 
How would I do that?
 
math
 
Oh you are referencing my earlier thingy
 
12:04 AM
answering an old question
 
stackoverflow.com/questions/698301/… I need to swap html code from 2 elements. I did this and shit went wild
Like a tradeoff. The 1st element becomes the 2nd at the initial position, viceversa
 
no need of jq
 
That's what I thought
 
innerHTML is enough
 
So do I just do it the old fashioned, put one's html in a temp var, then the other equal to that one, then temp equal other?
 
12:10 AM
yea, or xor them
 
var t = a, a=b, b=t
 
@CSᵠ xor them?
 
:)
 
That's a phi beside your name?
 
yes
 
12:12 AM
So oldX-newX, oldY-newY is not optimal/isn't right for calculating difference
because it's not working as intended
 
aren't those 2 sides of the rectangle?
 
I'm assuming this is a troll post, but I saw this somewhere:
//this is a really neat trick for swapping values efficiently
void swap(long* a,long *b) { *a=*a^*b;*b=*b^*a;*a=*a^*b; }
 
if you wanna go straight line, then diagonal is what you need
 
no. I'm getting nearest <li> element with this lib: gilmoreorless.github.io/jquery-nearest and then I want to animate from current position to that <li> position
 
what's the troll?
 
12:14 AM
281
Q: I need a program where the user inputs an array of doubles and the program outputs the array sorted

Victor StafusaNote: This question was severely edited since I first posted it here. The rules were moved to here, read them before posting any answer to understand the purpose of this. This was the first question created in the code-trolling category. Imagine a lazy user on Stack Overflow asks this question: ...

 
oh it's c
Why are the tags popularity-contest and code-trolling lmao
 
I just caught a problem with the NBA scoreboard for the TV broadcast. Engineer had the scores flipped ... I was thinking why did that Curry 3 go to OKC?
 
give us live updates please taco
 
It's 13-21 GSW@OKC
 
wow how
 
12:17 AM
yey
 
ok now it's 13-22 GSW@OKC
 
noo
go warriors
 
GO CURRY
Feed umair
 
@AndrewL Do you know if that swapping trick actually works though?
 
12:19 AM
from earlier
I'm not good in c. I started learning but never got around to it
(getting in depth)
 
haha people on twitter weren't happy about the scoreboard
http://bit.ly/Q2dkBX #TNTOT #TNTOTPlayoffs y'all mixing up the scoreboard man !!
 
hastebin.com/uhuxorewey.js Is this even logical to get nearest element <li> and animate to that position and swap html?
hahaa
 
Wow
 
!!>a=5;b=8;a^=b;b^=a;a^=b;console.log(a,b)
 
12:22 AM
XOR
 
@CSᵠ "undefined" Logged: 8,5
 
maybe
 
!!>
 
@AndrewL "undefined"
 
Wow
Could someone look at the hideous code I wrote. I'm really frustrated and have resorted to injecting dopamine into my bloodstream just to keep me from becoming terminally depressed stage 100
 
12:23 AM
!!>console.log('Wow much surprise very Andrew L')
 
@taco "undefined" Logged: "Wow much surprise very Andrew L"
 
@AndrewL what?
 
Up a few messages on hastebin
 
yea, no idea what you doing in code, what was that about doping?
 
!!>action="kill"subject="taco"executer="andrew"print(executer + " " + action + "ed" + " " + subject)
 
12:26 AM
@AndrewL "SyntaxError: missing ; before statement"
 
What? No python?
 
Andrew's on the precipice of jumping of a cliff
 
I've been hacking at this for 2 days.
 
just 19 to go
 
28-34, GSW@OKC ... End of 1st Quarter
 
12:28 AM
I have a grid of hexagons created from css: github.com/web-tiki/responsive-grid-of-hexagons I've generate a bunch and they're draggable. I want them to be able to be dragged but auto-moved to nearest <li> that doesn't have class hexOccupied like a puzzle thing
Dang. Warriors must win
 
oh, I remember you talking about hexagons
 
I like hexagons
 
I like trains
 
Maybe watch Bee Movie, for some inspiration
 
Stop lmao
 
12:29 AM
bees like hexagons
 
Because they are mathematically and naturally optimal for their circumstances
I've generated say 30 hexagons and populated 20% of them. I've made them draggable (the populated) and I want them, when finished dragging, to be able to auto-move to an un-populated hexagon
so i need to use animate to find distance
 
Did you post a question on SO?
because people in here help, but they expect you to do some work before they help
 
Yeah, but of course some guy answered vaguely and no one has since done anything and i've closed the question
Well I've done work
Guess I'll ask again :/
And I've got tons of external libraries and other js files that it's hard to create fiddles or bins
 
isolate your problems and take them one at a time
 
The problem I believe is the calculation of the distance in which I move to move the hexagon
Well it is
time to dig for algebra...
 
12:35 AM
Don't answer your question, state the problems
Because you obviously don't know the solution
I hope that makes sense
 
sqrt(deltaX+deltaY)
 
distance formula?
 
And you should just keep your question posted, then put up a 100 rep bounty. If it's worded well enough, somebody will answer
Oh shit. Game tied 38-38
 
yey
 
Oh shit
Lets go GSW
Take 'em home steph!
@CSᵠ How would I split that into top and left for animate() to process?
 
12:39 AM
no idea
gotta figure some stuff out by yourself
 
My ethernet cable just popped out wtf
yay math
 
@AndrewL where is your code again
 
The hastebin above a few messages?
?
 
Curry isn't hitting the 3's this game
 
D:
 
12:42 AM
@AndrewL Yeah, that's not a good demo for me, since it's not something usable
 
@AndrewL makes sense?
 
Yep
 
ossm
 
12:56 AM
score Taco?
 
1:26 AM
47-72 GSW@OKC - Halftime :(
 
WHAT
HOW
 
@AliMarrouny 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.
 
any one got an idea of how to Prevent body scrolling when a fixed div is scrolled
 
@AliMarrouny huh?
@AliMarrouny addeventlistener and check if mouse is over the div, and if so scroll back up
 
1:35 AM
:(
No
don't do that
when the fixed div is shown, set the height of the body to 100%
 
yeah do that ^ phenomnomnominal is smarter than me o.O
 
Agreed
 
Almost time for me to go to the hizzle. I will miss you all
except for the goatf#@!er, obviously
 
1:59 AM
peace out
 
Any emacs 1337 people here?
 
Vim warrior sheep here. (wear headband)
Slashdot discussion "Have you moved from PHP to Node.js? Is there (a CMS platform future) or is it all just a ball of hype with a huge mess of its own?" Everyone hate PHP, that is obvious, but everyone seems to hate JS more.
 
@Sheepy Great, how do I delete the first two characters of every line?
 
it's complicated
better make a new string ;)
 
@thepiercingarrow Either use regular expression replace, or use rectangular selection. I prefer the first......
 
2:11 AM
@Sheepy awesome.. recantangles here I go!
@Sheepy Yay thanks!!
 
Basically, the slashdot-er can be divided into two camps: those who haven't used node.js and say js is bad, and those who have used node.js and still says it is bad. Consensus: don't migrate from a mature hell to an immature hell.
 
2:42 AM
@Sheepy truer words were never said :D
Final followup: C++ mixer is running circles around the JS one :P :-( that makes me sad though
 
@Abhishrek Yeah. Expected, but sad indeed. :/
 
            source.offset += source.deltaO;
            sampleValue   += source.gain * buffValue;
Those two operations kill performance because float
:-(
 
@Sheepy slash dotter?
 
3:10 AM
Hi, do you know why emmet in my typescript file in my Webstorm doesn't do linebreak when I hit tab?
like
var somestuff = `

span*4
`;

would give you
 
@thepiercingarrow Ok. Slashdotter.
 
<span></span><span></span><span></span><span></span>
I want
<span></span>
<span></span>
<span></span>
<span></span>
 
Why should any code editor do linebreak when you hit tab?
 
Well, it works fine in regular HTML files
 
Then it is not a HTML file.
 
3:13 AM
yeah but Webstorm has "Inject Language Reference"
and it must know that anything within
` ` is HTML
 
wat?
why don't you use \n\t?
 
Yes. And I have read how it works from its plugin development doc when I was an IntelliJ user. It does know that part is HTML. Still doesn't mean that's an html file.
 
what?
 
wat wat?
 
I also can't remember it line breaking for me when I hit tab... may be it's only my memory or may be it is a new feature in newer version.
 
3:16 AM
do you know emmet?
 
I see Webstorm. No I don't know emmet.
Sorry I seem to misunderstood your question.
 
yeah sorry me too
 
it's fine, we learn as we go
you can't just tell person "hey, why didn't you know what Emmet is before doing this project? It's so much more efficient"
that's my boss's favourite quote
 
So am I correct to assume this tab break thingie is an Emmet feature?
 
what?
 
3:19 AM
I guess it's a preprocessor for IDE's?
 
@EnglishMaster because Webstorm sucks
It's not the emmet that ST2/3 or vim have
 
Can someone help me with some basic JS? I have an input element into which the user types a search query, beneath that, I have a search icon, clicking on which leads to further processing with the search results. But, now I need to ensure that if the user clicks enter after finishing his typing in the input element itself, the same processing would occur.
 
I used vim when I was in year 1
 
could it have anything to do with the fact that the Webstorm plugin is made by a third party?
 
it just looked cool to other kids
 
3:22 AM
@Shea More like a plugin.
 
then I realised, there is a 41.2 times better IDE called Webstorm exist
 
wat?
 
@Shea it's a plugin for text editors that lets you expand CSS selectors to tags
And then tab through them and fill them in with content
 
@Manish Put the input in a form. Make the button submit the form. Move the button login to form's onsubmit. Done. Enter will submit the form automatically without form submission.
 
I thought that's what I said
 
3:24 AM
you can fill in contents with emmet too
 
@EnglishMaster um, vim can be used as an IDE
 
IDE !== text editor. okay.
 
But if you're comfortable with WS, use it
 
well, Vim is like MS Paint revamped by whole bunch of poor kids just to get by
Webstorm is like rich and smart kids gathered up and created a kickass IDE for rich people only
because you have to pay for Webstorm
 
Lol, webstorm is nowhere near as powerful as vim
 
3:26 AM
Have +5 troll points.
 
implying you have to be rich to make good stuff?
 
@Sheepy Actually, there's no button element as such. I have a span styled with a glyphicon to look like a search icon.
 
I actually use IDE with vim plugin. So I sometime I can't use a vim feature because of key conflict... like the retangular selection mentioned around 1.5 hours ago
@Manish span.onclick="this.closest('form').submit()"
@Manish Or put all search logic into a function, separating it from input / button event.
 
@Sheepy $("#after-search").click(function () {
@Sheepy This is how I have it now.
 
Hello All
 
3:31 AM
@Sheepy I'll try out your suggestion. Thanks!
 
I am trying to update PM2 . and run this command
1) Sudo npm install pm2@latest -g and
2) sudo pm2 update
Be sure to have the latest version by doing `npm install pm2@latest -g` before doing this procedure.
[PM2] Saving current process list...
 
does vim have live editting?
I guess not
 
What?
What is that?
 
now my command is not running. i am still seeing this message
Saving current process list
 
@EnglishMaster you'll struggle to find a feature not in vim that's in [insert your favourite IDE or editor]
 
3:39 AM
well, not all features in Vim are necessarily useful
 
@littlepootis an easy way to exit
 
such as Vim might have a feature to remind you "It's Tea time!"
 
the ability to run C# projects
 
in Webstorm, you do not need it
 
@JanDvorak :X
 
3:40 AM
I don't know whether that's an emoticon or a supposed way to exit Vim
 
because webstorm developers drink coffee
 
I like IntelliJ product. I had considered shelling out the money to buy a personal license many, many times...
 
Wait, isn't one licence enough?
 
@JanDvorak that's.. how to exit
 
Oh. I thought it was :q :D
 
3:41 AM
Heh, yeah. :X does not exit :-)
 
:q just exits
:X writes and exits
 
Not if there are changes.
:X prompts for an encryption key.
 
@JanDvorak :q is Exit. :x is often binded to save and exit. Vim does not offer you a easy way to exit vim. It offers you many easy ways to exit vim.
 
The problem is you can't search for them once you're in vim.
 
3:43 AM
:help
 
During auto capitalize
 
F1 works too.
 
So, how do I find out how to search for help in vim?
 
:help
:help help
 
That's ... stupid.
 
3:44 AM
@JanDvorak I used to have multiple vim cheatsheets tapped to my monitors :p
 
Or F1
 
I don't need a cheatsheet for VSC
 
You have to read though. That seems to be a stumbling block.
 
or for Sublime
 
Is there a nicer way to chain Observables than flatMap?
 
3:45 AM
I can't read anything if my console acts randomly to keypresses
 
@JanDvorak I also had a cheatsheet for VS, if that is Visual Studio :|
 
Maybe your console is broken.
 
Yes. It's running Vim.
 
-2 troll points.
 
ka-ching
 
3:48 AM
@JanDvorak Not really
VS and Sublime are intuitive for beginners.
Vim isn't
 
Webstorm is too expansive right?
 
The point is, you have no way to research it once you enter it unprepared
@EnglishMaster Define "too expansive". It grows one gigabyte per day.
 
@JanDvorak vimtutor
I doubt anyone would enter vim unprepared
 
@JanDvorak That's not true. When you start vim by default it says hit F1 for online help.
 
You know what? Let's screw the whole command line idea. It just confuses everyone.
Pretty sure my vim didn't tell me to use F1.
 
3:51 AM
wtf?
 
@JanDvorak Blame your distro.
 
@JanDvorak um, it does
 
Can I even send F1 over telnet?
 
@FizzyTea I was about to say "I never see that". Then I realise I always invoke vim with a filename.
 
@JanDvorak Do you use Windows for dev?
 
3:52 AM
@littlepootis Yes.
 
little pooties, I use windows
but I am coding in Centos on my Windows
because I can pay for premium virtualisation
 
@Sheepy Yeah.
 
@littlepootis I do! I do! (/me jumps up and down)
 
@JanDvorak Try it. Or type :help<Enter>. Does the same thing.
 
3:54 AM
So, how do I know to use :help?
 
It tells you to when it starts.
 
Scroll
 
Oh. then maybe Vim is escapable...
 
My vim actually teaches me how to exit first, before it mentions the help :p
 
Yeah, it says 'type :q<Enter> to exit' on startup. They thought of that. :-)
 
3:57 AM
Well, I consider putting down "vim" as your skillset in your resume is like saying
 
"I love games. And I love the editor that turns the keyboard into a big gamepad."
 
I don't think anyone would care about what your favourite editors are
 
I know how to write on MS Text
as journalist
 
@FizzyTea but that's only been added after many got trapped
 

« first day (2046 days earlier)      last day (2893 days later) »