« first day (423 days earlier)      last day (4750 days later) » 

11:00
Hello everyone
is anybody there?????????????
Yeah
@Amaan Hello Sir
I have a small question...
I know
okz..
0
Q: how to highlighted the selected row using JavaScript

raman I have repeater and i have selected its row on which user clicks. Now there is button by click on that i am binding another repeater. after that that selected row from repeater 1 is un-highlighted. So what i want, i want that row to remain highlighted. My code to highlighting is:- function ...

please go to this link.. and review if you can help me ..
@raman How does that question now have an edit button?!
Also: What's a repeater?
11:04
0
Q: Template from ThemeForest in datepicker unable select date before today

SvisstackI buyed template from themeforest and i cant in any datepicker select date before today. I can't find any code who blocks or range this control. My inline.cs i have only: $('input.datepicker').datePicker({ clickInput: true, startDate: '01/01/1995' });

@Amaan Sir i am not getting What you want to say
The question doesn't have an edit button at the bottom. Not related to what you typed.
You keep saying 'repeater'. What is a repeater?
a repeater is an asp.net control...it's kinda like a foreach (row in data) { generate a row }
repeater is databound control..
@chao thanks sir.
Actually what i want to do here i have selected the row as user click on it first time. thats working ..
Oh. I know squat about ASP
11:08
now what is my problem.. I have another repeater. and when we click on repeater1, i am taking empid for that particular row. and bind the second repeater successfully..
after that the page is refreshed.. and i m losing the highlighted row..
i just want that row remain highlighted.
can someone help me??????????????
i'm pretty sure a repeater doesn't have a concept of "selected row". you might be able to do something with javascript and cookies, but if you have a table and care about the selected row, a grid view of some type might be a better bet
sir repeater generates table at client side..
0
Q: Define CSS for li id

TimHow do I define a style for an li id? Does it work the same way as an li style? e.g. <li id="news" class="section_wrapper"></li>

^ clearly never read a CSS tutorial
@raman it does? news to me...
i thought for sure it was all server-side.
@AndyE I am terribly tempted to just say that you can't do it. :P
11:17
or, post a "use jquery" answer. :)
ah! I have a snowman on my head
@Amaan well .. honestly you should not use IDs for css
@tereško I know you shouldn't. Separation of concerns and all.
Anybody got a quick second to check my (unworking) jQuery?
@Amaan , no , nothing to do with SoC
11:20
Then?
it's about specificity
But some styles are meant to be specific
I'd probably use a class instead anyway, just in case I decided to add more of the kind
nvm, it works. Wrong selector :D
Hi Andy.
11:36
@Lalit: we should probably keep the casual chat to a minimum in here :-p
Hahaha
yeah no problem Andy.
but you guys enjoy that much. :P
11:55
posted on December 13, 2011

Heads up: the Mobilism 2012 early bird discount and call for papers are ending. Mobilism 2012 will take place on 10th and 11th of May in Amsterdam. See Brian Leroux’s video from last May to get an idea of what the conference is all about. If you want to present at Mobilism, send in your proposal this Friday at the latest. The call for papers will be closed on Friday night, and we̵

12:06
Who would've thought? A Yale website has a glaring XSS vulnerability!
I think this image is great
Problem: old CSS code
Solution: !important all the things!
Jokes aside, I've seen devs do this :\
Hi everyone could you please explain this piece of JS code to me
I am having difficulty annotating it
@feeds how do you send a message like that?
@methuselah Some guy had come in a few days (was it over a week? I don't know) back. He'd made that thing
@Feeds hoe did you send a message with all that content
12:11
I understand how it works but not the logic behind it
@Amaan I understand how it works but not the logic behind it
What do you mean not that logic behind it?
@redoc01 In case you didn't make the connection, Feeds is a special "user" who posts all the related RSS feed updates.
@redoc01 XD
@methuselah It's pretty rough code, but the main idea is simple. I'll try and rewrite it more clearly.
Thanks!
@Zirak please if possible can you annotate the steps
@Zirak thanks i really appreciate it
@Raynos , i can give you only +1 .. i have fed up with explaining "how to walk" to toddlers
I mean generally what's the counterargument to "this node already has an id for an anchor why add extra markup to my HTML just for CSS?"
@Raynos: there isn't one, unless specificity is an issue. That's entirely my point.
Saying to never use ID selectors is fear mongering.
That's like saying "never use eval or never use goto is fear mongering"
12:21
@AndyE no , it is a very good rule of thumb
yes there are exceptions
yes , there are exceptions , but that does not make less valid
however given his code snippet theres a 95% chance he actually wants to refactor his CSS to use a class
ID selector

+ Fastest selector when used alone
+ Keeps markup and CSS simple
+/- Highest specificity
- Slow when used with other selectors

Have I missed anything?
1. not really
12:23
It's not the same as eval, because eval has very few use cases.
2. completely wrong
3. its bad
@AndyE CSS id's have very few use cases
seriously, where are your sources for these arguments? "Boo hoo, CSS Lint tells me I shouldn't use them".
It's like the blind leading the blind.
@AndyE , you should keep the specificity of the rules as low as possible
@AndyE it's simply a matter that I don't need the id when a class works
12:25
when was the last time you actually read something about CSS ?
It's also a matter of an id is an anchor or a hook for JS
@Raynos: but I don't need a class when I already have an ID.
id's should gtfo my css
@tereško: yesterday afternoon.
@AndyE Touché
12:25
@AndyE I would argue you don't need a ID when you really want a class.
I mean an id on a <li> wtf?
@AndyE , was yesterday last time you were learning something about css ?
@Raynos: <li> with IDs as a menu item is a common thing.
you should neither use tag names nor IDs in the css rules
well .. aside from reseting browser defaults
@tereško surely there is some use for tag names? like fixing page wide defaults
you were saying ...
12:27
erm, my css expertise is nearly 0, but according to what you're saying, css rules should only contain classes
@Zirak correct, and semantically name classes
Why are we making these ridiculous optimisations, exactly?
to make smaller css files
@AndyE it's about not programming by coincidence
"ids work for me. lalalalalalalala"
@tereško And bigger HTML files?
12:28
nope
@tereško how are class selectors shorter than ID selectors?
im not quite as extreme as teresko
Well if you're going to add a class to an element which already has an ID, it will make the HTML file bigger
@Raynos that's what you say about everything
@Amaan I meant how to explain it line by line
Next you'll be telling me not to use bitwise operations in JavaScript.
DAMN RIGHT
"because JS lint says so"
You don't use bitwise operations in javascript unless your manipulating bits
@methuselah I'd do that, but @Zirak's already on it
12:30
Sheep.
and the only use case for manipulating bits is hand optimising the hell out of a bottleneck
and everyone knows when your hand optimising code no rules apply only speed counts
@Raynos you're manipulating bits if you use bitwise operations :-p
@Amaan @Zirak thanks - you guys are legends!!!
Is ++ and -- bit manipulation?
@methuselah We know. :D :P
12:31
@Raynos: they're not binary operators, if that's what you mean.
Perhaps they are optimized as such "under the hood".
@AndyE anyway, there are edge cases to all the rules
But I dont bother telling people these edge cases I just tell them the rule
You guys are something else - you down voted my answer even though it was technically correct (the best kind of correct)
The rule is "dont use ids in css unless you know what your doing"
And "dont use bitwise operators unless you know what your doing"
@AndyE we downvote because we expect better from you. We expect you to teach a man how to fish not give him a fish
@Raynos: I tought him to fish with a pole that's guaranteed to catch a fish.
note I leave out the "unless you know what your doing" part of rules because its a useless statement, if you know what your doing you dont need to be told and if your told that you might assume you know what your doing when you don't.
12:35
Bitwise operators and not like ids. An id also has semantic meaning - "this element is unique". A class has a certain ambiguity in it, which you might or might not want
An id declares to all "yes, I chose this thing and not anything else because it's special"
Doing ~string.indexOf is not like doing #id, at all.
Just remember, guys, that you're all individuals and can think for yourselves.
@AndyE @Feeds is mad at you
@Feeds can suck it.
@AndyE I know that, from personal experience all the CSS I've written doesn't use an id
It uses a shit ton of tag names though :D
lol
12:40
From personal experience, I've never used string.substr, doesn't make it invalid
@Zirak meh I still think .klass is a great way to loosely couple html and css
some uses of id are valid, most can be refactored into better code
trick is that you can use more then one class for more then one element
class-based css makes you write the the properties which describe that particular type of elements
and you work by combining them
@Zirak ++ if (isInTyping) {
var value = searchbox.value;
searchbox.value = value.substring(0, value.length - 1) + number[count];
clearTimeout(setTimeout(function() {isInTyping = false;}, 1000));
// (setTimeout(function() {isInTyping = false; }, 1000));
}

else {
isInTyping = true;
searchbox.value += number[count];

}
count++; ++
@Zirak What does that portion mean especially at jsfiddle.net/JNCCW/19
@Zirak if (isInTyping) {
var value = searchbox.value;
searchbox.value = value.substring(0, value.length - 1) + number[count];
clearTimeout(setTimeout(function() {isInTyping = false;}, 1000));
// (setTimeout(function() {isInTyping = false; }, 1000));
}

else {
isInTyping = true;
searchbox.value += number[count];

}
count++;
@Raynos now that, I can agree with. However, I wouldn't always say that it should be. For extremely small sites, it's mostly a micro-optimisation.
Sorry it's taking long, I should learn to focus...
12:45
@AndyE micro optimisation or caring about writing correct code.
@Zirak Hey its ok you don't have to rewrite the code I jus need help with the annotating
The point is if I see <li id="news"> I would say that markup smells and should be refactored.
//sees this line:
			this.searchbox.value =
				this.searchbox.value.substring( 0, inputLnegth - 1 ) +
				buttonOptions[ nextPosition ];
//things of rage
And then I realized I wrote that. And I rage some more.
@Zirak what even is this?
You'll see in a sec. Need to write a comment and some html.
12:53
@rlemon I don't know what the optimum way is to show people that the code needs refactoring. I choose to use CAPSLOCK RANT which is clearly sub optimum
@Raynos Write a TODO or FIXME in a comment; some editors highlight those automatically
@Raynos lol the only point i'm trying to say is that the OP asked a specific question - you may have been a little less a holeish if you just commented and said "Hey [op guy] you know you will save yourself a huge headache if you read this artice [link to article]
@YiJiang It's with respect to comment thread
THEN, if he still stares blankly at you like a lump on a log (because his code works for him so he doesn't need to change his styles... ugh) then scream bloody RAGE!
12:58
@Raynos Oh for goodness sake, now you're just appearing as an ass.
@Zirak fixed
2
@YiJiang I know o/
@Zirak Is onpress an event?
Oh
It's a function you've defined
@Raynos Touche
@Zirak this.clearTimeout();
Eh?
ohright, I changed the name...woops
It's supposed to be clear :P
13:01
Yeah. Thought so
Still won't work, though
onpress is never called
I'm an idiot...found the error
Forgot to specify what event I'm listening to when adding the callback...just provided the callback
Lmao. Just saw that too
hi guys, i have populated dynamic list boxes upon a button click under a set of list boxes(objective is to create pair of list boxes upon button click), instead of appending the list boxes, my list boxes are being replaced...(as it was described in div)...any suggestions
@Zirak Fixing that doesn't make it work. Never cycles to the next alphabet / number
hrngh
13:05
Oh, also, using bind may just make it tougher to understand. (I don't know what it does, so it does for me)
oh, that's because I'm an idiot once more
What now?
@Amaan func.bind( thisArg [, args] ) returns a function, which basically does func.apply( thisArg, args )
It's a mechanism for making sure a function is called with a specific this value, and optionally specific arguments
Oh
This works now, @methuselah: jsfiddle.net/fnLnR/2
The mistake was that I compared apples to oranges...something silly
13:08
And since you're explaining stuff to me: What does [].forEach do?
['THIS', 'IS', 'SPARTA', '!!!!!!!!!!!!!'].forEach(function ( msg ) {
    console.log( msg );
});
2
@Amaan [].forEach.call(arrayLike, iterator)
forEach invokes a callback for every array item
@Amaan you may want to read about ES5
Oh, that's pretty cool
@Raynos Yeah. Thanks
13:11
0
Q: Security concern for Asp,net MVC app when invoking action method from javascript

Pankaj UpadhyayI have added the Authentication attribute on controller classes which are for admin purposes like adding, removing categories and product. All such controllers(ManageCategory, ManageProduct) are decorated with following :- [Authorize(Roles = "Administrator")] These controllers have Upload and ...

You could technically also do ['THIS', 'IS', 'SPARTA', '!!!!!!!!!!!!!'].forEach( console.log );, but for some reason Chrome complains that it's "illegal invocation" shrug
Yeah
But what does your [].forEach mean?
Oh, nevermind
Somehow I managed to overlook the call
anyone wanna wire transfer me a buck eighty? I need a coffee -_-
the top right corner of that last feed is mocking me.
go away feed
@Zirak because its a host object. Host objects say "Rules, fuck you"
@rlemon Here! Take 25.68 BitCoins!
13:14
@Zirak meh, so I can buy half a coffee - i sold those when they were worth something - got my new monitor with it.
pah! In Soviet Russia, you fuck host objects
@Zirak In Soviet Russia i'm not fucking anything unless there is a heated blanked to keep my ass warm!
@rlemon Q:What's the difference between pizza and a russian prostitute? A:You can order pizza without mushrooms :P
@Zirak i would also accept "I would eat the pizza"
oh, you've never had The Euphemism Talk before? Eating someone has a sexual meaning :P
13:19
@Zirak that's what he's implying, he's implying she is not clean
aahh, a double clever thing. Interesting
@Zirak thanks I'm looking through it now!
What should I do if I see a glaring XSS vulnerability in a Yale website?
Report it?
I can't find any contact addresses!
@Amaan clearTimeout(setTimeout(function() {isInTyping = false;}, 1000));
Tiem to pwn dem n00bz
13:27
@methuselah What?
Does that do anything at all?
@Amaan you abuse the XSS vulnerability
Hahaha
Then inject alert("Hey guis I hurd u liek XSS")
@Amaan what does it do here jsfiddle.net/JNCCW/19 - hey @Zirak I looked at the code its good but way above my level
@Raynos Done. That's pretty much how I check if it works. Chrome won't execute it, though because the source was found within the request
@methuselah That's not what it's doing. The setTimeout function returns a unique ID. clearTimeout takes this unique ID and clears the timeout.
So he's storing the ID in a variable and clearing it depending on certain conditions
13:31
@Amaan what does IsInTyping do?
@methuselah That's just a variable
Keeps record
Of whether the user is typing or not
ohhh ok
That's what allows you to cycle the current alphabet
if (isInTyping)
{
var value = searchbox.value;
searchbox.value = value.substring(0, value.length - 1) + number[count];
window.clearTimeout(endTimeout);
}
else {
isInTyping = true;
searchbox.value += number[count];
}
Everytime you 'type' it says, okay, for the next second, consider him to be typing. If he doesn't type by then, he isn't typing, and don't cycle to the next character
13:33
Okkk @Amaan I understand it now
Cool
@Raynos Seriously. What do I do about the XSS vulnerability?
@Amaan you use them to troll and if the webmaster doesnt have any contact details then you just ignore them
Whaddyamean?
Not on the subdomain I found the XSS on
@Raynos I heard that Node.js will soon support multiple threads/ processor cores. is it true?
(sorry I left in a hurry yesterday. Had to run)
@Amaan thanks for the help bro!!!!
13:37
Sure
@αits_me it already supports multiple processes
use require('cluster')
> Refused to execute a JavaScript script. Source code of script found within request.
Do other browsers have this feature as well now?
Or is it just Chrome?
@Raynos oh, cluster.js you mean? So, now Node.js is as good as any other! or are there still any caveats?
(As of now I need to decide b/n Java or JavaScript)
@αits_me No, cluster is a core module
side-note your nam is really annoying
Use real characters
@Raynos sorry. Will do it now. :)
13:42
Java vs JavaScript is easy, pick javascript
@αits_me it's just hard to type it so you get an @αits_me
Anything vs Java and 99% of the time probably pick the Anything.
@rlemon and why is that? (I'll be right back with an easier name.)
Java is worse than slow: it's painfully slow.
it's emulated.. and they know it's gonna be slow.
umm don't get me started on pointers in java.
sorry it's been so long since i've had to explain why java sucks.
@rlemon I am unable to change the account associated with my chat account. :(
you can google "Java good and bad" and you will see the list of bad outweighs the list of good 10 to 1. and usually when people talk good about java it's due to the fact it's semantically similar to c++
13:48
okay, so Java is worse. How about C/C++? Is it a good idea to build a web application using C or C++? I heard people saying it's a pain.
@αits_me it's a pain but it's usually more performant.
what is your application?
So, do you think it's a good idea to build a web application using C/C++ right from scratch?
@rlemon a photo-sharing kinda site (like flickr).
depends on the situation
Okay, can Yale sue me if I publish the XSS vulnerability?
@Amaan no.
@αits_me depends do you enjoy pain?
13:50
@Raynos So it's okay if I just, say submit it to Hacker News without telling Yale about it first?
@Raynos depends on how big a pain it is
It's on a subdomain, so it's not really big anyway
@rlemon and there are no proper web frameworks for C/C++ I guess?
@αits_me .net????
@rlemon Since anything I learn now would be my first programming language, I guess I won't feel the pain much
13:52
build it on ASP MVC
No. I want to stick to linux
solid and lots of examples
@Amaan sure, I would do it through a chinese proxy though :D
then ruby or php i suppose
ASP, .net & stuff are Windows servers, right?
13:52
Lmao
php is hacky but a good language to learn.
you can dev in mono
@rlemon what would be my choices for linux?
anything
html5/css/js + php OR ruby would be my suggestion to start.
@rlemon I want performance. I want the website to load really quick, do stuff really quick
php and ruby have HUGE communities behind them and will offer more learning materials.
@αits_me that is the goal of all of us. welcome to the internet.
13:54
@rlemon but they are not as performant
if I want performance, my only choices are C++ or JavaScript (node.js) right?
@αits_me you want to re-invent the wheel and write everything in c/c++ go ahead.. we'll speak again in 3 years when you've finished.
@αits_me no. Your only choices are C or erlang
oh! it takes that long to develop an app in C++? OMG!
@αits_me I think you are looking too deep into this.. the performance difference for the type of site you want to build would be nominal.
oh...
13:56
@αits_me no my point is, why build the tower when you can stand on the shoulds of giants.
@rlemon dont recommend PHP or ASP :\
those platforms don't have any redeeming qualities other then "hurr durr lots of mediocre tutorials on the interwebs"
@Raynos lol ohh Raynos.
I'm serious :\
they clearly have redeeming qualitys as over half the web is developed using it.
@rlemon and @Raynos : Can I be worry free with JavaScript + Node.js + jQuery + (X)HTML and CSS for my web app? Will it scale? (I read some posts stating that Node.js s*cks under heavy load)
13:58
we are moving forward to better things - but we still need to learn from the past.
@αits_me it will scale.
PHP is not an optimal language, neither is ASP. Raynos will ragefit if you use jQuery because he's stubborn and opinionated (which is why we love him)
@Raynos php is a nice language!
but i wouldn't go as far as saying don't use PHP
ASP has no redeeming qualities
13:59
just use is smart

« first day (423 days earlier)      last day (4750 days later) »