Search Results

Search: Posts Made By: durden_tyler
1,826
Posted By durden_tyler
Using Perl only for determining line counts just...
Using Perl only for determining line counts just does not seem to be an efficient way of doing things.
You will have more points of failure in your script. Also, more code means more to...
6,378
Posted By durden_tyler
I am not familiar with scl but by looking at the...
I am not familiar with scl but by looking at the "QuickStart" page of the "softwarecollections.org" website, it might be mandatory to specify "bash" at the end of that "scl" command(?)


scl...
Forum: Programming 01-03-2019
2,679
Posted By durden_tyler
First of all - thank you very much for providing...
First of all - thank you very much for providing the CREATE TABLE and INSERT statements. Those really help!
If you have MySQL version < 8.0.2, then you could find the previous level by joining the...
3,185
Posted By durden_tyler
That's because you are using a regular expression...
That's because you are using a regular expression for FS that works differently than you (probably) think it does.
This part:[^,]* matches "0 or more occurrences of a character other than comma"....
4,069
Posted By durden_tyler
A very un-awk-like and more Perl-like script. :) ...
A very un-awk-like and more Perl-like script. :)

I added the sort routine because array iteration doesn't return the elements in order.
(Definitely not a good idea for large arrays.)

Note that...
3,323
Posted By durden_tyler
If Perl is an option, then here's a sample...
If Perl is an option, then here's a sample program:



$
$ cat -n process_files.pl
1 #!/usr/bin/perl
2 use strict;
3
4 # Set the file names
5 my $search_file =...
Forum: Programming 06-27-2016
8,143
Posted By durden_tyler
Over the weekend, I was able to install a very...
Over the weekend, I was able to install a very basic free, developer's edition of SAP Sybase ASE 16.0 on my Debian 8 OS.
The SQL implementation is quite primitive compared to those by the big boys....
Forum: Programming 08-27-2018
1,140
Posted By durden_tyler
Not sure if I understood the "o/p values are...
Not sure if I understood the "o/p values are dynamic" part, but see if this helps:


SQL>
SQL> SELECT * FROM mytable;

A B STATUS
---------- ---------- ----------
Insert ...
Forum: Programming 08-27-2018
2,033
Posted By durden_tyler
What you want are the "rank()" or "dense_rank()"...
What you want are the "rank()" or "dense_rank()" analytic functions.
They could be referred to as "window functions" or "OLAP functions" in DB2 and some of them are available in DB2 9.7 at least....
1,797
Posted By durden_tyler
It's actually working correctly. The !~...
It's actually working correctly.
The !~ operator returns true if the pattern match fails.
The =~ operator returns true if the pattern match succeeds.

You may want to take note that the !...
Forum: Programming 05-05-2018
58,698
Posted By durden_tyler
The following was tested on DB2 Express-C Version...
The following was tested on DB2 Express-C Version 11.1 on a Centos 7 Virtual Machine.


[db2inst1@r2d2-centos7 data]$
[db2inst1@r2d2-centos7 data]$ cat -n dec2bin.sql
1 --
2 ...
1,247
Posted By durden_tyler
Upon searching about this topic in the Internet,...
Upon searching about this topic in the Internet, I found that the "read" command may be unable to read a line that is not terminated by a newline.
However, I could not test it in my Cygwin Bash on...
2,145
Posted By durden_tyler
One way to do it would be to keep appending and...
One way to do it would be to keep appending and "building" two different strings - one for all users and the other for all user role assignments inside the while loop.
Once you're done with the...
9,682
Posted By durden_tyler
Here's a Perl solution for the type of data you...
Here's a Perl solution for the type of data you posted:


$
$ cat diagmtx.txt
"244901_AT" 1.000 0.234 0.435 0.123 0.012 0.102 0.325 0.412 0.087 0.098
"243903_AT" 1.000 0.111 0.412 0.115 0.058...
2,593
Posted By durden_tyler
Yes, from your other Perl related posts, I do get...
Yes, from your other Perl related posts, I do get the impression that you are trying to use the regexes for too many things. That should be avoided.
However, for this particular piece of code, I...
7,845
Posted By durden_tyler
In a Perl program, you'd accept the input log...
In a Perl program, you'd accept the input log file name (if so desired), open it, loop/process through it and then close it.
Here's a short program called "process_log.pl".
Hopefully the inline...
5,751
Posted By durden_tyler
The Perl script will not work either because the...
The Perl script will not work either because the numeric part of the header columns moved to the left of the underscore ("_") instead of the right.

So, the index to compare after the "split"...
2,796
Posted By durden_tyler
Add an "order by" clause to your query and that...
Add an "order by" clause to your query and that should sort the data the way you want.
4,149
Posted By durden_tyler
Thank you for testing it for various inputs and...
Thank you for testing it for various inputs and posting the Perl version.
I could not find a working Perl 5.10 version to test it, so am unable to reproduce the bug.
However, after searching on...
2,593
Posted By durden_tyler
That's wrong! The regex looks for "a non-digit...
That's wrong!
The regex looks for "a non-digit followed by one or more digits" ("\D\d+").
Line numbers 2 and 3 do not have that, so it will not match.
Line number 4 has that, so it will match.

...
7,155
Posted By durden_tyler
It's a "metacharacter" or a "shorthand character...
It's a "metacharacter" or a "shorthand character class" in a regular expression.
Any book, blog or webpage on regular expressions should mention it.

Here's the Wikipedia page on regular...
7,155
Posted By durden_tyler
If you are using Vim (as per your 1st post...
If you are using Vim (as per your 1st post above), then Vim understands "\s" for whitespace. At least Vim versions 7 and higher.

Try:


:g/^\s*#/d
To check the version of your Vim editor, type...
1,695
Posted By durden_tyler
This line: char_to_ix = { ch:i for i,ch in...
This line:

char_to_ix = { ch:i for i,ch in enumerate(chars) }
creates a Dictionary called "char_to_ix" that has for its keys, each character from the list "chars". The corresponding values are...
5,852
Posted By durden_tyler
You may want to check a few things: 1) Are...
You may want to check a few things:

1) Are you connecting to the correct schema ("darwin_ext")?
2) Will the schema "darwin_ext" own the procedure "prc_synonym"?
3) Did you check that the...
2,006
Posted By durden_tyler
Please mention the Python version you're using. ...
Please mention the Python version you're using.
Since the difference between your two programs is the "input()" function, it should be clear that the "input()" function is the problem.

From your...
Showing results 1 to 25 of 358

 
All times are GMT -4. The time now is 05:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy