Saturday, 8 January 2011

iPhone error cannot "connect to iTunes store"

hi

i got this error while trying to download an application. 'Cannot connect to iTunes'.

I had already my own user and password.

To resolve it I had to register again on the iPhone for a new user. Once i placed all my old profile info in the registration on the phone. It told me that user already exists. Than it asked me if i want to use this profile on the phone. Once i said yes. everything worked normally after that.

hope it helps. This happen after a fresh install of a jailbreak.

Thursday, 1 October 2009

Google translate tool on your website

Google translate has now a widget that can be implemented onto you website. This widgte is a select box that you can change the language of you site.

It is an easy to place on the site be copy pasting the code, see the simple code on the google blog.

I have placed it on my site and it works well. You can see it working on sudoku site.

let me know if you have any questions.

Monday, 7 September 2009

Sudoku

Great site named Sudoku sute url is daily-sudoku.com. The site has been build in zend framework. The sudoku site has a connection with Google friend and facebook connect.

The sudoku puzzle was started since 2006. Last month the sudoku puzzle site has taken a big upgrade. Meaning connection to social networks. This gives users a way to login to the site and save and completed time to solve a puzzle.

Zendframe - work helped in making it easy to build and maintain. Keeping a well structure to add further sudoku features to the site.

Enjoy the site. And let me know if you have any feedback.

:)

Tuesday, 1 September 2009

Zend framework pull information from the application.ini

Zend framework pull information from the application.ini i used it to store the facebook info.

As i have a testing environment and a development one. I needed it to be in the wonderful application.ini where i can easily change between environments.

In the application.ini I have.

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1


resources.db.adapter = "mysqli"
resources.db.params.host = "localhost"
resources.db.params.username = "dbuser"
resources.db.params.password = "########"
resources.db.params.dbname = "########"

facebook.apikey = ########23415733; (NOTICE should be integer)

facebook.secret = ########66491221; (NOTICE should be integer)

[development : production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0

resources.db.adapter = "mysqli"
resources.db.params.host = "localhost"
resources.db.params.username = ""########"
resources.db.params.password = ""########""
resources.db.params.dbname = "########"


facebook.apikey = ########2341577d; (NOTICE should be integer)
facebook.secret = ########6649128; (NOTICE should be integer)
Now i want in the bootstrap to initialize the facebook object.

$aConfig = $this->getOptions();
require_once(APPLICATION_PATH .'/../library/facebook-platform/php/facebook.php');
$facebook = new Facebook($aConfig['facebook']['apikey'],$aConfig['facebook']['secret']);
Zend_Registry::set('facebook', $facebook); // register the object .

Now i can use in my application like so.

$facebook = Zend_Registry::get('facebook');

Take care,

Tuesday, 25 August 2009

Learn zend framework

I like to learn from experience, and examples.

A good starting point is a video a tech guy has done. You can find his videos on youtube. search zend framework

His blog is
http://alex-tech-adventures.com/

If you know PHP, there will be a learning curve. It took me about 2 weeks to understand and work out the logic of how it all goes together.

I am done with my first zend framework site. www.daily-sudoku.com

Sunday, 16 August 2009

Simple Samba with no password for windows and linux

Hi,

There are is much information how to install and configure your samaba on Linux. I have below an example of a simple samaba configuration. Which will make your linux computer available to windows machines in the "WORKGROUP".

On the linux machine I have a folder that is specified to be readable and writable.
path = /home/ShareFolder

In the smb.conf file i placed only the below.


[global]
workgroup = WORKGROUP
os level = 20
netbios name = ComputerName
security = share

[Public]
comment = Public Folder
path = /home/ShareFolder
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup

Saturday, 15 August 2009

Zend frame work dynamic image : imagecreate

A short example how to create an image in the zend MVC frame work.

It is the same code as you would do it in PHP. Below i explain how to place it in the framework.

I created a conrtoller, and in side an Action to get information from the database. In the view i put the code to create the Image.

I have
/application/CreatemyimageController.php



class CreatemyimageController extends Zend_Controller_Action
{

public function init()
{

/* Initialize action controller here */
}

public function indexAction()
{

}

public function indexpageimage(){
// i here get the date from the DB or any other info.
// send it to the view
$this -> view -> cell_list = $row;
}




In the view i create a file. indexpageimage.phtml

cell_list;


header("Content-type: image/png");
$im = @imagecreate(110, 20)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, $string, $text_color);
imagepng($im);
imagedestroy($im);


And my url is
http://localhost/createmyimage/indexpageimage/

This is it !