發表文章

[Magento] database configuration file

If you want to change the Magento database configuration file. You can find the file  local.xml  <DocumentRoot>/app/etc/ The code should be something like that: <config> <global> <install> <date><![CDATA[Tue, 30 Apr 2013 13:42:46 +0000]]></date> </install> <crypt> <key><![CDATA[f71bejhefa9510f00422fc8650f46c24]]></key> </crypt> <disable_local_modules>false</disable_local_modules> <resources> <db> <table_prefix><![CDATA[]]></table_prefix> </db> <default_setup> <connection> <host><![CDATA[localhost]]></host> <username><![CDATA[MyUserName]]></username> <password><![CDATA[MyPassword]]></password> <dbname><![CDATA[MydatabaseName]]></dbname> <initStatements><![CDATA[SET NAMES utf8]]></initStatements> <model><![CDATA[mysql4]]></model> ...

[ios] Set Admob banner to appear at bottom of screen

Set Admob banner to appear at bottom of screen Set in Portrait view: bannerView_ . frame = CGRectMake ( screenWidth / 2.0 - bannerView_ . frame . size . width / 2.0 , screenHeight - bannerView_ . frame . size . height , bannerView_ . frame . size . width , bannerView_ . frame . size . height ); Set in Landscape view: bannerView_ . frame = CGRectMake ( screenHeight / 2.0 - bannerView_ . frame . size . width / 2.0 , screenWidth - bannerView_ . frame . size . height , bannerView_ . frame . size . width , bannerView_ . frame . size . height );

How to setup icloud find my iphone

How to setup icloud find my iphone  You can find your iphone/ ipod from this link: https://www.icloud.com/#find Before you can locate your devices , you need to set up iCloud and turn on Find My iPhone on each of your iOS devices and Mac computers. Find My iPhone requires iOS 5 or later, or OS X v10.7.5 or later. Important:   To see all your devices in Find My iPhone, set up each device with the same iCloud account . With iOS 7 or later, Find My iPhone includes a new feature called Activation Lock , which is turned on automatically when you set up Find My iPhone. Activation Lock makes it harder for anyone to use or sell your iPhone, iPad, or iPod touch if it’s ever lost or stolen. For more information, see the Apple Support article Find My iPh...

The best jQuery plugin for creating side menus and the easiest way for doing your menu responsive

圖片
The best jQuery plugin for creating side menus and the easiest way for doing your menu responsive (Yes, I like the way Facebook implements its menu on mobile) By Alberto Varela Download You will be able to create multiple sidrs on both sides of your web to make responsives menus (or not, it works perfectly on desktop too). Fill the sidrs normally, with existent content, remote content,... or what you want. Source from : http://www.berriart.com/sidr/

[IOS] Add Admobs into ios app

圖片
Heres a quick guide to get Admob ads working in your monkey app. This guide will display the ads at the bottom of a portrait screen. This guide is based on the iOS guide from google here http://code.google.com/mobile/ads/docs/ios First, set up an iOS ad in Admob.. Second, open up your latest compiled project in xcode and add your project Thirdly, add the extra libs to your project in xcode AdSupport.framework AudioToolbox.framework MessageUI.framework SystemConfiguration.framework StoreKit.framework Now, its time to alter the main.h and main.mm files. Open up main.h and add the create ad banner code to the main view // ***** MonkeyViewController ***** @interface MonkeyViewController : UIViewController{ GADBannerView *bannerView_; @public } Next open up main.mm and add the import line for the ad lib #import "GADBannerView.h" next add the following to the top of @implementation MonkeyViewController - (void)viewDidLoad { [super viewDidLoad...

[Objective C] Detect if it is using ipad

The following code is for detecting ipad or not. #define IPAD UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPad if ( IPAD ) { // iPad } else { // iPhone / iPod Touch }

Get latest google trends with php

Get latest google trends with php Here we come to the fact that if you want traffic to your website it would be good to create posts about the subjects that people search the most which will lead to more visitors and visitors are money. I needed an automated way to extract google trends on hourly bases and store in my database so I can then use them. Google does not provide API for this so here is a script that scrapes google feed and extracts the keywords. <?php     $url = 'http://www.google.com/trends/hottrends/atom/feed?pn=p1';     $referrer = 'http://www.google.com';     $agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8';     $ch = curl_init();     curl_setopt($ch, CURLOPT_URL, $url);     curl_setopt($ch, CURLOPT_HEADER, 0);     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);     curl_setopt($ch, CURLOPT_HTTPPRO...