Wednesday, February 12, 2014

To Burn Fat, You Could Exercise … or Shiver

To Burn Fat, You Could Exercise … or Shiver

Sunday, March 27, 2011

Computer Technology in 2011 - Preview




Not surprisingly, the PC ethos we all embrace—nonlinear, flexible, interconnected, and constantly evolving—lies at the center of the crossover. We mean that literally and figuratively. Desktops. Laptops. Tablets. Smartphones. Accelerated Processing Units. 60GHz networks. Personal servers. These days, each of us is essentially walking around with a tiny supercomputer, Internet, and cloud-computing scheme in our hands. To which we say, “Bring it on.” We’ve been waiting for this moment for years.

As always, the near future of PC technology is coalescing around three key axes: performance, power, and interconnectivity. Back in the day, you could sacrifice one or maybe even two of these criteria. Not anymore. Over the next 10 pages, we’re going to explain what, why, when, where, and how
CPUs
2011 will bring a true battle royal for CPU supremacy. Here's an early scouting report

Yeah, we know: Everyone is hyper-excited about netbooks, tablets, smartphones, phablets, and blah blah blah. We couldn’t care less about that noise, because in 2011, we’re going to see an epic battle between AMD’s new CPU, code-named Bulldozer, and Intel’s Sandy Bridge and Sandy Bridge E procs.

We know that Bulldozer will be a significant update for AMD and is considered the company’s first all-out “new” chip since the original Athlon was introduced. The major change is the adoption of a new dual-chip “module” approach. Typical CPU cores are stand-alone affairs, isolated islands. If core 1 is busy on a single-threaded application and core 2 is twiddling its thumbs, core 1 won’t be able to access core 2’s resources. With Bulldozer’s dual-core modules, CPU core resources that aren’t being utilized can be thrown at the single-threaded application core 1 is working on, thereby increasing performance.



Courtesy: http://electronikmade.blogspot.com

Tuesday, June 1, 2010

Enabling mod_cgi, python in lighttpd

Hi Folks,

Enabling mod_cgi,python in lighttpd

Create cgi-bin directory in /var/www

mkdir -p cgi-bin
chown www-data:www-data cgi-bin/
chmod 755 test.py

open lighttpd.conf

vi /etc/lighttpd/lighttpd.conf

append .py extension and save the file
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".py" )

open 10-cgi.conf

vi /etc/lighttpd/conf-enabled/10-cgi.conf

enable mod_cgi
server.modules += ( "mod_cgi" )

Change the alias.url for your cgi-bin directory

$HTTP["remoteip"] =~ "127.0.0.1" {
alias.url += ( "/cgi-bin/" => "/var/www/cgi-bin/" )
$HTTP["url"] =~ "^/cgi-bin/" {
cgi.assign = ( "" => "" )
}
}

$HTTP["url"] =~ "^/cgi-bin/" {
cgi.assign = ( "" => "" )
}

## Warning this represents a security risk, as it allow to execute any file
## with a .pl/.php/.py even outside of /usr/lib/cgi-bin.
#

Uncomment the .py entry and save the file
cgi.assign = (
# ".pl" => "/usr/bin/perl",
# ".php" => "/usr/bin/php-cgi",
".py" => "/usr/bin/python",
)

Restart lighttpd
/etc/init.d/lighttpd stop
/etc/init.d/lighttpd start

Saturday, February 20, 2010

How to take an ISO from linux machine

Hi Folks,

If you want to take an iso of the ubuntu/kubuntu machine, Type command in terminal as a root user

$> remastersys clean

$> remastersys backup isoname.iso

It will take some time and the ISO image automatically saved into you /home/remastersys/remastersys folder itself.

Tuesday, June 3, 2008

Facebook App Creation

Step-by-step Guide to Creating an Application



Contents




  1. Introduction

  2. Integrating Hello World

  3. Pushing FBML to the profile box

  4. Using mock-AJAX in the profile box

  5. Using MySQL to create a counter

  6. Putting the examples together

  7. Downloads




Introduction



This tutorial describes how we created a platform application called 'tutorialapp' that you can use as a template when creating your own platform app. The tutorial assumes that you have access to a web server running php5.


The final version of 'tutorialapp' is hosted at http://tperry256.dreamhost.com/f8/tutorialapp/. If you follow this link it will ask you to login to Facebook and add the 'tutorialapp' application. You can get access to a server like this from a variety of hosting companies for just a few dollars a month.


When you create your own app, you will using a different application name and a different server. We have highlighted these things that will be different for your application.





Integrating Hello World



  1. Go to http://developers.facebook.com/

  2. Click on 'Get Started'

  3. Click on 'Add Facebook Developer Application'

  4. A link to 'Developer' should appear in the left nav on Facebook now. Go to the Developer App.

  5. Click on the button that says 'Setup New Application'

  6. Here are the steps for filling out the form:


    1. Application Name: for our app, we put 'Tutorial Application' - you should put in a different name.

    2. Check the Terms of service box.

    3. Click on the Optional Fields link - this will bring up more options.

    4. Support E-mail: your Facebook contact email may be filled in automatically, but you might not want to give out your personal email to everyone who adds your app! You do have to put a valid email address that you can check, however.

    5. Callback Url: for our app, we put 'http://tperry256.dreamhost.com/f8/tutorialapp/' - you should put something DIFFERENT - in particular, you should put the url of the directory on your server where you will create your application.

    6. Canvas Page URL: http://apps.facebook.com/: for our app, we put 'tutorialapp' - you must put in a different name.

    7. Use FBML: keep this setting.

    8. Application Type: leave this set to 'Website'.

    9. Can your application be added to Facebook: set to 'yes' - this will bring up more options.

    10. TOS URL: you can leave this blank.

    11. Post-Add Url: for our app, we put 'http://apps.facebook.com/tutorialapp/' -- you should put something DIFFERENT - in particular, you should put your full canvas page url.

    12. Default FBML: type in the text 'hello'.

    13. Leave everything else under Installation Options blank.

    14. Side Nav Url: for our app, we put 'http://apps.facebook.com/tutorialapp/' -- you should put something DIFFERENT - in particular, you should put your canvas page url here as well.

    15. Leave everything else under Integration Points blank.


  7. Click on the 'Submit' button.

  8. Go the the 'My Applications' page and check that your application was created. There are a couple ways to get here depending on where you are in the Developer application.

  9. Copy the latest version of the php5 client library into your application's directory on the server.

  10. There are some links to the client library in the downloads section. If you are using a unix shell and are currently in that directory, these commands will work:


  11. wget http://developers.facebook.com/clientlibs/facebook-platform.tar.gz
    
    tar zxvf facebook-platform.tar.gz
    cp facebook-platform/client/facebook.php .
    cp facebook-platform/client/facebookapi_php5_restlib.php .
    rm -rf facebook-platform.tar.gz facebook-platform


  12. Create an 'appinclude.php' file that you will include at the top of all the php pages in your app. Paste this code into the file:


  13. require_once 'facebook.php';
    

    $appapikey = '[your api_key]';
    $appsecret = '[your secret]';
    $facebook = new Facebook($appapikey, $appsecret);
    $user = $facebook->require_login();

    //[todo: change the following url to your callback url]
    $appcallbackurl = 'http://tperry256.dreamhost.com/f8/tutorialapp/';

    //catch the exception that gets thrown if the cookie has an invalid session_key in it
    try {
    if (!$facebook->api_client->users_isAppAdded()) {
    $facebook->redirect($facebook->get_add_url());
    }
    } catch (Exception $ex) {
    //this will clear cookies for your application and redirect them to a login prompt
    $facebook->set_user(null, null);
    $facebook->redirect($appcallbackurl);
    }


  14. Replace '[your app_key]' and '[your secret]' with the 'app_key' and 'secret' for your application that are shown on the 'My Applications' page of the Developer app. You should also replace our callback url with your callback url.


  15. Create a 'index.php' file which will be your application's home page. Paste this code into the file:


  16. require_once 'appinclude.php';
    

    echo "

    hello $user

    ";


  17. Type YOUR APP's callback url into your browser's address bar. You could also type in your canvas page url because going here will also cause your 'index.php' to run. Either way, the only way to get your application added at this time is to type a url into your browser's address bar.



  18. here is OUR APP's callback url: http://tperry256.dreamhost.com/f8/tutorialapp/



    here is OUR APP's canvas page url:http://apps.facebook.com/tutorialapp/



  19. Click 'I agree' to accept the terms of service for your application and then click the button to 'Add [your application name]' to add it.


  20. You should then be redirected to a canvas page which contains the output of your 'index.php' file.


  21. Go to your profile and look for a profile box for your application which contains the 'hello' -- this is the default FBML that you set before.


  22. Finally look for a left-nav link that will take you back to your canvas page.





Pushing FBML to the profile box




  1. Here is an extended version of 'index.php'. When the user submits the form, this code puts the text they submitted in the profile box.

  2. Note that submitting the empty string causes the profile box to disappear!


  3. require_once 'appinclude.php';
    

    echo "

    hello $user

    ";

    if (isset($_REQUEST['profiletext'])) {
    $facebook->api_client->profile_setFBML($_REQUEST['profiletext'], $user);
    $facebook->redirect($facebook->get_facebook_url() . '/profile.php');
    }

    echo '
    ';
    echo '
    ';
    echo '';
    echo '
    ';





Using mock-AJAX in the profile box




  1. This code pushes a form into the profile box that uses the mock-AJAX feature of FBML to give the illusion that you can dynamically update the content of the profile box.

  2. Notice how the if statement at the very top of this 'index.php' file handles the mock-AJAX call.


  3. if (isset($_REQUEST['mockfbmltext'])) {
    
    echo $_REQUEST['mockfbmltext'];
    exit;
    }

    require_once 'appinclude.php';

    echo "

    hello $user

    ";

    $fbml = <<This is the subtitle





    clickrewriteurl="$appcallbackurl"
    clickrewriteid="preview" value="Draw text below"
    />





    EndHereDoc;

    $facebook->api_client->profile_setFBML($fbml, $user);

    echo "

    the following form was added to the profile box:

    ";

    echo $fbml;





Using MySQL to create a counter




  1. This example assumes that you have a way to create a mysql database which the php scripts on your server can connect to.


  2. If you don't already have a database, create one.

  3. Create a table in the database called 'counter' which has a single integer column called 'count'.

  4. Create a new file called 'dbappinclude.php' and paste the following code into the file. Don't forget to replace the items in brackets with your actual db host, user, pass, and name.


  5. require_once 'appinclude.php';
    

    $dbhost = '[your db host]';
    $dbuser = '[your db user]';
    $dbpass = '[your db pass]';
    $dbname = '[your db name]';

    $conn = mysql_connect($dbhost, $dbuser, $dbpass);
    mysql_select_db($dbname, $conn);

    function query($q) {
    global $conn;
    $result = mysql_query($q, $conn);
    if (!$result) {
    die("Invalid query -- $q -- " . mysql_error());
    }
    return $result;
    }



  6. Now try out this version of 'index.php'. It displays a counter that gets updated every time 'index.php' is loaded.



  7. require_once 'dbappinclude.php';
    

    echo "

    hello $user

    ";

    $rs = query("select count from counter");
    if ($row = mysql_fetch_assoc($rs)) {
    $count = $row['count'];
    query("update counter set count=count+1");
    } else {
    query("insert into counter values (1)");
    $count = 1;
    }

    echo "

    the count is $count

    ";





Putting the examples together




  1. Here's a final version of 'index.php' which puts all these examples together. It assumes that you have created 'dbappinclude.php' from the previous example.


  2. if (isset($_REQUEST['mockfbmltext'])) {
    
    echo $_REQUEST['mockfbmltext'];
    exit;
    }

    require_once 'dbappinclude.php';

    echo "

    hello $user

    ";

    $rs = query("select count from counter");
    if ($row = mysql_fetch_assoc($rs)) {
    $count = $row['count'];
    query("update counter set count=count+1");
    } else {
    query("insert into counter values (1)");
    $count = 1;
    }

    echo "

    the count is $count

    ";

    if (isset($_REQUEST['profiletext'])) {
    $facebook->api_client->profile_setFBML($_REQUEST['profiletext'], $user);
    $facebook->redirect($facebook->get_facebook_url() . '/profile.php');
    }

    echo '
    ';
    echo '
    ';
    echo '';
    echo '
    ';

    $fbml = <<




    clickrewriteurl="$appcallbackurl"
    clickrewriteid="preview" value="Draw text below"
    />





    EndHereDoc;

    $facebook->api_client->profile_setFBML($fbml, $user);

    echo "

    the following form was added to the profile box:

    ";

    echo $fbml;





Downloads




  1. facebook_client.tar.gz -- the latest php5 platform client library

  2. tutorialapp.tar.gz -- source fo the final combined example; you need to fill in your own app_key, application secret, and db info to make it work on your server

  3. tutorialapp.zip -- same as tutorialapp.tar.gz but in a zip file



Friday, September 7, 2007

Mac Cocoa - Java API

Hi all, My new Project is Mac OS Project, Using XCode, Interface Builder..., Its my new Experience in Cocoa application development. its very interesting... i share my experience. First i tell what is Cocoa, it can be following here....

Cocoa is an object-oriented application environment designed specifically for developing Mac OS X-only native applications. The Cocoa frameworks include a complete set of classes, and for developers starting new Mac OS X-only projects, Cocoa provides the fastest way to full-featured, extensible, and maintainable applications. You can bring applications from UNIX and other platforms to Mac OS X quickly by using Cocoa to build state-of-the-art Aqua user interfaces while retaining most existing core code.

Cocoa is one of the application environments of Mac OS X and a peer to Carbon and Java. It consists of a suite of object-oriented software libraries and a runtime engine, and shares an integrated development environment with the other application environments. You can write Cocoa applications in either Objective-C or Objective-C++ (there are Java bindings as well) but you can also call Carbon C functions.

Cocoa is one of the application environments of Mac OS X and a peer to Carbon and Java. It consists of a suite of object-oriented software libraries and a runtime engine, and shares an integrated development environment with the other application environments. You can write Cocoa applications in either Objective-C or Objective-C++ (there are Java bindings as well) but you can also call Carbon C functions.

First U can download and install the Xcode in ur Mac Os, its also available for opensource in Mac Website clickhere.

And then u can run the Xcode application, then the same procedure for all other project development, click the File new Project then select the cocoa project, then u can give the project name,


after that click the finsh button the Project will ready to work... then u click the Main Meni.nib file, u automatically redirected to the Interface Builder.
then what ever u want to build the application window... then save the file, then return back to Xcode click the Build and go button. u can see, what u make the window as like..



Thats all... then we add the business logic and other programming stuffs to this project...

This is one of the best experience in my project life...

Saturday, August 18, 2007

JavaFX

This is my next Tech bitssssss..., The JavaFx is a scripting language. Can Create rich content applications for mobile, set-top, and desktop devices with JavaFX. The JavaFX Script™ (hereinafter referred to as JavaFX) language is a declarative and statically typed scripting language. It has first-class functions, declarative syntax, list-comprehensions, and incremental dependency-based evaluation. The JavaFX language makes intensive use of the Java2D Swing GUI components and allows for easy creation of graphical user interfaces or GUIs.

The Technical Details followed here.,

At A Glance
* The JavaFX product family leverages the Java platform's write-once-run-anywhere portability, application security model, ubiquitous distribution and enterprise connectivity
* JavaFX initially is comprised of JavaFX Script and JavaFX Mobile
* JavaFX Script is a highly productive scripting language for content developers to create rich media and interactive content
* JavaFX Mobile, Sun's software system for mobile devices, is available via OEM license to carriers, handset manufacturers and others seeking a branded relationship with consumers

The JavaFX product family delivers the ability to create interactive content, applications and services from the desktop to mobile devices to the living room.

Features
# avaFX Script uses a declarative syntax for specifying GUI components, so a developer's code closely matches the actual layout of the GUI
# Through declarative databinding and incremental evaluation, JavaFX Script enables developers to easily create and configure individual components by automatically synchronizing application data and GUI components
# JavaFX Script will work with all major IDEs, including NetBeans, which is the reference implementation IDE for Java development
# Unlike many other Java scripting languages, JavaFX Script is statically typed and will have most of the same code structuring, reuse, and encapsulation features that make it possible to create and maintain very large programs in Java
# JavaFX Script is capable of supporting GUIs of any size or complexity
# JavaFX Script makes it easier to use Swing, one of the best GUI development toolkits of its kind

Benefits
* Increases developer productivity
* Offers an intuitive language design
* Requires less code
* Enables faster development cycles
* Zero loss of functionality across devices

JavaFX Mobile - Overview
JavaFX Mobile is a complete, pre-integrated software system for advanced mobile devices designed to enable developers to author rich, high-impact content and network-based services. Built around open and standards-based technologies, JavaFX Mobile enables control and flexibility for the mobile ecosystem.

JavaFX Mobile Architecture Key Benefits
Device Manufacturers
Business Challenges


* More advanced architectures and increasingly complex functionality result in significant time dedicated to porting and integration rather than creating value-added services
* Getting to market quickly with new services and functionality is critical
* Need a platform that is sufficiently customizable and that can be leveraged across a wide range of devices

Advantages of JavaFX Mobile Software


* JavaFX Mobile is a complete and pre-integrated solution enabling device manufacturers to focus on developing new services
* Because JavaFX Mobile is built around standard Java APIs, porting costs will be reduced
* JavaFX Mobile will implement libraries, middleware, and applications in Java and rely on standardized APIs, so porting the software to new hardware and adding/replacing software components is much easier than it would be with proprietary components
* JavaFX Mobile will simplify and accelerate the development of highly customizable, richly branded and secure user interfaces across mobile feature phone handsets

Content Developers
Business Challenges


* The proliferation of devices in the mobile space has made it very costly to develop and deploy mobile applications and services
* Developers want to take advantage of the latest device capabilities, but not all software platforms enable the use of the latest functionality
* Developer tools that have been loosely coupled with the application platform can present a variety of development challenges and compatibility issues

Advantages of JavaFX Mobile Software


* With more than 1.8 billion handsets running Java, this software will enable developers to validate applications on almost any mobile device with little or no porting
* Developers can create content using the product's open, standard Java APIs, fully integrated with a complete mobile software system to provide more consistent application behavior and functionality
* Developers can freely leverage numerous tools available for Java, including the award-winning NetBeans IDE and the Sun Java Wireless Toolkit

Mobile Operators
Business Challenges


* Proliferation and fragmentation of mobile platforms has resulted in high operational costs and has increased the cost of deploying new content
* Compelling content and superior customer experience is necessary to fuel subscriber growth

Advantages of JavaFX Mobile Software

* JavaFX Mobile is highly portable, so it's easy to deploy applications and services in a consistent fashion across a wide range of devices, enabling faster time-to-market and improved customer experience
* JavaFX Mobile will improve consistency between handsets supplied into the operator's network, resulting in reduced validation, porting, and support costs.

System Requirements

Systems Requirements section of the NetBeans IDE 5.5 Release Notes or the NetBeans IDE 6.0 Preview (M10) Release Notes in order to run the IDE.
See More technical details, tutorials, examples,click here
another link