« first day (550 days earlier)      last day (4623 days later) » 

00:41
0
Q: ControlEntry Object - Best Practice?

stack.user.0Here is how I do it for a two page site. Just a module pattern that has two functions one for each page. An id on page 1 identifies it and selects the branch. window.onload = function(){ new ControlEntry(); }; var ControlEntry = ( function () { var ControlEntryI = function...

 
3 hours later…
TND
TND
03:38
Why is it that you have to do parseInt($(window).scrollTop()) to be cross browser compatible? $(window).scrollTop() doesn't work in Opera because apparently it returns a string I guess? ._.
0
Q: Unfade downvoted posts

ManishearthAnswer to this meta question. Allows one to unfade downvoted posts. Installation Click here to install. Will only work in Chrome or Firefox (the latter requires Greasemonkey). Source Usage Mouse over a faded post to unfade it. Mousing out will bring it back to the unfaded state. If you don...

 
2 hours later…
05:26
0
Q: Autonavigate/autocomment "close/flag offtopic" for MSO

ManishearthOn MSO, there are plenty of questions that should be on SO asked every day. The procedure with dealing with these is: Copy-paste boilerplate comment saying "This belongs on SO blah". Alternatively, use Pro-forma comments, and navigate the menu Navigate the flag menu/close menu to "off topic". ...

05:46
@sg3s i am never scared of coding pure js :P i love the langauge
06:09
:)
hello
me neither, I am just glad I rarely have too since I can already get pissed off enough due to CSS inconsistencies between browsers....
@Abhishek
Oh boy ...
0
Q: HTML text effect animation for iPad Web

Punhoon KhanI have web app i want to perform text effect like we have in power point lines come from left side like that how to do that i have tried many links but did not get <HTML> <Body> <p>This is the First Ans Last Game Of <p>The Tournament </Body> <HTML>

I have no idea how to salvage it.
06:42
Well.... suggestion on wtf javascript is might help
but its a fairly hopeless cause until he learns that @OctavianDamiean
07:05
@All...
can any one help me around in the currency conversion API...
ask your question :)
the currency conversion API ... because there is only one.
07:31
Good Morning. Anyone know a tool which converts VSDoc comments to JSDoc Comments?
Hi, is there a way in jQuery UI to apply an effect without animation?
effect without animation? what do you mean?
I want to apply the scale effect to an element
without having an animation :)
@patrick set width and height directly using $.css
I am stuck on my requirement. please help me to fix this
08:06
damn
there is a form , and it has a <input type="submit" name="action" > in it
how can i get form's action attribute (in cross-browser safe way) ?
Did you try with jQuery and $('form').attr('action', 'new');
?
Where can I read about the file patterns mentioned for use with the -o option?
why? -.-
because i am not crappy and bloated "library"
and if you are suggesting , that i add it just to read an attribute from a tag , you really should help the humanity by removing yourself
08:16
no no, I thought that you were using jQuery :)
however you can look into the code of jQuery to see how it is done
08:27
@tereško: document.forms[0].elements.action
seems painful
or if your form has name="my", you can use document.forms.my.elements.action
even document.forms.my.action works actually
but it's kind of buggy in FF, if you remove the element you can still retrieve it
but if you don't mind this bug, you can go for it :) document.forms[0].action
08:45
naah , getAttribute('action') is implemented properly in IE7
08:57
@rlemon, thanks! I want to use to lower string to parse incomming JSON strings (containing only numeric values) in order to make sure all properties of the JSON object are lower cased. Because I'm receiving JSON messages each 500ms, I needed to be sure this function would not impact the performance
@tereško: I didn't quite get your question then. having name="action" did confuse me :)
yes .. i can see how
09:18
@tereško if that's it, using el.action would be enough :p
Hello
This is a JavaScript interpreter brainfuck.progopedia.org
What i didn't understand is how can it interpret a non-javascript code
@Malek: what, you don't think it's possible to write a parser in JavaScript?
0
Q: Change Query Arguments (filter) with jQuery/Ajax or PHP?

juliuskI have a pretty complex wordpress-site for travelling. theres a archive-hotels.php. A template for the custom-post-type "Hotels". Inside that CPT is a taxonomy called "city", so we can do this: domain.com/hotels/city. Works perfectly. Now theres a filter on the site, which should filter the shown...

if i have multiple submit button in a form , how can i know which one was clicked ?
No, but the code i can see on the link is not a javascript code, i mean, how could it parse a Hello World message from a strange suit of caracters
09:34
@tereško: target.value === 'something' ?
@tereško Give them names
@Malek , it is an interpreter for language "brainfuck"
@Malek: just the same as an interpreter would be written in any other language. It's not evaluating non-JavaScript code, it's parsing the string using a tokeniser based on the syntax of another language.
@tereško so it's not a JavaScript interpreter?
@AndyE so it's not a JavaScript interpreter?
No, it's a brainfuck interpreter written in JavaScript.
09:38
Thank you, google
FYI: when you load a google ads, there is an window.google_ad_block variable available so that you can check if (window.google_ad_block === undefined) and act accordingly
@AndyE Because i just came across a weird programming language, i am charged of developing a Chef Interpreter in JavaScript. My question is: how can the interpreter understand that this program is for displaying a HelloWorld message : dangermouse.net/esoteric/chef_hello.html
@Malek: first, you can see that each statement is separated by a dot
each ingredient starts with a number
but why it's outputting "Hello world" is out of my understanding.
That's the point, it's driving me crazy, why such instructions will be outputting a HelloWorld message !!!!
Check the ingredient measurements. 72 = H, 101 = e, etc.
09:50
So it's based on the ASCII code? but it's not the same rule for Fibonacci Numbers
@AndyE The ingredients measurements are 9. and Hello World is 10 caracters length
@Malek: the instructions probably repeat the character somehow.
It's the l that's only defined once.
@AndyE Sorry, what you mean the 1, what you refer to?
L (lowercase). The characters listed are H, e, l, o, (space), W, r, d, and !.
Some of those characters are used more than once.
ah okay, sorry for the missunderstood ;)
@AndyE generic popular web based non-JS blog, go
@AndyE too slow
10:07
@Raynos: I don't think I'm a regular at any generic or popular non-JS blogs.
10:36
bbc.couk is a blog? is it?
blog by journalists ;o)
11:32
What compressor for JS and CSS do you use?
I have a hard time with YUI and Ant
YUI or Google Closure
But I don't understand YUI
How would you compress every JS or every CSS in a folder for example?
And I want those in a file
trough an ant build - script
I tried
But I don't seem to add the right files etc
Can you help me, links etc
you could try a filelist
11:42
But I don't know where to add al this
thats the problem
what do I download
where do I find the options etc?
<filelist id="js.fileset" dir="${basedirectory}/js">
  <file name="file1.js" />
  <file name="file2.js" />
</filelist>
<target name="build-js" depends="">
	    <echo message="Building JS" />
    	<mkdir dir="${publish.dir}/js" />
    	<concat destfile="${publish.dir}/js/compressed.js">
    		<filelist refid="js.fileset" />
    	</concat>
</target>
<taskdef resource="yuicompressor.tasks" classpath="dist/yuicompressor-taskdef-1.0.jar"/>

<target name="example">
<yuicompressor linebreak="40" todir="${basedir}/test">
<fileset dir="${basedir}/test" includes="*.js"/>
<mapper type="glob" from="*.js" to="*-min.js"/>
</yuicompressor>
</target>
But where do I download this jar?
hi all
I am using this example for my password checking scriptiny.com/2008/04/dynamic-inline-javascript-form-validation
but the issue is that I am getting my password in the query string at link
which is of course should avoide
how to prevent this?
first use https, then the url can't be intercepted, but use post that way it won't show up in server logs.
u mean post method, right?
11:55
yep
use a post request. It wasn't clear from your question whether you were sending data by a form or not, but either way you can still use post.
gtg though. I'm sure someone else here can help.
@user973810 thanks for ur help
but I tried that as well but still
and i am just want to use the tool tip for the input validation only
I don't want to send anything just now
cool , there exists : console.dirxml();
12:18
@tereško can't see what it's useful for :/
f***
YUI Compressor in Ant is hard to set up
var el = document.getElementById('jplayer')
console.dirxml(el)
console.log(el) // both do the same in the console
@Viper: you looked at this? code.google.com/p/yui-compressor-ant-task
also, what's your development environment? Most provide something like this out of the box
IntelliJ IDEA 11 Ultimate
framework?
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Minimizer" basedir="." default="start">

<!-- defines location of libraries -->
<property name="lib.dir" value="/Users/andreas/Developer tools/compressor-libs" />

<!-- defines output directory -->
<property name="build.dir" value="build" />

<!-- output files, one for JS one for CSS -->
<property name="final_js" value="${basedir}/js/complete.js" />
<property name="final_css" value="${basedir}/css/complete.css" />

<!-- define nicknames for libraries -->
@FlorianMargaine What do you mean?
12:22
are you using any framework for your web development?
@FlorianMargaine The thing is that yuicompressor inside the target compress at the bottom turns up red
No, just jQuery...but I am not able to run this because of the condition above@
on your server side, what are you using?
@rlemon \o
how are you doing? not too much nightmares about node? :p
nahh girl troubles.
12:25
ah :/
worse
relationships are like UX. no one wants to think about it or put any work into it... it's just magically supposed to be there and people are supposed to be happy with it.
@FlorianMargaine no nothing
@FlorianMargaine Just HTML, JS and CSS
nothing dynamic then?
I just want to minify the CSS and JS, something simpler than YUI, no nothing.
closure compiler no work?
12:27
JavaScript just use a JSON service
closure?
@Viper: use something like this then refresh-sf.com/yui
ah awesome
Hey Florian .. Hru ?
hi
hru?
what is that supposed to mean?
cc - http://closure-compiler.appspot.com/home
https://github.com/hiddentao/weber - for nodejs
https://github.com/mishoo/UglifyJS - for nodejs
12:30
@FlorianMargaine Should I download the gzip or just files?
I am facing a problem related to pdf generation ..
@FlorianMargaine , lol ... not everyone of us can avoid legacy software
@rlemon thanks I will take a look at that as well
@Viper what server technology are you using
oh.. it is for for How are you!
12:30
this is just a client mobile application of a web service
just HTML, CSS and JS
it just use data from the JSON
@kcrajput: I'm fine then :)
is there any option to add image in background of pdf..?
yes but all webpages are served from servers
ah, yes
@kcrajput: depends on the technology used
12:32
@Viper maybe instead of doing through the headache you can dump you unminified code in pi.rlemon.com/paste and I will minify it for you.
(really needs to write online minifier)
It is PHP
@kcrajput then rtfd
@Floarian is this possible to call image via CSS in body
12:34
I search on google, but didnt find any solution
@tereško still on that jsValidationScript.... i feel sorry for you
are you talking about background: url(.....) ?
searching "css background image" should get you what you're looking for
What is the difference between just downloading the files and downloading the gzip ones?
http://refresh-sf.com/yui/
after compressing
@rlemon , i have to make the replacement to work exactly like this crap + add features
12:35
yea, but it is not working pdf..
Can we change the room title to "Dont know google? Come here! We'll run a single search and give you the first result back!"
pdf?
css in pdf?
if (
    (!responseNode)
    ||
    (responseNode.tagName.toLowerCase() != 'response')
    ||
    (!(status = responseNode.getAttribute('status')))
    ||
    (
        (status != 'ok')
        &&
        (status != 'error')
    )
)
{
    return null; // bad mofo
}
@kcrajput dude..... RTFD!!! php.net/manual/en/ref.pdf.php
what the hell is going on?
12:35
that's a bad way to check :/
check for what is right, not for what may be wrong
@Viper one is compressed one is compressed and gzipped
What is gzip
merged?
this.getXmlChildNodeTextByTagName(errorNode, 'message');
lol
gzip is the encoding method to make the file smaller.
isn't that just getElementsByTagName('message').childNodes.textContent?
or it doesn't work maybe?
12:38
Thanks Florian :) will check this link
haha
@tereško: what's the xml expected?
Date.getTimezoneOffset() will always return a number divisible by 2 right?
( Date.getTimezonzeOffset() % 2 === 0 ) ??
@rlemon Thank you, one more thing: Does this refresh-sf.com/yui understand the order in which files need to be in?
bah.. i gets no love.
12:39
 <response status="ok"/>

 OR

<response status="error">
   <error>
        <message>Lūdzu aizpildiet visus obligāti aizpildāmos laukus!</message>
        <field_name>Atbildes </field_name>
        <focus>answers</focus>
    </error>
</response>
@rlemon :x
@rlemon .. Florian was first .. :)
but thanks you too
@Viper check it out... make one file var foo = function() { this.a }; and another file with var bar = function(b){ this.b = b; };
screwing up the live-server like a BAUS!
@FlorianMargaine i just lul because i was the one who posted the link :P
12:41
what the hell did i just do -.-
yeah I know :p
ooooops :P
> If Hem is good enough for you then stick with it. Otherwise take a look at what Weber can offer you below.
lol
"we're based on the competition, so if it still works for you ignore us"
what a business model!
@what should that do?
@Viper you wanna know if the order is retained? so test it out
write two or three small files that can easily be identified when minified or obfuscated
then compress them all together and see if the order is retained.
12:45
To be honest I don't understand how three separate functions that does not rely on each should cause any retaining in order
@tereško: that's the kind of thing you have to do? jsfiddle.net/Ralt/BNayC
I skipped the first part, but well...
13:02
@FlorianMargaine Does this refresh-sf.com/yui/#output keep everything in working order or not?
I have no idea
Is it usual to minify or are gzip enoguh?
both are done
Both with and without? Or should both be done?
@tereško: this'd be a more cross-browser solution :p jsfiddle.net/Ralt/BNayC/2
both should be done
13:07
any cz people in here?
what do you use to make that happen? I want them to be minified but not merged in one file as the online YUI compressor does
search "minify css online"
then minify them individually
how many freeking files are there?!
if it's more than 2 or 3 you need to fix that first.
also @Viper Florian and I have just repeated the same information like 6 times over.
14 css files
13:11
dafuq is the point of that?
I would rather load one maybe two css files once and cache them for every page.
single moderate load with subsequent faster loads vs always a little better than moderate load.
@rlemon but that's what concatenating and minifying your files is for actually
it's way better to have one big css file than multiple small css files
to keep organisation in the projcet
assuming performance and load times are the reason you're doing this.
@Viper then keep them seperate and compile them together on build
13:14
so is it better to browse thousands of file lines than having multiple
@GNi33 i know... he doesn't want that thought. i'm telling him he does.
@Viper no.... have multiple files in development... before you push to production, compress and merge them into a single file
or have them compile on runtime (slower)
then you may see why that is why I have 14 css files then
or get an editor which allows you to bookmark lines and collapse blocks.
@Viper yes. so why is it an issue that YUI compresses AND merges them?
you don't uglify code pre-production
because I wondered if a file B needs something in file A it will order it correctly
RAM usage, 96%
13:17
and that is why I made this friggin comment!
alright, gotta restart my system :)
34 mins ago, by rlemon
@Viper you wanna know if the order is retained? so test it out
But I don't understand how that would test ffs
test using the method I freaking suggested!
i'm like 2 stupid comments away from ignoring you.
whatever
13:20
ahh, when noobs don't understand the principals at hand... ragequit.
goodluck doing your uber simple thing that i've explained how to do three times.
ignored
thank you
A coworker (Network/Systems guy, not programmer) linked me an article on JavaScript as the assembly of the web. And the guy completely missed the point
He makes points that are just blatantly wrong, and compares compiled languages to JavaScript.
> JavaScript was intended as a scripting language. The name (although not the original name for the language) was adopted because Netscape thought that it would be used primarily for scripting Java Applets and connecting them to the rest of the page.
O_O
Wow.
well, he writes it "Java Script"
not netscape thougt this
but sun did
13:35
He also seems to think that JavaScript lacks scoping rules
> Rather than continue to enhance JavaScript, I would love to see some standards effort directed at defining a portable bytecode format that would provide a more language-agnostic target for different compilers.
js lacks scoping rules?
this guy didn't spend enough time, yet he wrote a objective-c to js compiler ._.
sigh I had a guy on my twitter list say the same thing the other day
"variables should have scope"
hes a friend so I tried to be nice
@Loktar: you should have tore him a new one :-p
@incognito didnt care lol
he linked lexical scoping
and made fun of him a bit
I like function scope.
13:53
also, let will let us have "block scope-like"
@Loktar var is too many characters for these new hipsters to write...
all the lovez for IE7
if (target.tagName === 'FORM') {
	data = collect(target);
	action = target.getAttribute('action');
	if (typeof action === 'object') {
		action = target.attributes.action.value;
	}


	request.open('POST', action, true);
	request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	request.onreadystatechange = function () {
		if (request.readyState === 4 && request.status === 200) {
			callback(request.responseXML);
		}

	};
	request.send(data);
}
the magic is in the action = target.attributes.action.value;
because in html i have:
how could getAttribute return an object and not a string?
dafuq
@FlorianMargaine This is neat: developer.mozilla.org/en/…
<form action="/something/">
   <input type="submit" name="action" value="taksName">
</form>
@rlemon , in IE7 everything is possible
13:58
The top of the page says it's new stuff for firefox 2. Do you know why let isn't working now?
but how does action="/something/" translate into [object]
wow... MS you really dropped the ball on this one.
actually it translates into object with two parameters , both objects too
@rlemon , did a fast quick test ?
nope
i refuse to place IE anywhere near my computer
shame
i would appreciate a second opinion
14:05
i just test from IE9
wow... looking between IE8/9 and IE10 on one of my sites is a huge difference in how bootstrap is rendered.
I forgot how much IE typeography sucks.
if you mean the twitters turd , the i hope it will break the internet when IE10 comes out
Actually typography is one of the better things in IE
suprisingly maybe.... yeah the rest is just that much worse
@sg3s font rendering is not that great in IE.
it's good in ie9
14:07
looking at IE vs earlier versions of Chrome and FF i'm seeing a lot of fragmenting in IE
IE9 is better but there is still kerning issues (may just be bootstrap)
ohh well... IE users can suck it up.
you use a shitty browser, I give you a shitty UX
@rlemon agreed :)
emm .. is "validatable" a word ?
webpages do not need to look the same acrossed all browsers. They merely need to function acrossed all browsers :P
@tereško yes, close enough
@tereško no, make it up.
Tereskespear
14:12
found in HTML , felt annoyed , asked to check if that was the reason
Thou element, validatable thusly.
lol
StackOverflow: home of 3 million questions.... 10% unique
posted on April 18, 2012

My slides from Breaking Development Orlando, where I held my Mobile Platform World presentation, are up now. It was a fun conference, and if you’re interested in the mobile web and don’t want to travel to Mobilism in Amsterdam, the next Breaking Development in September in Dallas is a good option. Unfortunately I was so tired that I didn’t appear at all on day 2 of the con

@GNi33 remember me? you told me yestrday that this is messy <ul>
<a href="#"><li> bla bla </li></a>
</ul>
whats the ideal way of arranging this
<ul>
    <li><a href="#">bleh</a></li>
</ul>
li a block elements, a are inline elements
you can't have block elements in inline elements
14:27
oh,.thanks.
think of what the tags represent
ul === unordered list
li === list item
a === anchor

the unordered list contains list items which in turn contain anchors/text/images/etc...
just like tables contain headers and rows.
rows contains divisable cells.
Thanks! I'll keep that in mind....
Another thing. Whenever I browse my webpage on ipad , the page is not centered. its has more space on the right than the left. But when viewedd in pc's the page is centered. i used margin:0 auto . so im wondering my ipad displays it not in center
Anyone know a jQuery select replacement plugin that keeps functionality as typeahead/keyboard controls and works 'ok' on an iPad in regards to scrolling?
@Saber container block level? or at least 100% width?
1
Q: HTML5/jQuery metronome - performance problems

DominikAs mentioned in the title I'm trying to create a jQuery/JavaScript based metronome along with the HTML <audio /> tag to play the sound. It works "okay", but it seems to me the setInterval method is not working accurately enough. I searched some threads here, but for I am new to both jQuer...

metronome + setInterval === fail
doesn't a metronome need to be accurate :P
14:43
@rlemon you can view it here www.uniwinmultiprinting.com . you can view my indexStylesheetnew in source
my whole page is contained in mainContainer with specific min and max width
the body width is set to 100 % and Height 100%
maybe ipad does not like it.. me no own any apple prods.
I can check it on my Nexus (ICS 4.0.2) or my tablet (Honeycomb 3.something)
/me android guy
lol. mind checking it?
tablets at home... i'll check on my phone,.
ok. by the way no links is yet working. only the main page is under my server.
nope
5-7% whitespace on the right.
14:48
meaning...
meaning it is not centered...
doesnt margin:0 auto centered it out
apparently not in this case
... if your min-width and your max-width are the same, why not just use width?
ohhh dude... you really need to work on your html/css skills.
css is a mess.
14:56
dreemweeved?
sorry I can't be of anymore help... uniwinmultiprinting.com/stylesheet/Home.css
@vdoogs nightmarified
I really hope 'programming in Dreamweaver' is a euphemism for taking a crap... because if it isn't... i'm pretty sure it is...
nods
This picture says everything.
@OctavianDamiean agrreess

« first day (550 days earlier)      last day (4623 days later) »