Wednesday, September 12, 2012

New iOS Code Camp Dates Announced! October 22nd is the next iOS Code Camp.

iOS Code Camp is our premier online training program.  You’ll be personally guided by Matthew Campbell, author of Objective-C Recipes and lead blogger at How to Make iPhone Apps.  After going through our program, you’ll have the skills to develop real world, magical, iOS apps for the iPhone and iPad.

Matthew has trained and mentored 869 (as of this writing) new iOS developers and many of Matthew’s students have gone on to do consulting and even create their own applications.

What Makes iOS Code Camp Different?

Matt has a unique background having spent many years doing counseling, studying psychology and education before becoming a software developer to help with educational research.  When you take iOS Code Camp, you’ll get a program honed and tested by someone with years of experience in education, psychology and software development.

Of course, Matt is an empiricist and believes in proof.  Check out all the graduates of the program who have earned our App Publisher award at Mobile App Mastery Institute to see some examples of people who have succeeded at iOS Code Camp.

Many more alumni have gone on to do consulting, add mobile to their company.  We do quality assurance surveys for all our online and live trainings and consistently get high marks.

How Does iOS Code Camp Work?

The program is a mixture of self-directed coursework where you go through videos and complete hands-on labs and live video conferencing and interaction via a private forum.  For the 4 weeks of iOS Code Camp, we will be best friends and Matt will be in touch with answers, encouragement and coaching to supercharge your progress as a developer.  Except to spend about 20 hours per week on the training program.

Note by the end of the program, you will have followed a detailed step by step procedure to create a real world app called NoteMaker that includes Core Data, location services, maps, web services, asynchronous processing with Grand Central Dispatch (GCD) and more.

How to Register for iOS Code Camp

To get all the information about iOS Code Camp and to register, click right here.

PS BTW, we only let a handful of people into this program so if you’re serious about becoming an iOS developer you may want to act sooner rather than later…  Click right here to register now.


Source : howtomakeiphoneapps[dot]com

Wednesday, June 6, 2012

very simple jquery ajax

jquery supports ranges of ajax calling, below is the very simple code

Note:

  • use method get
  • receive data as html
$(
 function(){
 // Get a reference to the content div (into which we will load content).
 var jContent = $( "#content" );
      
 // Hook up link click events to load content.
 $( "a" ).click(
 function( objEvent ){
   var jLink = $( this );
  
   // Clear status list.
   $( "#ajax-status" ).empty();
    
   // Launch AJAX request.
   $.ajax(
     {
         // The link we are accessing.
  url: jLink.attr( "href" ),
      
  // The type of request.
  type: "get",
      
  // The type of data that is getting returned.
  dataType: "html",
      
  error: function(){
   ShowStatus( "AJAX - error()" );
       
         // Load the content in to the page. 
         jContent.html( "Page Not Found!!

"                    );
  },
      
  beforeSend: function(){
   ShowStatus( "AJAX - beforeSend()" );
  },
    
  complete: function(){
   ShowStatus( "AJAX - complete()" );
  },
      
  success: function( strData ){
             ShowStatus( "AJAX - success()" );
       
   // Load the content in to the page.
   jContent.html( strData );
  }
 }       
     );
    
     // Prevent default click. 
     return( false );     
}
);
  
 }
 );

source: http://www.bennadel.com/resources/presentations/jquery/demo21/index.htm

Tuesday, June 5, 2012

jquery - get id of element that fired event

In jquery, event.target.id always refers to the element that triggers the event (or selected event). Sample below


$(document).ready(function() {
    $("a").click(function(event) {
        alert(event.target.id);
    });
});

download firefox 13 final release

In case you could not use auto upgrade, please download firefox 13 release here (link from mozilla)

http://www.mozilla.org/en-US/products/download.html?product=firefox-13.0&os=win&lang=en-US

Monday, June 4, 2012

List root folders in J2ME/Blackberry


The following code list/check all the folders that existed in SD card, which is inserted in J2ME or Blackberry running OS. Please remember to import necessarily packages (in eclipse based, us Ctrl + Shift + O)

String root = null;
Enumeration e = FileSystemRegistry.listRoots();
while (e.hasMoreElements()) {
root = (String) e.nextElement(); // device has a microSD
        if (root.equalsIgnoreCase("store")) {
          System.out.println("okies man - store/ is available");
        } else {
  System.out.println(root);
        }
}

Friday, May 11, 2012

Rails + PostgreSQL on Mac Lion

1) Install PostgreSQL

$brew install postgresql

Once the installation is complete it is important to follow all the instructions that brew created for us!
Here is a list of instructions to initialize a database named postgres and run postgresql on start-up:

$ initdb /usr/local/var/postgres
$ mkdir -p ~/Library/LaunchAgents
$ cp /usr/local/Cellar/postgresql/9.0.4/org.postgresql.postgres.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist







or follow the instruction generated after installing.

2) Create PostgreSQL users

Login to psql console:

$ psql -h localhost postgres

If all is good we should see the command prompt:

postgres=#

Now lets create a user postgres:

postgres=# CREATE USER postgres WITH PASSWORD 'postgres';

And give it all permissions for postgres database that we created earlier:

postgres=# GRANT ALL PRIVILEGES ON DATABASE postgres to postgres;

3) Install pg gem

env ARCHFLAGS="-arch x86_64" gem install pg

4) Configure Rails project

Add the following lines to database,yml file:



  development:
    adapter: postgresql
    database: postgres
    username: postgres
    password: postgres
    host: localhost
    encoding: UTF8

Add pg gem to Gemfile:

gem 'pg', :require => 'pg'

Thursday, May 10, 2012

PHP - get full URL

There are times when we want to get the full path (URL) of a page, PHP makes it easy

function getPageURL() {
    $pageURL = 'http';

        // Check if https is enabled
    if ($_SERVER["HTTPS"] == "on") {
        $pageURL .= "s";
    }
    $pageURL .= "://";
    if ($_SERVER["SERVER_PORT"] != "80") {
        $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
    } else {
        $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
    }
 
    return $pageURL;
}

Call getPageURL() whenever you want to get the expected path.