Thanks to antville.org
Friday, 17. December 2010
InnoDB foreign key

There are 4 checks need to be performed while creating foreign keys.

1) Check if you are using InnoDB table type for both the tables.
2) Make sure that both the columns are indexed.
3) Make sure that the constraint name for e.g. "FK_batch_relation" is not used anywhere else. Or better, change the name to something else.
4) Make sure that the column type matches. For e.g. If one is INT then the parent column can not be varchar.

... Link (0 comments) ... Comment


Wednesday, 10. November 2010
Installing MySQL

Downloaded rpms from mysql.org

rpm -ivh MySQL-client-community-5.1.52-1.rhel5.x86_64.rpm MySQL-server-community-5.1.52-1.rhel5.x86_64.rpm

If you want to uninstall just give rpm –e package name.

... Link (0 comments) ... Comment


Read Private feeds

You can use "live bookmarks", the built-in RSS reader of Firefox to read private feeds.
To view Gmail messages in this manner, just subscribe to a new feed, enter https://mail.google.com/mail/feed/atom in the URL field, and submit your Gmail address and password.

... Link (0 comments) ... Comment


Sunday, 4. July 2010
concise wikipedia extension

https://addons.mozilla.org/en-us/firefox/addon/wikisearch-concise/

The user will select any word from the current webpage and choose "wikipedia Concise" on the right click. The selection will be submitted to the website mobile.wikipedia.org
For e.g. if I have selected the word "obama" and searched using "wikipedia description", I will be directed to the site that will show me a few lines about Barack Obama.

The URL is menioned in the url tag and that looks something like this.
mobile.wikipedia.org/transcode.php?go=obama

pretty easy, huh?

... Link (0 comments) ... Comment


Sunday, 13. June 2010
Improve InnoDB performance

innodb_flush_method=O_DIRECT
innodb_file_per_table
innodb-flush-log-at-trx-commit = 2

# number of cpus * number of disks * 2
#innodb_thread_concurrency=16
_____
Lowering the value of swappiness may help mysql

# default 60
echo '50' > /proc/sys/vm/swappiness

Make the change permanent:
/etc/sysctrl.conf
vm.swappiness = 50

# innodb basic settings
innodb_buffer_pool_size=1G
innodb_log_file_size=512M

# MyISAM only cnf setting
user=root
skip-innodb
default-storage-engine=myisam
bulk_insert_buffer_size=1G
key-buffer=1G

# increase default 2 GB on 32 bit OS
myisam_max_sort_file_size=40G
myisam_sort_buffer_size=512M

# make sure temp directory has sufficient space
# and mysql has permission to write
tmpdir=/

... Link (0 comments) ... Comment


Saturday, 12. June 2010
Brace Expansion

Brace expansion is used to generate arbitrary strings. For e.g.
ls mysql*.0000{1..3}

will list the files like mysql.00001 mysql.00002 & mysql.00003

This can also be used for something like this...

cp mysql.log{,.bak}
>> cp mysql.log mysql.log.bak

cp $da.log{.bak,}
>> cp 2010-05-28.log.bak 2010-05-28.log

... Link (0 comments) ... Comment


Thursday, 10. June 2010
Microsoft Mess

Microsoft mess is not a topic for me to blog anymore. But since someone whose blog I track has mentioned about it, let me link the article.

http://ma.tt/2010/06/windows-reboot/

The only advice is do not use Micro$oft products when better alternatives are available. The machine automatically boots when the security updates are installed silently! Another reason to use pirated software?

... Link (0 comments) ... Comment


Monday, 12. April 2010
mysql login

Instead of specifying password in mysql command line, I prefer storing it in ~/.my.cnf while doing such works to avoid typing passwords every time. you can create this file or supply password as you wish.

$ cat ~/.my.cnf
[client]
user=root
password="password"

... Link (0 comments) ... Comment


Tuesday, 6. April 2010
Saving files in VI

You can save the current file as a new file after making changes,
:w new_file.txt

If you want only 50 lines starting from line number 100, use...
:100,150w! new_file.txt

... Link (0 comments) ... Comment


Wednesday, 24. March 2010
User input in shell script

#!/bin/sh
unset REPLY
until [[ $REPLY ]]; do read -p "Enter your name: "
done
echo "welcome $REPLY"

... Link (0 comments) ... Comment


Online for 8601 days
Last modified: 12/29/25, 8:42 AM
Status
Youre not logged in ... Login
Menu
... Home
... Tags

Search
Calendar
March 2026
SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
22232425262728
293031
December
Recent updates
easyphone features for senior citizens
Auto Answer This service lets an authorised user listen discreetly...
by shantanuo (12/29/25, 8:42 AM)
install ubuntu GUI on EC2
instance #!/bin/bash set -e echo "===> Switching to text mode...
by shantanuo (11/27/25, 3:43 AM)
Extract words Extract all incorrect
words in first.txt file and all correct ones in second.txt...
by shantanuo (10/13/24, 10:18 AM)
Remove hyperlink in LO writer
1) Select "Internet Link" from Character styles. 2) Right click...
by shantanuo (10/9/24, 8:09 AM)
Templates in LO writer 1)
File > Templates > Save as Template 2) Give it...
by shantanuo (10/9/24, 8:07 AM)
discretize continuous features You can
"discretize" or "bin" continuous features into categorical features. from sklearn.preprocessing...
by shantanuo (4/24/24, 9:33 AM)
User Defined Property You
can create User Defined Property in libreoffice writer. File – Properties...
by shantanuo (1/9/23, 8:52 AM)
Arranging Chapters in the Navigator
To use a custom paragraph style for a heading, choose...
by shantanuo (1/4/23, 8:26 AM)
Use focus mode using Android
phones Settings > Digital Wellbeing and parental controls. Tap your...
by shantanuo (1/1/23, 3:59 AM)
Embed Fonts in document If
you use a font that the recipient is unlike to...
by shantanuo (12/18/22, 10:07 AM)
Using Navigator in Writer To
open the Navigator, select View > Navigator, or press the...
by shantanuo (12/18/22, 10:06 AM)
More about hyphenation The settings
for Tools > Options > Language Settings > Writing Aids...
by shantanuo (12/18/22, 10:04 AM)
link or unlink template If
you are using Libre office then template changer extension is...
by shantanuo (12/16/22, 5:27 AM)
Finding Styles you can select
Edit > Find and Replace > Other Options > Paragraph...
by shantanuo (12/14/22, 7:17 AM)
regex in clac In LibreOffice
Calc, you can use function REGEX for e.g. Begins with...
by shantanuo (12/14/22, 4:40 AM)
Libre Calc tips Turn Off
Grid Lines If you want to turn off grid lines...
by shantanuo (12/13/22, 8:14 AM)
More about Styles You can
goto View - Styles and change "All Styles" to "Applied...
by shantanuo (12/13/22, 7:49 AM)
Page Break Before Every Chapter
If your chapter titles are using the "Heading 2" Style:...
by shantanuo (12/13/22, 6:36 AM)
View and print in different
color Displaying Color in LO but Printing as White Page...
by shantanuo (12/13/22, 6:26 AM)
Change Normal Template in Libreoffice
Writer 1) Open a new file and set your font;...
by shantanuo (12/12/22, 8:45 AM)
Short english words in Devanagari
The list of short english words written in Devanagari. #...
by shantanuo (10/5/22, 9:05 AM)
Card issuing banks CITI
Standard Chartered HSBC American Express HDFC ICICI AXIS INDUS IND Kotak...
by shantanuo (7/16/22, 4:46 AM)
Activate IAM Access To activate
the Activate IAM Access setting, you must log in to...
by shantanuo (7/12/22, 5:52 AM)
use cheat instead of man
wget https://github.com/cheat/cheat/releases/download/4.2.3/cheat-linux-arm64.gz gunzip cheat-linux-arm64.gz chmod 770 cheat-linux-arm64 ./cheat-linux-arm64 mv cheat-linux-arm64...
by shantanuo (7/4/22, 8:53 AM)
python module itertools list of
useful methods of itertools module. permutations combinations combinations_with_replacement zip_longest count...
by shantanuo (9/8/21, 7:50 AM)

RSS feed

Made with Antville
Helma Object Publisher