Sponsored Content
Full Discussion: Cargo cult programming...
The Lounge What is on Your Mind? Cargo cult programming... Post 302818511 by jgt on Friday 7th of June 2013 03:45:58 PM
Old 06-07-2013
All the time. Sometimes you have to learn a new language just for one job. I had never heard of that expression in forty years of programming by the way.
 

10 More Discussions You Might Find Interesting

1. Programming

c programming on vi

i am new in linux environment .I have used vi editor of Unix to get a programe compiled through "gcc ".kindly give me the options to get a program compiled & executed written in c on vi editor. I want the command to compile a file and the command to get that compiled file executed with any... (2 Replies)
Discussion started by: Rajraius
2 Replies

2. Programming

c programming or unix programming!?

i would like advice on the usbject of c programming (in the middle of reading a book on C). could i benefit more if i apply that knowledge in the unix format if i were able to, or would that take the point out of learning C, basically I want to stay away from strying too far away from unix and use... (1 Reply)
Discussion started by: moxxx68
1 Replies

3. Shell Programming and Scripting

Unix Systems Programming Vs Unix Programming

Several months ago I found a link that explained the difference between how a Unix Systems Admin would do scripting compared to what a Unix Programmer would do. It showed a basic script and then show several iterations that explained how the Systems Admin would change it to make it better. I was... (0 Replies)
Discussion started by: BCarlson
0 Replies

4. Programming

C++ programming

Sorry to ask this question here... where can I find a C++ programming thread? Thanks guys! (7 Replies)
Discussion started by: nadiamihu
7 Replies

5. UNIX for Dummies Questions & Answers

Carreer:Networking Programming in Unix (C programming Language)

Hello, I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
Discussion started by: vibhory2j
5 Replies

6. Programming

C Programming - Hardware Programming

Can someone help me on suggesting some ways to access the memory content in RAM directly from C/C++ source code. Please provide me any book name or any URL so that I can get an exhaustive knowledge over it. If possible please give me some tips on interacting with hardwares directly through... (3 Replies)
Discussion started by: nandumishra
3 Replies

7. Shell Programming and Scripting

Sh programming

I have started writing one script. It is not taking the if block. Here is the script: #!/bin/sh set USER='/usr/ucb/whoami' ####################################################################### #Killing Process #######################################################################... (6 Replies)
Discussion started by: amarpreetka
6 Replies

8. Programming

Help with C programming

for a question like this Assume you have a server with two clients and two child processes. The server retrieves data from the children through a pipe (one each) and writes data to the clients through a socket (one each). child1 produces data for client1, and child2 for client2. Write a C... (4 Replies)
Discussion started by: omega666
4 Replies

9. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

10. UNIX for Dummies Questions & Answers

From iOS programming to Linux system programming

Hello. I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations: 1. Linux and iOS are UNIX-like systems, POSIX compliant. 2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies
OpenGuides::Search(3pm) 				User Contributed Perl Documentation				   OpenGuides::Search(3pm)

NAME
OpenGuides::Search - Search form generation and processing for OpenGuides. DESCRIPTION
Does search stuff for OpenGuides. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers. SYNOPSIS
use CGI; use OpenGuides::Config; use OpenGuides::Search; my $config = OpenGuides::Config->new( file => "wiki.conf" ); my $search = OpenGuides::Search->new( config => $config ); my %vars = CGI::Vars(); $search->run( vars => \%vars ); METHODS
new my $config = OpenGuides::Config->new( file => "wiki.conf" ); my $search = OpenGuides::Search->new( config => $config ); wiki my $wiki = $search->wiki; An accessor; returns the underlying Wiki::Toolkit object. config my $config = $search->config; An accessor; returns the underlying OpenGuides::Config object. run my %vars = CGI::Vars(); $search->run( vars => \%vars, return_output => 1, # defaults to 0 return_tt_vars => 1, # defaults to 0 ); The "return_output" parameter is optional. If supplied and true, the stuff that would normally be printed to STDOUT will be returned as a string instead. The "return_tt_vars" parameter is also optional. If supplied and true, the template is not processed and the variables that would have been passed to it are returned as a hash. This parameter takes precedence over "return_output". These two parameters exist to make testing easier; you probably don't want to use them in production. You can also request just the raw search results: my %results = $search->run( os_x => 528864, os_y => 180797, os_dist => 750, format => "raw", ); Results are returned as a hash, keyed on the page name. All results are returned, not just the first "page". The values in the hash are hashes themselves, with the following key/value pairs: o name o wgs84_lat - WGS-84 latitude o wgs84_long - WGS-84 longitude o summary o distance - distance (in metres) from origin, if origin exists o score - relevance to search string, if search string exists; higher score means more relevance In case you're struggling to follow the code, it does the following: 1) Processes the parameters, and bails out if it hit a problem with them 2) If a search string was given, do a text search 3) If distance search paramaters were given, do a distance search 4) If no search has occured, print out the search form 5) If an error occured, bail out 6) If we got a single hit on a string search, redirect to it 7) If no results were found, give an empty search results page 8) Sort the results by either score or distance 9) Decide which results to show, based on paging 10) Display the appropriate page of the results INPUT
word a single word will be matched as-is. For example, a search on escalator will return all pages containing the word "escalator". AND searches A list of words with no punctuation will be ANDed, for example: restaurant vegetarian will return all pages containing both the word "restaurant" and the word "vegetarian". OR searches A list of words separated by commas (and optional spaces) will be ORed, for example: restaurant, cafe will return all pages containing either the word "restaurant" or the word "cafe". phrase searches Enclose phrases in double quotes, for example: "meat pie" will return all pages that contain the exact phrase "meat pie" - not pages that only contain, for example, "apple pie and meat sausage". SEARCHING BY DISTANCE
To perform a distance search, you need to supply one of the following sets of criteria to specify the distance to search within, and the origin (centre) of the search: os_dist, os_x, and os_y Only works if you chose to use British National Grid in wiki.conf osie_dist, osie_x, and osie_y Only works if you chose to use Irish National Grid in wiki.conf latlong_dist, latitude, and longitude Should always work, but has a habit of "finding" things a couple of metres away from themselves. You can perform both pure distance searches and distance searches in combination with text searches. OUTPUT
Results will be put into some form of relevance ordering. These are the rules we have tests for so far (and hence the only rules that can be relied on): o A match on page title will score higher than a match on page category or locale. o A match on page category or locale will score higher than a match on page content. o Two matches in the title beats one match in the title and one in the content. AUTHOR
The OpenGuides Project (openguides-dev@lists.openguides.org) COPYRIGHT
Copyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
OpenGuides perl v5.14.2 2013-01-11 OpenGuides::Search(3pm)
All times are GMT -4. The time now is 02:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy