Sponsored Content
Full Discussion: Simplified Code? Acceptable?
Top Forums UNIX for Beginners Questions & Answers Simplified Code? Acceptable? Post 303025838 by RudiC on Tuesday 13th of November 2018 06:29:38 AM
Old 11-13-2018
On first sight the "new" looks like being equivalent. Still you're running grep five times, and opening ${_FDMEE_LOG} seven times. It might be worthwhile to consider a small awk script.
 

10 More Discussions You Might Find Interesting

1. IP Networking

Acceptable collisions

Hi All I have a Sun V120 with eri0 NIC set to 10-Half connected to Fa0/0 on a Cisco 2600 (Fa0/0 also set to 10-Half). I am seeing collisions on this link (as expectd with a 10-Half connection) BUT, what is an acceptable rate of collisions for this type of link? FYI, the Sun box is showing... (2 Replies)
Discussion started by: bashdem
2 Replies

2. HP-UX

printer problem - 10.48.2.24 is NOT an acceptable name

HP-UX 10.20 with an HP LaserJet P2015dn. I've connected and configured the P2015 using its internal nic on our Win 2003 Server network. When trying to add it to UNIX thru sam, network based printer plotter --> add printer/plotter connected to hp jetdirect --> add printer to local spooler, I... (3 Replies)
Discussion started by: mtedeschi
3 Replies

3. Post Here to Contact Site Administrators and Moderators

Link to Amazon wishlist or similar, acceptable?

A guy contacted me a while back and wanted to compensate me for helping him with a question here in the forums. I never heard back from him, but I said I would create an Amazon wishlist and link to it from my profile. Only now do I realize that this is something the forum owners might have an... (2 Replies)
Discussion started by: era
2 Replies

4. Solaris

configure: error: no acceptable ld found in $PATH

When i configure apache(2.2.15) on solaris-8 server it producing following error <configure: error: no acceptable ld found in $PATH configure failed for srclib/apr > please help me any to fix this error. :confused: ---------- Post updated at 09:44 PM ---------- Previous update was... (0 Replies)
Discussion started by: kalpeer
0 Replies

5. Linux

Simplified find command to find multiple file types

Hi, I'm using the following command to find the multiple requierd file types and its working fine find . -name "*.pl" -o -name "*.pm" -o -name "*.sql" -o -name "*.so" -o -name "*.sh" -o -name "*.java" -o -name "*.class" -o -name "*.jar" -o -name "*.gz" -o -name "*.Z" -type f Though... (2 Replies)
Discussion started by: vickramshetty
2 Replies

6. Shell Programming and Scripting

Simplified awk script for if else statements

Hi, The below awk script that i did is working fine. It gives me the results that i want. But, the script is not smart and very long as i have 8 conditions to meet. The sample script below only show 2 conditions. awk 'BEGIN{FS=OFS=" ~ |\t"} {if (($7>$9) && ($6>$8)){ Ql= $7-$6; Sl=... (6 Replies)
Discussion started by: redse171
6 Replies

7. UNIX for Beginners Questions & Answers

Using exit in For Loop - Is this acceptable

Hi Folks - Here is a for loop I've created and I just wanted to see if this was okay practice: for M in NAME1 NAME1 NAME3 do echo "Executing MaxL:" $M >>${_LOGFILE} 2>&1 . ${_STARTMAXLPATH}startmaxl.sh ${_MAINPATH}${_MAXLPATH}$M.mxl _RC=$? if then ... (7 Replies)
Discussion started by: SIMMS7400
7 Replies

8. Shell Programming and Scripting

Simplified file conversion

Hi All, I have a file like below Topic:price PartitionCount:5 ReplicationFactor:3 Configs: Topic: price Partition: 0 Leader: 13 Replicas: 13,15,11 Isr: 11,13 Topic: price Partition: 1 Leader: 14 Replicas: 14,11,12 Isr: 11,12,14 ... (4 Replies)
Discussion started by: manas_ranjan
4 Replies

9. What is on Your Mind?

New Simplified Log Out for UNIX.COM

Hi, I changed the logout code to just simply log out and go back to the page you were viewing: Was (ending code): eval(standard_error(fetch_error('cookieclear', create_full_url($vbulletin->url), $vbulletin->options, $vbulletin->session->vars), '', false)); Now: $goto = "Location:... (0 Replies)
Discussion started by: Neo
0 Replies

10. What is on Your Mind?

Simplified Registration Page with nCaptcha

At Ravinder's request, I have simplified the new member registration page on both mobile and desktop: Mobile: https://www.unix.com/members/1-albums214-picture909.jpeg Desktop (big image): https://www.unix.com/members/1-albums215-picture907.png (2 Replies)
Discussion started by: Neo
2 Replies
QIntValidator(3qt)														QIntValidator(3qt)

NAME
QIntValidator - Validator which ensures that a string contains a valid integer within a specified range SYNOPSIS
#include <qvalidator.h> Inherits QValidator. Public Members QIntValidator ( QObject * parent, const char * name = 0 ) QIntValidator ( int minimum, int maximum, QObject * parent, const char * name = 0 ) ~QIntValidator () virtual QValidator::State validate ( QString & input, int & ) const void setBottom ( int ) void setTop ( int ) virtual void setRange ( int minimum, int maximum ) int bottom () const int top () const Properties int bottom - the validator's lowest acceptable value int top - the validator's highest acceptable value DESCRIPTION
The QIntValidator class provides a validator which ensures that a string contains a valid integer within a specified range. The validate() function returns Acceptable, Intermediate or Invalid. Acceptable means that the string is a valid integer within the specified range. Intermediate means that the string is a valid integer but is not within the specified range. Invalid means that the string is not a valid integer. Example of use: QIntValidator v( 0, 100, this ); QLineEdit* edit = new QLineEdit( this ); // the edit lineedit will only accept integers between 0 and 100 edit->setValidator( &v ); Below we present some examples of validators. In practice they would normally be associated with a widget as in the example above. QString s; QIntValidator v( 0, 100, this ); s = "10"; v.validate( s, 0 ); // returns Acceptable s = "35"; v.validate( s, 0 ); // returns Acceptable s = "105"; v.validate( s, 0 ); // returns Intermediate s = "-763"; v.validate( s, 0 ); // returns Invalid s = "abc"; v.validate( s, 0 ); // returns Invalid s = "12v"; v.validate( s, 0 ); // returns Invalid The minimum and maximum values are set in one call with setRange() or individually with setBottom() and setTop(). See also QDoubleValidator, QRegExpValidator, and Miscellaneous Classes. MEMBER FUNCTION DOCUMENTATION
QIntValidator::QIntValidator ( QObject * parent, const char * name = 0 ) Constructs a validator called name with parent parent, that accepts all integers. QIntValidator::QIntValidator ( int minimum, int maximum, QObject * parent, const char * name = 0 ) Constructs a validator called name with parent parent, that accepts integers from minimum to maximum inclusive. QIntValidator::~QIntValidator () Destroys the validator, freeing any resources allocated. int QIntValidator::bottom () const Returns the validator's lowest acceptable value. See the "bottom" property for details. void QIntValidator::setBottom ( int ) Sets the validator's lowest acceptable value. See the "bottom" property for details. void QIntValidator::setRange ( int minimum, int maximum ) [virtual] Sets the range of the validator to only accept integers between minimum and maximum inclusive. void QIntValidator::setTop ( int ) Sets the validator's highest acceptable value. See the "top" property for details. int QIntValidator::top () const Returns the validator's highest acceptable value. See the "top" property for details. QValidator::State QIntValidator::validate ( QString & input, int & ) const [virtual] Returns Acceptable if the input is an integer within the valid range, Intermediate if the input is an integer outside the valid range and Invalid if the input is not an integer. s = "35"; v.validate( s, 0 ); // returns Acceptable s = "105"; v.validate( s, 0 ); // returns Intermediate s = "abc"; v.validate( s, 0 ); // returns Invalid Reimplemented from QValidator. Property Documentation int bottom This property holds the validator's lowest acceptable value. Set this property's value with setBottom() and get this property's value with bottom(). See also setRange(). int top This property holds the validator's highest acceptable value. Set this property's value with setTop() and get this property's value with top(). See also setRange(). SEE ALSO
http://doc.trolltech.com/qintvalidator.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qintvalidator.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QIntValidator(3qt)
All times are GMT -4. The time now is 06:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy