
Cocoa Dev Central: Learn Objective-C Objective-C Objective-C is the primary language used to write Mac software. If you're comfortable with basic object-oriented concepts and the C language, Objective-C will make a lot of sense. If you don't know C, you should read the C Tutorial first. This tutorial is written and illustrated by Scott Stevenson Copyright © 2008 Scott Stevenson Calling Methods To get started as quickly as possible, let's look at some simple examples. [object method]; [object methodWithInput:input]; Methods can return a value: output = [object methodWithOutput]; output = [object methodWithInputAndOutput:input]; You can call methods on classes too, which is how you create objects. id myObject = [NSString string]; The id type means that the myObject variable can refer to any kind of object, so the actual class and the methods it implements aren't known when you compile the app. In this example, it's obvious the object type will be an NSString, so we can change the type: NSString* myString = [NSString string]; Accessors
CoffeeScript CoffeeScript Happy Nerds - Programming Links for Kids Understanding JQuery.Deferred and Promise Please read my new and more accurate blog post about promises first: here Notice this blog post has lot of runnable examples in Javascript, but it might not work on a rss reader. JQuery 1.5 introduced the concept of “Deferred”, you can read more about it here. I find this concept very powerful when working with Javascript and ajax, and I think is a game changer to the way we are used to write asynchronous code in js. Usually, the way we are used to deal with asynchronous code in Javascript is passing callbacks as an argument to the function: As you can see here we are passing two callbacks (success and error) to the $.ajax method using the object-literal syntax that the method support. This work but it is not an standard interface, it requires some work inside the post method and we can't register multiple callbacks. The deferred object is pretty easy to understand yet powerful. resolve reject And it has three important “events” or ways to attach a callback: done fail always
peter/ruby_basic - GitHub Advanced Plugin Concepts An improvement we can, and should, make to the code above is to expose the default plugin settings. This is important because it makes it very easy for plugin users to override/customize the plugin with minimal code. And this is where we begin to take advantage of the function object. Now users can include a line like this in their scripts: And now we can call the plugin method like this and it will use a blue foreground color: As you can see, we've allowed the user to write a single line of code to alter the default foreground color of the plugin. This item goes hand-in-hand with the previous item and is an interesting way to extend your plugin (and to let others extend your plugin). We could have just as easily supported another property on the options object that allowed a callback function to be provided to override the default formatting. Considering the trivial example plugin we're building in this article, you may be wondering when this would ever be useful. A bad implementation:
Useful Node.js Tools, Tutorials And Resources - Smashing Coding Advertisement Created by Ryan Dahl in 2009, Node.js is a relatively new technology which has gained a lot of popularity among Web developers recently. However, not everyone knows what it really is. Node.js is essentially a server-side JavaScript environment that uses an asynchronous event-driven model. What this means is simple: it’s an environment which is intended for writing scalable, high performance network applications. It’s like Ruby’s Event Machine or Python’s Twisted, but it takes the event model a bit further—it presents the event loop as a language construct instead of as a library. And that’s not all: what’s really great about Node.js is the thousands of modules available for any purpose, as well as the vibrant community behind this young project. Useful Node.js Tools Socket.IO Socket.IO is a cross-browser Web socket that aims to make real-time apps possible in every browser and mobile device, blurring the distinctions between the various transport mechanisms. Related Posts
The Unix Command Line: Text Files By Gordon Davisson Copyright (c) 2002, Westwind Computing inc. Working with Text Files: more and less - display the contents of a text file, one screenful at a time (hit the spacebar to get the next screen). Examples: more /etc/inetd.config print the inetd.conf file to the terminal, one screen at a time. ps -ax | more use the ps command to generate a list of processes running on the system, and pipe them to more to display them one screen at a time. grep - search the contents of a text file, and print lines containing a given word or pattern. Examples: grep telnet /etc/inetd.config search the inetd.conf file, and print all lines that contain "telnet". grep diskarbitrationd /var/log/system.log search the main system log for entries that mention the disk arbitration daemon. ps -ax | grep netinfod use the ps command to generate a list of processes running on the system, then pipe the list through grep, which will print only those lines containing "netinfod". Text File Format Compatibility:
15 Sites for Learning and Mastering SEO We recently compiled a list of some of the best social media blogs on the web. Although maintaining healthy relationships and building a strong network on the web is crucial, search engine placement certainly can’t be ignored either. We all know the impact of search engines on our daily traffic. It can be a make or break deal. With Google covering the most ground on search engine space and Bing slowly trying to catch up, it is a must for freelancers to learn the basics of search engine optimization. The key is to utilize both social media and search engines in a way that gets you the most from both worlds. Here are 15 SEO blogs that you should read if you are interesting in mastering SEO: 15 SEO Blogs You Should Read Some of these blogs will help you learn the basics of how search engines work, and others will keep you up-to-date on what’s new in search space. Go ahead and add these blogs to your feed reader and get ready to dominate search engines with rankings that will be hard to beat.
Learning jQuery - Tips, Techniques, Tutorials