08-23-2011
here you can see all about the
DBI
This User Gave Thanks to itkamaraj For This Post:
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wnat to assign a set of values to a variable
and
use it in if condition.
for example:
i=$1
d=1 2 3 4 5 6
if
then
echo "Fine"
else
echo "Check"
fi
i will either of the value in d, i.e. i can be 1 or 2 or any value in d, How this can be done?
Thanks in advance (2 Replies)
Discussion started by: sol_nov
2 Replies
2. Shell Programming and Scripting
I have an two arrays. One array BINDIST consists of fences. I have another array XOFFS.
Eg
BINDIST = 0 10 20 30 40 50 60
XOFFS = 2 3 4 23 25 28 55 58
I want to find to find the indices of values in XOFFS that are closest to each BINDIST.
My idea is to do as follows
I create array... (7 Replies)
Discussion started by: kristinu
7 Replies
3. Programming
Hi,
I'm trying to set two OID's in the same PDU (so both OIDs and values are sent in the same packet) at present I am only able to send one at a time which does not trigger the hardware response as the two specific OID's need to be set simultaneously in order to work.
I'm using perl along... (0 Replies)
Discussion started by: MCLASS
0 Replies
4. UNIX for Dummies Questions & Answers
Hello.
In csh if I declared a variable to be a set of arguments can I retrieve a particular element from that set.
My code
set files=(`ls`)
and I want to get only one file from $files. How can I do that????(It is just an abstract example):wall:
Thanks in advance :) (5 Replies)
Discussion started by: FUTURE_EINSTEIN
5 Replies
5. Shell Programming and Scripting
I am new to ksh scripting, specially array. How do i get values from an array and set the value as variable and pass those variables to the different functions??
someone taught me how to get input from a file with have columns i need to read, but now i doesnt know how to set those value to be a... (7 Replies)
Discussion started by: gavin_L
7 Replies
6. Shell Programming and Scripting
Hi everyone,
This is an exemple of inpout.txt file (a "," delimited text file which can be open as csv file):
ID, Code, Value, Store SP|01, AABBCDE, 15, 3 SP|01, AABBCDE, 14, 2 SP|01, AABBCDF, 13, 2 SP|01, AABBCDE, 16, 3 SP|02, AABBCED, 15, 2 SP|01, AABBCDF, 12, 3 SP|01, AABBCDD,... (1 Reply)
Discussion started by: jeremy589
1 Replies
7. Shell Programming and Scripting
Can some one please help me with the syntax in shell script for the below :
if $var1 exists in ('val1','val2','val3')
I want to execute a set of commands if the value of var1 variable matches any one of the given string values. Please let me know if there are any other option to go by.
... (10 Replies)
Discussion started by: Pandee
10 Replies
8. UNIX for Beginners Questions & Answers
Hello,
I am writing a script which expects as its input a hash with student names as the keys and marks as the values. The script then returns array of average marks for student scored 60-70, 70-80, and over 90.
Output expected
50-70 1
70-90 3
over 90 0
The test script so far... (4 Replies)
Discussion started by: nans
4 Replies
LEARN ABOUT DEBIAN
dbix::fulltextsearch::stoplist
DBIx::FullTextSearch::StopList(3pm) User Contributed Perl Documentation DBIx::FullTextSearch::StopList(3pm)
NAME
DBIx::FullTextSearch::StopList - Stopwords for DBIx::FullTextSearch
SYNOPSIS
use DBIx::FullTextSearch::StopList;
# connect to database (regular DBI)
my $dbh = DBI->connect('dbi:mysql:database', 'user', 'passwd');
# create a new empty stop word list
my $sl1 = DBIx::FullTextSearch::StopList->create_empty($dbh, 'sl_web_1');
# or create a new one with default stop words
my $sl2 = DBIx::FullTextSearch::StopList->create_default($dbh, 'sl_web_2', 'english');
# or open an existing one
my $sl3 = DBIx::FullTextSearch::StopList->open($dbh, 'sl_web_3');
# add stop words
$sl1->add_stop_word(['a','in','on','the']);
# remove stop words
$sl2->remove_stop_word(['be','because','been','but','by']);
# check if word is in stoplist
$bool = $sl1->is_stop_word('in');
# empty stop words
$sl3->empty;
# drop stop word table
$sl2->drop;
DESCRIPTION
DBIx::FullTextSearch::StopList provides stop lists that can be used -DBIx::FullTextSearch. StopList objects can be reused accross several
FullTextSearch objects.
METHODS
CONSTRUCTERS
create_empty
my $sl = DBIx::FullTextSearch::StopList->create_empty($dbh, $sl_name);
This class method creates a new StopList object.
create_default
my $sl = DBIx::FullTextSearch::StopList->create_default($dbh, $sl_name, $language);
This class method creates a new StopList object, with default words loaded in for the given language. Supported languages include
Czech, Danish, Dutch, English, Finnish, French, German, Italian, Portuguese, Spanish, and Swedish.
open
my $sl = DBIx::FullTextSearch::StopList->open($dbh, $sl_name);
Opens and returns StopList object
OBJECT METHODS
add_stop_word
$sl->add_stop_word(@stop_words);
Adds stop words to StopList object. Expects array reference as argument.
remove_stop_word
$sl->remove_stop_word(@stop_words);
Remove stop words from StopList object.
is_stop_word
$bool = $sl->is_stop_word($stop_word);
Returns true iff stop_word is StopList object
empty
$sl->empty;
Removes all stop words in StopList object.
drop
$sl->drop;
Removes table associated with the StopList object.
AUTHOR
T.J. Mather, tjmather@tjmather.com, http://www.tjmather.com/
COPYRIGHT
All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
DBIx::FullTextSearch
perl v5.8.8 2007-10-23 DBIx::FullTextSearch::StopList(3pm)