03-01-2020
Optimization does not mean condensing several readable single commands into a less readable single line - which can be harder to maintain, say, in six months. When you have forgotten about it. And you have to come back for other changes - then you wonder what this 'optimized' code really does.
Crocodile indeed.
These 3 Users Gave Thanks to jim mcnamara For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
my $date_converted = UnixDate(ParseDate("3 days ago"),"%e/%h/%Y");
open FILE,">$ARGV";
while(<DATA>){
my @tab_delimited_array = split(/\t/,$_);
$tab_delimited_array =~ s/^\ =~ s/^\-//;
my $converted_date =... (2 Replies)
Discussion started by: sandy1028
2 Replies
2. Shell Programming and Scripting
Pl help to me to write the below code in a simple way ...
i suupose to use this code 3 to 4 places in my makefile(gnu) ..
****************************************
@for i in $(LIST_A); do \
for j in $(LIST_B); do\
if ;then\
echo "Need to sign"\
echo "List A = $$i , List B =$$j"\
... (2 Replies)
Discussion started by: pk_arun
2 Replies
3. Shell Programming and Scripting
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies
4. Shell Programming and Scripting
Hi,
My Oracle query is returing below o/p
----------------------------------------------------------
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies
5. Shell Programming and Scripting
Here is my code. What it does is it reads an input file (input.txt which contains roughly 2,000 search phrases) and searches a directory for files that contains the search phrase. The directory contains roughly 1900 files and 84 subdirectories. The output is a file (output.txt) that shows only the... (23 Replies)
Discussion started by: jl487
23 Replies
6. Shell Programming and Scripting
Hi All,
I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end.
Before:-
File Name:- File1.dat
102 121340560... (10 Replies)
Discussion started by: lancesunny
10 Replies
7. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies
9. Shell Programming and Scripting
Hi guys,
I feel a bit comfortable now doing bash scripting but I am worried that the way I do it is not optimized and I can do much better as to how I code.
e.g.
I have a whole line in a file from which I want to extract some values.
Right now what I am doing is :
STATE=`cat... (5 Replies)
Discussion started by: Junaid Subhani
5 Replies
10. Shell Programming and Scripting
sample data.file:
0,mfrh_green_screen,1454687485,383934,/PROD/G/cicsmrch/sys/unikixmain.log,37M,mfrh_green_screen,28961345,0,382962--383934
0,mfrh_green_screen,1454687785,386190,/PROD/G/cicsmrch/sys/unikixmain.log,37M,mfrh_green_screen,29139568,0,383934--386190... (7 Replies)
Discussion started by: SkySmart
7 Replies
LEARN ABOUT DEBIAN
goo::canvas::polylinemodel
Goo::Canvas::PolylineModel(3pm) User Contributed Perl Documentation Goo::Canvas::PolylineModel(3pm)
NAME
Goo::Canvas::PolylineModel - wrapper for GooCanvasPolylineModel
HIERARCHY
Glib::Object
+----Goo::Canvas::ItemModelSimple
+----Goo::Canvas::PolylineModel
INTERFACES
Goo::Canvas::ItemModel
METHODS
itemmodel = Goo::Canvas::PolylineModel->new ($parent, $close_path, $points, ...)
o $parent (Goo::Canvas::ItemModel)
o $close_path (boolean)
o $points (arrayref) The points is an array reference that contains a flat points coordinates. If you want create a polyline without
points, pass an empty array refer or undef.
o ... (list)
itemmodel = Goo::Canvas::PolylineModel->new_line ($parent, $x1, $y1, $x2, $y2, ...)
o $parent (Goo::Canvas::ItemModel)
o $x1 (double)
o $y1 (double)
o $x2 (double)
o $y2 (double)
o ... (list)
PROPERTIES
'arrow-length' (double : default 5 : readable / writable)
The length of the arrows, as a multiple of the line width
'arrow-tip-length' (double : default 4 : readable / writable)
The length of the arrow tip, as a multiple of the line width
'arrow-width' (double : default 4 : readable / writable)
The width of the arrows, as a multiple of the line width
'close-path' (boolean : default false : readable / writable)
If the last point should be connected to the first
'end-arrow' (boolean : default false : readable / writable)
If an arrow should be displayed at the end of the polyline
'height' (double : default 0 : readable / writable)
The height of the polyline
'points' (Goo::Canvas::Points : default undef : readable / writable)
The array of points
'start-arrow' (boolean : default false : readable / writable)
If an arrow should be displayed at the start of the polyline
'width' (double : default 0 : readable / writable)
The width of the polyline
'x' (double : default 0 : readable / writable)
The x coordinate of the left-most point of the polyline
'y' (double : default 0 : readable / writable)
The y coordinate of the top-most point of the polyline
SEE ALSO
Glib::Object, Goo::Canvas::ItemModelSimple
COPYRIGHT
Copyright (C) 2011 Gtk2-Perl Team
perl v5.14.2 2011-11-16 Goo::Canvas::PolylineModel(3pm)