« first day (922 days earlier)      last day (4025 days later) » 

3:00 PM
one sec i'll find it
$().dropdown('toggle')
wait
 
thanks a ton @rlemon, will try it out and let you know in a few mins :)
 
maybe no
 
0
Q: No audio on tv even though using HDMI output

Anders MetnikI have installed my Graphics card, and hooked up my old labtop to the TV as a media center, videofeed is going through nicely. But the sound is lacking, even though the HDMI output is selected, then it stills outputs the sound through the labtop. I have got a nvidia 9500M(as far as i remember) up...

 
but i think the accordion collapse thing would be appropriate
 
yea it appears they changed things since I last looked at it
one sec
 
3:01 PM
got it, $().collapse
experimenting now, will let you know in a min..
 
hrm, yea I didn't read it properlly.
I was reading about dropdowns in nav not the collapse nav.
 
how can i turn a number into a percentage of another number
 
I always forget
 
large/small * 100
 
3:02 PM
@rlemon yeah, of course there's no need, but i'm just screwing around with a filter-prototype for now, so it should suffice
 
BTW what it is supposed to do when beautify command is given. I was expecting it would repeat the sentence what the mentioned person enters in the chat.
 
1% = 1/100 = part / whole
 
there's already a TODO-comment there ;)
 
!!/tell Appu help beautify
 
@Appu beautify: Fetches and beautifies a message containing html, css or js. /beautify msgid [lang=js]
 
3:04 PM
@rlemon cheers
 
10 mins ago, by SO ChatBot
@GNi33 http: //jsfiddle.net/rlemon/NYHqY/
 
It tried beautifying rlemon's last message.
 
public class SerialComm
{
private SerialPort serialPort;

public string ComPort { get; protected set; }

public delegate void DoneDataReadHandler (byte[] data);
public event DoneDataReadHandler DoneDataRead;
 
How? It gave the above one when I typed that.
 
!!/beautify rlemon
 
3:06 PM
< div class = 'full' > public class SerialComm < br > { < br > private SerialPort serialPort; < br > < br > public string ComPort {
        get;
        protected set;
    } < br > < br > public delegate void DoneDataReadHandler(byte[] data); < br > public event DoneDataReadHandler DoneDataRead; < /div>
 
ouchville
 
yeah, chat's multiline isn't very friendly.
 
got it.
 
@Appu ...in other words, his last message when you executed the command
 
I was expecting the next sentence to be beautified. So, I just got confused.
 
3:07 PM
!!/beautify Zirak
 
@Appu... in other words, his last message when you executed the command
 
(Hoping for an error)
Damn.
 
!!JS or C#
 
@rlemon JS
 
!!JS or F#
 
3:08 PM
@canon F#
 
!!c# or f#
 
@rlemon c#
 
!!is js > c# > f#
 
@rlemon Of course not
 
well wtf bot, why did you just say so then
 
3:09 PM
My brain...it hurts
 
So, JS > C# and F# > JS but C# > F#
 
A > B
C > A
B > C
 
slash boggle... the bot broke transitive relationships
 
!!Do you have ulterior motives?
 
FUCK why is it everything I have done today hasnt worked
 
3:10 PM
@rlemon I can neither confirm nor deny
 
!!WHY?
 
@BillyMathews Y U NO MAEK SENSE!? Could not understand WHY?
 
Add a touch of random to anything, and it turns awesome
 
	$(window).resize(function() {
		if(!this.resizeTO){
			this.resizeTO = setTimeout(function() {
				$(this).trigger('resizeEnd');
				$(window).resizeTo = null;
			}, 150);
		}
	});
it will only fire once
 
Learn basic objects
$(window) !== $(window)
 
3:12 PM
sorry
	$(window).resize(function() {
		if(!this.resizeTO){
			this.resizeTO = setTimeout(function() {
				$(this).trigger('resizeEnd');
				this.resizeTo = null;
			}, 150);
		}
	});
I think it is a scope problem
 
Cache this ouside of the setTimeout callback
 
Billy, its a two parter!
 
should I just store the timeout in a variable?
 
You bind the resizeEND event to the window
 
@mikedidthis Yeah, I know, I'm trying to modify it to throttle
 
3:14 PM
You shouldn't be storing these kind of things on it anyway
 
blegh
 
Quick one, if I load the same image twice, it will only be requested once?
 
depends
 
3:15 PM
I mean in relation to 'modern' browsers
IE can well...
 
depends again
 
On?
 
caching depends on what the server sends
 
Ahh ok.
I will try / test. Thanks
And I presume a temp div (not in the DOM) will still request the image?
 
0
Q: What's wrong with this javascript programming approach?

Ada Bell'h Mon TrésorHelllo people I'm now developing an instant messaging system but I'm a little confused : I can't decide which approach do I have to choose! Here is a code and I want you to tell me what is good/bad with this programming approach: one friend of mine said it's difficult to read, but It works /*! ...

 
3:20 PM
Fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
 
Billy!
 
if(height < parentheight) $(this).width( ( ( (width/height) * parentheight) /parentheight ) *100 + '%');
 
!!/beautify 9059184
 
@SomeKittens Message -1 not found
 
marnin
 
3:22 PM
Billy, are all the images the same size?
 
I need to change the width to make the height = parentheight
 
< div class = 'full' >
if (height < parentheight) $(this).width((((width / height) * parentheight) / parentheight) * 100 + '%'); < /div>
 
Not neccesarily
 
Ahh ok.
 
@rlemon It worked :D
 
3:23 PM
cool
:)
 
howdy
 
Thanks for the help bro :)
 
!!rlemon or copy or zirak or BenjaminGruenbaum or OctavianDamiean or FlorianMargaine or AmaanCheval or Darkyen or Loktar or someone else
 
@Shmiddty copy
 
copy gets my sick
achoo
!!/randomperson
 
3:26 PM
@Shmiddty Command randomperson does not exist.
 
I'd make a pull request but I'm too lazy
 
!!/parse $someone
 
@Zirak user2320384
 
@BillyMathews
var height = 400, width = 300, parentHeight = 600, ratio = width/height;

while (height <= parentHeight) {
    width = width + (1*ratio);
    height = height + (1*ratio);
}
 
oic
!!/parse $someone
 
3:27 PM
@Shmiddty GNi33
 
achoo
 
!!/parse $0 SomeKittens
 
@SomeKittens 0 SomeKittens
 
!!/echo "$someone smells"
 
@rlemon Hi!
@rlemon Command echo does not exist.
 
3:28 PM
!!/tell $someone echo "you now has my sick"
 
@Shmiddty Command echo does not exist.
 
!!/learn echo $0
 
@rlemon Command echo learned
@rlemon "$someone smells"
@$someone "you now has my sick"
 
boo
 
:(
@Zirak no reparsing?
 
3:29 PM
That's actually weird. Learned command should go through /parse
oh, no, there's no recursive parsing
 
but should there be?
@BillyMathews let me know if that works for you
 
I still feel like !!/tell $someone echo "you now has my sick" should work
 
@rlemon just putting in now...
I think it will.
 
Under the current system, no. If it's important, then I can probably add it in
 
Just add a limit to the recursion.
 
3:31 PM
@BillyMathews I tested it, the final height was 600.25 and width was 500.25, (rounding errors)
 
is anything the bot does really important?
 
@AmaanCheval i am watchin the most hillarious coding discussion i have ver seen
 
@Darkyen Huzza!
 
besides greeting neophytes
 
mustache command is awesome
 
3:32 PM
@Shmiddty I've debated that as well, and decided at the end that these simply won't be really good outside of learned commands (and /parsed messages)
 
inhistory as well
 
@Shmiddty Arguable
 
It's good to have around
 
!!/inhistory 09-05
 
@rlemon 1887 – Fire at Theatre Royal in Exeter, England killed 186
 
3:33 PM
!!/inhistory
 
Not very important, but makes a nice addition
 
@Shmiddty That format confuses me! See /help inhistory
 
@Shmiddty Omit the parameter for today
 
@Shmiddty 1847 – The last survivors of the Donner Party are out of the wilderness.
 
heh
 
3:33 PM
People keep throwing in today...should that be added in?
 
@Zirak wouldn't hurt
 
Anyone seen Cannibal! The Musical?
 
cough we need years as well cough
 
Today is really not my fucking day
 
!!/inhistory 1986-09-05
 
3:34 PM
@rlemon That format confuses me! See /help inhistory
 
I want to know what other awesome stuff happened on that specific day!
 
!!s/my fucking/my favorite/
 
@rlemon Nothing.
 
@Shmiddty Today is really not my jumping day (source)
@Shmiddty Today is really not my frakking day (source)
 
3:35 PM
I left it open for a day to see if anyone objects
 
I did
but I objected in the chat not the issues
 
@Shmiddty Today is really not my favorite day (source)
 
...then how was I supposed to know :P
 
say there are a number of events to choose from on a given day for a given year
 
@rlemon Then it doesn't count. :P
 
3:35 PM
why not just toss the ability in there
 
YYYY-MM-DD may be okay implementatio-wise...it'll just bring in a lot of "nothing"s
 
or I want to know a random fact for something that happened in all of 1969
 
Combining all 3 will actually require a smart system
 
Brian got his first new six-string -bought it at the five-and-dime.
 
so !!/inhistory 1969
> We landed on the moon!
or
> Woodstock was trippy man.
 
3:38 PM
!!/inhistory 2015
 
@Shmiddty That format confuses me! See /help inhistory
 
@rlemon
	$(window).bind('resizeEnd', function() {
		$('.index-slide-container img').each(function(){
			width = $(this).width();
			height = $(this).height();
			parentwidth = $(this).parent().width();
			parentheight = $(this).parent().height();
			ratio = width/height;
			while (height <= parentheight) {
				width = width + (1*ratio);
				height = height + (1*ratio);
			}
			console.log(width);
			$(this).width(width);
		});
	});
 
and wikipedia makes it easy :) en.wikipedia.org/wiki/1969
 
@rlemon
^width never changes
 
Combining them is the hard part
 
3:38 PM
camography.org
 
It's ok everybody, the bot can't see into the future. The robot uprising has been delayed
 
@AmaanCheval my CEO and CTO are discussing how they are going to grab the tickets to wwdc
its hillarious as hell :D
 
Post it on issues, I'll work on it
 
Haha
 
@Darkyen How many people work there?
 
3:39 PM
@BillyMathews Y U NO var?!
 
i amma make a video of the final attempt :D
@SomeKittens so far 3 of us, we hired 3 more
we have 1 HR manager and 4 interns aswell though*
 
I take it that matters?
 
@rlemon he was golfing it, obviously
 
In this situation..?
 
but we dont count them daily staff
 
3:40 PM
@BillyMathews do you understand what var does?
 
@andriy.kashchynets 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.
 
@BillyMathews globals are always bad
 
@BillyMathews and what leaving off var does?
 
@Shmiddty No, no not really
 
@BillyMathews var localizes a variable to the current scope. if you leave off the var, the variable is added to the global scope (generally window)
 
3:41 PM
Ok, but that's not why my code isn't working
amiright?
 
where is your code in this mess
what file?
 
scripts.js
 
link
 
@BillyMathews Technically, it shouldn't affect that particular piece of code.
 
linking me some wp stuff is a pain in the ass to read
 
3:42 PM
@Shmiddty ;)
 
But pollution is awful and you should feel ashamed
 
wp-content/themes/camography/js/scripts.js
 
:(
dude...
 
if you are using jQuery 1.8.3 why are you using .bind
and not .on
? just wondering
 
Oh, copy + paste job
 
just got an idea for a code-golf problem! :D
 
> As of jQuery 1.7, the .on() method is the preferred method for attaching event handlers to a document. For earlier versions, the .bind() method is used for attaching an event handler directly to elements. Handlers are attached to the currently selected elements in the jQuery object, so those elements must exist at the point the call to .bind() occurs. For more flexible event binding, see the discussion of event delegation in .on() or .delegate().
 
Will change
 
3:46 PM
@BillyMathews so you want what? the maxwidth or the maxheight to be stronger
because it looks like it's working for me
 
I need both dimensions to be as small as possible, while still being > parent & maintaining aspect ratio
your code should work, but it only works once and I dont know why
then it just returns the same over and over
check console while resizing
 
.resize !== .onresize
 
you might just be triggering the resize
change to .onresize
> This method is a shortcut for .on('resize', handler) in the first and second variations, and .trigger('resize') in the third.
 
I dont think so, that bit of code works man
 
3:50 PM
yea and it would... once.
 
The values in the console won't update until you stop resizing right?
 
@rlemon do u know how to find the viewport size on codepen ?
it lies to me :[
 
It should update every 150ms
which it is
 
window.innerWidth is full width, not the reduced one [ as i use the frame on side view ]
 
but with the same value..
 
3:51 PM
@Darkyen I always document.body.offsetHeight
 
hmm
 
Ahh ok.
 
okay i will try with that today.
 
		if(!this.resizeTO){
			that = this;
			this.resizeTO = setTimeout(function() {
				$(this).trigger('resizeEnd');
				that.resizeTO = null;
			}, 150);
		}
this bit of code doesn't look right to me
brb lunch
 
^it works
∴ I will leave it
please somebody shoot me
 
3:57 PM
 

« first day (922 days earlier)      last day (4025 days later) »