To supresses error reporting.
Sometmes functions are called with "@' in front of them -
E.g. $somevar = @mail($to,$subject,$msg);
Thursday, 30 April 2009
@, in PHP
at 03:19 0 comments
labels: symbol
Friday, 24 April 2009
HOWTO: firefox cannot save username & password on hotmail.com
If it just happens on that site try clearing the hotmail cookies. Select Tools > Options > Privacy - In the Cookies section click "Show Cookies..." to access the option for removing cookies.
If you can not use the "remember me" option on other sites as well, a likely cause is the file that stores cookies is corrupt. To test this close Firefox, go to your profile folder and rename cookies.sqlite to cookies.tmp
Restart Firefox, log into those sites and then see if it remembers the logins.
Also make sure that cookies are being accepted and not being deleted when Firefox closes. Go to Tools > Options > Privacy, on that dialog you can make sure that cookies are being accepted, then in the private data section make sure that Firefox is not set to delete cookies when Firefox closes. Also click on the Exceptions button in the cookies section to make sure cookies from those sites are not being blocked.
Next check any internet security software to make sure it is not blocking or deleting cookies. Some internet security software has privacy options that can block or delete cookies.
at 13:17 0 comments
Monday, 20 April 2009
My MAC applications
Large files:
xcode developer
mactex
ilife
iwork
Photoshop cs4 trial
Dreamweaver cs4 trial
Plugins:
x11-2.3.2.1
NTFS-3g (http://www.ntfs-3g.org/)
Server:
pdt-all-in-one-macosx-carbon-2.0.0GA.tar.gz
MAMP_1.7.2
Joomla_1.5.10-Stable-Full_Package
Others:
Adobe reader
Adobe flash player
Adium_1.3.3
Calaboration_1.0.2 (iCal sync with Google Calendar)
Cyperduck
Evernote
ffmpegX (video converter, 3gp to mp4/avi etc.)
Fink
Firefox
ID3Mod2_V49
JavaForMacosx10.5
Lyx
Macports
MacVim
Messenger (Microsoft)
Openoffice
Picasamac
Realplayer
Speed download (buy)
Textmate (buy)
TheUnarchiver
VLC
Vuze
Xee
at 16:44 0 comments
Sunday, 19 April 2009
MAC: X11 on Mac 10.5.6
The X11 download on apple.com is for Panther 'only'. So it will never be installed successfully. You will get the error prompt like "You cannot install X11 on this volume. A newer version of this software already exists on this volume."
Your best bet for staying current with bugfixes is to install the latest X11 package (at the moment X11 2.3.0) released by the Xquartz project, which contains Xquartz-1.4.2-apple5, and includes many fixes outside of Xquartz. Afterwards, just install the latest binary versions of Xquartz released periodically as fixes are being made. To see the complete list of changes in release X11-2.3.0, please go here.
After this installation, run the x11.app from /Application/Utilities/, then run terminal from the X11 Application menu. In this xterm based terminal you can run those x11 applications installed by macports or fink, also run those like gimp which need x11 environment.
For example:
1) run gedit
gedit
2) run gimp
open -a gimp or open /Applications/Gimp.app
at 17:43 0 comments
labels: mac
Saturday, 18 April 2009
MAC: startup item
2. All the system's start up items (as opposed to login items) should be located in a folder named StartupItems in your hard drive's /Library.
at 01:28 0 comments
labels: mac
Friday, 17 April 2009
Mac 10.5.6 on PC (ipc osx86 10.5.6 on Dell dimension 5150)
Spec:
========
Dell Dimension 5150:
DIMENSION 5150 PENTIUM D 805 DUAL CORE
AUDIO INTEGRATED HDA 7.1 DOLBY DIGITAL C
GRAPHICS CARD ATI RADEON X300 SE 128MB H
INTEL PRO/100 VE NETWORK CONNECTION (ETHERNET)
ISO:
========
IPC OSX86 10.5.6 PPF5 FINAL
Burn it using the lowest speed is important.
The supported hardware list: http://www.ihackintosh.com/2009/02/ipc-osx86-1056-final-ppf5-complete-driver-list/
Intallation options:
========
try not to select extra driver and patches, which can be installed easily after successful installation.
To remove kext cache in 10.5.6 or later just run:
sudo rm -rf /System/Library/Extensions.mkext
Kernel: 9.5 voodoo (the default kernel 9.6 will bring black screen; After upgrade to 10.5.7, the voodoo kernel need to be reinstalled)
ethernet driver: intel pro/100 ve (tips for your particular device: modifying Info.plist)
audio: the patch or driver coming with this iso doesn't work for my Dell Dimension 5150, the available driver is here.
video: typing '-x "Graphics Mode"="1280x1024x32@85" as boot flag to change the screen resolution. More details are here.
Alternatively, using ATI 9700 driver as the driver for x300, this will remove small square around mouse, but still no QE support in Leopard. + ATI Radeon x300 PCI-Ex Callisto v.008 to change the screen resolution.
patch:
seatbelt (to solve mounting dmg file kernel panic issue)
shutdown (seems not work properly)
"NTFS-3g (http://www.ntfs-3g.org/)" can be installed later as a software
Sleep problem: (I did both together, so far don't know which fixed this problem. This happened when I upgrade to 10.5.7)
1) try to remove useless ATI and Gefore kext from /System/Library/Extensions.
2) GMA driver ( I removed the ATI VGA card, because it doesn't support Quartz Extreme. )
Softwares:
Here
at 00:57 0 comments
labels: mac
Monday, 13 April 2009
BUG: f-spot uploading photos to flickr
F-spot will suspend when uploading photos to flickr.
Fix:
===========
sudo ifconfig wlan0 mtu 1450
then try to upload again.
Where MTU = Maximum transmission unit
====================
TWEAKING MTU SETTINGS
As you become more experienced with Linux you maybe want to fine tune your internet connection settings . . . . .
The default of 1460 bytes per packet can vary with the connection, distro or hardware you have.
On some systems you can have better results with low MTU settings and some with high MTU settings, you will just have to see and try what works best for you.
Here is how you can change the MTU settings for your network interface:
First have a look on how the settings are now:
CODE |
# ifconfig eth0 |
And you will get something similar to this:
QUOTE = ifconfig |
eth0 Link encap:Ethernet HWaddr 00:07:95:XX:XX:59 inet addr:10.0.0.152 Bcast:10.0.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:29861 errors:0 dropped:0 overruns:0 frame:0 TX packets:26784 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6378900 (6.0 Mb) TX bytes:2889677 (2.7 Mb) Interrupt:11 Base address:0xd400 |
Now we will test another setting ( MTU 1460 ):
CODE |
# ifconfig eth0 mtu 1460 |
And see if you get better results . . . No ? Well, try again
CODE |
# ifconfig eth0 mtu 1300 |
or
CODE |
# ifconfig eth0 mtu 1200 |
Now imagine you found the value you want to make permanent: MTU 1250 , pull up the file "/etc/sysconfig/network-scripts/ifcfg-eth0" and make it read:
QUOTE = /etc/sysconfig/network-scripts/ifcfg-eth0 |
DEVICE=eth0 MTU=1250 BOOTPROTO=dhcp NETMASK=255.255.255.0 ONBOOT=yes METRIC=10 |
After the next boot the MTU settings will be on 1250
at 22:33 2 comments
dual boot configuration within XP
When Linux or Mac os86 installed on the disk, where Windows has been installed before, some time it's not set dual boot by defalt. This is the fix, only using the funtion coming along with xp.
Fix:
====================
in Dos, type:
diskpart
list disk
select disk 0
list part
select part 3 // could be different depending on your partitions
active
exit
======================
at 21:30 0 comments
Saturday, 4 April 2009
HOWTO: gtalk in pidgin
Force old (port 5223) SSL: Checked
Allow plaintext auth over unencrypted streams: Un-Checked
Connect Port: 443
Connect Server: talk.google.com
Proxy type: Use Global Proxy Settings
at 16:15 0 comments
labels: howto