The Mobile Galaxy The New Mobile Era Has Come | Mobile – A Time To Remember

31Mar/140

How to fix WordPress 3.8.1 admin page not found issues?

After upgrade to WordPress 3.8.1, admin area some links got " Sorry, but you are looking for something that isn't here."

or got Error 500 on WP-admin

It caused by php memory limit .

so edit a file php.ini

put below line to it:

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 512M ; Maximum amount of memory a script may consume (32MB)

and upload this file to wp-admin folder

it will fix the issues

 

Share
Filed under: HTML5, PHP No Comments
21Aug/130

hotmail doesn’t receive mail

From : http://www.howtoforge.com/forums/showthread.php?t=11725&page=9

Your mailserver always will be "mail.yourdomain.com". It doesnt matter how many domains you have to host !
Well, let us say you have a client with the domain "yourclient.net". Sure you have created the zones for the DNS, havn't you ?
I must to say that in this case I like to write the DNS-entries by hand and not to use the DNS-scripts of ISPConfig.

1.) Let us have a look at the relevant records of your domain. It should look like this:

mail A (your IP public of the mailserver without ending point)
mail MX 10 mail.yourdomain.com.

and

yourdomain.com. TXT "v=spf1 mx -all"

2.) The records in the zone-file of your client should look like this:

mail A (your IP public of the mailserver without ending point)
mail MX 10 mail.yourdomain.com.

and

yourclient.net. 86400 IN TXT "v=spf1 a mx include:yourdomain.com ~all"

3.) XXXX-> not working : Send an e-mail to senderid@microsoft.com and write in the first line your domain - nothing else. (Repeat it for all of your domains that you are hosting).

https://support.live.com/eform.aspx?productKey=senderid&ct=eformts

4.) Dont forget: if you make manual changes to a zone-file, you have to increase the serial-number by hand too !! Example : 2007101801 , (YYYYMMDD
+ 2 digits number)

Share
Tagged as: , No Comments
16Aug/130

Postfix – lost connection after UNKNOWN from(Fixed)

In postfix master.cf, make sure the section for port 465/smtps contains
  -o smtpd_tls_wrappermode=yes
Share
Tagged as: , No Comments
26Jun/130

Python check asian language

IDEOGRAPHIC_SPACE = 0×3000

def is_asian(char):
    """
    Is the character Asian?

    >>> is_asian(u'a')
    False
    >>> is_asian(u'日')
    True
    """

    return ord(char) > IDEOGRAPHIC_SPACE
Share
Filed under: iPhone No Comments
26Jun/130

How to Fix Eclipse freezes on startup on the Mac

Eclipse Juno with SVN plugins on the Mac freezes on start up

Bug:

"Deadlock when JNA is loading" problem on Mac OS X [using SVN Kit connector]

Fixing:

This is some AWT related issue on the Mac. Starting Eclipse with -Djava.awt.headless=true solves this deadlock.

 

Share
Tagged as: , No Comments
21May/130

Recursive list files in a dir using Python

import os
import sys
fileList = []
rootdir = sys.argv[1]
for root, subFolders, files in os.walk(rootdir):
    for file in files:
        fileList.append(os.path.join(root,file))
print fileList

#================================================================================
# List of all the files, total count of files and folders & Total size of files.
#================================================================================
import os
import sys

fileList = []
fileSize = 0
folderCount = 0
rootdir = sys.argv[1]

for root, subFolders, files in os.walk(rootdir):
    folderCount += len(subFolders)
    for file in files:
        f = os.path.join(root,file)
        fileSize = fileSize + os.path.getsize(f)
        #print(f)
        fileList.append(f)

print("Total Size is {0} bytes".format(fileSize))
print(“Total Files “, len(fileList))
print(“Total Folders “, folderCount)
Share
Tagged as: , No Comments
20Feb/130

DON’T BUY NIKON D600 Camera

Nikon D600 camera, a Fatal flaw camera.

I am a user of Nikon D600 Camera, the oil or dust issues of sensor will annoyed you whole life.

Do you want to cost $2000 to buy a  FATAL FLAW camera?

DON'T BUY NIKON D600 Camera, let it die.

Share
22Jan/130

Load Iphone 5 image in IOS

#define isPhone568 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568)
#define iPhone568ImageNamed(image) (isPhone568 ? [NSString stringWithFormat:@"%@-568h.%@", [image stringByDeletingPathExtension], [image pathExtension]] : image)
#define iPhone568Image(image) ([UIImage imageNamed:iPhone568ImageNamed(image)])


and call method:

[UIImage imageNamed:iPhone568ImageNamed(@"iphone.png")]];
Share
Tagged as: No Comments
19Dec/120

How to convert BufferedImage to byte[] in Java?

Method 1 (no cached):

BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
        Graphics2D g = image.createGraphics();
        g.setColor(Color.WHITE);
        g.setBackground(Color.WHITE);
        g.clearRect(0, 0, 1, 1);
        AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.0f);
        g.setComposite(ac);
        g.dispose();

        // Kevin 12/18/2012 change for no cached image to bytes[]
        try {

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            JPEGCodec.createJPEGEncoder(baos).encode(image);
            resultImageAsRawBytes = baos.toByteArray(); 
            sLogger.debug("[D] resultImageAsRawBytes is done!!!");

        } catch (Exception e) {
            sLogger.error("[E] resultImageAsRawBytes throw error!!!", e);

        }

Method 2(cached):
        BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
        Graphics2D g = image.createGraphics();
        g.setColor(Color.WHITE);
        g.setBackground(Color.WHITE);
        g.clearRect(0, 0, 1, 1);
        AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.0f);
        g.setComposite(ac);
        g.dispose();

        // open
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
	        // write
	        ImageIO.write(image, "gif", baos);
        } catch (IOException ioe) {
            sLogger.error("[I] Image write failed!!!", ioe);

        }
        // flush
        baos.flush();

        resultImageAsRawBytes = baos.toByteArray();

        // close
        baos.close();

For method 2, sometimes will throw exception in some cases because temporary folder.
Share
Tagged as: No Comments
1Nov/120

Convert \uXXXX code to UTF-8 readable Text

<code>native2ascii -encoding UTF-8 -reverse src.txt dest.txt</code>

Detailed description is here: http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/native2ascii.html

Share
Tagged as: No Comments