2
Posted on 11:28 AM by Hamid and filed under

Some people prefer not to display the label count in their blogs as it looks a bit unprofessional. Lets say if you have a label 'Funny sms' with 50 label count and another one ' Good morning sms' with 2 as label count... less people will show interest on clicking the second one.
hiding blogger label count
So, lets see how to hide or remove the Label count in your blogger blog(s)...

1. Sign into Blogger dashboard » Layout » Edit html
Tick the expand widget templates and remove this line from the template..

<span dir='ltr'>(<data:label.count/>)</span>

removing blogger label count
2. Save the Changes and done!

Stumble Upon Toolbar
0
Posted on 3:01 AM by Hamid and filed under
Hamid - World
Stumble Upon Toolbar
0
Posted on 7:16 PM by Hamid and filed under


Microsoft Access 2000
Introduction into Microsoft Access
Starting Up Microsoft Access
Creating New, and Opening Existing Databases
Creating a database using a wizard
Creating a database without using a wizard
Tables - What they are and how they work
    Create a table from scratch in Design view
    Primary Keys
    Switching Views
    Entering Data
    Manipulating Data
    Advanced Table Feature Examples
Relationships - How to link multiple tables together
Forms - What they are and how they work
    Creating A Form Using A Wizard
Reports - What they are and how they work
    Creating A Report Using A Wizard
    Creating Mail Merge Labels using aWizard


Microsoft Access Description
Back to top

Starting Microsoft Access
Back to top

Creating New, and Opening Existing Databases

Creating A Database
The above picture gives you the option to:

Back to top

Create a database using the Database Wizard

  1. When Microsoft Access first starts up, a dialog box is automatically displayed with options to create a new database or open an existing one. If this dialog box is displayed, click Access Database Wizards, pages, and projects and then click OK.

    If you have already opened a database or closed the dialog box that displays when Microsoft Access starts up, click New Database on the toolbar.

  2. On the Databases tab, double-click the icon for the kind of database you want to create.

  3. Specify a name and location for the database.

  4. Click Create to start defining your new database


Back to top

Create a database without using the Database Wizard

  1. When Microsoft Access first starts up, a dialog box is automatically displayed with options to create a new database or open an existing one. If this dialog box is displayed, click Blank Access Database, and then click OK.

    If you have already opened a database or closed the dialog box that displays when Microsoft Access starts up, click New Database on the toolbar, and then double-click the Blank Database icon on the General tab.

  2. Specify a name and location for the database and click Create. (Below is the screen that shows up following this step)

    Database Window


Back to top

Tables

A table is a collection of data about a specific topic, such as students or contacts. Using a separate table for each topic means that you store that data only once, which makes your database more efficient, and reduces data-entry errors.


Tables organize data into columns (called fields) and rows (called records).
Table Output

Back to top

Create a Table from scratch in Design view
  1. If you haven't already done so, switch to the Database Window You can press F11 to switch to the Database window from any other window.
    Database Window
  2. Double-Click on "Create table in Design view".
    (DESIGN VIEW)
    Design View
  3. Define each of the fields in your table.

Back to top

Primary Key

Back to top

Switching Views
Datasheet View Design View
Datasheet View Button
Displays the view, which allows you to enter raw data into your database table.
Design View Button
Displays the view, which allows you to enter fields, data-types, and descriptions into your database table.

Back to top

Entering Data

Back to top

Manipulating Data

Back to top

Advanced Table Features w/Microsoft Access

Back to top

Relationships

After you've set up multiple tables in your Microsoft Access database, you need a way of telling Access how to bring that information back together again. The first step in this process is to define relationships between your tables. After you've done that, you can create queries, forms, and reports to display information from several tables at once.

A relationship works by matching data in key fields - usually a field with the same name in both tables. In most cases, these matching fields are the primary key from one table, which provides a unique identifier for each record, and a foreign key in the other table. For example, teachers can be associated with the students they're responsible for by creating a relationship between the teacher's table and the student's table using the TeacherID fields.

Having met the criteria above, follow these steps for creating relationships between tables.

  1. In the database window view, at the top, click on Tools ---> Relationships
  2. Select the Tables you want to link together, by clicking on them and selecting the Add Button
  3. Drag the primary key of the Parent table (Teacher in this case), and drop it into the same field in the Child table (Student in this case.)
    Relationships
  4. Select Enforce Referential Integrity
    Referential Integrity
    • When the Cascade Update Related Fields check box is set, changing a primary key value in the primary table automatically updates the matching value in all related records.
    • When the Cascade Delete Related Records check box is set, deleting a record in the primary table deletes any related records in the related table
  5. Click Create and Save the Relationship

Back to top

Forms

A form is nothing more than a graphical representation of a table. You can add, update, delete records in your table by using a form. NOTE: Although a form can be named different from a table, they both still manipulate the same information and the same exact data. Hence, if you change a record in a form, it will be changed in the table also.

A form is very good to use when you have numerous fields in a table. This way you can see all the fields in one screen, whereas if you were in the table view (datasheet) you would have to keep scrolling to get the field you desire.


Back to top

Create a Form using the Wizard

It is a very good idea to create a form using the wizard, unless you are an advanced user and know what you are doing. Microsoft Access does a very good job of creating a form using the wizard. The following steps are needed to create a basic form:

  1. Switch to the Database Window. You can do this by pressing F11 on the keyboard.
  2. Click on the Forms button under Objects on the left side of screen
  3. Double click on Create Form Using Wizard
  4. On the next screen select the fields you want to view on your form. Most of the time you would select all of them.
  5. Click Next
  6. Select the layout you wish
  7. Click Next
  8. Select the style you desire...HINT: if you plan on printing your form, I suggest you use a light background to save on printer toner and ink
  9. Click Next
  10. Give you form a name, and select Open the Form and enter information
  11. Select Finish
  12. You should see your form. To adjust the design of your form, simply hit the design button (same as with the tables), and adjust your form accordingly

Back to top

Reports

A report is an effective way to present your data in a printed format. Because you have control over the size and appearance of everything on a report, you can display the information the way you want to see it.


Back to top

Create a Report using the Wizard

As with the Form, it is a very good idea to create a report using the wizard, unless you are an advanced user. Microsoft Access does a very good job using the wizard to create reports.

  1. Switch to the Database Window. You can do this by pressing F11 on the keyboard.
  2. Click on the Reports button under Objects on the left side of screen
  3. Double click on Create Report Using Wizard
  4. On the next screen select the fields you want to view on your form. Most of the time you would select all of them.
  5. Click Next
  6. Select if you would like to group your files. Keep repeating this step for as many groupings as you would like.
  7. Click Next
  8. Select the layout and the paper orientation you desire
  9. Click Next
  10. Select the style you desire...HINT: if you plan on printing your report, I suggest you use a light background to save on printer toner and ink
  11. Click Next
  12. Give you report a name, and select Preview the Report
  13. Select Finish
  14. You should see your report. To adjust the design of your report, simply hit the design button (same as with the tables), and adjust your report accordingly

Back to top

Creating Mail Merge Labels using a Wizard

Microsoft Access lets you create Mailing Labels for your database that you have. To do this do the following:

  1. Switch to the Database Window. You can do this by pressing F11 on the keyboard.
  2. Click on the Reports button under Objects on the left side of screen
  3. Click on New
    Mail Merge
  4. Select Label Wizard and the table you would like to get your information from.
    Label Wizard
  5. Click OK
  6. Select the layout of your labels
  7. Click Next
  8. Select the font size and color you want on each label
  9. Click Next
  10. Select how you want your label to look
  11. Click Next
  12. Select how you want your labels sorted
  13. Give your label report a name and preview it

Back to top

Stumble Upon Toolbar
0
Posted on 6:43 PM by Hamid and filed under
Coding Queries

Once you’ve created a database and populated it with data you need to find a way to get the data out to view. You also need to be able to change, remove or update the data in order for a database to be truly useful. So how do you go about doing this?

Well, to communicate with a database in Microsoft Access you use what is called SQL or Structured Query Language.

Microsoft Access makes manipulating database information very easy because it allows users to manipulate data visually or through coding using VBA. Both methods enable you to retrieve specific information based on set conditions.

For example in a database that holds information about books you might want to view books that were written by a specific author instead of viewing all the books in the database. This type of limitation is also called filtering and is fully supported by MS Access.

To demonstrate the use of SQL in Access we are going to create a database called Books with two tables called genre and book. So, we startup Microsoft Access 2000 and create a database with the above details. Then after creating the database, create the tables with the following data and structure:

Books table structure
Fig 1. Books table structure

Books table Data
Fig 2. Books table Data

Genre table structure
Fig 3. Genre table structure

Genre table Data
Fig 4. Genre table Data

Creating a Query

Microsoft Access makes this extremely easy to do. Simply click on Insert » Query, you will then get dialog box popping up that will give you various options to create a query. If you are new to creating queries then I suggest you take the Simple Query Wizard option, because the wizard will guide you in creating the kind of query that you want otherwise use the design view option.

After creating the query, you have a choice of saving it for later use. For the purposes of this article, save the query as ListEducationalBooks. I’ve created this query using the visual design method which as the name suggests lets you construct a query visually:

Creating the query in design view
Fig 5. Creating the query in design view

The query retrieves a list of all the titles that fall within the educational genre. You can create the same query programmatically, using CreateQueryDef() function.

The function has the syntax: CreateQueryDef(QueryName, SQLStatement).

The first argument of the function is the name of the new query that you want to create and the second argument is the SQL statement i.e.:

Private Sub createquery_Click()
Dim query As String
Query = "SELECT books.title FROM books WHERE (((books.genreID)=3))"
CreateQueryDef(ListEducationalBooks, Query)
End Sub



Running a query


After creating and saving the query it automatically becomes a method of the database object. You can execute the query or “open” it by clicking on the red exclamation mark on the toolbar or selecting Query and then run from the menu bar.



To run the query through code, you use the OpenQuery() method of the doCmd object. The method takes three arguments which is the name of the query, view (optional) and the datamode (optional).



The syntax is as follows: OpenQuery(QueryName, View, DataMode)



You can use the method in something like this:




Private Sub Command2_Click()
On Error GoTo Err_Command2_Click

Dim stDocName As String

stDocName = "ListEducationalBooks"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_Command2_Click:
Exit Sub

Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click

End Sub
Stumble Upon Toolbar
0
Posted on 7:39 PM by Hamid and filed under
hamid-world
Stumble Upon Toolbar
0
Posted on 4:56 PM by Hamid and filed under ,

In Unix, how do I change the permissions for a file?



You can change file permissions with the chmod command.
In Unix, file permissions, which establish who may have
different types of access to a file, are specified by both access
classes and access types. Access classes are groups of users, and
each may be assigned specific access types. The access classes are
"user", "group", "other", and "all". These refer, respectively, to
the user who owns the file, a specific group
of users, the other remaining users who are not in the group, and all
three sets of users. Access types (read, write, and execute)
determine what may be done with the file by each access class.





There are two basic ways of using chmod to change file
permissions:



Symbolic method



The first and probably easiest way is the relative (or symbolic)
method, which lets you specify access classes and types with single
letter abbreviations. A chmod command with this form of
syntax consists of at least three parts from the following lists:































Access Class Operator Access Type
u (user) + (add access) r (read)
g (group) - (remove access) w (write)
o (other) = (set exact access) x (execute)
a (all: u, g, and o)



For example, to add permission for everyone to read a file in the
current directory named myfile, at the Unix prompt, you
would enter:



chmod a+r myfile

The  a  stands for "all", the

 +  for "add", and the
 r  for "read".




Note: This assumes that everyone already has access
to the directory where myfile is located and its parent
directories; that is, you must set the directory permissions
separately.




If you omit the access class, it's assumed to be all, so you could
also enter the previous example as:


chmod +r myfile

You can also specify multiple classes and types with a single command.
For example, to remove read and write permission for group and other
users (leaving only yourself with read and write permission) on a file
named myfile, you would enter:


chmod go-rw myfile

You can also specify that different permissions be added and removed
in the same command. For example, to remove write permission and add
execute for all users on myfile, you would enter:



chmod a-w+x myfile

In each of these examples, the access types that aren't specified are
unchanged. The previous command, for example, doesn't change any
existing settings specifying whether users besides yourself may have
read ( r ) access to myfile. You
could also use the exact form to explicitly state that group and other
users' access is set only to read with the  = 
operator:


chmod go=r myfile

The chmod command also operates on directories. For
example, to remove write permission for other users on a subdirectory
named mydir, you would enter:



chmod o-w mydir

To do the same for the current directory, you would enter:


chmod o-w

Be careful when setting the permissions of directories, particularly
your home directory; you don't want to lock yourself out by removing
your own access. Also, you must have execute permission on a directory
to switch ( cd ) to it.



Absolute form





The other way to use the chmod command is the absolute
form. In this case, you specify a set of three numbers that together
determine all the access classes and types. Rather than being able to
change only particular attributes, you must specify the entire state
of the file's permissions.



The three numbers are specified in the order: user (or owner), group,
other. Each number is the sum of values that specify read (4), write
(2), and execute (1) access, with 0 (zero) meaning no access. For
example, if you wanted to give yourself read, write, and execute
permissions on myfile; give users in your group read and
execute permissions; and give others only execute permission, the
appropriate number would be calculated as (4+2+1)(4+0+1)(0+0+1) for
the three digits 751. You would then enter the command as:


chmod 751 myfile


As another example, to give only yourself read, write, and execute
permission on the current directory, you would calculate the digits
as (4+2+1)(0+0+0)(0+0+0) for the sequence 700, and enter the command:



chmod 700

If it seems clearer to you, you can also think of the three digit
sequence as the sum of attributes you select from the following table:



400 read by owner
200 write by owner
100 execute by owner

040 read by group
020 write by group
010 execute by group

004 read by others
002 write by others
001 execute by others



To create an access mode, sum all the accesses you wish to permit.
For example, to give read privileges to all, and write and execute
privileges to the owner only for a file, you would sum:
400+200+100+040+004 = 744. Then, at the Unix prompt, you would enter:


chmod 744 myfile.ext

Some other frequently used examples are:























777 anyone can do anything (read, write, or execute)
755 you can do anything; others can only read and execute
711 you can do anything; others can only execute
644 you can read and write; others can only read


More information



For more information about chmod, consult the manual
page. At the Unix prompt, enter:



man chmod Stumble Upon Toolbar
0
Posted on 4:47 AM by Hamid and filed under

1 Log In Session

1.1 Log In

Enter username at login: prompt. Be carefull - Unix is case sensitive.
Enter password at password: prompt.

1.2 Change Password

passwd

1.3 Log Out

logout or exit

2 File System

2.1 Create a File
cat >  file      Enter text and end with  ctrl-D
vi file Edit file using the vi editor


2.2 Make a Directory


mkdir   directory-name



2.3 Display File Contents


cat   file    display contents of  file 
more file display contents of file one screenfull at a time.
view file a read only version of vi.
less file similar to, but more powerfull than more.
See the man page for more infomation on less.


2.4 Comparing Files


diff file1 file2   line by comparison
cmp file1 file2 byte by byte comparison


2.5 Changing Access Modes


chmod mode file1 file2 ...
chmod -R mode dir (changes all files in dir )


    Mode Settings

u user (owner)
g group
o other

+ add permission
- remove permission

r read
w write
x execute


Example: chmod go+rwx public.html adds read, write, and execute permissions for group and other on public.html.



2.6 List Files and Directories


ls        list contents of directory
ls -a include files with "." (dot files)
ls -l list contents in long format (show modes)


2.7 Move (or Rename) Files and Directories


mv src-file dest-file    rename src-file to  dest-file
mv src-file dest-dir move a file into a directory
mv src-dir dest-dir rename src-dir, or move to dest-dir
mv -i src dest copy & prompt before overwriting


2.8 Copy Files


cp src-file dest-file    copy src-file to  dest-file
cp src-file dest-dir copy a file into a directory
cp -R src-dir dest-dir copy one directory into another
cp -i src dest copy & prompt before overwriting


2.9 Remove File


rm file      remove (delete) a file
rmdir dir remove an empty directory
rm -r dir remove a directory and its contents
rm -i file remove file, but prompt before deleting


2.10 Compressing files


compress file       encode file, replacing it with file.Z
zcat file.Z display compressed file
uncompress file.Z decode file.Z, replacing it with file


2.11 Find Name of Current Directory


pwd    display absolute path of working directory


2.12 Pathnames

simple:
One filename or directory name for accessing local file or directory.

Example: foo.c


absolute:
List of directory names from root directory to desired file or directory name, each separated by /.

Example: /src/shared


relative:
List of directory names from working directory to desired file or directory name, each separated by /.

Example: Mail/inbox/23


2.13 Directory Abbreviations


~           Your home (login) directory
~username Another user's home directory
. Working (current) directory
.. Parent of working directory
../.. Parent of parent directory


2.14 Change Working Directory


cd /	   			go to the root directory
cd go to your login (home) directory
cd ~username go to username's login (home) directory
not allowed in the Bourne shell
cd ~username/directory go to username's indicated directory
cd .. go up one directory level from here
cd ../.. go up two directory levels from here
cd /full/path/name/from/root change directory to absolute path named
note the leading slash
cd path/from/current/directory change directory to path relative to here.
note there is no leading slash


3.0 Commands



3.1 Date


date    display date and time


3.2 Wild Cards


?    single character wild card
* Arbitrary number of characters


3.3 Printing


lpr file            print file on default printer
lpr -Pprinter file print file on printer
lpr -c# file print # copies of file
lpr -d file interpret file as a dvi file
lpq show print queue (-Pprinter also valid)
lprm -# remove print request # (listed with lpq)


3.4 Redirection


command > file		direct output of command to file instead of
to standard output (screen), replacing current
contents of file

command > > file as above, except output is appended to the current
contents of file

command < file command receives input from file instead of
from standard input (keyboard)

cmd1 | cmd2 "pipe" output of cmd1 to input of cmd2

script file log everything displayed on the terminal to file;
end with exit


4 Search Files



grep string filelist 		show lines containing string in any file 
in filelist
grep -v string filelist show lines not containing string
grep -i string filelist show lines containing string, ignore case


5 Information on Users



finger user or
finger user@machine get information on a user
finger @machine list users on machine
who list current users


6 Timesavers



6.1 Aliases


alias string command     abbreviate command to string


6.2 History: Command Repetition


Commands may be recalled



history    show command history
!num repeat command with history number num
!str repeat last command beginning with string str
!! repeat entire last command line
!$ repeat last word of last command line


7.0 Process and Job Control



7.1 Important Terms


pid		Process IDentification number.  See section 7.2.
job-id Job identification number. See section 7.2.


7.2 Display Process and/or Job IDs



ps       report processes and pid numbers
ps gx as above, but include "hidden" processes
jobs report current jobs and job id numbers


7.3 Stop (Suspend) a Job


ctrl-Z    NOTE:process still exists!


7.4 Run a Job in the Background


To start a job in  background add & to the end of the command. 
Example: xv foo.gif &



To force a running job into the background:

ctrl-Z    stop the job
bg "push" the job into the background


7.5 Bring a Job to the Foreground


fg              bring a job to foreground
fg %job-id foreground by job-id (see 7.2)


7.6 Kill a Process or Job


ctrl-C                 kill foreground process
kill -KILL pid# see 7.2 for
kill -KILL %job-id# displaying pids & job-ids


8.0 Mail Handler (MH)



MH commands are issued directly to the terminal.



inc        incorporate new mail
scan show list of mail messages
show show current message
next show next message
prev show previous message
repl reply to current message
forw forward current message
comp compose a mail message
rmm remove current mail message
cmd -help print help on mh commmand cmd


The file .mh_profile is used to enable/disable MH features. man mh-profile for more information.



9.0 On-line Assistance



On-line Documentation



man command-name   display on-line manual pages
man -k string list one-line summaries of manual pages containing string
Stumble Upon Toolbar