« first day (947 days earlier)      last day (4005 days later) » 

7:00 PM
@Loktar I was about to
 
@Loktar we think it's a good idea too
 
!!cowthink soon...
 
SWF is actually a pretty clean file format
 
 ________
( soon... )
 --------
        O   ^__^
         O  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
 
!!c> class OkOk extends Error; new OkOk('fuck')
 
7:00 PM
Much cleaner than PDF
 
@phenomnomnominal "Error: fuck"
 
@BenjaminGruenbaum haha Ill give you that
I never want to work with the PDF format.. or PSD
 
@CapricaSix worst. prostitute. ever.
 
Ive heard horror stories about the PSD format.
 
@phenomnomnominal You should write blog posts explaining some of the Project Euler problems
 
7:01 PM
412
A: What is the best comment in source code you have ever encountered?

halcyhttp://code.google.com/p/xee/source/browse/XeePhotoshopLoader.m?r=f16763d221dfca6253983824b470adf553a19e06#108 // At this point, I'd like to take a moment to speak to you about the Adobe PSD // format. PSD is not a good format. PSD is not even a bad format. Calling it // such would be an insult ...

 
@AmaanCheval, one day my friend
 
@SomeKittens lol I've read that as well, probably where I formed my opinion
such a great comment
Has anyone here ever worked with QT?
Im loving the hell out of it right now.
 
@SomeKittens Have you seen the line following that comment?
if(sign!='8BIM') break; // sanity check
 
@BenjaminGruenbaum what do you consider a good way to store images? data:base64; is just stupid (75% data, 25% bloat)
storing the URL won't help you if you're offline
 
@JanDvorak What about what emails do? Your image is stored as an attachment (just a file with type and id headers) and when you link to it you do <img src='cid:yourImageId' />
 
7:05 PM
@BenjaminGruenbaum then you have multiple files to carry around
so, HTML.ZIP
 
@JanDvorak Why? You don't have to store it in different files
 
user1596138
Now I'm setting up pages to spy on our outside sales rep..... This job is weird.
 
@BenjaminGruenbaum then it's no longer HTML
 
First of all, having a zipped html with multiple files might not be a bad options. Second of all, you can just store them like emails with attachments
 
emails with attachments = multiple files or a generic container
.zip is a pretty good container
 
7:07 PM
Yeah, you need a container, no argument there. The file is HTML and the data would be in images
 
so, HTMLZ?
 
even normal src urls that use archive:// might work. Sounds simple
 
I wish my company saved their images.
 
not really a bad idea, I admit
 
7:08 PM
Instead of having me put the PDF in photoshop and crop them out individually
 
@BenjaminGruenbaum note the font files would need to be present as well
 
Then again PDF has some advantages, printing to PDF is dead simple to implement
That's not a big issue with web fonts
 
@rlemon instantrimshot.mp3.jpg.sh
 
What about ODT? It's a XML in a ZIP container
 
I like the idea of HTML because it's already widely standardized and a lot of people know how to read/write/parse it
Browsers could easily open such "htmlz" files without any overhead
 
7:10 PM
@BenjaminGruenbaum *Bobince*
 
Writing a well-formed html parser isn't that much of a pain (it's challenging, but on the good side). Malformed html, well...
 
@BenjaminGruenbaum my company realized this and has decided to use HTML now for App notes, and documents
 
(well-formed ~> html of course, not well-formed ~> parser)
 
7:12 PM
I designed the new template for them that the documents will use
 
@Zirak require 'nokogiri'
 
So now I have to convert 450 PDFs into HTML :'(
 
> Writing
 
@JanDvorak Oh, that, sure. Still it's fairly easy to parse HTML. I think most competent programmers can write an HTML parser. It's just a recursive descent parser. Even 'malformed' html shouldn't be too tricky. I'm not talking about formatting or CSS or how to display your HTML, understanding HTML is pretty easy.
 
Using an existing html library isn't writing an html library
 
7:13 PM
Especially since you'd have programs saving as HTML (like they save as PDF) which would likely produce valid html
 
@user2352034 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.
 
@Zirak Right, but writing one shouldn't prove too hard either. It's just a clever tree after all.
 
@BenjaminGruenbaum including all sorts of escaping? it's not that easy.
 
Hello,

i want to make something in acrobat, i think that i need javascript.

I want to change `015644543` to `01/564-45-43`, so when user type `015644543` i want to change it auto to `01/564-45-43`.
 
You can't just say "read until the closing angle bracket"
 
7:14 PM
@JanDvorak not saying that it's not a lot of work, it's sounds like a ton of work, but I don't think it'd be a big issue algorithmically
@JanDvorak That's not how recursive descent parsers normally work, if you have the BNF of the language it's fairly straightforward though. A lot of work, but straightforward.
@user2352034 acrobat?
 
yes
 
@user2352034 Acrobat what?
 
reader
 
I actually use markdown for summarizing stuff nowdays
 
lol
 
7:16 PM
@user2352034 along the lines of x.substr(0,1)+"/"+x.substr(2,4)+...?
 
Hey! Uhm, when I have display: inline-block elements (three per row according to their widths and margins), is there a way to automatically center them so they don't look awkward, or do I need to manually adjust the margins ?
 
@Ariane margin: 0 auto;
 
@KevinMurphy pdftohtml
 
@Ariane if you wrap them in a common element, margin: 0 auto
 
i have field where user must enter 015644543, and then i want to change it auto to 01/564-45-43
 
7:16 PM
There is existing programmes for that
 
@Ariane check out what I did in biology-studies.huji.ac.il , darkyen helped me there
 
@dievardump I don't want to replicate it in HTML, I want to manipulate the text, etc
into a template I've designed :/
 
Eh, no, they're not in a common element. Well, they are, but not one element per row, ya see. The element they're in is directly the main container
 
@KevinMurphy use pdftohtml then you use XSL(T) to transform it
pretty easy, really fast
 
@dievardump interesting. so how willing would you be to help me? I've never heard of XSL(T) heh
 
7:18 PM
@Ariane width = 1/3 of the container + margin:auto to the container?
 
I won't be able to help that much
 
doesn't need to be a per-row container
 
Not a lot of time
 
@JanDvorak I tried but mysteriously that causes them to only be two per line. Like (94%/3)*3 != 94 %.
 
can u help me with that?
 
7:20 PM
@Ariane did you account for margins and paddding when sizing?
 
@Ariane you need to resolve the white space issue: css-tricks.com/fighting-the-space-between-inline-block-elements
 
Most likely they don't fit
 
@JanDvorak I did. It's even easier since I'm in border-box.
 
He learned nothing :(
Even if it is stone age coding, overriding a listener is supposed to erase the previous behavior. So I keep your first answer. It gives me the flexibility to call the previous handler never, before or after the new one, without having to learn one more part of the language spec. — user1938185 24 mins ago
 
user1596138
@rlemon Hahahaha
 
user1596138
7:21 PM
@BenjaminGruenbaum Lol. I'm sorry but I really don't feel bad about earlier now.
 
@BenjaminGruenbaum o-0
 
@mikedidthis That's so silly! o_o Thanks!
 
user1596138
He doesn't even know how to accept the other guy's answer.
 
@Ariane yes it is.
 
user1596138
7:22 PM
He said he's looking for the link to accept haha.
 
@Ariane if you're working with smarty, you can request it to remove all whitespace for you
 
jan care daj pomozi :)
 
@KevinMurphy these pdfs, can you select the text from them, or are they just images wrapped in the pdf extension?
 
Dunno what smarty is and no time to look into it ATM but uhm
Yeah, thanks :D
 
Anonymous
Does this room hate jQuery? If so, I am in.
 
7:23 PM
@mikedidthis I can select text. Basically, for now I copy each paragraph to strip the line breaks :(
so slow.
 
@phpNoOb then you're half-in
 
LOL
0
A: Automatic friend requests being sent

keyCrumbsUnfortunately this isn't the place for this type of question. In addition, when tagging a question, be more specific. The tag "auto" wouldn't get you noticed much, probably anywhere. Sorry that you're having this issue.

 
	section {
		display: inline-block;
		padding: 0;
		width: 96%/3;
		margin-bottom: 2em;
		margin-right: 1%;
		margin-left: 1%;
Oh wait
I forgot one of the whitespace things
 
@KevinMurphy can you show me the 'copied' text? On a fiddle for the love of god! :)
 
@mikedidthis Without having line breaks stripped?
 
7:25 PM
@KevinMurphy as it comes from the pdf.
 
Anonymous
@JanDvorak :) @BenjaminGruenbaum LOL
 
We hate people downloading jQuery just to getElementById
 
@mikedidthis Surely. except for some reason these headers are duplicated. meh. one sec
 
@mikedidthis If I understand well the following is supposed to clear the problem?
<section>
					<img src="images/image.png" alt="Pouces en l'air !" />
					<h2>Titre 1</h2>
					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.	</p>
			</section><section>
					<img src="images/image.png" alt="Pouces en l'air !" />
					<h2>Titre 2</h2>
					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veni
 
user1596138
@JanDvorak What?
 
user1596138
7:27 PM
@JanDvorak Why can't you just use document.getElementById?
 
@JosiahSouth the point is you can
 
@Ariane can you use jsfiddle or show use a live example.
 
@mikedidthis No time ATM... I guess I'll just give up for now and leave it looking awkward. :p Though I'm curious so I'll come back to resolve this later.
 
@JosiahSouth but some people download a 90k library just to be able to do $("#id")instead
 
user1596138
@JanDvorak Ah I get it. People really download jQuery just to use $('#ID')??
 
user1596138
7:29 PM
Idiots....
 
@JosiahSouth you get my point :-)
 
AFAIK jQuery calls getElementById() anyway if it's an element-id
 
@sjngm it does
 
user1596138
@JanDvorak You could just bind $ the same way jQuery does and skip all the other functions from jQuery. It'd be tiny then.
 
user1596138
But I'm guessing the people who download jQuery just for that wouldn't know where to start.
 
7:30 PM
Chrome & FF bind $ to querySelectorAll if jQuery isn't present
 
the funniest sites are sites that load two different versions of jQuery... Sometimes I really wonder what kind of people are allowed to code... But that's off-topic :)
 
@mikedidthis here's a portion of the body. jsfiddle.net/berryboy/prfFk here's the link to the PDF: cdn.teledynelecroy.com/files/appnotes/…
 
function $(x){return document.getElementById(x)}
 
user1596138
@JanDvorak Exactly.
 
7:31 PM
I think this would also work: $ = document.getElementById
 
user1596138
I don't see the point though. Writing it out works fine. When we make things too simple we stop actually learning.
 
var $ = function(x){return document.querySelectorAll(x) }
 
user1596138
@sjngm Nah.
 
@sjngm it wouldn't. You need to bind document
 
@mikedidthis i'm uploading the template for you to see :D
 
user1596138
7:32 PM
@phenomnomnominal This would be identical to jQuerys method.
 
@JanDvorak true!
 
And it's a native function
 
@KevinMurphy well that's rubbish. Sorry man, I can't help. Your gonna have to copy paste like a bause.
 
user1596138
@phenomnomnominal Is it really native in FF and Chrome? I've never tried.
 
gah. pdftohtml does shit all. it starts adding italic tags
 
7:33 PM
function querySelectorAll() { [native code] }
 
user1596138
Anybody else think pdf.js is ridiculous?
 
user1596138
It rapes all of our PDFs. And we're a weekly paper.
 
I have to admit that the only place I really use query selectors is scraping. I find them useless otherwise.
 
@mikedidthis were you expecting something else? :p
man pdftohtml is stupid as hell.
 
"man pdftohtml is stupid as hell" or "man, pdftohtml is stupid as hell"
 
7:37 PM
I have to admit I try to interact with the DOM as little as possible.
 
Normally I just know what the elements I'm working on are, I don't have to look for them. When scraping css selectors are useful though.
 
@Zirak more of a man.................. pdftohtml is stupid as hell.
 
@KevinMurphy I honestly don't know.
 
@Zirak as long as you don't make it "man is stupid is hell" :D
 
it sure is frustrating. I'll try and work at home. If i come up with anything, I'll take a couple days off of work.
 
user1596138
7:45 PM
!!/eval bot.log
 
@JosiahSouth "ReferenceError: bot is not defined"
 
user1596138
@JosiahSouth "ReferenceError: Can't find variable: bot"
 
user1596138
Cool.
 
user1596138
I accidentally ran the bot as myself lmao.
 
I thought bots were only used on trivia-channels and such.
 
7:47 PM
@JosiahSouth Change bot.invocationPattern to something other than !! please
 
But then again as usual bots have nice avatars :)
 
user1596138
@Zirak Haha of course. I've already fixed it. Sorry.
 
Enjoy
 
user1596138
@Zirak I'm just building better cowsay templates haha.
 
Different browsers :)
 
7:52 PM
@JosiahSouth *cosplay templates
 
user1596138
@canon No. Cowsay.
 
user1596138
Well it's implemented as cow think here. But it's the same as Cowsay.
 
@JosiahSouth How now, brown cow?
 
user1596138
!!cowthink I am a cow.
 
 ____________
( I am a cow. )
 ------------
        O   ^__^
         O  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
 
7:54 PM
silly horse....
 
Holy cow...
 
@sjngm brahman?
 
@canon Well, thanks. Now I had to use Google... Actually I just meant it as a common expression
 
@canon Hahaha
 
:P
 
7:58 PM
who does the bot belong to? :o
 
!!/tell kevin help
 
!!/eval parent
 
@canon "ReferenceError: parent is not defined"
 
aww, it's an orphan...
 
7:59 PM
!!/eval alert("bot")
 
@sjngm "ReferenceError: alert is not defined"
 
It's BATMAN!
 
@sjngm It's in a WebWorker
 
I see
 
hey what is the point of this chat room?
 
8:00 PM
Making fun of bots :)
 
It's to discuss the applications of JavaScript's history. I, for instance, use a copy to level my desk.
 
Finding hot single RoR devs nearby
 
@Zirak M/F?
 
@GabrielPetrovay ASL?
 
!!/weather Chestnut Ridge, NY
womp
 
8:02 PM
!!/norris
 
@sjngm Chuck Norris describes human beings as "a sociable holder for blood and guts".
 
@BenjaminGruenbaum ASL?!
 
!!/urban human
 
What's up with services malfunctioning...
!!/weather NY, NY
 
@Zirak New York: 25.31C (298.46K), broken clouds
 
8:02 PM
!!/urban asl
 
Urban's API is borked, they return 500 errors
 
@JanDvorak human (no comparative or superlative) Of or belonging to the species
 
@GabrielPetrovay ASL is 90's internet slang for age/sex/location
 
@JanDvorak [Human](http://human.urbanup.com/2941929) A fictional race of [\[Argonimorphic\]](http://urbandictionary.com/define.php?term=Argonimorphic) [\[apes\]](http://urbandictionary.com/define.php?term=apes), presented in books, movies, tales and in the [real life]. Humans are warm-blooded, soft-skinned, flat-faced, ugly mammals, who tent to make things that are beautiful ugly. The apes are rather unintelligent (the average intelligence quotient is 100), their main obsessions are domination, copulation (population over 6.600.000.000 and is still growing, it probably will until the apes
 
@Zirak you shoud retry or at least complain if they do
 
8:04 PM
@BenjaminGruenbaum found it as well: average/not interesting/Europe
 
!!/urban reverse piledriver
 
@canon Reverse Piledriver A sexual position, much like the "[69]", only with the male on top of the female. This gives the male complete control and the ability to "piledrive" his [member] into the female's mouth, often causing discomfort and/or choking on the part of the female.
 
@GabrielPetrovay LOL, that was a joke referring to Zirak's comment :P
@GabrielPetrovay it's the JavaScript room, we talk about, JavaScript.
 
jebus
 
@canon I didn't want to know that
 
8:05 PM
@BenjaminGruenbaum i can "see" this
 
LOL
 
there really is no active sql chatroom
that's unfortunate
 
@Shmiddty you're on the wrong stackexchange buddy
 
@Shmiddty I'm idling in there but there's never anything interesting.
 
8:06 PM
@Shmiddty SELECT FROM rooms WHERE 'SQL' IN name
 
@JanDvorak error: you've selected no columns
 
@BenjaminGruenbaum thx loverly
 
@canon SELECT name, id FROM rooms WHERE 'SQL' IN name
 
which are the bots?
 
!!/tell gabriel help
 
8:08 PM
!!Are you a bot?
 
@gabriel https://github.com/Zirak/SO-ChatBot/wiki/Interacting-with-the-bot
@BenjaminGruenbaum Yes!
 
@BenjaminGruenbaum did you star me for my badge? :)
 
Yikes, self awareness...
 
!!are you going to wipe out humans?
 
@JanDvorak Of course!
 
8:09 PM
@GabrielPetrovay I didn't star you :P
 
!!am I a human?
 
@JanDvorak I expect so
 
someone did
 
@JanDvorak I'll see if I can
 
!!will you spare me if I wear an aluminium coverall?
 
8:11 PM
@JanDvorak No way
 
!!will you spare me if I beg and please?
 
@JanDvorak Doubtfully
 
!!will you spear me if a spear is nearby?
 
@JanDvorak I expect so
 
HALP!
 
8:13 PM
---JAN--> splotch
 
!!are you watertight?
 
@JanDvorak No way
 
!!/urban spitroast
 
@BennyF 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.
 
what is a yellow and what a black star?
 
8:15 PM
Black Star is a hip hop duo composed of Yasiin Bey (formerly Mos Def) and Talib Kweli. History Black Star arose from the underground movement of the late 1990s, which was in large part due to Rawkus Records, an independent record label stationed in New York City. They released one album, Mos Def & Talib Kweli Are Black Star on August 26, 1998. The record received critical acclaim, but only moderate commercial success. Black Star (and other members of the Native Tongues Posse) helped shape underground alternative rap, bringing it into the mainstream. Both Mos Def and Talib Kweli have gone...
 
!!/tell gabriel google site:meta.stackoverflow.com chat stars
 
Server error (status 500) occured (message probably too long)
 
Server error (status 500) occured (message probably too long)
 
@GabrielPetrovay Yellow is when you star, black is when someone else does
 
8:16 PM
... and a yellow one?
 
0
Q: Collision detection accuracy

user2350334How do you guys think I can improve the code for collision detection on my website@asteroidfield.eu5.org? The current code is var dx = Math.abs(c1.getcx() - c2.getcx()); var dy = Math.abs(c1.getcy() - c2.getcy()); var dist = Math.sqrt( (dx * dx) + (dy * dy) ); if ( dist - ( c1....

 
thanks, i should have then now the 10 chat messages and one starred
have a nice day guys
 
@BenjaminGruenbaum That "arrrrr" scared the shit out of me
 
@Zirak You're such a wuss
 
@Zirak Lol, I doubt you'd gain much from watching it, I posted it because we've had a bunch of new users here. (Also, it's Crockford, and he likes ripping on the DOM)
 
8:23 PM
I stopped listening to mellow jazz to hear that. Was in a completely different world. Normally I'm pumped with testosterone and at edge for punching any offender
 
anyone have interesting large header fonts they'd recommend?
 
@BenjaminGruenbaum That begs to be a cheap scare
 
@KevinMurphy Impact
:-D
 
Hello,

i want to make something in acrobat, i think that i need javascript.

I want to change `015644543` to `01/564-45-43`, so when user type `015644543` i want to change it auto to `01/564-45-43`.
 
8:28 PM
@FizzyTea @copy I'm not going to be much use today for the golfing
 
@Shmiddty You're never useful anyways.
6
 
It's true
 
How do you remove a club soda stain?
 
@CapricaSix tomato juice
 
+
 
9:09 PM
what does this mean?
XMLHttpRequest cannot load open.api.ebay.com/……b3fda9-0e2e-40e4-9cef-e9cd753fa44&siteid=0&version=515&ItemID=110116623501. Origin stores.shop.sandbox.ebay.com is not allowed by Access-Control-Allow-Origin.
 
gah. my print style is cutting off text. da heck?
 
!!/tell connor google access-control-allow-origin
 
@JanDvorak Command googlee does not exist. Did you mean: google
Server error (status 500) occured (message probably too long)
 
@Zirak c'mon
 
@Connor google that error, without the url :)
 
9:12 PM
@JanDvorak i have
 
then look up "same-origin policy"
 
@JanDvorak whats that got to do with anything when calling a api
 
@JanDvorak I know I'm sorry, I'll fix it
@Connor Because you're requesting something not in the same origin, which is a violation of the same-origin policy
 
@Connor that API is cross-domain. You can't just talk to it
 
does anyone know why my <pre><code> would get cut off while printing?
 
9:15 PM
!!/tell Connor mdn same-origin policy
 
i've tried setting visible overflow, page breaks, etc.
 
@KevinMurphy your lines overflow?
 
@JanDvorak so i have to be on the same domain as ebay.com to make a api call?
 
@Connor make the call from the server
 
9:17 PM
If it doesn't explicitly allow cross-origin requests or has a jsonp api, yes.
 
the pre/code is in a box with a border. the bottom of the box gets cut off, as well as half of the last line of text
ill upload, one sec
 
jsonp is inherently unsecure
 
@Zirak Thanks very much for your help, jsonp sorted it, that was simple thank you
 
@JanDvorak Huh? I don't think so. I think you can make secure JSONP
 
@Connor Helping you is always bitter-sweet. Sweet because, well, I helped you solve a problem. Bitter because you could've researched and arrived at the same place, and I see you coming back here with these kind of simple research problems. So am I doing the wrong thing in not telling you to rtfm?
 
9:19 PM
@BenjaminGruenbaum JSONP is basically a XSS injection request
you need to trust the callee
 
@JanDvorak That really depends on which browsers you need to support
 
@Zirak ok, so your assuming i didn't research, if you say so
 
I know you didn't, because how do you think I learned of it?
 
having problems uploading :(
 
I got to that problem, said "wtf?", dug in and found it.
 
9:21 PM
@BenjaminGruenbaum tell me. How do you make JSONP without having to trust the callee?
 
@JanDvorak if you can support IE10, Firefox, Chrome Safari, well, basically new browsers, you can make it secure. Then again you should use CORS to begin with.
@JanDvorak simple, run it in a WebWorker
 
nice point
 
i.imgur.com/sQGVF7v.png - you can see the box at the bottom of the print preview
i can't upload teh files right now
 
!!/caniuse webworker
 
@JanDvorak Command caniuse does not exist.
 
9:22 PM
One of the goals of web workers is to allow safe execution of untrustworthy code.
 
@Zirak well, im sure you will get far in life assuming, and not really knowing but think you do, for your information i did reasearch and i went to 3 different stackoverflow questions but they were all to do with localhost so it didnt help me
 
how do you perform JSONP from a web worker?
I think you can't
 
night all
 
@Connor It was wrong of me to care.
 
@JanDvorak importScripts I assume
@JanDvorak that could actually make a very nice blog post if I wrote a coding blog :)
 
9:24 PM
@BenjaminGruenbaum self-answer?
 
@Zirak calling someone a liar is not caring
 
Of course CORS is the correct solution
@JanDvorak That's an interesting idea, I'll think about it.
 
asking is hard, however
 
...why do I bother defending myself?
 
@Zirak no idea.
 
9:28 PM
@Zirak i can send you my history if you like :)
 
No, you're right, I don't care.
 
@Zirak - good
 
I really hate it when people don't
 
@CapricaSix me 2
 
9:52 PM
@Zirak I blocked connor long ago
 
When does SO begin a new day?
 
I the the servers are in NYC
 

« first day (947 days earlier)      last day (4005 days later) »