Search Results

Showing results 1 to 25 of 25
Search took 0.01 seconds.
Search: Posts Made By: axn
Forum: Java 31 Days Ago
Replies: 1
Views: 278
Posted By axn
How do I reinitialize array to null or zero when reprompted to renter data. Tried this but still computes average for previous entry.
Student[] students1 = new Student[studentCount];

here is a...
Forum: Java Oct 25th, 2009
Replies: 2
Views: 194
Posted By axn
java float example

float f1 = 5.5f;
float f2 = 5.4f;

how would you initialize a static float without using the wrapper class?

static float f1 = 5.5f

would that be correct?
Forum: Perl Oct 13th, 2009
Replies: 2
Views: 847
Posted By axn
got it to work. I had to full path it within the perl script. Below is the syntax

exec("/path/to/script/abcd");

i figured since both the perl and ksh were in the same directory it should run!!...
Forum: Perl Oct 12th, 2009
Replies: 2
Views: 847
Posted By axn
I am migrating scripts from UNIX server to a Linux. In the perl script it calls rcp to transfer files. It worked ok in UNIX but not in Linux, which has scp, I dont want to do scp now as this is a...
Forum: Java Oct 12th, 2009
Replies: 1
Views: 218
Posted By axn
how do i increment the category book? eventually i will display it in summary
***************
Summary
Books 3.


public class ProductDB
{
public static String[] inventory = {" java",...
Forum: Java Oct 12th, 2009
Replies: 3
Views: 363
Posted By axn
thanks. i declared inventory as a static variable.
Forum: Java Oct 11th, 2009
Replies: 3
Views: 363
Posted By axn
getting error when compiling.
"java:60: non-static variable inventory cannot be referenced from a static context for (String show : ProductDB.inventory)"

the showCodes class has to public static...
Forum: Shell Scripting Jul 8th, 2009
Replies: 1
Views: 502
Posted By axn
while getopts htn: OPTION
do
case ${OPTION} in
t) LIST='john mike smith' ;;
n) LIST='rob peter joe' ;;
h|*) show_usage
...
Forum: *nix Software May 26th, 2009
Replies: 2
Solved: unix PS1
Views: 872
Posted By axn
Ok much thanks, i got the idea for K-shell
Forum: *nix Software May 20th, 2009
Replies: 2
Solved: unix PS1
Views: 872
Posted By axn
I have setup in .profile my login prompt as:
PS1='${HOSTNAME}/${PWD}>

how do I get the prompt to highlight so everytime i log in i see
whatever i set my PS1 to highlighted.?
Forum: Python Jan 8th, 2009
Replies: 3
Views: 1,861
Posted By axn
def zippy(path):
for root, dirs, files in os.walk(path, topdown=True):
for file in files:
file_path = os.path.join(root, file)
fh = commands.getoutput('/usr/bin/bzip2 %...
Forum: Python Jan 8th, 2009
Replies: 3
Views: 1,861
Posted By axn
python script reading config file and then zipping files after X days from directories. dir contains dynamic files. i have specified the extension and the "startswith" in the config. problem i have...
Forum: Python Nov 29th, 2008
Replies: 5
Views: 701
Posted By axn
import os, time, sys, ConfigParser, zlib, zipfile

def zip_fh(path):
zipp = zipfile.ZipFile('%s.zip' % (path), 'w')
for root, dirs, files in os.walk(path, topdown=True):
for file...
Forum: Python Nov 29th, 2008
Replies: 5
Views: 701
Posted By axn
need to read the config file and then zip files in path. dont get any errors but files not zipping

# config file
[clean1]
path = C:/Project/Log1
action=zip

[clean2]
path = C:/Project/Log2...
Forum: Shell Scripting Nov 13th, 2008
Replies: 1
Views: 839
Posted By axn
trying to diff new files in a dir

cd ${PWD}
for line in $(ls *.new)
do
# lists all new files and then 2nd variable strips the .new extension of the files
echo...
Forum: Python Nov 5th, 2008
Replies: 2
Views: 1,286
Posted By axn
Forum: Python Nov 4th, 2008
Replies: 2
Views: 1,286
Posted By axn
>>> line = '2008-10-27 12:05:54...........
>>> time = line.split(' ')[1].split('.')[0]
>>> print time
12:05:54

i would like to add 45 or so minutes to the time i am parsing from a line
i have...
Forum: Python Jul 23rd, 2008
Replies: 2
Views: 3,192
Posted By axn
i have a python script and would like to know how to email the output of the script in python.
i can do it from the command line(kshell) with in *nix but would like something like this in the...
Forum: Shell Scripting Jun 19th, 2008
Replies: 2
Views: 1,114
Posted By axn
display output on one line. this is a exerpt from my kshell script

cat <filename> |egrep -v Pattern1|egrep -v Pattern2|egrep -v Pattern3 |egrep -v Pattern3
which displays
Name=john, Age=24,...
Forum: Python May 21st, 2008
Replies: 1
Views: 493
Posted By axn
i can write to the file with no issues, but cant read. i have defined the file to append so as not to overwrite data. then i write to it

log_file.writelines(lines)
but the reading wont work??...
Forum: Python Jan 4th, 2008
Replies: 3
Views: 1,930
Posted By axn
here is the snippet

data = ''2007-12-31 Name (mike) Age (34).....'
gregorian = time.strftime(data.split(" ")[0])
print gregorian
this gives me "2007-12-31"

i need to convert the gregorian...
Forum: Python Oct 29th, 2007
Replies: 2
Views: 3,255
Posted By axn
thanks folks but i unfused my brain and figured it out.

output = line.replace("|"," ")
print output.split()
Forum: Python Oct 29th, 2007
Replies: 2
Views: 3,255
Posted By axn
excuse my ignorance, cant find it here in the forum. how do i strip the "|" or the pipe character from a line. i tried this. it splits but doesnt remove the "|" character.

output = string.strip...
Forum: Python Sep 22nd, 2007
Replies: 4
Views: 3,014
Posted By axn
contents of dictionary should have first name, last name, age and so on as the keys.
if i find john in the file populate that in the dict. as the value for first name. find his age and do the same....
Forum: Python Sep 21st, 2007
Replies: 4
Views: 3,014
Posted By axn
i know how to create a dictionary but how do i search for a pattern in a file and then create a dictionary based on the search
Showing results 1 to 25 of 25

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC