rss

Lots of improvements for Firefox 4

Category : General, Product Releases

Some of the cool new stuff coming in Firefox 4.
* New Add-Ons Builder based on Bespin
* HTML5 Video display
* Painting with Canvas
* Image manipulation with Canvas – pixel testing, face detection with opencivitas
* Green screen technologies in images and video by detecting pixel colours.
* HTML5 embedded inside SVG (yes!)
* SVG as an IMG
* SVG as a CSS background
* SVG filter/mask/clip
* SVG animations
* Inline SVG inside HTML5
* CSS3 (selectors, @font-face, 2D Transforms, Transitions, Shadow, Gradients ,calculations – calc(2em-10px) )
* APIs: Geolocation, Offline (IndexDB, localStorage, AppCache, FileAPI – binary content of a file input, file drag and drop, web workers, websockets)
* Websockets controller running the presentation from the mobile.
* WebGL

Share

Microsoft Rolls Out Office Web Apps

Category : General, Information

Microsoft rolled out Microsoft Office Web Apps on Skydrive to users in the U.S., U.K., Canada and Ireland June 7th

Microsoft_office_live
Share

CakePHP Sharing sessions between apps on the same domain

1

Category : General, PHP

Few days back i was working on two separate CakePHP applications, suddenly there was a need to maintain session between these two separate apps working on the same domain. Let me explain a bit more.

Cake-logo
Cake-logo
Image via Wikipedia

I was having two apps (i)wishlist (ii) lighthouse

These are two separate apps under the root folder having the directory structure as:
/htdocs
/wishlist
/app
/config
….
/lighthouse
/app
/config ….

By default the sessions are created relative to the apps directory, and this was the problem i was dealing with, not a big thing but i spent a lot of time figuring this, but for you its will work like a charm.

Steps that i follow to make the two apps share sessions between them.
1. Edit “core.php” for wishlist and the lighthouse and add the line
ini_set(‘session.cookie_path’, “/”);
This is to direct the CakePHP app to create the session on the root

2. The Session.cookie name should be same for the two apps

3. The Session.salt should be same for the two apps

4. Security.level should be low in both the apps

This is it what is required. Let me know if you are still stuck with the things, happy coding.

Share

CakePHP: Paginate using multiple tables/associations

Category : General

I was stuck with a scenario while working on one of the CakePHP application where i have the following association:

City belongsTo => State
State belongsTo => country

In case of Ruby on Rail we can use ‘through’ to create a relationship between the City and Country, but in case of CakePHP we have two things 1) recursive 2) Contain, but in my case both were not working so i searched and found an alternate way of establishing relationship between City and Country so when i run a find on City i also get the Country data in the resultset. Here is the function that i used.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
function unbindAndBind(){
		// unbind State model for entire request
		$this->City->unbindModel(array('belongsTo' =>array('State')), false);
 
		// unbind State->Country model for entire request
		$this->City->State->unbindModel(array('belongsTo' =>array('Country')), false);
 
		// rebind Site and Company models with custom condition for Company model forcing join
		$this->City->bindModel(array
					(
					   'belongsTo' => array(
					   'State' => array(),
					   'Country' => array(
					  			     'foreignKey' => false, 
								     'conditions' => array('State.country_id = Country.id')
								   )
					    )
					),
					false
		);
	}
Share

Retrieving nth Salary from DB

1

Category : General

This query lets you find the nth highest salaries employees.

Select * From @Table [T1] Where
(2 = (Select Count(Distinct [ESalary]) From @Table [T2] where [T1]।[ESalary] <= [T2].[ESalary]))

Replace 2 with 3,4 ,5,6 etc to get the 3,4 ,5,6 etc highest salaried employees

Share

iGoogle new celebrity showcase

Category : General

iGoogle announce a new iGoogle Showcase, which allows one to see and share the homepages of some of your favorite icons. These 30 preeminent people, including Dave Matthews, Rachael Ray and Katie Couric, are sharing their iGoogle pages with users in full.

The iGoogle Showcase allows one to either add a celebrity’s entire iGoogle page to his/her own, or browse through the collection and choose different gadgets and themes from several pages. For example, you might select Al Gore’s iGoogle page for his preferred theme and gadgets for keeping up on the latest media news, supporting the Alliance for Climate protection cause or browsing through photos from National Geographic.

Share

Great to see this:)

Category : General

I was just browsing and came cross this link

http://en.wikipedia.org/wiki/Yadav

This talks about the past of Yadav cast. I was thrilled to see that i belong to such a great past.

Share

Essential Mac Software

Category : General

Share

Colorless View of www.amityadav.name

Category : General

I was just stumbling through the sites and found a very good utility that talks about how people suffering from color blindness see things. This is a visualization of how they see things. I thought of sharing how my looks to them, so here is the how it looks to colorblind people.

amityadavname

www.amityadav.name

Share

openid.sreg

Category : General

Simple registration request and response parsing and object representation

This module contains objects representing simple registration requests and responses that can be used with both OpenID relying parties and OpenID providers.

  1. The relying party creates a request object and adds it to the AuthRequest object before making the checkid_ request to the OpenID provider:
    auth_request.addExtension(SRegRequest(required=['email']))
  2. The OpenID provider extracts the simple registration request from the OpenID request using SRegRequest.fromOpenIDRequest, gets the user’s approval and data, creates a SRegResponse object and adds it to the id_res response:
    sreg_req = SRegRequest.fromOpenIDRequest(checkid_request.message)
    # [ get the user's approval and data, informing the user that
    #   the fields in sreg_response were requested ]
    sreg_resp = SRegResponse.extractResponse(sreg_req, user_data)
    sreg_resp.toMessage(openid_response.fields)
  3. The relying party uses SRegResponse.fromSuccessResponse to extract the data from the OpenID response:
    sreg_resp = SRegResponse.fromSuccessResponse(success_response)
Share

Amit Yadav is Stephen Fry proof thanks to caching by WP Super Cache