GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I think this will be of benefit to everyone, but newbies especially, to collect your three most recommended books (or other media):
On Linux, programming in general or specialized
1) For newbies
2) From newbie to intermediate
3) Integrating several popular technologies
For example,
1) "Beginning Perl" by Simon Cozen
2) "jQuery: Novice to Ninja" by Earle Castledine & Craig Sharkie
3) "No Nonsense XML Web Development with PHP", by Thomas Myer (sitepoint)
1) K&R's C Programming Language / C Primer Plus
2) 24 Deadly Sins of Software Security
4) Programming Challenges - The Programming Contest Training Manual
Edit: number 3) is more about "integrating" several areas of mathematics and data structures to solving programming problems rather than technologies per se.
1) K&R's C Programming Language / C Primer Plus
2) 24 Deadly Sins of Software Security
4) Programming Challenges - The Programming Contest Training Manual
Edit: number 3) is more about "integrating" several areas of mathematics and data structures to solving programming problems rather than technologies per se.
FYI, I'm not ignoring. I'm guaging whether responses are more likely when I answer or refrain from answering.
These selections are definite reads down the road when it's time for me to study C. Hopefully sooner than later I will get to study the security pick--vital. The third is more than I can chew now, maybe down the road. Thanks!
BTW, I've been studying Dugan's pick, JavaScript:The Good Parts. Good so far.
Last edited by bluegospel; 01-06-2012 at 01:24 PM.
Reason: specify which "other poster"
The third is more than I can chew now, maybe down the road. Thanks!
Yeah, it's a bit on the "heavy" side if you are still new to programming, but it presents some excellent problems to solve from various fields and is great to sharpen your programming skills. What's nice is that it isn't associated with any particular language.
Yeah, it's a bit on the "heavy" side if you are still new to programming, but it presents some excellent problems to solve from various fields and is great to sharpen your programming skills. What's nice is that it isn't associated with any particular language.
Yeah, I would like to return to some real-world math problem-solving exercises one of these days. I'll make it a point to look here when I do. Likewise with C & security (in these cases I'm pretty green).
"Javascript: The Good Parts", by Douglas Crockford
I've returned to this read a third time, this time finally not baffled by "the towers of hanoi."
On page 39 the author uses this example as the correct way to bind handlers to several events:
Code:
// Make a function that assigns event handler functions to an array of nodes the right way. // When you click on a node, an alert box will display the ordinal of the node.
var add_the_handlers = function (nodes) {
var i;
for (i = 0; i < nodes.length; i += 1) {
nodes[i].onclick = function (i) {
return function (e) {
alert(e);
};
}(i);
} };
My question is this--we're calling a function that returns the function being assigned to the event, but e is our event, correct? So why do we use "alert(e)" rather than "alert(i)?" Or when neither e's properties nor methods are requested is it's value rendered specially? Or is this an error?
Thanks again!
Last edited by bluegospel; 01-03-2014 at 07:12 AM.
I've returned to this read a third time, this time finally not baffled by "the towers of hanoi."
On page 39 the author uses this example as the correct way to bind handlers to several events:
Code:
// Make a function that assigns event handler functions to an array of nodes the right way. // When you click on a node, an alert box will display the ordinal of the node.
var add_the_handlers = function (nodes) {
var i;
for (i = 0; i < nodes.length; i += 1) {
nodes[i].onclick = function (i) {
return function (e) {
alert(e);
};
}(i);
} };
My question is this--we're calling a function that returns the function being assigned to the event, but e is our event, correct? So why do we use "alert(e)" rather than "alert(i)?" Or when neither e's properties nor methods are requested is it's value rendered specially? Or is this an error?
The "i" in what you posted is a counter, unless it's used in some other manner you haven't posted. "e" is used differently....you don't post the entire context of what you're asking about, but it seems fairly clear.
Quote:
Originally Posted by bluegospel
Nope. Strictly technical (rest assured).
We 'rested assured' when you said you were leaving...yet here you are...again....
The "i" in what you posted is a counter, unless it's used in some other manner you haven't posted. "e" is used differently....you don't post the entire context of what you're asking about, but it seems fairly clear.
The author is trying to demonstrate that in javascript, the inner functions have direct access to the outer function's variables (not copies). So the alert should correspond with the counter in the several event handlers.
The author is trying to demonstrate that in javascript, the inner functions have direct access to the outer function's variables (not copies). So the alert should correspond with the counter in the several event handlers.
Ok...but since we don't have that book, and you haven't posted anything but a few lines of code, all we can go by is what little is there. Based on that, you were given a hypothesis.
If you'd like a more detailed answer, post a more detailed question.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.