niedziela, 2 marca 2008

How to Change Windows Startup Sound

How to Change Windows Startup Sound




Change the startup, shutdown, and any system sounds on your Windows computer.

Steps


  1. Go to the Control Panel
  2. Click the Sounds and Audio Devices tab
  3. Click on the sound you wish to change, the sounds are available and labeled in the box on the lower half of the Sounds control box.
  4. Click the Browse button in the bottom right corner of the box.
  5. Select your custom sound.
  6. Press the play button next to the Browse button to confirm your sound.
  7. Save the Sound Scheme by clicking Save As and setting a unique name
  8. Make sure your sound scheme is selected
  9. Click Apply and exit out the box


Tips


  • While any sound can be used, it is typically best to use WAV sound files.


Related wikiHows





Article provided by wikiHow How to Change Windows Startup Sound. All content on wikiHow can be shared under a Creative Commons license.

How to Change Colors and Set Paths and Aliases in Your Startup File

How to Change Colors and Set Paths and Aliases in Your Startup File




Are you used to using a Linux machine and recently switched to Mac? If so, do you miss colored files (blue directories, green executables, etc.) and Emacs GUIs? Then you may want to customize your .cshrc file to make your life easier.
These steps have been tested on a Mac running Mac OS X 10.4.9 and X11 (default installation).

Steps


  1. Check the version of OS X running on your Mac. If it is different than the one listed above, these steps may not work or may need to be modified.
  2. Download Emacs for free from http://www.gnu.org/software/emacs/.
  3. Install X11.
  4. Open your existing .cshrc file, usually located in "/Users/
  5. Copy the contents into a text file using TextEdit and save as custom_cshrc.txt. If you haven't modified it, the only thing that should be in there is: set path = ( /sw/bin $path /abin /usr/local/bin)
  6. Next, set your colors.
    • setenv TERM xterm-color
    • setenv CLICOLOR true
    • setenv LSCOLORS ExDxHxAxCxegedabagacad

  7. You can customize these colors by changing the case (upper=bold, lower=normal) and the actual color.
    • a black
    • b red
    • c green
    • d brown
    • e blue
    • f magenta
    • g cyan
    • h light grey
    • x default foreground or background

  8. The order of the attributes are as follows:
    • directory
    • symbolic link
    • socket
    • pipe
    • executable
    • block special
    • character special
    • executable with setuid bit set
    • executable with setgid bit set
    • directory writable to others, with sticky bit
    • directory writable to others, without sticky bit

  9. The default is "exfxcxdxbxegedabagacad", i.e., blue foreground and default background for regular directories, black foreground and red background for setuid executables, etc.
  10. Now set your aliases where 'alias' specifies that what follows will be an alias, 'la' is what you want to call it and ' 'ls -aF' ' (this MUST be in single quotes) is the actual command. Information beyond those characters, such as 'list all and file types', must be commented out using the pound sign if they are to be included.
    • alias ls 'ls' list all files
    • alias la 'ls -aF' list all and file types
    • alias ld 'ls -ld' list directories
    • alias ll 'ls -lF' list style
    • alias lx 'ls -lXB' sort by extension
    • alias lk 'ls -lSr' sort by size
    • alias lc 'ls -lcr' sort by change time
    • alias lu 'ls -lur' sort by access time
    • alias lr 'ls -lR' recursive ls
    • alias lt 'ls -ltr' sort by date
    • alias lm 'ls -al | more' pipe through 'more'
    • alias . 'pwd' shows current directory
    • alias .. 'cd ..' goes back one directory
    • alias ../ 'cd ../' goes back one directory
    • alias ... 'cd ../..' goes back two directories
    • alias .../ 'cd ../../' goes back two directories
    • alias - 'cd -' goes to previous directory
    • alias / 'cd /' goes to the root directory

  11. These are fun to play around with, use whatever alias you like that you will remember.
  12. Finally, alias your programs so you don't have to type out the entire path every time you want to call a program.
    • alias matlab '/Applications/MATLAB74/bin/maci/StartMATLAB.app/Contents/MacOS/StartMatlab'
    • alias emacs22 '/Applications/Emacs.app/Contents/MacOS/Emacs'

  13. These locations are dependent on where you install Matlab and Emacs, these are simply default locations that the programs usually use to install.
  14. Now save your text file again and move it to /Users//
  15. Change the name of your original file from .cshrc to original_cshrc.txt
  16. Change the name of your custom file from custom_cshrc to .cshrc. This will allow you to revert back to the original if the custom file does not work.
  17. To use this new startup file without restarting the program, type source .cshrc. If this doesn't work, simply type csh at your prompt and repeat the previous step of sourcing your file.
  18. Your new custom modifications should now be set and working!


Tips


  • If your new custom file doesn't work and you can't figure it out, just rename your .cshrc file back to custom_cshrc.txt and your original_cshrc.txt back to .cshrc.
  • When setting colors, choose colors you can see clearly. If you have a white background don't use yellow, etc.
  • If the alias names specified above aren't logical, change them! Just make sure that the command doesn't already exist. You might be writing over a command...VERY bad.
  • By using the alias emacs22, you preserve the preset alias emacs to open the bundled version. This is important and 22 is used as the version number. So if you download Emacs version 25, alias it as emacs25.
  • Write down your new aliases on a sticky and affix it to the frame of you computer monitor until you learn them. DO NOT affix the sticky to your actual monitor, especially if it is a flat panel. This will RUIN the finish on the screen.


Warnings


  • Don't alias dangerous commands such as rm -rf or anything that could lead to changing settings or removing files. This could damage your data and or system. Just don't do it.
  • Have basic working knowledge of UNIX and computers before trying this, you must know how to troubleshoot problems else be stuck with a fried computer.
  • Always save your original so you can revert back if things go wacky.
  • Check your OS X version, if it doesn't match the one above things might not work.


Things You'll Need


  • Mac OS X Installation Disc 1 (to add on X11 if you haven't already).
  • Connection to the Internet (to download Emacs).
  • Some UNIX knowledge.


Related wikiHows




Sources and Citations





Article provided by wikiHow How to Change Colors and Set Paths & Aliases in Your Startup File. All content on wikiHow can be shared under a Creative Commons license.

How to Care for Discs

How to Care for Discs




Discs, whether they are CDs, DVDs or video games, are very compact and fragile, and need to be taken care of.

Steps


  1. Keep the discs protected, all the time. Being inside the case or a special album for discs are the places they should always be left for long periopds of time. If you leave it in a thing that reads it that is portable or movable, such as a walkman or PlayStation, you could damage the thing that spins.
  2. Hold the edges or/and the middle ring whenever you are transfering it. Never touch the shiny side.
  3. Use ONLY water and soap when cleaning the discs. Wipe from the center to the edge with a damp paper towel with soap, then wash a second time to get the soap off.


Tips


  • If you must place a disc on an open surface, put it label-down; the little dust it will pick up does nowhere near as much damage as the scratches it will get when you drag it a little to pick it up.
  • Use only permanent markers for labeling CDs you burned; any sharper, and the writing can go through the label side and make the other side unreadable.


Related wikiHows




Sources and Citations





Article provided by wikiHow How to Care for Discs. All content on wikiHow can be shared under a Creative Commons license.

niedziela, 17 lutego 2008

How to Backup and Restore Data in MySQL

How to Backup and Restore Data in MySQL



Multiple backups should be taken. E.g.
  • One copy on the same computer or locally networked computer that can be used to quickly replace a database that is in use.
  • Another copy in a physically different location in case something happens at the current location (fire, flood). This could be another computer at a remote site or some portable medium like a tape or CD.

If using Windows, open a command prompt window.
If using Linux, execute the commands on the command line.
The examples below are for Linux - convert backslashes and add .exe to the command for the Windows equivalents.

Steps


  1. To make a backup:
    • mysqldump --user=username --password=password databasename >path/backupfilename

  2. To repair a table:
    1. Stop the MySQL server:
      • mysqladmin -u username -p shutdown

    2. Start the repair:
      • myisamchk -r databasepath/databasename/tablename.MYI
        • databasepath - The complete path to your data directory.
        • tablename can be "*" which means fix all tables.


    3. You should see output on the screen telling you which tables are being checked.
    4. Restart the MySQL server:
      • mysqladmin -u username -p start


  3. If the repair doesn't work, you may need to delete the table and restore from the backup file:
    1. Delete the table - in MySQL, send the query:
      • DROP TABLE tablename

    2. Back at the command prompt:
      • mysql -u username -p databasename < path/backupfilename




Warnings


  • The backup file contains all INSERT commands to restore all tables you specified when you made the backup. If you only want to restore some of the tables, you'll need to edit the backup file before running the restore command.


Related wikiHows





Article provided by wikiHow, a collaborative writing project to build the world's largest, highest quality how-to manual. Please edit this article and find author credits at the original wikiHow article on How to Backup and Restore Data in MySQL. All content on wikiHow can be shared under a Creative Commons license.