Sponsored Content
The Lounge What is on Your Mind? PI calculated by hand. If this doesn't blow your mind nothing will. Post 303014687 by jim mcnamara on Sunday 18th of March 2018 03:49:56 PM
Old 03-18-2018
Fixed the title. Nice topic!
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Create a calculated field from existing fields

I need to add an average field to a file. I can create it in an on-screen report and it does what I need using the awk command but I can't get it to create a new file with the additional field. Here's what I'm working with: file layout: id:lastname:firstname:grade1:grade2:grade3:grade4 I... (1 Reply)
Discussion started by: atchleykl
1 Replies

2. Shell Programming and Scripting

adding calculated column

Hi, My text file looks like this... I am not sure if it is tab separated or space separated. SHANTNU 101 12:40:00 AM 04:53:00 AM 219:40:00 04:23:00 AM 10 12:01:00 AM 296:18 1:55 test 342 12:53:00 AM 01:09:00 PM 144:43:00 07:44:00 AM 47 12:05:00 AM... (7 Replies)
Discussion started by: shantanuo
7 Replies

3. UNIX for Dummies Questions & Answers

awk calculated with amazing result

I don't the following why ?:confused: $ awk 'BEGIN{printf "%.40f\n",(0.33*3)}' 0.9899999999999999911182158029987476766109 $ awk 'BEGIN{printf "%.4f\n",(0.33*3)}' 0.9900 (0 Replies)
Discussion started by: saloman
0 Replies

4. UNIX for Advanced & Expert Users

awk calculated with amazing result

I don't the following why ?:confused: $ awk 'BEGIN{printf "%.40f\n",(0.33*3)}' 0.9899999999999999911182158029987476766109 $ awk 'BEGIN{printf "%.4f\n",(0.33*3)}' 0.9900 (0 Replies)
Discussion started by: saloman
0 Replies

5. Shell Programming and Scripting

Merge left hand strings mapping to different right hand strings

Hello, I am working on an Urdu to Hindi dictionary which has the following structure: a=b a=c n=d n=q and so on. i.e. Headword separated from gloss by a = I am giving below a live sample بتا=बता بتا=बित्ता بتا=बुत्ता بتان=बतान بتان=बितान بتانا=बिताना I need the following... (3 Replies)
Discussion started by: gimley
3 Replies

6. What is on Your Mind?

Something in my mind - what's your opinion ?

Dear Forum staff / Advisors / members , I am having something in my mind, about Linux / Unix possible Interview questions collections, I guess if I post them here,which might be useful for our members and for students, and in meantime we can discuss also about those questions, what's your... (4 Replies)
Discussion started by: Akshay Hegde
4 Replies

7. Shell Programming and Scripting

How to send mail at specific calculated time interval?

Hi All, I want to send an email if the time difference from previous mail sent is more than or equal to 30 mins. I have written below code and it's working fine. In this script I am storing previous mail sent time in txt file. Instead of storing in txt file how to store in a variable.... (8 Replies)
Discussion started by: nalu
8 Replies

8. UNIX for Beginners Questions & Answers

Bash script to get total size off of remainder calculated

I am working on a script to get the final total size and so far have the following and wondering if this can be improved. # Compare the desired size of each lvm to the standard size. If it is desired is larger than calculate the difference and keep that value as the amount to add to that LVM. ... (5 Replies)
Discussion started by: user3528
5 Replies
SWISS::CCs(3pm) 					User Contributed Perl Documentation					   SWISS::CCs(3pm)

Name
       SWISS::CCs

Description
       SWISS::CCs represents the CC lines within a Swiss-Prot or TrEMBL entry as specified in the user manual
	http://www.expasy.org/sprot/userman.html . The CCs object is a container object which holds a list comprised of object of the type
       SWISS::CC or derived classes (see below).

       Code example

       local $/="
//
";

       while (<>) {

	 my $entry = SWISS::Entry-> fromText($_);
	 my @CCs = $entry -> CCs -> elements();

	 for my $CC (@CCs) {

	   if ($CC -> topic eq 'ALTERNATIVE PRODUCTS') {

	     # now can call methods of CCalt_prod

	   } elsif ($CC -> topic eq 'Copyright') {

	     # now can call methods of CCcopyright

	   } else {

	     # now can call methods of CC
	   }
	 }
       }

Inherits from
       SWISS::ListBase.pm

Attributes
       "list"
	   Each list element is an object of one of the following classes, depending of the type of comment:

	    topic			    object
	    --------------------	    --------------------
	    ALTERNATIVE PRODUCTS	    SWISS::CCalt_prod
	    RNA EDITING 		    SWISS::CCrna_editing
	    BIOPHYSICOCHEMICAL PROPERTIES   SWISS::CCbpc_properties
	    INTERACTION 		    SWISS::CCinteraction
	    Copyright			    SWISS::CCcopyright
	    (all other topics)		    SWISS::CC

Methods
   Standard methods
       new
       fromText
       sort
	   Sort the CC block according to the order given in Swiss-Prot annotation note ANN017.

       toText
       update

   Reading/Writing methods
       ccTopic ($topic)
	   Returns true if entry contains a comment block with the specified topic.

       copyright
	   Returns a string representation of the copyright text.

       del (@patternList)
	   Deletes all comment elements whose topic matches the first element of the pattern list.  The second element is the used to specify a
	   requirement for the comment to match as well.

       get (@patternList)
	   An array is returned consisting of all comment elements elements whose topic matches any elements of the pattern list.

       getObject (@patternList)
	   Same as get, but returns the results wrapped in a new ListBase object.

       toString
	   Returns a string representation of the CCs object.

perl v5.10.1							    2008-07-16							   SWISS::CCs(3pm)
All times are GMT -4. The time now is 05:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy