Shantanu's Blog

Database Consultant

June 13, 2007

 

Openoffice Writer - grammar check

One of the drawbacks of using writer is it does not have built-in grammar check feature like word has. You can use the add-on called "LanguageTool". LanguageTool supports English, German, Polish, and Dutch. The installation process is a little unorthodox:
Download the zip file from ...
http://www.languagetool.org/download/LanguageTool-0.9.zip
In OpenOffice.org: Do not unzip the archive, just call Tools -> Package Manager -> Add...
Open a new window of OpenOffice.org (Ctrl-N) and you'll see a new menu entry "LanguageTool" that will check the current text. See the screenshot...


LangaugeTool is a free download that requires at least Java 5.0, and works anywhere OpenOffice does.

Labels:


June 12, 2007

 

Open Office - Writer - formatting features

1) Format - Page - Page Tab (2nd from left) - (margins - 1.50cm)



2) Tools - Line Numbering - Show numbering



3) Select all (Ctrl + A) - Format - Columns - 4 columns

4) Insert - Foolter - Default. When the cursor is in the footer section, use Insert - Fields - Page Number

5) Click on Export as PDF button on standard toolbar (or choose from files menu to see advance options like Range, Initial view and security.

Labels:


June 11, 2007

 

Drupal Checklist

Here are 12 points to be checked once drupal is installed on the server.
  1. Select your favorite theme for e.g. “bluemarine” and then click on Configure to add search box. Select "Use the default logo", Add custom logos and also Deselect page, story under "Display post information on"
  2. Administer - Site configuration - Site information - Name - Syntax Chemicals and Footer - Footer message
  3. Administer – User Management - User settings - select "Only site admins can create new user accounts" and Deselect "Require e-mail verification"
  4. Administer – User Management - Roles - Create a role "permanent" and "Temporary" and edit permissions accordingly.
  5. Administer – User Management - Users - Add user
  6. Administer – User Management - Access control - Deselct "access content" for annonymous users
  7. Administer – Content Management – Post settings – Number of posts – 1 Length: unlimited
  8. Administer – Site configuration – Input formats – Select PHP Code or full HTML as default
  9. Create a few stories and pages using the “create content link”. Link the stories to the Navigation Menus
  10. Administer - Site building – Menu – Update primary and navigation menus
  11. Administer - Site building - Modules - Make sure "Profile" is selected.
  12. Administer - User management - Profiles - single-line textfield - to create address profile.
  13. Administer – Content Management – Categories – Add Vocabulary – For e.g. Page type, Add term like facilities

Labels:


 

Drupal External Modules

Here are 5 modules you can install and test to see how the modules add extra ordinary functionality to the drupal installation.

1) Front Page Module : can be installed to redirect the user to a different page based on different criterion.
Administer - Site building - Modules - Select "Front page"
global $user;
$sql_profile_check = db_query("SELECT * FROM {profile_values} WHERE fid = 8 AND uid = %d", $user->uid);
if (db_affected_rows($sql_profile_check)== 0 ) {
return 'user/' . $user->uid . '/edit/Details' ; //put once only destination here, this takes you to Profile
} else {
return 'user/'.$user->uid ; // put normal login destination here
}
2. Image Module : is required to be installed for the site where you want the user to upload and manage photos.
3. Regcode module : can be used if you want to send the registration code offline for better security
4. CCK module : To design custom form for e.g. “Repair Order Status”
5. Nodeaccess module : can be used to give restricted access to the “Verified users” to read all tickets but update only their own tickets.

Labels:


June 10, 2007

 

Drupal Optional Modules

If you are planning to use drupal for your website or as a Content Management System, please consider the 23 modules those are installed by default. The list is as follows:

1) Aggregator: Aggregates syndicated content (RSS, RDF, and Atom feeds).
2) Blog: Enables keeping easily and regularly updated user web pages or blogs.
3) Blog API: Allows users to post content using applications that support XML-RPC blog APIs.
4) Book: Allows users to collaboratively author a book.
5) Color: (Default: selected) Allows the user to change the color scheme of certain themes.
6) Comment: (Default: selected) Allows users to comment on and discuss published content. Required by - Forum (disabled)
7) Contact: Enables the use of both personal and site-wide contact forms.
8) Drupal: Lets you register your site with a central server and improve ranking of Drupal projects by posting information on your installed modules and themes.
9) Forum: Enables threaded discussions about general topics. Depends on - Taxonomy (enabled), Comment (enabled)
10) Help: (Default: selected) Manages the display of online help.
11) Legacy: Provides legacy handlers for upgrades from older Drupal installations.
12) Locale: Enables the translation of the user interface to languages other than English.
13) Menu: (Default: selected) Allows administrators to customize the site navigation menu.
14) Path: Allows users to rename URLs.
15) Ping: Alerts other sites when your site has been updated.
16) Poll: Allows your site to capture votes on different topics in the form of multiple choice questions.
17) Profile: Supports configurable user profiles.
18) Search: Enables site-wide keyword searching.
19) Statistics: Logs access statistics for your site.
20) Taxonomy: (Default: selected) Enables the categorization of content. Required by - Forum (disabled)
21) Throttle: Handles the auto-throttling mechanism, to control site congestion.
22) Tracker: Enables tracking of recent posts for users.
23) Upload: Allows users to upload and attach files to content.

a) Color, Comments, Help, Menu and Taxonomy are selected by default.

b) I will recommend to enable Profile, Tracker, Upload and polls to enable user participation. You can ofcourse decide the type of user who will have access to these features. for e.g. employees, editors etc.
i) Profile enables you to add more fields to the user page like, college, City etc.
ii) Tracker keeps log of the comments, stories submitted by the registered user.
iii) upload modules as the name suggests, allows users to upload pdf, media files.
iv) Polls are another good example of user particiation. Everyone likes to express his/ her opinion on all the issues of the world. Let's ask the public what they think about presidential candidate. See the screenshot below.




c) I will also recommend to enable Search and Ping modules to make the site searchable and automatically indexed by serach engines.

d) You can also enable Aggregator module to add external blog entries to the registered users account. For e.g. you can add Rashmi Bansal's blog entries directly into the navigation menu of the Registered users as shown in the picture. To enable this feature,
i) Administer - User Management - aggregator module - access news feeds - Select "authonticated user" or "Annonymous" as well if you want.
ii) Administer - Content management - Add category - Title: "Editor's note"
iii) Administer - Content management - Add feed - Title : "Rashmi", URL: "http://youthcurry.blogspot.com/atom.xml", Category: "Editor's note"




e) Blog and Forum are essentially just another content type like page and story. Since "story" content type works exactly like blog or forum, dont' select it.

Labels:


June 01, 2007

 

MySQL Case Study - 140

Is there a single SQL Query that will do the following?

mysql> SELECT * FROM user;
+----+----------+
| id | username |
+----+----------+
| 1 | Bill |
| 2 | Bob |
| 3 | Hank |
| 4 | Jim |
+----+----------+
4 rows in set (0.00 sec)

mysql> SELECT * FROM email;
+----+-------+------+---------------------------------------+
| id | _from | _to | message |
+----+-------+------+---------------------------------------+
| 1 | 1 | 2 | Blah, blah, blah |
| 2 | 1 | 3 | I told Bob to Blah, Blah, Blah |
| 3 | 3 | 4 | Bill told Bob to Blah, Blah, Blah |
| 4 | 4 | 2 | Did Bill tell you to Blah, Blah, Blah |
+----+-------+------+---------------------------------------+
4 rows in set (0.00 sec)

What SQL Query would result in the following...???

mysql> SELECT ??????????????????????????????;
+----+-------+------+---------------------------------------+
| id | _from | _to | message |
+----+-------+------+---------------------------------------+
| 1 | Bill | Bob | Blah, blah, blah |
| 2 | Bill | Hank | I told Bob to Blah, Blah, Blah |
| 3 | Hank | Jim | Bill told Bob to Blah, Blah, Blah |
| 4 | Jim | Bob | Did Bill tell you to Blah, Blah, Blah |
+----+-------+------+---------------------------------------+
4 rows in set (0.00 sec)

http://forums.mysql.com/read.php?10,155739,155739#msg-155739

Labels: ,


 

MySQL Case Study - 139

I'd like to insert "rackmount" in a database text field in front of "radio." The term "radio" appears in each "description" column but it is surrounded by other, random, text. Is there a way to accomplish this?
http://forums.mysql.com/read.php?10,155433,155433#msg-155433

Labels: ,


 

Why IS NULL doesn’t always work in MySQL

A lot of weird things happened when someone tried to insert NULL values in MySQL table.
The list is here:

1. MySQL didn’t insert 0 into the first column; it inserted 1.
2. I asked for rows where the first column is NULL, which should return no rows, but I got a row where it is clearly not NULL.
3. I repeated the query and got a different result.

Any system that’s really used much in the real world will end up with these kinds of idiosyncrasies to meet particular needs. Oh, the joy of trying to be compatible with Microsoft Access!

http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/

Labels:


Archives

June 2001   July 2001   January 2003   May 2003   September 2003   October 2003   December 2003   January 2004   February 2004   March 2004   April 2004   May 2004   June 2004   July 2004   August 2004   September 2004   October 2004   November 2004   December 2004   January 2005   February 2005   March 2005   April 2005   May 2005   June 2005   July 2005   August 2005   September 2005   October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   May 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006   December 2006   January 2007   February 2007   March 2007   April 2007   June 2007   July 2007   August 2007   September 2007   October 2007   November 2007   December 2007   January 2008   February 2008   March 2008   April 2008   July 2008   August 2008   September 2008   October 2008   November 2008   December 2008   January 2009   February 2009   March 2009   April 2009   May 2009   June 2009   July 2009   August 2009   September 2009   October 2009   November 2009   December 2009   January 2010   February 2010   March 2010   April 2010   May 2010   June 2010   July 2010   August 2010   September 2010   October 2010   November 2010   December 2010   January 2011   February 2011   March 2011   April 2011   May 2011   June 2011   July 2011   August 2011   September 2011   October 2011   November 2011   December 2011   January 2012   February 2012   March 2012   April 2012   May 2012   June 2012   July 2012   August 2012   October 2012   November 2012   December 2012   January 2013   February 2013   March 2013   April 2013   May 2013   June 2013   July 2013   September 2013   October 2013   January 2014   March 2014   April 2014   May 2014   July 2014   August 2014   September 2014   October 2014   November 2014   December 2014   January 2015   February 2015   March 2015   April 2015   May 2015   June 2015   July 2015   August 2015   September 2015   January 2016   February 2016   March 2016   April 2016   May 2016   June 2016   July 2016   August 2016   September 2016   October 2016   November 2016   December 2016   January 2017   February 2017   April 2017   May 2017   June 2017   July 2017   August 2017   September 2017   October 2017   November 2017   December 2017   February 2018   March 2018   April 2018   May 2018   June 2018   July 2018   August 2018   September 2018   October 2018   November 2018   December 2018   January 2019   February 2019   March 2019   April 2019   May 2019   July 2019   August 2019   September 2019   October 2019   November 2019   December 2019   January 2020   February 2020   March 2020   April 2020   May 2020   July 2020   August 2020   September 2020   October 2020   December 2020   January 2021   April 2021   May 2021   July 2021   September 2021   March 2022   October 2022   November 2022   March 2023   April 2023   July 2023   September 2023   October 2023   November 2023   April 2024   May 2024   June 2024   August 2024   September 2024   October 2024   November 2024   December 2024  

This page is powered by Blogger. Isn't yours?