Tuesday, August 25, 2009

iPhone SDK Articles

http://www.iphonesdkarticles.com/

First iPhone Application


In this first iPhone app tutorial you will be introduced to some new tools like xcode, and Interface Builder. You will also learn how to create new view, add controls, and respond to the events. Click on Read more to continue.Introduction
In this tutorial I will give you a brief introduction on how to get started with your first iPhone application. To begin you will need the latest version of the iPhone SDK which you can download it from here. With the SDK you get some tools like Xcode, Interface Builder, iPhone simulator, and many more. The first application is usually called "Hello World" but I have named my first app "Hello Universe" because a revolutionary device calls for a change of name.

Purpose of the "Hello Universe" app
Using the app a user will be able to enter his/her full name and click a button to see a message appear. The message will say "John Doe says Hello Universe!!!". This app will not only introduce you to some of the tools but will also show you how to use controls, respond to events and create new views. Excited, I am :-)

This is how the app will look like

Creating a new project

Launch Xcode and click on File -> New Project -> Select Application (under iPhone OS) -> select Window-Based Application project template and click on choose.

In the next screen you will be asked to save your project and give it a name. Xcode creates some files for us based on the name of the project, so you want to be careful with the name you provide. I have named my project "HelloUniverse".

This is how the list of files look like in Xcode.

All the class files are stored under the "Classes" folder, some special files are listed under "Other Sources", all the view files and resources show up under "Resources", and any library or frameworks we add to our project are listed under the "Frameworks" folder. It is important that we save all the images, files, databases, and views in the "Resources" folder because all the iPhone apps run in its own sand box; which means they can only access files placed under the resources folder.

How the app is launched
Every C/C++/Java/C# programmer knows about the main method found in main.m file which is present under the "Other Sources" folder. You normally will never have to change this method and all we have to know is that this method is responsible in launching the app. The method applicationDidFinishLaunching method is called when the app is launched on the device or the simulator. The method is defined in "HelloUniverseAppDelegate.m" file which is found under the "Classes" folder.

Interface Builder
Using Interface Builder we can design our application by adding controls or creating additional views. The files that the Interface Builder creates gets saved with a .xib extension and are called nib files. Every project gets one nib file by called which is called "MainWindow.xib" which can be found under "Resources". An iPhone application has only one window (MainWindow.xib) unlike a desktop application which is created with multiple windows; however, we can create multiple views which are added to the window. Double click on "MainWindow.xib" to launch the Interface Builder, which will open four windows and one of the window will look like this


The above picture shows the contents of the "MainWindow.xib" nib file. Every nib file has atleast two files; File's Owner and First Responder which cannot be deleted. Every other objects apart from the first two, represents an instance of an object which gets created when the nib file loads. File's Owner simply shows that it owns the object in the nib file. First Responder tells us which object are we currently interacting with; like the textbox, buttons... The third object which is special to the MainWindow.xib file is called "Hello Universe App Delegate" and this file represents "HelloUniverseAppDelegate" class. Last but not the least the view represents the object which we design in our apps.

Creating a new view
If we had created this project using "View-Based Application" project template then there would have been no need of creating another view from scratch, but where is the fun in that. In Interface Builder create a new view by clicking File -> New -> Select Cocoa Touch -> View and click on choose. Let's save the view in the project folder by naming it "HelloUniverse" and once we do that IB (Interface Builder) will prompt us to add the view to the current project; click on "Add" and it will show up in Xcode. In Xcode and move your view to the Resources folder.

Creating a view controller
We have a view now let's create a view controller to manage the view. In Xcode create a new view controller by selecting classes and clicking File -> New File -> Select Cocoa Touch Classes under iPhone OS -> select UIViewController -> click on choose and name your file "HelloUniverseController" without changing the extension. The newly created class inherits from UIViewController which knows how to interact with a view. Now that we have our view and the controller class, there must be some way to connect these two files and we can do it by setting the class property of the File's Owner. Double click "HelloUniverse.xib" file in Xcode to launch Interface Builder and select File's Owner -> select Tools -> Identity Inspector and under "Class Identity" category, change the class to "HelloUniverseController". This is how the Class Identity should look like


Once that is done we need a way to control the view in the nib file from code and this is done by connecting the view instance variable to the view object in the nib. The connection is made using "outlets". Select Tools -> Connections Inspector create a connection from the view variable to the view in the nib file. Move your mouse over the empty circle to see it change to a plus symbol indicating that a connection can be created. Click on circle and drag your mouse to the view in the nib file and release. As you do this you will see a blue line being created from the circle to the mouse. Once a connection is created, the connections inspector for File's Owner will look like this


Adding controls to the view
From the screen shot above we require two text boxes, one label, and a button (Round Rect Button). From the library drag and drop the controls to the view and align it as seen in the figure 1.0. After you have added the controls let's change some of its properties, starting with the text boxes. Select the first text box and open Attributes Inspector by selecting Tools -> Attributes Inspector. Under Placeholder enter "First name", under "Text Input Traits" change Capitalize property to "Words" and change the Return key property to "Done". Apply the same settings for the other text box but change the Placeholder to say "Last name". Select the label and delete its text property, since we do not want the label to say anything until the button is clicked. Double-click the button to edit the title of the button and type in "Click Me". Save and quit Interface Builder as we have successfully designed our view.

Connecting instance variables to the objects in the view
We still need some way to interact with the controls on the view, in code and this is where outlets help us out. IBOutlet is a special keyword if used with an instance variable, will make the variable appear in Interface Builder. Since IBOutlet makes the variable appear in Interface Builder, using IBAction as a return type for a method will have the opposite effect. Using IBAction we can handle an event triggered by any control placed on the view. Let's see how this works; open HelloUniverseController.h file in Xcode and type in the following code

//HelloUniverseController.h
@interface HelloUniverseController : UIViewController {

IBOutlet UITextField *txtFirstName;
IBOutlet UITextField *txtLastName;
IBOutlet UILabel *lblMessage;
}

- (IBAction) btnClickMe_Clicked:(id)sender;

@end

//HelloUniverseController.m
- (void)dealloc {
[txtFirstName release];
[txtLastName release];
[lblMessage release];
[super dealloc];
}

All the variables above are marked with IBOutlet and Interface Builder will make these available to itself so proper connections can be made. We also have a method whose return type is IBAction (void); Interface Builder will also make this method available to itself so we can choose which event will call this method. The method also takes a parameter called "sender" which is the object which triggered the event. The variables are released in the dealloc method as shown above. Let's connect these instance variables to the controls on the view (HelloUniverse) as described earlier. Open Interface Builder by double-clicking HelloUniverse.xib file and select File's Owner, open Connections Inspector to see all the variables present under Outlets and to create connections.


Let's hook up the button click event to the "btnClickMe_Clicked" method. Select the button and under the Events list it seems that we do not have a button click event; however, we do have a "Touch Up Inside" event which is raised when the button is touched and released symbolizing a click. With the button selected click the circle next to "Touch Up Inside" and drag your mouse over to File's Owner and release to have the method name show; simply click on the method name to create a connection.


Handling events
Let's write some code in btnClickMe_Clicked event to read the first and last name and display a message in the label. This is how the code looks like

//HelloUniverseController.m
- (IBAction) btnClickMe_Clicked:(id)sender {

NSString *FirstName = txtFirstName.text;
NSString *LastName = txtLastName.text;
NSString *Message = nil;

if([FirstName length] == 0 && [LastName length] == 0)
Message = [[NSString alloc] initWithFormat:@"Anonymous says Hello Universe!!!"];
else if ([FirstName length] > 0 && [LastName length] ==0)
Message = [[NSString alloc] initWithFormat:@"%@ says Hello Universe", FirstName];
else if ([FirstName length] == 0 && [LastName length] == 0)
Message = [[NSString alloc] initWithFormat:@"%@ says Hello Universe", LastName];
else
Message = [[NSString alloc] initWithFormat:@"%@ %@ says Hello Universe", FirstName, LastName];

lblMessage.text = Message;

//Release the object
[Message release];
}

The method does few simple things, it finds out the first and last names and figures out what message to display in the label. We also create a temporary variable called "Message" to hold the message which will be displayed in the label. The variable is allocated and initialized by alloc and initWithFormat messages respectively. The variable is released in the end because when working with the iPhone we are responsible of cleaning up the memory. The easiest way to remember when to release objects is; if you create it then you own the object and hence you are responsible of releasing it.

If you click on Build and Go, the view will not be visible because we have not yet added it to the window. Let's see how we can do that

Adding view to the window
Now we cannot drag the view and add it to the window, so we need another way to add the view as a sub view to the window. We already know that "HelloUniverseController" is the view controller of the view "HelloUniverse" and "HelloUniverseAppDelegate" is the application delegate where the window is made visible in applicationDidFinishLaunching method. It is in that method we will add the view as a sub view to the window. Before we do that, the application delegate (HelloUniverseAppDelegate) needs to know about our view controller. Add the following lines to HelloUniverseAppDelegate.h file to change the file like this

//HelloUniverseAppDelegate.h
@class HelloUniverseController;

@interface HelloUniverseAppDelegate : NSObject {
UIWindow *window;
HelloUniverseController *hvController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) HelloUniverseController *hvController;

@end

From the above code we first add a forward class declaration of "HelloUniverseController" because we do not want any circular dependency when we import the header file of "HelloUniverseController" in HelloUniverseAppDelegate.m. A variable and a property of type HelloUniverseController is also declared. The property as you can see is declared with a couple of attributes called "retain" and "nonatomic". The retain attribute will increase the reference count of the instance variable by one and nonatomic is used because our program is not multi-threaded.

A lot of first time users miss to synthesize the property we declared, so let's do that now at the top of the HelloUniverseAppDelegate.m file and the code looks like this


//HelloUniverseAppDelegate.m
@implementation HelloUniverseAppDelegate

@synthesize window, hvController;
...


The view is added as a subview to the window in applicationDidFinishLaunching method and this is how the code looks like

//HelloUniverseAppDelegate.m
- (void)applicationDidFinishLaunching:(UIApplication *)application {

HelloUniverseController *hvc = [[HelloUniverseController alloc]
initWithNibName:@"HelloUniverse" bundle:[NSBundle mainBundle]];

self.hvController = hvc;

[hvc release];

[window addSubview:[self.hvController view]];


// Override point for customization after application launch
[window makeKeyAndVisible];
}

The second line shows that we imported the header file of "HelloUniverseController" and we also synthesized the property hvController. In the "olden" days in order to create a property we had to create getter and setter methods which would be something like getHVController and setHVController. The synthesize keyword automatically generates these methods for us. In applicationDidFinishLaunching method we allocate and initialize a temporary variable, assign it to our property, release it, and the view associated with the view controller is added as a sub view to the window. The key thing to remember here is that the view message is passed to the "hvController" which returns the view and is added as sub view to the window. A valid view is returned because we created a connection from the view instance variable to the view in the nib file. The property is finally released in the dealloc method as shown below

//HelloUniverseAppDelegate.m
- (void)dealloc {
[hvController release];
[window release];
[super dealloc];
}

We have always allocated and initialized variables in one single line as seen below, this is usually the accepted way but the same code can be written in a different way as seen below

HelloUniverseController *hvc = [HelloUniverseController alloc];
hvc = [hvc initWithNibName:@"HelloUniverse" bundle:[NSBundle mainBundle]];

Build and go to test your application.

Hiding the keyboard
Wait a minute clicking the "Done" button doesn't do anything. Ideally we would like to hide the keyboard when the "Done" button is clicked no matter which text box we are currently editing. To hide the keyboard we need to do two things; set the delegate of the keyboard to File's Owner and implement a method called textFieldShouldReturn in HelloUniverseController.m file. To set the delegate, open Interface Builder by double clicking HelloUniverse.xib, select the first text box and click on Tools -> Connections Inspector. Click and drag your mouse by selecting the empty circle next to delegate under "Outlets" and release your mouse over to File's Owner. Assign the delegate for the next text box in the same manner.

The method textFieldShouldReturn gets called when the "Done" button is clicked and this is how the code looks like

//HelloUniverseController.m
- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {

[theTextField resignFirstResponder];
return YES;
}

The method gets a parameter called sender, which is the object that triggered the event. We will use the same object to which we send the resignResponder message, which will hide the keyboard on the textbox. The boolean "Yes" is returned to tell the sender that the first responder is resigned.

Conclusion
I hope you had fun with this tutorial and feel a little confident in writing your next great iPhone app. Please leave me your comments and let me know what you thought.

Happy Programming,
iPhone SDK Articles

Monday, August 24, 2009

Tweak Allows Installing Any Win7 Version from One DVD

http://hothardware.com/News/Tweak-Allows-Installing-Any-Win7-Version-from-One-DVD/

Tweak Allows Installing Any Win7 Version from One DVD

Let's be clear, this is a way to try, not indefinitely use different versions of Windows 7 from one DVD or .ISO image. A small tweak will allow users tech-savvy enough to get a taste of all the versions of Windows 7.

Now, why do you need a little technical expertise? You need to remove a file from the DVD or from the .ISO image. As Windows Secrets notes, all you have to do is delete the ei.cfg file.

To make things easier for you, the ei.cfg file is in the sources subdirectory (WS didn't indicate its location).

It's simple enough: if you have an .ISO file use an appropriate .ISO imaging program to delete the file from it, then save the image and burn it. If you have the DVD you can use the same program to rip the DVD to an .ISO image, then delete the file, and reburn it.



Once deleted, you'll get a menu of choices, as shown above. You can select any version of Windows 7 to install, and thus try out any version, to see if you really, really want to buy that version.

Also, while the standard trial period is 30 days, just as with Windows Vista, you can extend that through the use of Microsoft's Software License Manager (slmgr), which ships with the OS.



If you install Windows 7 sans activation key, you have 30 days to try the software. Using slmgr, you can "rearm" and restart the clock. If you right-click on the Computer icon, and choose Properties, under Windows Activation, you'll see the number of days left in your trial period.

To restart the clock,
  • Click Start, All Programs, Accessories. Right-click Command Prompt and choose Run As Administrator. If necessary, enter your administrator password.
  • Type "slmgr -rearm" and press the Enter key.
  • Restart Windows 7.
You can rearm a total of three times. Wait until the end of each period and you get a total of 120 days of use. Want to try another version? You can do a clean install.

Which version are you readers going to install?

Sunday, August 23, 2009

5 Reasons to Get Excited about Linux on the Netbook

http://www.readwriteweb.com/archives/5_reasons_to_get_excited_about_linux_on_the_netbook.php

5 Reasons to Get Excited about Linux on the Netbook

Written by Sarah Perez / August 20, 2009 8:14 AM

1. Jolicloud

The netbook OS getting the most buzz today is one that doesn't scream "I'm a Linux distro!" Instead, Jolicloud's internet OS provides easy access to all your favorite applications whether those are online apps like Gmail and Facebook or desktop apps like Skype and Boxee. A bar at the top tracks all the applications you're currently running for easy switching between them. However, the most unique element to this netbook OS is the social component which lets you "subscribe" to other Jolicloud users so you can see what applications they've installed and vice versa. Jolicloud is still in private alpha, but those who signed up to try it are starting to receive their invites now. You can request one too from the Jolicloud home page.

2. gOS's Cloud 1.0

Most people remember gOS as the distro that tried and failed to make it big by way of a deal with Walmart. The company was the pre-installed OS for the low-end Everex machines sold at the American superstore. But that failure shouldn't count gOS out of the running just yet. For one thing, the Everex machines were boring, cheap desktop computers sold without monitors. Plus, the Walmart shoppers...well...let's just say they probably didn't know what they were getting into. While the original gOS is still available for download today, we're more intrigued by the company's upcoming Cloud 1.0, an OS optimized for notebooks. This new version boots straight to a web browser (one that looks just like Google Chrome, in fact). Cloud is supposed to go into private beta this year. You can sign up here to be one of the first to try it.

3. Moblin 2.0

Moblin 2.0 is a netbook OS which is publicly available right now. Designed for Intel Atom-based netbooks, this Linux distro focuses on aggregating your social networking activity and media content. A dynamic start page called the "Myzone" is the centralized area where you can get instant access to files, tasks, your calendar, updates from your social networks, and more. Unfortunately though, when it comes to social networks, only Twitter and Last.fm are supported at this time. If you're not sure if Moblin is right for you, there's a "test drive" available as a downloadable live image. Once you're ready to install it for good, you can grab the full download.

4. Ubuntu Netbook Remix

The Ubuntu Netbook Remix is a netbook-friendly version of one of the most popular Linux distros, Ubuntu. This OS features a customizable Ubuntu Mobile Edition (UME) Launcher which basically serves to replace the desktop for easy access to applications and system settings. Categories on the left display related icons when clicked and a "Favorites" category lets you store your most frequently used applications for quick launching. Remix also offers a unique window switcher which lets you move between programs similar to how you switch between tabs in your web browser. This version of Linux is available for download now from here.

5. Google Chrome OS?

We can't help but put Google Chrome OS on this list. Although the OS isn't actually a product yet, only an announcement, we're incredibly excited to see what Google comes up with for their first real launch into the OS market (Android notwithstanding). All we really know about this Linux distro is that Google aims to build a real "cloud OS" where web applications run in the company's Chrome web browser. We also know that their goals include a fast boot time to get you on the web quickly and an OS which is safe from malware and viruses. But what we don't know about Chrome OS could fill a room. According to Google, this OS will make its debut in the second half of 2010. We're not sure if we can stand the wait.


Friday, August 21, 2009

Creating a simple Amazon S3 browser with Tarzan by Tarzan AWS

http://vimeo.com/2023547

http://tarzan-aws.com/features/

Free DNS service for everyone, Try it

http://www.zoneedit.com/

The industry standard in internet domain name management. Our services include: 630028 zones hosted as of Aug 21, 2009
  • Managed DNS Service - Did your registrar sell you a domain name, then leave you without any DNS? ZoneEdit.com provides DNS, with an easy front end. Just type in a domain name and an IP address on a web page, then browse to the domain you've created, instantly!
  • Secondary Name Service - ZoneEdit's high-speed managed network is located across the US/Europe. Adding more DNS servers to your domain results in reliability and speed.
  • WebForward™ - Do you have a web site with a complicated address? Would you like to have a "www.___.com"? Use our pathed WebForward™ service, and visitors will get transferred automatically!
  • MailForward™ - Easily forward mail@yourdomain.com to other email addresses using MailForward. You can set up a 'default' email for every domain as well.
  • Free starter web page - No place to park your domain while you develop it? Park it here!
  • Branded Site - Get your own nameservers and your own control panel to complement your firm's existing website. Give your clients secure access to only their own domains, and they'll save you time and money by editing their own DNS entries.
  • Our Network - All of our servers are colocated at top-tier NOCs, with redundant fiber connectivity, diesel backup and climate-controlled environments. Click here for more info.
  • Dynamic DNS - Full free dynamic DNS support allowing cable modem, dsl, and dial up users to run web sites on your home pc.
  • Failover & Load Balancing new! - monitoring, failover and load balancing services for web servers
  • Backup Mail Service new! - Want to run your own mail server, but you're afraid of missing important e-mails? Our optional "Store and Forward" service will accept e-mails for you while your mail server is down or unavailable, and redeliver them when you're back up!

Wednesday, August 19, 2009

WPF and Linq 3.5

http://windowsclient.net/learn/videos_linq.aspx

LINQ Videos

Language-Integrated Query (LINQ) is a general-purpose query facility included in the .NET 3.5 Framework that applies to all sources of information. In these video training sessions learn how LINQ extends languages like C# and Visual Basic with native language syntax for queries and provides class libraries to take advantage of these capabilities.

In this video you will learn about the new LINQ enabled XML API in Visual Studio 2008. First learn how to load XML from disk or create XML in code with XML literals in VB or XElement in C#. Once XML is loaded see how powerful LINQ queries can be executed against the XML to extract specific elements. In addition, learn how to traverse XML in loops like For Each and insert new XML elements. Finally, see how namespaces in XML have been greatly simplified.

Author: Chris Pels

', 163, 2, 250)">

Tuesday, August 11, 2009

The Google Maps Image Cutter

http://www.casa.ucl.ac.uk/software/googlemapimagecutter.asp
The Google Maps Image Cutter

The Google Map Image Cutter is an application designed to take any image or digital photo and cut it into tiles which are displayed on a Google Map. Using this tool, large images can be published on the web in a format that allows the user to pan and zoom using the standard Google Maps interface. Although publishing large digital photos is the most obvious application, this technique can also be used for annotated maps of an area that are not to scale e.g. directions for how to get to the office.

Download version 1.4 now (23 May 2008).

Version 1.4 contains a new batch mode feature which allows multiple files to be processed in one operation.

The following images were created using the application. Click on the images to view them using Google Maps.

The Old Dispensary in Newham, Northeast London. A partial panorama taken from a hotel window in Sapporo, Japan.

How It Works

The Google Maps Image Cutter takes a large image and cuts it into lots of 256x256 pixel images. At the top level there is only one 256 pixel square which is a smaller copy of the original image. At the next level, there are four 256 pixel squares, then sixteen, sixty four and two hundred and fifty six. This corresponds to 256, 512, 1024, 2048 and 4096 pixel square images spread over the map tiles. The application automatically chooses the depth of the maximum zoom level to correspond to the original size of the image, so zooming in any further would make the image bigger and cause it to pixelate.

Further Information

More detailed information can be found in the readme file installed with the application.

For additional support email support@casa.ucl.ac.uk

The Google Map Creator is part of the GeoVUE project at CASA. This project is sponsored by the ESRC as a node in the National Centre for e-Social Science.


I am looking to implement floor planning solution for our intranet
site at my work.
Basically the point is to have our plans searchable to be able to find
where other colleagues are located on the floor.

I have designed the floor plan imageries and I even found tile cutters
which leads to me having the floor plan cut in multiple tiles based on
the zoom levels that I specified.

I used the Google Maps Image Cutter at the address:
http://www.casa.ucl.ac.uk/software/googlemapimagecutter.asp

to make my tiles.

Looking deeper at the Google Maps API tutorials, I would have to host
my floor plans on Google servers, which I am rather hesitant about,
since it would be confidential information.

I also looked at LaudonTech (www.laudontech.com) but I am not too
confortable working with them, since we would want to do it ourselves
with a possible platform like Google Maps that is open source.

Did anyone run into such an issue previously? Is there some sort of
tutorial which I could be referred to where I could follow some
instructions on how to get a basic floor plan with office coordinates
to the different locations where employees are located, and I would
take it from there to continue through that endeavour..

Saturday, August 8, 2009

15 Great Tips For Ubuntu Power Users

15 Great Tips For Ubuntu Power Users

Aug. 8th, 2009 By Varun Kashyap

http://www.makeuseof.com/tag/15-great-tips-for-ubuntu-power-users/

1. Get lightning fast and clever at the command line

You can use keyboard shortcuts and other command line tricks to make entering commands easier and faster. You might already know about the ‘tab’ key which completes partial commands and even file and directory names.

Here are some other keyboard shortcuts you can use within terminal:

Ctrl-a Move to the start of the line.
Ctrl-e Move to the end of the line.
Alt-] x Moves the cursor forward to the next occurrence of x.
Alt-Ctrl-] x Moves the cursor backwards to the previous occurrence of x.
Ctrl-u Delete from the cursor to the beginning of the line.
Ctrl-k Delete from the cursor to the end of the line.
Ctrl-w Delete from the cursor to the start of the word.
Ctrl-y Pastes text from the clipboard.
Ctrl-l Clear the screen leaving the current line at the top of the screen.
Ctrl-x Ctrl-u Undo the last changes. Ctrl-_
Alt-r Undo all changes to the line.
Alt-Ctrl-e Expand command line.
Ctrl-r Incremental reverse search of history.
Alt-p Non-incremental reverse search of history.
!! Execute last command in history
!abc Execute last command in history beginning with abc
!n Execute nth command in history
^abc^xyz Replace first occurrence of abc with xyz in last command and execute it

Also don’t forget to check out 4 websites where you can learn cool command line tricks

2. Launch Applications with keyboard

There are two ways you can achieve this:

  • Use applications like Launchy or Gnome-Do that make it easier to launch applications by typing a few characters of the application’s name.
  • Or you can summon gconf editor (Alt+F2 then type gconf-editor and hit enter), and navigate to apps > metacity > global_keybindings, double click on any of the run_command_N and type in the keyboard shortcut you want to assign to an application then make a mental note of the number N. Then go to apps > metacity > keybinding_commands and double click on command_N (N being the number you used above) and type in the command you want to run. As an example if you wanted to run Firefox you would type in firefox.

Also check out these Ubuntu keyboard shortcuts you might not know about.

3. Start from wherever you left off

You can make Ubuntu remember the applications you had open when you last logged out, so that when you log back in again you’ll find all those applications running and you can resume right from where you left off.

To achieve this go to System > Preferences > Startup Applications, then go to the options tab and check “Automatically remember running applications when logging out”

4. Create a separate Home Partition

New versions of Ubuntu arrive every 6 months. Although you can upgrade to the latest version via the update manager, sometimes the upgrade doesn’t work as expected so some users like to do a fresh clean install.

The disadvantage with that of course is that you lose data you had in your home directory. To overcome this you can create a separate Home partition when you are installing Ubuntu, size it according to your requirements and then when you decide to install Ubuntu the next time, simply specify this partition as the Home partition (by choosing /home as the mount point).

All your files and data on the Home partition will be preserved even after a fresh install.

5. Update and Install software without Internet connection

There are lots of way to do this, the easiest of all is to use APTonCD. APTonCD allows you to create CDs and DVD’s containing all the packages you want, which you can then use to install software on computers without an internet connection.

Note that APTonCD requires you to have an internet connection (or downloaded packages) to create the installed media. However once the media is ready you don’t need an internet connection for any of the machines you want to install the software on. Insert the appropriate CD/DVD and use apt-get as you would normally.

6. Install new fonts, Microsoft fonts and improve font rendering

Ubuntu doesn’t offer many choices when it comes to the fonts. However you can easily install new fonts including those from Microsoft like Arial, Verdana, impact and many more. You can use different sites to find the kind of font you are looking for.

7. Use PPAs, Install latest versions of software

There are a lot of steps that a software has to go through before it becomes part of Ubuntu or becomes available through the Ubuntu repositories. While all those steps lend additional stability, it generally means that you don’t get the latest versions of all the software as soon as they are released.

If you like to stay on the cutting edge, you can search for Personal Package Archives for your favorite software on Launchpad and add those to your installation’s software sources. I briefly touched on PPAs and how to use them here. If that seems like too much work, you can also download the latest deb packages and install them by double clicking (you won’t get automatic updates for the software if you install it this way).

Remember you might get into an occasional trouble or two with the latest versions, but mostly it wouldn’t be catastrophic. You can always hop over to the Ubuntu Forums to get quick help.

8. Be the root

The root account is disabled by default on Ubuntu installations, mainly to prevent you from doing something you didn’t intend to do. However if you “promise to be careful” you can enable root account as follows:

  1. Type sudo passwd root and provide a root password.
  2. Then head on over to System > Administration > Login Window, go to the Security tab and check “Enable local system administrator login”

You should now be able to login as root from the Login prompt. As an alternative you can use “sudo su” to provide your password and get root prompt.

9. Run Windows applications and games

Who wouldn’t like to play Counter Strike on Ubuntu (unless of course you are completely not into it) or perhaps even run Photoshop? Well it is very much possible and here is how to do it.

10. Shorten boot time with profiling

Ubuntu devs have done a great job with the boot time, Jaunty is fast and Karmic is slotted to be even faster. There is however a bit more you can do by profiling your boot. Profiling lets Ubuntu make a list of all the files that are accessed during bootup, it then sorts the files according to how they are stored on your hard disk. So the next time the system is booted, the files would be read faster.

To profile boot you need to follow these steps

  • At the grub menu highlight the kernel you boot most often.
  • Press e for edit.
  • Choose the line starting with kernel and press e again. Now add the word profile to the end of this line. Hit Enter and then press b to boot

Note that while profiling, the system will boot slower this one time, the next time however you should see an improvement. Also keep in mind that all this is machine-dependent and also depends on the arrangement of files on your hard disk, so the difference you see might not be huge, or even nil in some cases.

11. Try out different Desktop Environments and Desktop Managers

If you are looking for something different than the default Gnome interface, you should check out alternative desktop managers that you can use. If it is a complete Desktop Environment you are looking for, KDE4 has come a long way and is now impressively usable and fun. You can do a “sudo apt-get install kubuntu-desktop” to get KDE.

12. Create a media center or a media server

It would be great if you could easily browse and manage your huge collection of music, videos and pictures. Mesmerized by Windows Media Center’s slick interface? Wait till you see what all cool options you have to turn your Ubuntu system into a media center. You can even access your media collection on your phone, PSP or a different computer if you set up a media server on your Ubuntu machine.

13. Share Firefox profile data with Windows

Many people use Windows and Linux on the same machine. If you are one of them, there would have been times you couldn’t find that bookmark you created or password you stored when you were using Firefox from within Windows. Check out how you can share Firefox profile data across operating systems without syncing it over the web (works best if you have the same version of Firefox in both OS’s). For different computers you can of course use Weave.

14. Customize Nautilus to your liking

Nautilus is the default file manager on Ubuntu. While you may be content with what it does, there is lots more you can make it do. You can use extensions to improve functionality and even add custom functionality to Nautilus

15. Compile your own Kernel

If you can’t find something to keep you busy for the weekend and you have your customization hat on, how about building a kernel to specifically meet your requirements? This is frankly more of a learning experience. Some might say that it enables you to use just the features and drivers you require, but if everything is working fine with the kernel supplied and you don’t have any interest in the Linux kernel, skip ahead this one is not for you.

If however you require some of the experimental features of the kernel, or need it to be compiled in some other special way we say you check out this guide within Ubuntu Documentation.

16. Change Usplash Screen and create a custom splash screen for GRUB

So you didn’t count the last one? Here is another one then. A Usplash screen is Ubuntu text and a logo with a progress bar that you see when you boot up Ubuntu.

If you would like to change that to something more interesting follow these steps. What better way to show your Linux fu than customizing the very first screen that appears? You can create a custom splash screen using one of your photos, GIMP and a little tweaking. Here is the how-to.

Know some more tips or great hacks? Sure you do, go ahead let us know about them in the comments.

Wednesday, August 5, 2009

Thank you Tita Cory


God take care of our Tita Cory!

Mac - Terminal(CMD) Commands

http://www.howtogeek.com/forum/topic/mac-terminalcmd-commands

alias - Create an alias
alloc - List used and free memory
awk - Find and Replace text within file(s)

basename - Convert a full pathname to just a folder path
bash - Bourne-Again SHell (Linux)
bless - Set volume bootability and startup disk options.
break - Exit from a loop

cal - Display a calendar
case - Conditionally perform a command
cat - Display the contents of a file
cd - Change Directory
chflags - Change a file or folder's flags.
chgrp - Change group ownership
chmod - Change access permissions
chown - Change file owner and group
chroot - Run a command with a different root directory
cksum - Print CRC checksum and byte counts
clear - Clear terminal screen
cmp - Compare two files
comm - Compare two sorted files line by line
complete - Edit a command completion [word/pattern/list]
continue - Resume the next iteration of a loop
cp - Copy one or more files to another location
cron - Daemon to execute scheduled commands
crontab - Schedule a command to run at a later date/time
cut - Divide a file into several parts

date - Display or change the date & time
dc - Desk Calculator
dd - Data Dump - Convert and copy a file
df - Display free disk space
diff - Display the differences between two files
diff3 - Show differences among three files
dirname Convert a full pathname to just a path
dirs Di - play list of remembered directories
diskutil - Disk utilities - Format, Verify, Repair
ditto - Copy files and folders
dscl - Directory Service command line utility
du - Estimate file space usage

echo - Display message on screen
ed - A line-oriented text editor (edlin)
enable - Stop or start printers and classes.
env - Set environment and run a utility
eval - Evaluate several commands/arguments
exec - Execute a command
exit - Exit the shell
expect - Programmed dialogue with interactive programs
expand - Convert tabs to spaces
expr - Evaluate expressions

false - Do nothing, unsuccessfully
fdisk - Partition table manipulator for Darwin UFS/HFS/DOS
find - Search for files that meet a desired criteria
fmt - Reformat paragraph text
fold - Wrap text to fit a specified width
for - Expand words, and execute commands
foreach - Loop, expand words, and execute commands
fsck - Filesystem consistency check and repair
fs - usage Filesystem usage (process/pathname)
ftp - Internet file transfer program

GetFileInfo - Get attributes of HFS+ files
getopt - Parse positional parameters
goto - Jump to label and continue execution
grep - Search file(s) for lines that match a given pattern
groups - Print group names a user is in
gzip - Compress or decompress files

head - Display the first lines of a file
hdiutil - Manipulate iso disk images
history - Command History
hostname - Print or set system name

id - Print user and group names/id's
if - Conditionally perform a command
info - Help info
install - Copy files and set attributes

jobs - List active jobs
join - Join lines on a common field

kill - Stop a process from running

l - List files in long format (ls -l)
ll - List files in long format, showing invisible files (ls -la)
less - Display output one screen at a time
ln - Make links between files (hard links, symbolic links)
locate - Find files
logname - Print current login name
login - log into the computer
logout - Exit a login shell (bye)
lpr - Print files
lprm - Remove jobs from the print queue
lpstat - Printer status information
ls - List information about file(s)
lsbom - List a bill of materials file
lsof - List open files

man - Help manual
mkdir - Create new folder(s)
mkfifo - Make FIFOs (named pipes)
more - Display output one screen at a time
mount - Mount a file system
mv - Move or rename files or directories

net - Manage network resources
nice - Set the priority of a command
nohup - Run a command immune to hangups

onintr - Control the action of a shell interrupt
open - Open a file/folder/URL/Application
osascript - Execute AppleScript

passwd - Modify a user password
paste - Merge lines of files
pbcopy - Copy data to the clipboard
pbpaste - Paste data from the Clipboard
pico - Simple text editor
ping - Test a network connection
pmset - Power Management settings
popd - Restore the previous value of the current directory
pr - Convert text files for printing
printenv - Print environment variables
printf - Format and print data
ps - Process status
pushd - Save and then change the current directory
pwd - Print Working Directory

quota - Display disk usage and limits

rcp - Copy files between machines.
repeat - Execute a command multiple times
rm - Remove files
rmdir - Remove folder(s)
rpm - Remote Package Manager
rsync - Remote file copy - Sync file tree (also RsyncX)

say - Convert text to audible speech
sched - Schedule a command to run at a later time.
screencapture - Capture screen image to file or disk
sdiff - Merge two files interactively
security - Administer Keychains, keys, certificates and the Security framework
sed - Stream Editor
set - Set a shell variable = value
setenv - Set an environment variable = value
setfile - Set attributes of HFS+ files
shift - Shift positional parameters
shutdown - Shutdown or restart OS X
sleep - Delay for a specified time
softwareupdate - System software update tool
sort - Sort text files
split - Split a file into fixed-size pieces
stop - Stop a job or process
su - Substitute user identity
sudo - Execute a command as another user
sum - Print a checksum for a file
switch - Conditionally perform a command

tail - Output the last part of files
tar - Tape ARchiver
tee - Redirect output to multiple files
test - Condition evaluation
time - Measure Program Resource Use
touch - Change file timestamps
traceroute - Trace Route to Host
tr - Translate, squeeze, and/or delete characters
true - Do nothing, successfully
tty - Print filename of terminal on stdin
type - Describe a command

umask - Users file creation mask
umount - a device
unalias - Remove an alias
uname - Print system information
unexpand - Convert spaces to tabs
uniq - Uniquify files
units - Convert units from one scale to another
unset - Remove variable or function names
unsetenv - Remove environment variable
users - Print login names of users currently logged in
uuencode - Encode a binary file
uudecode - Decode a file created by uuencode

vi - Text Editor

wc - Print byte, word, and line counts
where - Report all known instances of a command
which - Locate a program file in the user's path
while - Execute commands
who - Print all usernames currently logged on
whoami - Print the current user id and name (`id -un')

xargs - Execute utility - passing arguments

yes - Print a string until interrupted

Tuesday, August 4, 2009

Developing Apple I-App Language to Master References

http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html

Introduction to The Objective-C 2.0 Programming Language

Contents:

Who Should Read This Document
Organization of This Document
Conventions
See Also


The Objective-C language is a simple computer language designed to enable sophisticated object-oriented programming. Objective-C is defined as a small but powerful set of extensions to the standard ANSI C language. Its additions to C are mostly based on Smalltalk, one of the first object-oriented programming languages. Objective-C is designed to give C full object-oriented programming capabilities, and to do so in a simple and straightforward way.

Most object-oriented development environments consist of several parts:

  • An object-oriented programming language

  • A library of objects

  • A suite of development tools

  • A runtime environment

This document is about the first component of the development environment—the programming language. It fully describes the Objective-C language, and provides a foundation for learning about the second component, the Mac OS X Objective-C application frameworks—collectively known as Cocoa. You can start to learn more about Cocoa by reading Getting Started with Cocoa. The two main development tools you use are Xcode and Interface Builder, described in Xcode Workspace Guide and Interface Builder respectively. The runtime environment is described in a separate document, Objective-C 2.0 Runtime Programming Guide.

Please review “ObjC.pdf” & “iPhone in Action.pdf”

Sunday, August 2, 2009

Setting up Away3d with Flex 3

http://www.thetechlabs.com/tutorials/3d/setting-up-away3d-with-flex/

Setting up Away3d with Flex 3

Mon, Sep 1, 2008

3D, Flex, Tips, Tutorials

Setting up Away3d with Flex 3

In this tutorial I will show you how to set up a simple away3d scene, taking advantage of FlexBuilder’s enhanced programming interface. I will also take advantage of the tutorial to introduce Flex to Flash developers who have never used it.

The result is THIS and you can download the source HERE.

Saturday, August 1, 2009

15 jQuery Plugins For A Better Photo Gallery And Slideshow

http://www.webdesignbooth.com/15-jquery-plugins-for-a-better-photo-gallery-and-slideshow/

15 jQuery Plugins For A Better Photo Gallery And Slideshow

Photo Gallery, picture gallery, or slideshow are the best way to showcase your images/photos to your readers. There are a lot of different methods to create them and today we are going to look into different jQuery plugins that can be used to create a better photo gallery.

1. GalleryView

GalleryView aims to provide jQuery users with a flexible, attractive content gallery that is both easy to implement and a snap to customize.
gallery-view

2. Pikachoose

Pikachoose is a lightweight Jquery plugin that allows easy presentation of photos with options for slideshows, navigation buttons, and auto play. Pikachoose is designed to be easily installed and easy to setup.
pikachoose

3. Galleria

Galleria is a javascript image gallery written in jQuery. It loads the images one by one from an unordered list and displays thumbnails when each image is loaded.
galleria

4. Galleriffic

Galleriffic was inspired by Mike Alsup’s Cycle plugin, but with performance in mind for delivering a high volume of photos.
galleriffic

5. Supersized

Supersized is an image gallery built by BuildInternet.com and it is able to slideshows the images with full screen. Besides that, it has navigation controls that allow for pause/play and forward/back.
supersized

6. slideViewer

slideViewer is a lightweight (1.5Kb) jQuery plugin wich allows to instantly create an image gallery by writing just few lines of HTML such as an unordered list of images.
slideviewer

7. Easy Slider

Easy Slider (as I call this plugin) enables images or any content to slide horizontally or vertically on click. It is configurable with css alone. So, basically you link to plugin file, set the content up and style it with css.
easy-slider

8. EOGallery

EOGallery is a web animated slideshow gallery maid with jQuery. It only uses basic jQuery functions and Cody Lindley’s Thickbox to display larger pictures.
eogallery

9. jQZoom

JQZoom is a javascript image magnifier built at the top of the popular jQuery javascript framework.jQzoom is a great and a really easy to use script to magnify what you want.
jqzoom

10. jqGalScroll

jQuery Gallery Scroller (jqGalScroll) takes list of images and creates a smooth scrolling photo gallery scrolling vertically, horizontally, or diagonally. The plugin will also create pagination to allow you to flow through your photos.
jqgalscroll

11. jQuery Scroll Show

ScrollShow is a unique photo gallery implementation that uses scrolling to display the items. It’s similar to a carousel implementation, but simpler and more flexible.
jquery-scrollshow

12. prettyPhoto

prettyPhoto is a jQuery lightbox clone. It has excellent animations and support themes.
prettyphoto

13. Space Gallery

Space Gallery is another fancy jQuery photo gallery plugin. click on the image will make it fade away and the next image will move forward.
space-gallery

14. PictureSlides

PictureSlides is a highly customizable JavaScript-based way to easily turn your images into a collection viewable as a slideshow, and with fading effects, if desired.
picture-slides

15. Image Gallery by qd-creative

This is a simple image gallery created by the author of qd-creative.co.uk.
qd-creative-image-gallery